diff --git a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialAutoConfiguration.java b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialAutoConfiguration.java index 19b39d8fb..1ccb81aca 100644 --- a/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialAutoConfiguration.java +++ b/ruoyi-common/ruoyi-common-social/src/main/java/org/dromara/common/social/config/SocialAutoConfiguration.java @@ -15,6 +15,11 @@ import org.springframework.context.annotation.Bean; @EnableConfigurationProperties(SocialProperties.class) public class SocialAutoConfiguration { + + public SocialAutoConfiguration() { + System.out.println("[AutoConfiguration] |- SDK 自动装配启动"); + } + @Bean public AuthStateCache authStateCache() { return new AuthRedisStateCache(); diff --git a/ruoyi-common/ruoyi-common-tenant/pom.xml b/ruoyi-common/ruoyi-common-tenant/pom.xml index 8e1a6ab1e..c741afe98 100644 --- a/ruoyi-common/ruoyi-common-tenant/pom.xml +++ b/ruoyi-common/ruoyi-common-tenant/pom.xml @@ -27,6 +27,10 @@ ruoyi-common-redis + + cn.dev33 + sa-token-core + diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/LoginHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/LoginHelper.java new file mode 100644 index 000000000..53cb01afc --- /dev/null +++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/LoginHelper.java @@ -0,0 +1,67 @@ +package org.dromara.common.tenant.helper; + +import cn.dev33.satoken.session.SaSession; +import cn.dev33.satoken.stp.SaLoginModel; +import cn.dev33.satoken.stp.StpUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.convert.Convert; +import cn.hutool.core.util.ObjectUtil; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.dromara.common.core.constant.TenantConstants; +import org.dromara.common.core.constant.UserConstants; +import org.dromara.common.core.domain.model.LoginUser; +import org.dromara.common.core.enums.UserType; + +import java.util.Set; + +/** + * 登录鉴权助手 + *

+ * user_type 为 用户类型 同一个用户表 可以有多种用户类型 例如 pc,app + * deivce 为 设备类型 同一个用户类型 可以有 多种设备类型 例如 web,ios + * 可以组成 用户类型与设备类型多对多的 权限灵活控制 + *

+ * 多用户体系 针对 多种用户类型 但权限控制不一致 + * 可以组成 多用户类型表与多设备类型 分别控制权限 + * + * @author Lion Li + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class LoginHelper { + public static final String TENANT_KEY = "tenantId"; + public static final String USER_KEY = "userId"; + + public static final String CLIENT_KEY = "clientid"; + + + /** + * 获取用户id + */ + public static Long getUserId() { + return Convert.toLong(getExtra(USER_KEY)); + } + + /** + * 获取租户ID + */ + public static String getTenantId() { + return Convert.toStr(getExtra(TENANT_KEY)); + } + + /** + * 获取当前 Token 的扩展信息 + * + * @param key 键值 + * @return 对应的扩展数据 + */ + private static Object getExtra(String key) { + try { + return StpUtil.getExtra(key); + } catch (Exception e) { + return null; + } + } + + +} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java index b18561267..fa986fa19 100644 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java +++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/org/dromara/common/tenant/helper/TenantHelper.java @@ -14,7 +14,6 @@ import org.dromara.common.core.utils.SpringUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.reflect.ReflectUtils; import org.dromara.common.redis.utils.RedisUtils; -import org.dromara.common.satoken.utils.LoginHelper; import java.util.Stack; import java.util.function.Supplier; diff --git a/ruoyi-site/ruoyi-gateway/Dockerfile b/ruoyi-site/ruoyi-gateway/Dockerfile index 728985672..de8673b4f 100644 --- a/ruoyi-site/ruoyi-gateway/Dockerfile +++ b/ruoyi-site/ruoyi-gateway/Dockerfile @@ -3,7 +3,7 @@ FROM bellsoft/liberica-openjdk-debian:17.0.11-cds #FROM bellsoft/liberica-openjdk-debian:21.0.3-cds #FROM findepi/graalvm:java17-native -LABEL maintainer="Lion Li" +LABEL maintainer="lizhw" RUN mkdir -p /ruoyi/gateway/logs \ /ruoyi/gateway/temp \ @@ -11,7 +11,7 @@ RUN mkdir -p /ruoyi/gateway/logs \ WORKDIR /ruoyi/gateway -ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" +ENV SERVER_PORT=18000 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" EXPOSE ${SERVER_PORT} diff --git a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/filter/AuthFilter.java b/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/filter/AuthFilter.java index 06591704f..d4a259ad3 100644 --- a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/filter/AuthFilter.java +++ b/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/filter/AuthFilter.java @@ -34,11 +34,12 @@ public class AuthFilter { .addInclude("/**") .addExclude("/actuator", "/actuator/**") .addExclude("/favicon.ico", "/sso/getSsoAuthUrl", "/sso/isLogin", "/sso/doLoginByTicket") + .addExclude(ignoreWhite.getWhites().toArray(new String[0])) // 鉴权方法:每次访问进入 .setAuth(obj -> { // 登录校验 -- 拦截所有路由 SaRouter.match("/**") - .notMatch(ignoreWhite.getWhites()) +// .notMatch(ignoreWhite.getWhites()) .check(r -> { ServerHttpRequest request = SaReactorSyncHolder.getContext().getRequest(); // 检查是否登录 是否有token diff --git a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/SsoController.java b/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/SsoController.java index b67e2376e..103285f08 100644 --- a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/SsoController.java +++ b/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/SsoController.java @@ -9,6 +9,7 @@ import cn.dev33.satoken.stp.StpUtil; import cn.dev33.satoken.util.SaFoxUtil; import cn.dev33.satoken.util.SaResult; import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -72,8 +73,8 @@ public class SsoController { clientLoginUrl = joinParam(clientLoginUrl, paramName.back, back); } - // 返回 - return joinParam(serverUrl, paramName.redirect, clientLoginUrl); + // 返回 ticket + return joinParam(serverUrl, paramName.redirect, SaFoxUtil.encodeUrl(clientLoginUrl)); } /** @@ -119,4 +120,12 @@ public class SsoController { return SaSsoClientProcessor.instance.dister(); } + + @GetMapping("/sso/getUserInfo") + public SaResult getUserInfo() { + //TODO 后续改成统一从指定用户服务取,用户应该通一接口 + return SaResult.data(StpUtil.getTokenSession().get("loginUser")); + } + + } diff --git a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/UserController.java b/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/UserController.java deleted file mode 100644 index 013b7b5d9..000000000 --- a/ruoyi-site/ruoyi-gateway/src/main/java/org/dromara/gateway/sso/UserController.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.dromara.gateway.sso; - -import cn.dev33.satoken.stp.StpUtil; -import cn.dev33.satoken.util.SaResult; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class UserController { - - @GetMapping("/user/getUserInfo") - public SaResult getUserInfo() { - //TODO 后续改成统一从指定用户服务取,用户应该通一接口 - return SaResult.data(StpUtil.getTokenSession().get("loginUser")); - } - - -} diff --git a/ruoyi-site/ruoyi-gateway/src/main/resources/application-dev.yml b/ruoyi-site/ruoyi-gateway/src/main/resources/application-dev.yml new file mode 100644 index 000000000..6bd1569b2 --- /dev/null +++ b/ruoyi-site/ruoyi-gateway/src/main/resources/application-dev.yml @@ -0,0 +1,102 @@ +# 安全配置 +security: + # 不校验白名单 + ignore: + whites: + - /auth/code + - /auth/logout + - /auth/login + - /auth/binding/* + - /auth/social/callback + - /auth/register + - /auth/tenant/list + - /resource/sms/code + - /resource/sse/close + - /*/v3/api-docs + - /*/error + - /csrf + - /sso/getSsoAuthUrl + - /sso/isLogin + - /sso/doLoginByTicket + +# sa-token配置 +sa-token: + sign: + # API client和server之间调用 接口签名秘钥 (随便乱摁几个字母即可) + secret-key: kQwIOrYbtXmSDkwEiFngrKidMcdrgKor + # token名称 (同时也是cookie名称) + token-name: Authorization + # 允许动态设置 token 有效期 + dynamic-active-timeout: true + # 允许从 header 读取 token + is-read-header: true + # 关闭 cookie 鉴权 从根源杜绝 csrf 漏洞风险 + is-read-cookie: false + # SSO-相关配置 + sso-client: + # SSO-Server 端主机地址 + server-url: http://sa-sso-server.com:19000 + auth-url: http://sa-sso-server.com:8701/?mode=ticket#/sso-login + client: "e5cd7e4891bf95d1d19206ce24a7b32e" + #jwt密钥 + jwt-secret-key: abcdcosctlklmnopqrstuvwxyz + token-prefix: Bearer + +spring: + cloud: + # 网关配置 + gateway: + # 打印请求日志(自定义) + requestLog: true + discovery: + locator: + lowerCaseServiceId: true + enabled: true + routes: + # 认证中心 + - id: ruoyi-auth + uri: lb://ruoyi-auth + predicates: + - Path=/auth/** + filters: + - StripPrefix=1 + # 代码生成 + - id: ruoyi-gen + uri: lb://ruoyi-gen + predicates: + - Path=/tool/** + filters: + - StripPrefix=1 + # 系统模块 + - id: ruoyi-system + uri: lb://ruoyi-system + predicates: + - Path=/system/**,/monitor/** + filters: + - StripPrefix=1 + # 资源服务 + - id: ruoyi-resource + uri: lb://ruoyi-resource + predicates: + - Path=/resource/** + filters: + - StripPrefix=1 + # workflow服务 + - id: ruoyi-workflow + uri: lb://ruoyi-workflow + predicates: + - Path=/workflow/** + # 演示服务 + - id: ruoyi-demo + uri: lb://ruoyi-demo + predicates: + - Path=/demo/** + filters: + - StripPrefix=1 + # MQ演示服务 + - id: ruoyi-h5 + uri: lb://ruoyi-h5 + predicates: + - Path=/ruoyi-h5/** + filters: + - StripPrefix=1 diff --git a/ruoyi-site/ruoyi-gateway/src/main/resources/application.yml b/ruoyi-site/ruoyi-gateway/src/main/resources/application.yml index 928446df6..8a715c134 100644 --- a/ruoyi-site/ruoyi-gateway/src/main/resources/application.yml +++ b/ruoyi-site/ruoyi-gateway/src/main/resources/application.yml @@ -14,29 +14,6 @@ spring: active: @profiles.active@ -# sa-token配置 -sa-token: - sign: - # API client和server之间调用 接口签名秘钥 (随便乱摁几个字母即可) - secret-key: kQwIOrYbtXmSDkwEiFngrKidMcdrgKor - # token名称 (同时也是cookie名称) - token-name: Authorization - # 允许动态设置 token 有效期 - dynamic-active-timeout: true - # 允许从 header 读取 token - is-read-header: true - # 关闭 cookie 鉴权 从根源杜绝 csrf 漏洞风险 - is-read-cookie: false - # SSO-相关配置 - sso-client: - # SSO-Server 端主机地址 - server-url: http://sa-sso-server.com:19000 - auth-url: http://localhost:9000/#/sso-login - client: "pc" - #jwt密钥 - jwt-secret-key: abcdcosctlklmnopqrstuvwxyz - token-prefix: Bearer - --- # nacos 配置 spring: cloud: @@ -54,4 +31,4 @@ spring: config: import: - optional:nacos:application-common.yml - - optional:nacos:${spring.application.name}.yml +# - optional:nacos:${spring.application.name}.yml diff --git a/ruoyi-site/ruoyi-h5/src/main/resources/application.yml b/ruoyi-site/ruoyi-h5/src/main/resources/application.yml index 1d650f5f8..19346f4d9 100644 --- a/ruoyi-site/ruoyi-h5/src/main/resources/application.yml +++ b/ruoyi-site/ruoyi-h5/src/main/resources/application.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: mall-h5 + name: ruoyi-h5 profiles: # 环境配置 active: @profiles.active@ diff --git a/ruoyi-site/ruoyi-sso-server/pom.xml b/ruoyi-site/ruoyi-sso-server/pom.xml index 48a1c39cd..fab48a223 100644 --- a/ruoyi-site/ruoyi-sso-server/pom.xml +++ b/ruoyi-site/ruoyi-sso-server/pom.xml @@ -122,10 +122,10 @@ dubbo-spring-boot-starter - - org.apache.dubbo - dubbo-nacos-spring-boot-starter - + + + + diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/SaSsoServerApplication.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/SaSsoServerApplication.java new file mode 100644 index 000000000..49707b9ab --- /dev/null +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/SaSsoServerApplication.java @@ -0,0 +1,23 @@ +package org.dromara.sso; + +import cn.dev33.satoken.sso.SaSsoManager; +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@EnableDubbo +@SpringBootApplication(scanBasePackages = {"org.dromara"}) +public class SaSsoServerApplication { + + public static void main(String[] args) { + SpringApplication.run(SaSsoServerApplication.class, args); + + System.out.println(); + System.out.println("---------------------- Sa-Token SSO 统一认证中心启动成功 ----------------------"); + System.out.println("配置信息:" + SaSsoManager.getServerConfig()); + System.out.println("统一认证登录地址:http://sa-sso-server.com:19000/sso/auth"); + System.out.println("测试前需要根据官网文档修改hosts文件,测试账号密码:sa / 123456"); + System.out.println(); + } + +} diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/captcha/UnsignedMathGenerator.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/captcha/UnsignedMathGenerator.java similarity index 98% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/captcha/UnsignedMathGenerator.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/captcha/UnsignedMathGenerator.java index 0c2f2992d..670934c66 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/captcha/UnsignedMathGenerator.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/captcha/UnsignedMathGenerator.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.captcha; +package org.dromara.sso.captcha; import cn.hutool.captcha.generator.CodeGenerator; import cn.hutool.core.math.Calculator; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CaptchaConfig.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CaptchaConfig.java similarity index 97% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CaptchaConfig.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CaptchaConfig.java index 368bb52ef..ad513331e 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CaptchaConfig.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CaptchaConfig.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config; +package org.dromara.sso.config; import cn.hutool.captcha.CaptchaUtil; import cn.hutool.captcha.CircleCaptcha; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CorsConfig.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CorsConfig.java similarity index 97% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CorsConfig.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CorsConfig.java index 2d429ab56..a379aacdf 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/CorsConfig.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/CorsConfig.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config; +package org.dromara.sso.config; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/GlobalExceptionHandler.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/GlobalExceptionHandler.java similarity index 92% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/GlobalExceptionHandler.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/GlobalExceptionHandler.java index c70642c00..9c373306a 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/GlobalExceptionHandler.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/GlobalExceptionHandler.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config; +package org.dromara.sso.config; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/SaTokenSsoConfig.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/SaTokenSsoConfig.java similarity index 81% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/SaTokenSsoConfig.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/SaTokenSsoConfig.java index 2c22aa96f..1dfff4c28 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/SaTokenSsoConfig.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/SaTokenSsoConfig.java @@ -1,12 +1,11 @@ -package org.ruoyi.sso.server.config; +package org.dromara.sso.config; import cn.dev33.satoken.jwt.StpLogicJwtForSimple; import cn.dev33.satoken.stp.StpInterface; import cn.dev33.satoken.stp.StpLogic; -import org.ruoyi.sso.server.config.satoken.SaPermissionImpl; -import org.ruoyi.sso.server.config.satoken.SaTokenExceptionHandler; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; import org.dromara.common.log.aspect.CommonLogTenantIntercept; +import org.dromara.sso.config.satoken.LoginSaasHelper; +import org.dromara.sso.config.satoken.SaPermissionImpl; import org.dromara.system.api.model.LoginUser; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -33,13 +32,13 @@ public class SaTokenSsoConfig { return new SaPermissionImpl(); } - /** - * 异常处理器 - */ - @Bean - public SaTokenExceptionHandler saTokenExceptionHandler() { - return new SaTokenExceptionHandler(); - } +// /** +// * 异常处理器 +// */ +// @Bean +// public SaTokenExceptionHandler saTokenExceptionHandler() { +// return new SaTokenExceptionHandler(); +// } /** diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/LoginSaasHelper.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/LoginSaasHelper.java similarity index 99% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/LoginSaasHelper.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/LoginSaasHelper.java index c383ad499..ca2cbe9f8 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/LoginSaasHelper.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/LoginSaasHelper.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config.satoken; +package org.dromara.sso.config.satoken; import cn.dev33.satoken.session.SaSession; import cn.dev33.satoken.stp.SaLoginModel; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaPermissionImpl.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaPermissionImpl.java similarity index 96% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaPermissionImpl.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaPermissionImpl.java index 26a58710d..a8fca300f 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaPermissionImpl.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaPermissionImpl.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config.satoken; +package org.dromara.sso.config.satoken; import cn.dev33.satoken.stp.StpInterface; import org.dromara.common.core.enums.UserType; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaTokenExceptionHandler.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaTokenExceptionHandler.java similarity index 97% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaTokenExceptionHandler.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaTokenExceptionHandler.java index c9711be7a..eb36979f4 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/config/satoken/SaTokenExceptionHandler.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/config/satoken/SaTokenExceptionHandler.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.config.satoken; +package org.dromara.sso.config.satoken; import cn.dev33.satoken.exception.NotLoginException; import cn.dev33.satoken.exception.NotPermissionException; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/HomeController.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/HomeController.java similarity index 97% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/HomeController.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/HomeController.java index fbce6eb6d..12198a434 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/HomeController.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/HomeController.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.controller; +package org.dromara.sso.controller; import cn.dev33.satoken.context.SaHolder; import cn.dev33.satoken.stp.StpUtil; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/SsoServerController.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/SsoServerController.java similarity index 90% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/SsoServerController.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/SsoServerController.java index 1f138b13f..dd4aa7cd1 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/SsoServerController.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/SsoServerController.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.controller; +package org.dromara.sso.controller; import cn.dev33.satoken.context.SaHolder; import cn.dev33.satoken.context.model.SaRequest; @@ -32,15 +32,15 @@ import org.dromara.common.json.utils.JsonUtils; import org.dromara.common.ratelimiter.annotation.RateLimiter; import org.dromara.common.ratelimiter.enums.LimitType; import org.dromara.common.redis.utils.RedisUtils; +import org.dromara.sso.properties.CaptchaProperties; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; import org.dromara.system.api.RemoteClientService; import org.dromara.system.api.domain.vo.RemoteClientVo; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; -import org.ruoyi.sso.server.domain.vo.CaptchaVo; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.enums.CaptchaType; -import org.ruoyi.sso.server.properties.CaptchaProperties; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; +import org.dromara.sso.config.satoken.LoginSaasHelper; +import org.dromara.sso.domain.vo.CaptchaVo; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.enums.CaptchaType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.expression.Expression; import org.springframework.expression.ExpressionParser; @@ -165,14 +165,21 @@ public class SsoServerController { } // 已登录情况下,构建 redirectUrl redirect = SaFoxUtil.decoderUrl(redirect); - if (SaSsoConsts.MODE_SIMPLE.equals(mode)) { + if (SaSsoConsts.MODE_SIMPLE.equals(mode)) { // 模式一 SaSsoUtil.checkRedirectUrl(redirect); return SaResult.data(redirect); } else { + //支持vue页面 + String routerUrlSuffix = ""; + int routerUrlIdx = redirect.indexOf("#/"); + if (routerUrlIdx != -1) { + routerUrlSuffix = redirect.substring(routerUrlIdx); + redirect = redirect.substring(0, routerUrlIdx); + } // 模式二或模式三 String redirectUrl = SaSsoUtil.buildRedirectUrl(StpUtil.getLoginId(), client, redirect); - return SaResult.data(redirectUrl); + return SaResult.data(redirectUrl + routerUrlSuffix); } } diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/TokenController.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/TokenController.java similarity index 94% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/TokenController.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/TokenController.java index f7cb8b3fc..8b1df92f4 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/controller/TokenController.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/controller/TokenController.java @@ -1,17 +1,17 @@ -package org.ruoyi.sso.server.controller; +package org.dromara.sso.controller; import cn.dev33.satoken.exception.NotLoginException; import cn.hutool.core.codec.Base64; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; -import org.ruoyi.sso.server.domain.vo.LoginTenantVo; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.domain.vo.TenantListVo; -import org.ruoyi.sso.server.form.RegisterBody; -import org.ruoyi.sso.server.form.SocialLoginBody; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.form.RegisterBody; +import org.dromara.sso.form.SocialLoginBody; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; +import org.dromara.sso.domain.vo.LoginTenantVo; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.domain.vo.TenantListVo; +import org.dromara.sso.config.satoken.LoginSaasHelper; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/convert/TenantVoConvert.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/convert/TenantVoConvert.java similarity index 78% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/convert/TenantVoConvert.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/convert/TenantVoConvert.java index e3dc963f4..137af54ca 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/convert/TenantVoConvert.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/convert/TenantVoConvert.java @@ -1,7 +1,7 @@ -package org.ruoyi.sso.server.domain.convert; +package org.dromara.sso.domain.convert; import io.github.linpeilie.BaseMapper; -import org.ruoyi.sso.server.domain.vo.TenantListVo; +import org.dromara.sso.domain.vo.TenantListVo; import org.dromara.system.api.domain.vo.RemoteTenantVo; import org.mapstruct.Mapper; import org.mapstruct.MappingConstants; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/CaptchaVo.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/CaptchaVo.java similarity index 87% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/CaptchaVo.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/CaptchaVo.java index e239fe93a..ff4cbb8f0 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/CaptchaVo.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/CaptchaVo.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.domain.vo; +package org.dromara.sso.domain.vo; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginTenantVo.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginTenantVo.java similarity index 88% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginTenantVo.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginTenantVo.java index d00a91447..4abd0fdd6 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginTenantVo.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginTenantVo.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.domain.vo; +package org.dromara.sso.domain.vo; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginVo.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginVo.java similarity index 95% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginVo.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginVo.java index b5808f176..08829e553 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/LoginVo.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/LoginVo.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.domain.vo; +package org.dromara.sso.domain.vo; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/TenantListVo.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/TenantListVo.java similarity index 88% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/TenantListVo.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/TenantListVo.java index a54bd123b..1210fd18a 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/domain/vo/TenantListVo.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/domain/vo/TenantListVo.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.domain.vo; +package org.dromara.sso.domain.vo; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaCategory.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaCategory.java similarity index 94% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaCategory.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaCategory.java index 589e0b37b..f6f024df8 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaCategory.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaCategory.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.enums; +package org.dromara.sso.enums; import cn.hutool.captcha.AbstractCaptcha; import cn.hutool.captcha.CircleCaptcha; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaType.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaType.java similarity index 82% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaType.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaType.java index b205b012a..afc507373 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/enums/CaptchaType.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/enums/CaptchaType.java @@ -1,8 +1,8 @@ -package org.ruoyi.sso.server.enums; +package org.dromara.sso.enums; import cn.hutool.captcha.generator.CodeGenerator; import cn.hutool.captcha.generator.RandomGenerator; -import org.ruoyi.sso.server.captcha.UnsignedMathGenerator; +import org.dromara.sso.captcha.UnsignedMathGenerator; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/EmailLoginBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/EmailLoginBody.java similarity index 94% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/EmailLoginBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/EmailLoginBody.java index df05f1d98..2c5889703 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/EmailLoginBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/EmailLoginBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/PasswordLoginBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/PasswordLoginBody.java similarity index 96% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/PasswordLoginBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/PasswordLoginBody.java index eca4b6c5e..ebc6cd479 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/PasswordLoginBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/PasswordLoginBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/RegisterBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/RegisterBody.java similarity index 96% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/RegisterBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/RegisterBody.java index 71dd90528..3d72fe34c 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/RegisterBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/RegisterBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SmsLoginBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SmsLoginBody.java similarity index 93% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SmsLoginBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SmsLoginBody.java index ae305cf2b..9f2832aae 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SmsLoginBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SmsLoginBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SocialLoginBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SocialLoginBody.java similarity index 95% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SocialLoginBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SocialLoginBody.java index 9646dfe2f..1b2956e39 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/SocialLoginBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/SocialLoginBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/XcxLoginBody.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/XcxLoginBody.java similarity index 93% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/XcxLoginBody.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/XcxLoginBody.java index 9a34f155e..3a2703d0f 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/form/XcxLoginBody.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/form/XcxLoginBody.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.form; +package org.dromara.sso.form; import jakarta.validation.constraints.NotBlank; import lombok.Data; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/listener/UserActionListener.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/listener/UserActionListener.java similarity index 98% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/listener/UserActionListener.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/listener/UserActionListener.java index 51f3737f3..ee648a03d 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/listener/UserActionListener.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/listener/UserActionListener.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.listener; +package org.dromara.sso.listener; import cn.dev33.satoken.config.SaTokenConfig; import cn.dev33.satoken.listener.SaTokenListener; @@ -8,7 +8,7 @@ import cn.hutool.core.convert.Convert; import cn.hutool.http.useragent.UserAgent; import cn.hutool.http.useragent.UserAgentUtil; import org.dromara.system.api.model.SysSaasUserOnlineDTO; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.annotation.DubboReference; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/CaptchaProperties.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/CaptchaProperties.java similarity index 84% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/CaptchaProperties.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/CaptchaProperties.java index 126a679be..01fcb78de 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/CaptchaProperties.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/CaptchaProperties.java @@ -1,8 +1,8 @@ -package org.ruoyi.sso.server.properties; +package org.dromara.sso.properties; import lombok.Data; -import org.ruoyi.sso.server.enums.CaptchaCategory; -import org.ruoyi.sso.server.enums.CaptchaType; +import org.dromara.sso.enums.CaptchaCategory; +import org.dromara.sso.enums.CaptchaType; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Configuration; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/UserPasswordProperties.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/UserPasswordProperties.java similarity index 93% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/UserPasswordProperties.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/UserPasswordProperties.java index da5b6d779..3703232ff 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/properties/UserPasswordProperties.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/properties/UserPasswordProperties.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.properties; +package org.dromara.sso.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/IAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/IAuthStrategy.java similarity index 92% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/IAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/IAuthStrategy.java index 6ecb1f826..263a85412 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/IAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/IAuthStrategy.java @@ -1,6 +1,6 @@ -package org.ruoyi.sso.server.service; +package org.dromara.sso.service; -import org.ruoyi.sso.server.domain.vo.LoginVo; +import org.dromara.sso.domain.vo.LoginVo; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.SpringUtils; import org.dromara.system.api.domain.vo.RemoteClientVo; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/SysLoginService.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/SysLoginService.java similarity index 97% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/SysLoginService.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/SysLoginService.java index 1fa73a9ad..054f1128b 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/SysLoginService.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/SysLoginService.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.service; +package org.dromara.sso.service; import cn.dev33.satoken.exception.NotLoginException; import cn.dev33.satoken.secure.BCrypt; @@ -7,10 +7,10 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import com.baomidou.lock.annotation.Lock4j; -import org.ruoyi.sso.server.form.RegisterBody; -import org.ruoyi.sso.server.properties.CaptchaProperties; -import org.ruoyi.sso.server.properties.UserPasswordProperties; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.properties.CaptchaProperties; +import org.dromara.sso.properties.UserPasswordProperties; +import org.dromara.sso.form.RegisterBody; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.zhyd.oauth.model.AuthUser; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/EmailAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/EmailAuthStrategy.java similarity index 91% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/EmailAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/EmailAuthStrategy.java index 11e73a243..6b7f9a0fe 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/EmailAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/EmailAuthStrategy.java @@ -1,12 +1,12 @@ -package org.ruoyi.sso.server.service.impl; +package org.dromara.sso.service.impl; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.form.EmailLoginBody; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.form.EmailLoginBody; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.annotation.DubboReference; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/PasswordAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/PasswordAuthStrategy.java similarity index 91% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/PasswordAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/PasswordAuthStrategy.java index 5d2bb6796..bd91eaf4b 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/PasswordAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/PasswordAuthStrategy.java @@ -1,14 +1,14 @@ -package org.ruoyi.sso.server.service.impl; +package org.dromara.sso.service.impl; import cn.dev33.satoken.secure.BCrypt; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.form.PasswordLoginBody; -import org.ruoyi.sso.server.properties.CaptchaProperties; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.form.PasswordLoginBody; +import org.dromara.sso.properties.CaptchaProperties; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.annotation.DubboReference; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SmsAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SmsAuthStrategy.java similarity index 91% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SmsAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SmsAuthStrategy.java index 505de7e14..5583c5720 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SmsAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SmsAuthStrategy.java @@ -1,12 +1,12 @@ -package org.ruoyi.sso.server.service.impl; +package org.dromara.sso.service.impl; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.form.SmsLoginBody; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.form.SmsLoginBody; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.annotation.DubboReference; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SocialAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SocialAuthStrategy.java similarity index 94% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SocialAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SocialAuthStrategy.java index 4a10a357b..7c37c433e 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/SocialAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/SocialAuthStrategy.java @@ -1,4 +1,4 @@ -package org.ruoyi.sso.server.service.impl; +package org.dromara.sso.service.impl; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; @@ -6,15 +6,15 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.map.MapUtil; import cn.hutool.http.HttpUtil; import cn.hutool.http.Method; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.form.SocialLoginBody; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.zhyd.oauth.model.AuthResponse; import me.zhyd.oauth.model.AuthUser; import org.apache.dubbo.config.annotation.DubboReference; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.form.SocialLoginBody; -import org.ruoyi.sso.server.service.IAuthStrategy; +import org.dromara.sso.domain.vo.LoginVo; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.StreamUtils; import org.dromara.common.core.utils.ValidatorUtils; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/XcxAuthStrategy.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/XcxAuthStrategy.java similarity index 88% rename from ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/XcxAuthStrategy.java rename to ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/XcxAuthStrategy.java index a82e125f4..628f114ac 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/service/impl/XcxAuthStrategy.java +++ b/ruoyi-site/ruoyi-sso-server/src/main/java/org/dromara/sso/service/impl/XcxAuthStrategy.java @@ -1,12 +1,12 @@ -package org.ruoyi.sso.server.service.impl; +package org.dromara.sso.service.impl; import cn.dev33.satoken.stp.SaLoginModel; import cn.dev33.satoken.stp.StpUtil; -import org.ruoyi.sso.server.domain.vo.LoginVo; -import org.ruoyi.sso.server.form.XcxLoginBody; -import org.ruoyi.sso.server.service.IAuthStrategy; -import org.ruoyi.sso.server.service.SysLoginService; -import org.ruoyi.sso.server.config.satoken.LoginSaasHelper; +import org.dromara.sso.form.XcxLoginBody; +import org.dromara.sso.service.IAuthStrategy; +import org.dromara.sso.service.SysLoginService; +import org.dromara.sso.domain.vo.LoginVo; +import org.dromara.sso.config.satoken.LoginSaasHelper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.annotation.DubboReference; diff --git a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/SaSsoServerApplication.java b/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/SaSsoServerApplication.java deleted file mode 100644 index 60a741af0..000000000 --- a/ruoyi-site/ruoyi-sso-server/src/main/java/org/ruoyi/sso/server/SaSsoServerApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.ruoyi.sso.server; - -import cn.dev33.satoken.sso.SaSsoManager; -import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@EnableDubbo -@SpringBootApplication -public class SaSsoServerApplication { - - public static void main(String[] args) { - SpringApplication.run(SaSsoServerApplication.class, args); - - System.out.println(); - System.out.println("---------------------- Sa-Token SSO 统一认证中心启动成功 ----------------------"); - System.out.println("配置信息:" + SaSsoManager.getServerConfig()); - System.out.println("统一认证登录地址:http://sa-sso-server.com:19000/sso/auth"); - System.out.println("测试前需要根据官网文档修改hosts文件,测试账号密码:sa / 123456"); - System.out.println(); - } - -} diff --git a/ruoyi-site/ruoyi-sso-server/src/main/resources/application-dev.yml b/ruoyi-site/ruoyi-sso-server/src/main/resources/application-dev.yml index 45fe4240b..044179321 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/resources/application-dev.yml +++ b/ruoyi-site/ruoyi-sso-server/src/main/resources/application-dev.yml @@ -138,3 +138,79 @@ dubbo: retries: 0 # 初始化检查 check: false + +--- # 三方授权 +justauth: + # 前端外网访问地址 + address: http://localhost:80 + type: + maxkey: + # maxkey 服务器地址 + # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据 + server-url: http://sso.maxkey.top + client-id: 876892492581044224 + client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8 + redirect-uri: ${justauth.address}/social-callback?source=maxkey + topiam: + # topiam 服务器地址 + server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol + client-id: 449c4*********937************759 + client-secret: ac7***********1e0************28d + redirect-uri: ${justauth.address}/social-callback?source=topiam + scopes: [openid, email, phone, profile] + qq: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=qq + union-id: false + weibo: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=weibo + gitee: + client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98 + client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac + redirect-uri: ${justauth.address}/social-callback?source=gitee + dingtalk: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=dingtalk + baidu: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=baidu + csdn: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=csdn + coding: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=coding + coding-group-name: xx + oschina: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=oschina + alipay_wallet: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet + alipay-public-key: MIIB**************DAQAB + wechat_open: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_open + wechat_mp: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_mp + wechat_enterprise: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise + agent-id: 1000002 + gitlab: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=gitlab diff --git a/ruoyi-site/ruoyi-sso-server/src/main/resources/application-local.yml b/ruoyi-site/ruoyi-sso-server/src/main/resources/application-local.yml index d3dd58b7a..b642ca00b 100644 --- a/ruoyi-site/ruoyi-sso-server/src/main/resources/application-local.yml +++ b/ruoyi-site/ruoyi-sso-server/src/main/resources/application-local.yml @@ -22,10 +22,6 @@ spring: max-idle: 10 # 连接池中的最小空闲连接 min-idle: 0 - cloud: - nacos: - discovery: - server-addr: http://127.0.0.1:8848 # Sa-Token配置 sa-token: @@ -138,3 +134,79 @@ dubbo: retries: 0 # 初始化检查 check: false + +--- # 三方授权 +justauth: + # 前端外网访问地址 + address: http://localhost:80 + type: + maxkey: + # maxkey 服务器地址 + # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据 + server-url: http://sso.maxkey.top + client-id: 876892492581044224 + client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8 + redirect-uri: ${justauth.address}/social-callback?source=maxkey + topiam: + # topiam 服务器地址 + server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol + client-id: 449c4*********937************759 + client-secret: ac7***********1e0************28d + redirect-uri: ${justauth.address}/social-callback?source=topiam + scopes: [openid, email, phone, profile] + qq: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=qq + union-id: false + weibo: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=weibo + gitee: + client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98 + client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac + redirect-uri: ${justauth.address}/social-callback?source=gitee + dingtalk: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=dingtalk + baidu: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=baidu + csdn: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=csdn + coding: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=coding + coding-group-name: xx + oschina: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=oschina + alipay_wallet: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet + alipay-public-key: MIIB**************DAQAB + wechat_open: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_open + wechat_mp: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_mp + wechat_enterprise: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise + agent-id: 1000002 + gitlab: + client-id: 10**********6 + client-secret: 1f7d08**********5b7**********29e + redirect-uri: ${justauth.address}/social-callback?source=gitlab diff --git a/ruoyi-site/ruoyi-user-sso/Dockerfile b/ruoyi-site/ruoyi-user-sso/Dockerfile new file mode 100644 index 000000000..e87fe55a2 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/Dockerfile @@ -0,0 +1,26 @@ +# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/ +FROM bellsoft/liberica-openjdk-debian:17.0.11-cds +#FROM bellsoft/liberica-openjdk-debian:21.0.3-cds +#FROM findepi/graalvm:java17-native + +LABEL maintainer="lizhw" + +RUN mkdir -p /ruoyi/resource/logs \ + /ruoyi/resource/temp \ + /ruoyi/skywalking/agent + +WORKDIR /ruoyi/resource + +ENV SERVER_PORT=19200 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="" + +EXPOSE ${SERVER_PORT} + +ADD ./target/ruoyi-h5.jar ./app.jar + +ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \ + # 应用名称 如果想区分集群节点监控 改成不同的名称即可 + #-Dskywalking.agent.service_name=ruoyi-h5 \ + #-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \ + -XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \ + -jar app.jar + diff --git a/ruoyi-site/ruoyi-user-sso/pom.xml b/ruoyi-site/ruoyi-user-sso/pom.xml new file mode 100644 index 000000000..570f7eb10 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/pom.xml @@ -0,0 +1,106 @@ + + + + org.dromara + ruoyi-site + ${revision} + + 4.0.0 + + ruoyi-user-sso + + + ruoyi-user-sso + + + + + + org.dromara + ruoyi-common-core + + + + + org.dromara + ruoyi-common-tenant + + + + + org.dromara + ruoyi-common-mybatis + + + + org.dromara + ruoyi-common-doc + + + + + org.dromara + ruoyi-api-system + + + + org.dromara + ruoyi-common-log + + + + + com.mysql + mysql-connector-j + + + + org.dromara + ruoyi-common-encrypt + + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + org.apache.dubbo + dubbo-spring-boot-starter + + + + org.apache.dubbo + dubbo-nacos-spring-boot-starter + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + + + + diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/MallH5Application.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/MallH5Application.java new file mode 100644 index 000000000..9a424b279 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/MallH5Application.java @@ -0,0 +1,20 @@ +package com.luban.api; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 鲁班H5 api启动类 + * + * @author WeiHongBin + */ +@EnableDubbo +@SpringBootApplication +public class MallH5Application { + + public static void main(String[] args) { + SpringApplication.run(MallH5Application.class, args); + } + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/JsonConfig.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/JsonConfig.java new file mode 100644 index 000000000..7d0e0aecb --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/JsonConfig.java @@ -0,0 +1,32 @@ +package com.luban.api.config; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; + +/** + * JSON 配置,修改默认 时间序列化格式 + * + * @author WeiHongBin + */ +@Configuration +public class JsonConfig { + @Bean + public ObjectMapper mapperObject() { + JavaTimeModule module = new JavaTimeModule(); + module.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + module.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + module.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss"))); + return new ObjectMapper().registerModule(module); + } + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/MybatisPlusAutoConfigTenant.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/MybatisPlusAutoConfigTenant.java new file mode 100644 index 000000000..acc0d5d73 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/MybatisPlusAutoConfigTenant.java @@ -0,0 +1,20 @@ +package com.luban.api.config; + +import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; +import org.dromara.common.mybatis.config.MybatisPlusConfig; +import org.dromara.common.tenant.properties.TenantProperties; +import org.springframework.boot.autoconfigure.AutoConfiguration; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConditionalOnBean(MybatisPlusConfig.class) +@AutoConfiguration(after = {MybatisPlusConfig.class}) +public class MybatisPlusAutoConfigTenant { + + @Bean + public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) { + return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties)); + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/PlusTenantLineHandler.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/PlusTenantLineHandler.java new file mode 100644 index 000000000..f661c163e --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/PlusTenantLineHandler.java @@ -0,0 +1,56 @@ +package com.luban.api.config; + +import cn.hutool.core.collection.ListUtil; +import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.NullValue; +import net.sf.jsqlparser.expression.StringValue; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.tenant.helper.TenantHelper; +import org.dromara.common.tenant.properties.TenantProperties; + +import java.util.List; + +/** + * 自定义租户处理器 + * + * @author Lion Li + */ +@Slf4j +@AllArgsConstructor +public class PlusTenantLineHandler implements TenantLineHandler { + + private final TenantProperties tenantProperties; + + @Override + public Expression getTenantId() { + String tenantId = TenantHelper.getTenantId(); + if (StringUtils.isBlank(tenantId)) { + log.error("无法获取有效的租户id -> Null"); + return new NullValue(); + } + // 返回固定租户 + return new StringValue(tenantId); + } + + @Override + public boolean ignoreTable(String tableName) { + String tenantId = TenantHelper.getTenantId(); + // 判断是否有租户 + if (StringUtils.isNotBlank(tenantId)) { + // 不需要过滤租户的表 + List excludes = tenantProperties.getExcludes(); + // 非业务表 + List tables = ListUtil.toList( + "gen_table", + "gen_table_column" + ); + tables.addAll(excludes); + return tables.contains(tableName); + } + return true; + } + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/WebMvcConfig.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/WebMvcConfig.java new file mode 100644 index 000000000..e6dcc72d2 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/config/WebMvcConfig.java @@ -0,0 +1,22 @@ +package com.luban.api.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +@EnableWebMvc +public class WebMvcConfig implements WebMvcConfigurer { + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + //兼容swagger老版本v1,v2 + registry.addResourceHandler("/statics/**").addResourceLocations("classpath:/statics/"); + registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); + registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); + registry.addResourceHandler("/swagger-ui/**").addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/"); + registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0); + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/constant/PackageConstant.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/constant/PackageConstant.java new file mode 100644 index 000000000..47f9055c0 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/constant/PackageConstant.java @@ -0,0 +1,18 @@ +package com.luban.api.constant; + +/** + * 包名常量 + * + * @author WeiHongBin + */ +public final class PackageConstant { + + + public static final String BASE_PACKAGE = "com.luban.api"; + + public static final String CONTROLLER_PACKAGE = BASE_PACKAGE + ".controller"; + + public static final String DAO_PACKAGE = BASE_PACKAGE + ".dao"; + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/ScriptsController.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/ScriptsController.java new file mode 100644 index 000000000..b0688d084 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/ScriptsController.java @@ -0,0 +1,50 @@ +package com.luban.api.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.luban.api.entity.Scripts; +import com.luban.api.convert.ScriptsConvert; +import com.luban.api.service.ScriptsService; +import com.luban.api.vo.ScriptsVO; +import io.swagger.v3.oas.annotations.Operation; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 作品 前端控制器 + *

+ * + * @author lizhengwei + * @since 2024-06-21 + */ +@RestController +@RequestMapping("/scripts") +public class ScriptsController { + + + private final ScriptsService scriptsService; + + public ScriptsController(ScriptsService scriptsService) { + this.scriptsService = scriptsService; + } + + + @Operation(summary = "根据scriptsId查询") + @GetMapping("/{id}") + public ScriptsVO findScriptsById(@PathVariable Long id) { + return ScriptsConvert.toVO(scriptsService.getById(id)); + } + + @Operation(summary = "查询所有scripts") + @GetMapping + public List listAllScriptss(@RequestParam Integer _limit) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.last("limit " + _limit); + return scriptsService.list(wrapper).stream().map(ScriptsConvert::toVO).collect(Collectors.toList()); + } + +} + diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/UploadController.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/UploadController.java new file mode 100644 index 000000000..65db005fb --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/UploadController.java @@ -0,0 +1,51 @@ +package com.luban.api.controller; + +import cn.hutool.core.util.IdUtil; +import com.luban.api.exception.UnifiedException; +import com.luban.api.vo.FileVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author WeiHongBin + */ +@RestController +@RequestMapping("/upload") +@Tag(name = "上传文件") +@Slf4j +public class UploadController { + +// @Value("${upload-path}") todo 改成公共文件上传下载 + + public String uploadPath = "data"; + + @Operation(summary = "文件上传") + @PostMapping + public List upload(@Validated MultipartFile files) { + String originalFilename = files.getOriginalFilename(); + assert originalFilename != null; + String suffix = originalFilename.substring(originalFilename.lastIndexOf(".") + 1); + String key = IdUtil.fastSimpleUUID() + "." + suffix; + try { + files.transferTo(new File(uploadPath + key)); + } catch (IOException e) { + throw new UnifiedException("文件上传失败"); + } + return new ArrayList() {{ + add(new FileVO() {{ + setUrl(key); + }}); + }}; + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkController.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkController.java new file mode 100644 index 000000000..d23546051 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkController.java @@ -0,0 +1,175 @@ +package com.luban.api.controller; + + +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.luban.api.convert.WorkConvert; +import com.luban.api.dto.WorkCreateDTO; +import com.luban.api.dto.WorkQueryDTO; +import com.luban.api.dto.WorkUpdateDTO; +import com.luban.api.entity.Work; +import com.luban.api.service.WorkService; +import com.luban.api.vo.WorkVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 前端控制器 + *

+ *

+ * 由于业务都非常简单,并没有把业务代码下沉到 service 层 + * + * @author WeiHongBin + */ +@RestController +@RequestMapping("/works") +@Tag(name = "作品管理", description = "作品管理") +@Slf4j +public class WorkController { + + + private final WorkService workService; + + public WorkController(WorkService workService) { + this.workService = workService; + } + + + @Operation(summary = "根据workId查询") + @GetMapping("/has-forms") + public List hasForms() { + return WorkConvert.toVO(workService.list()); + } + + @Operation(summary = "根据workId查询") + @GetMapping("/{id}") + public WorkVO findWorkById(@PathVariable Long id) { + return WorkConvert.toVO(workService.getById(id)); + } + + @Operation(summary = "查询所有work") + @GetMapping + public List listAllWorks(@Valid WorkQueryDTO dto) { + WorkVO vo = new WorkVO(); + vo.setTemplate(Boolean.parseBoolean(dto.getIs_template())); + BeanUtils.copyProperties(dto, vo); + return workService.list(new QueryWrapper<>(WorkConvert.toEntity(vo))).stream().map(WorkConvert::toVO).collect(Collectors.toList()); + } + + + @Operation(summary = "分页查询works") + @GetMapping("/pageable") + public IPage listWorks(@Valid WorkQueryDTO dto) { + WorkVO vo = new WorkVO(); + vo.setTemplate(Boolean.parseBoolean(dto.getIs_template())); + BeanUtils.copyProperties(dto, vo); + IPage page = workService.page(new Page<>(dto.getCurrent(), dto.getSize()), new LambdaQueryWrapper<>(WorkConvert.toEntity(vo)).orderByDesc(Work::getCreateTime)); + List voList = page.getRecords().stream().map(WorkConvert::toVO).collect(Collectors.toList()); + return new Page(page.getCurrent(), page.getSize(), page.getTotal()).setPages(page.getPages()).setRecords(voList); + } + + @Operation(summary = "创建work") + @PostMapping + public WorkVO createWork(@RequestBody @Valid WorkCreateDTO dto) { + WorkVO vo = new WorkVO(); + BeanUtils.copyProperties(dto, vo); + Work work = WorkConvert.toEntity(vo); + workService.save(work); + return WorkConvert.toVO(work); + } + + @Operation(summary = "更新work") + @PutMapping("/{id}") + public WorkVO updateWork(@PathVariable Long id, @RequestBody @Valid WorkUpdateDTO dto) { + Work work = workService.getById(id); + if (!StringUtils.isEmpty(dto.getTitle())) { + work.setTitle(dto.getTitle()); + } + if (!StringUtils.isEmpty(dto.getDescription())) { + work.setDescription(dto.getDescription()); + } + if (!StringUtils.isEmpty(dto.getCoverImageUrl())) { + work.setCoverImageUrl(dto.getCoverImageUrl()); + } + if (!CollectionUtils.isEmpty(dto.getPages())) { + work.setPages(JSONUtil.toJsonStr(dto.getPages())); + } + work.setIsTemplate(dto.isTemplate()); + work.setIsPublish(dto.isPublish()); + work.setWidth(dto.getWidth()); + work.setHeight(dto.getWidth()); + work.setPageMode(dto.getWidth()); + + work.setUpdateTime(LocalDateTime.now()); + workService.saveOrUpdate(work); + return WorkConvert.toVO(work); + } + + + @Operation(summary = "删除work") + @DeleteMapping("/{id}") + public void deleteWorkById(@PathVariable Long id) { + workService.removeById(id); + } + + @Operation(summary = "设为模板") + @PostMapping("/set-as-template/{id}") + public WorkVO markWorkAsTemplate(@PathVariable Long id) { + Work work = workService.getById(id); + work.setIsTemplate(true); + work.setUpdateTime(LocalDateTime.now()); + workService.updateById(work); + return WorkConvert.toVO(work); + } + + @Operation(summary = "统计作品总数") + @GetMapping("/count") + public long countWork() { + return workService.count(); + } + + @Operation(summary = "使用模板") + @PostMapping("/use-template/{id}") + public WorkVO useTemplate(@PathVariable Long id) { + Work work = workService.getById(id); + work.setId(null); + work.setIsTemplate(false); + work.setIsPublish(false); + workService.save(work); + return WorkConvert.toVO(work); + } + + @Operation(summary = "使用模板") + @GetMapping("/preview/{id}") + public ModelAndView useTemplate(@PathVariable Long id, @RequestParam(value = "view_mode", required = false) String viewMode) { + Work work = workService.getById(id); + + // 非预览模式, 查看不到内容 + boolean canRender = "preview".equals(viewMode) || work.getIsPublish(); + + if (!canRender) { + work.setPages("[]"); + } + ModelAndView mv = new ModelAndView("engine"); + //TODO 后端处理前端,这种方式不是很好,最后改成纯前端处理 + mv.addObject("workString", JSONUtil.toJsonStr(WorkConvert.toVO(work))); + mv.addObject("work", work); + return mv; + } +} + diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkFormsController.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkFormsController.java new file mode 100644 index 000000000..4be91bc65 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/controller/WorkFormsController.java @@ -0,0 +1,20 @@ +package com.luban.api.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 前端控制器 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@RestController +@RequestMapping("/work-forms") +public class WorkFormsController { + +} + diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/ScriptsConvert.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/ScriptsConvert.java new file mode 100644 index 000000000..6e31e01e1 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/ScriptsConvert.java @@ -0,0 +1,21 @@ +package com.luban.api.convert; + +import com.luban.api.entity.Scripts; +import com.luban.api.vo.ScriptsVO; +import org.springframework.beans.BeanUtils; + +/** + * Scripts 转换器 + * + * @author WeiHongBin + */ +public class ScriptsConvert { + + + public static ScriptsVO toVO(Scripts entity) { + ScriptsVO vo = new ScriptsVO(); + BeanUtils.copyProperties(entity, vo); + return vo; + } + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/WorkConvert.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/WorkConvert.java new file mode 100644 index 000000000..0e39b8e6a --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/convert/WorkConvert.java @@ -0,0 +1,49 @@ +package com.luban.api.convert; + +import cn.hutool.json.JSONUtil; +import com.luban.api.entity.Work; +import com.luban.api.vo.WorkVO; +import org.springframework.beans.BeanUtils; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * Work 转换器 + * + * @author WeiHongBin + */ +public class WorkConvert { + + + public static WorkVO toVO(Work entity) { + WorkVO vo = new WorkVO(); + BeanUtils.copyProperties(entity, vo); + if (!StringUtils.isEmpty(entity.getPages())) { + vo.setPages(JSONUtil.parseArray(entity.getPages())); + } + return vo; + } + + + public static List toVO(List entitys) { + List workVOS = new ArrayList<>(); + for (Work entity : entitys) { + workVOS.add(toVO(entity)); + } + return workVOS; + } + + public static Work toEntity(WorkVO vo) { + Work work = new Work(); + BeanUtils.copyProperties(vo, work); + if (!CollectionUtils.isEmpty(vo.getPages())) { + work.setPages(JSONUtil.toJsonStr(vo.getPages())); + } + return work; + } + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/ScriptsDao.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/ScriptsDao.java new file mode 100644 index 000000000..fdcb108a3 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/ScriptsDao.java @@ -0,0 +1,18 @@ +package com.luban.api.dao; + +import com.luban.api.entity.Scripts; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * 作品 Mapper 接口 + *

+ * + * @author lizhengwei + * @since 2024-06-21 + */ +@Mapper +public interface ScriptsDao extends BaseMapper { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkDao.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkDao.java new file mode 100644 index 000000000..3b9cffb92 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkDao.java @@ -0,0 +1,18 @@ +package com.luban.api.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.luban.api.entity.Work; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Mapper +public interface WorkDao extends BaseMapper { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkFormsDao.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkFormsDao.java new file mode 100644 index 000000000..440f69bdf --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dao/WorkFormsDao.java @@ -0,0 +1,18 @@ +package com.luban.api.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.luban.api.entity.WorkForms; +import org.apache.ibatis.annotations.Mapper; + +/** + *

+ * Mapper 接口 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Mapper +public interface WorkFormsDao extends BaseMapper { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/PageDtoBase.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/PageDtoBase.java new file mode 100644 index 000000000..43598a9fc --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/PageDtoBase.java @@ -0,0 +1,37 @@ +package com.luban.api.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** + * 分页基类 + * + * @author admin + */ +@Data +public class PageDtoBase { + /** + * 每页行数 + */ + @Schema(title = "每页行数") + protected Integer size = 10; + + /** + * 页码 + */ + @Schema(title = "页码") + protected Integer current = 1; + + + public void setSize(Integer size) { + if (size != null) { + this.size = size; + } + } + + public void setCurrent(Integer current) { + if (current != null) { + this.current = current; + } + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/ScriptsQueryDTO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/ScriptsQueryDTO.java new file mode 100644 index 000000000..80ae28ace --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/ScriptsQueryDTO.java @@ -0,0 +1,15 @@ +package com.luban.api.dto; + + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "WorkQueryDTO") +public class ScriptsQueryDTO { + private Integer _limit; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkCreateDTO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkCreateDTO.java new file mode 100644 index 000000000..c755dec02 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkCreateDTO.java @@ -0,0 +1,35 @@ +package com.luban.api.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author WeiHongBin + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "WorkCreateDTO") +public class WorkCreateDTO { + + private String title; + + private String description; + + private String coverImageUrl; + + private List pages; + + private LocalDateTime createTime = LocalDateTime.now(); + + private LocalDateTime updateTime = LocalDateTime.now(); + + private boolean isPublish = false; + + private boolean isTemplate = false; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkQueryDTO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkQueryDTO.java new file mode 100644 index 000000000..ce6be983c --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkQueryDTO.java @@ -0,0 +1,35 @@ +package com.luban.api.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author WeiHongBin + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "WorkQueryDTO") +public class WorkQueryDTO extends PageDtoBase { + + private String title; + + private String description; + + private String coverImageUrl; + + private List pages; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + private String is_publish; + + private String is_template; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkUpdateDTO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkUpdateDTO.java new file mode 100644 index 000000000..9c743e223 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/dto/WorkUpdateDTO.java @@ -0,0 +1,42 @@ +package com.luban.api.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author WeiHongBin + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "WorkQueryDTO") +public class WorkUpdateDTO { + + private String title; + + private String description; + + private String coverImageUrl; + + private String width; + + private String height; + + /** + * 页面模式:h5_swipper、h5_long_page、h5_form + */ + private String pageMode; + + private List pages; + + private LocalDateTime updateTime = LocalDateTime.now(); + + private boolean isPublish; + + private boolean isTemplate; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Scripts.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Scripts.java new file mode 100644 index 000000000..dcd1fa149 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Scripts.java @@ -0,0 +1,46 @@ +package com.luban.api.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serial; +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 作品 + *

+ * + * @author lizhengwei + * @since 2024-06-21 + */ +@Data + +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@Schema(name = "Scripts对象", description = "作品") +public class Scripts implements Serializable { + + @Serial + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @Schema(title = "标题") + private String title; + + @Schema(title = "内容") + private String content; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Work.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Work.java new file mode 100644 index 000000000..9b8ce1f5a --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/Work.java @@ -0,0 +1,62 @@ +package com.luban.api.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "Work对象") +public class Work implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @Schema(title = "标题") + private String title; + + @Schema(title = "描述") + private String description; + + private String coverImageUrl; + + private String pages; + + private String width; + + private String height; + + /** + * 页面模式:h5_swipper、h5_long_page、h5_form + */ + private String pageMode; + + private Boolean isPublish; + + private Boolean isTemplate; + + @Schema(title = "创建时间") + private LocalDateTime createTime; + + @Schema(title = "更新时间") + private LocalDateTime updateTime; + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/WorkForms.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/WorkForms.java new file mode 100644 index 000000000..c14c6379e --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/entity/WorkForms.java @@ -0,0 +1,36 @@ +package com.luban.api.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "WorkForms对象") +public class WorkForms implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + private String form; + + private Long workId; + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/ExceptionHandle.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/ExceptionHandle.java new file mode 100644 index 000000000..540c5922d --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/ExceptionHandle.java @@ -0,0 +1,113 @@ +package com.luban.api.exception; + + +import com.luban.api.util.JSON; +import com.luban.api.vo.Result; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindException; +import org.springframework.validation.FieldError; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 异常处理 + * + * @author WeiHongBin + */ +@Slf4j +@RestControllerAdvice +public class ExceptionHandle { + + + @Autowired + private JSON json; + + /** + * 统一异常处理器 + * + * @param e UnifiedException + * @return 响应实体 + */ + @ExceptionHandler(value = UnifiedException.class) + public ResponseEntity> unifiedExceptionHandle(UnifiedException e) { + Result result = new Result<>(e.getMessage(), e.getStatus()); + if (e.getStatus() == HttpStatus.INTERNAL_SERVER_ERROR) { + log.error(e.getMessage(), e); + } else { + log.warn(e.getMessage(), e); + } + return new ResponseEntity<>(result, HttpStatus.OK); + } + + + /** + * 处理参数校验异常 + * + * @param e BindException + * @return 响应实体 + */ + @ExceptionHandler(value = MethodArgumentNotValidException.class) + @ResponseStatus(HttpStatus.OK) + public Result methodArgumentNotValidExceptionHandle(MethodArgumentNotValidException e) { + // 获取全部错误对象 + List allErrors = e.getBindingResult().getAllErrors(); + String errorMsg = objectErrorHandle(allErrors); + log.warn("MethodArgumentNotValidException:", e); + return new Result<>().error(HttpStatus.BAD_REQUEST, errorMsg); + } + + private String objectErrorHandle(List allErrors) { + Map map = new HashMap<>(allErrors.size()); + // 把错误对象转成 k,v 存入Map + allErrors.forEach(error -> { + String key = error.getObjectName(); + if (error instanceof FieldError) { + FieldError fieldError = (FieldError) error; + key = fieldError.getField(); + } + map.put(key, error.getDefaultMessage()); + }); + return json.toJSON(map); + } + + /** + * 处理参数校验异常 + * + * @param e BindException + * @return 响应实体 + */ + @ExceptionHandler(value = BindException.class) + @ResponseStatus(HttpStatus.OK) + public Result bindExceptionHandle(BindException e) { + // 获取全部错误对象 + List allErrors = e.getAllErrors(); + String errorMsg = objectErrorHandle(allErrors); + log.warn("BindException:", e); + return new Result<>().error(HttpStatus.BAD_REQUEST, errorMsg); + } + + @ExceptionHandler(value = NoHandlerFoundException.class) + @ResponseStatus(HttpStatus.OK) + public Result noHandlerFoundExceptionHandle(NoHandlerFoundException e) { + log.warn("NoHandlerFoundException 异常:", e); + return new Result<>().error(HttpStatus.NOT_FOUND, e.getMessage()); + } + + @ExceptionHandler(value = Exception.class) + @ResponseStatus(HttpStatus.OK) + public Result exceptionHandle(Exception e) { + log.error("Exception 异常:", e); + return new Result<>().error(HttpStatus.INTERNAL_SERVER_ERROR, "服务繁忙,请稍后再试!"); + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/UnifiedException.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/UnifiedException.java new file mode 100644 index 000000000..19f574b4a --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/exception/UnifiedException.java @@ -0,0 +1,91 @@ +package com.luban.api.exception; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; + +/** + * 统一异常 + * + * @author WeiHongBin + */ +@Slf4j +@Data +@EqualsAndHashCode +public class UnifiedException extends RuntimeException { + private HttpStatus status; + private String message; + + + /** + * Unified exception + * 统一异常 + */ + public UnifiedException() { + super("服务器忙,请稍候重试"); + this.status = HttpStatus.INTERNAL_SERVER_ERROR; + this.message = "服务器忙,请稍候重试"; + } + + /** + * 统一异常 + * + * @param status 异常状态码 + * @param message 异常消息 + */ + public UnifiedException(HttpStatus status, String message) { + super(message); + this.status = status; + this.message = message; + } + + /** + * 统一异常 + * + * @param message 异常消息 + */ + public UnifiedException(String message) { + super(message); + this.status = HttpStatus.INTERNAL_SERVER_ERROR; + this.message = message; + } + + public UnifiedException(String message, Throwable e) { + super(message, e); + this.status = HttpStatus.INTERNAL_SERVER_ERROR; + this.message = message; + } + + public UnifiedException unauthorized(String message) { + return new UnifiedException(HttpStatus.UNAUTHORIZED, message); + } + + public UnifiedException verifyError(Map map) { + JavaTimeModule module = new JavaTimeModule(); + module.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + module.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + module.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss"))); + ObjectMapper mapper = new ObjectMapper().registerModule(module); + String asString = ""; + try { + asString = mapper.writeValueAsString(map); + } catch (JsonProcessingException e) { + log.error("JSON 转换异常", e); + } + return new UnifiedException(HttpStatus.BAD_REQUEST, asString); + } +} + diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/P6SpyLogger.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/P6SpyLogger.java new file mode 100644 index 000000000..620d3a0e7 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/P6SpyLogger.java @@ -0,0 +1,21 @@ +package com.luban.api.log; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.p6spy.engine.spy.appender.MessageFormattingStrategy; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * P6Spy 日志自定义处理 + * + * @author WeiHongBin + */ +@Slf4j +@Component +public class P6SpyLogger implements MessageFormattingStrategy { + @Override + public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) { + return StringUtils.isNotEmpty(sql) ? " Consume Time:" + elapsed + " ms " + now + + "\n Execute SQL:" + sql.replaceAll("[\\s]+", " ") + "\n" : null; + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/StdoutLogger.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/StdoutLogger.java new file mode 100644 index 000000000..437c007ec --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/log/StdoutLogger.java @@ -0,0 +1,20 @@ +package com.luban.api.log; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * 修改SQL执行输出到 日志,便于分析 + * + * @author WeiHongBin + */ +@Slf4j +@Component +public class StdoutLogger extends com.p6spy.engine.spy.appender.StdoutLogger { + @Override + public void logText(String text) { + if (log.isDebugEnabled()) { + log.debug(text); + } + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/ScriptsService.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/ScriptsService.java new file mode 100644 index 000000000..c7bc9bc73 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/ScriptsService.java @@ -0,0 +1,16 @@ +package com.luban.api.service; + +import com.luban.api.entity.Scripts; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 作品 服务类 + *

+ * + * @author lizhengwei + * @since 2024-06-21 + */ +public interface ScriptsService extends IService { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkFormsService.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkFormsService.java new file mode 100644 index 000000000..0317bcb29 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkFormsService.java @@ -0,0 +1,16 @@ +package com.luban.api.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.luban.api.entity.WorkForms; + +/** + *

+ * 服务类 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +public interface WorkFormsService extends IService { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkService.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkService.java new file mode 100644 index 000000000..e4cf7aa3c --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/WorkService.java @@ -0,0 +1,16 @@ +package com.luban.api.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.luban.api.entity.Work; + +/** + *

+ * 服务类 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +public interface WorkService extends IService { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/ScriptsServiceImpl.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/ScriptsServiceImpl.java new file mode 100644 index 000000000..70db2c4b7 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/ScriptsServiceImpl.java @@ -0,0 +1,20 @@ +package com.luban.api.service.impl; + +import com.luban.api.dao.ScriptsDao; +import com.luban.api.entity.Scripts; +import com.luban.api.service.ScriptsService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 作品 服务实现类 + *

+ * + * @author lizhengwei + * @since 2024-06-21 + */ +@Service +public class ScriptsServiceImpl extends ServiceImpl implements ScriptsService { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkFormsServiceImpl.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkFormsServiceImpl.java new file mode 100644 index 000000000..a64c228b1 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkFormsServiceImpl.java @@ -0,0 +1,20 @@ +package com.luban.api.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.luban.api.dao.WorkFormsDao; +import com.luban.api.entity.WorkForms; +import com.luban.api.service.WorkFormsService; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Service +public class WorkFormsServiceImpl extends ServiceImpl implements WorkFormsService { + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkServiceImpl.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkServiceImpl.java new file mode 100644 index 000000000..b447ff738 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/service/impl/WorkServiceImpl.java @@ -0,0 +1,21 @@ +package com.luban.api.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.luban.api.dao.WorkDao; +import com.luban.api.entity.Work; +import com.luban.api.service.WorkService; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author WeiHongBin + * @since 2019-11-26 + */ +@Service +public class WorkServiceImpl extends ServiceImpl implements WorkService { + + +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/util/JSON.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/util/JSON.java new file mode 100644 index 000000000..f756e40e8 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/util/JSON.java @@ -0,0 +1,66 @@ +package com.luban.api.util; + + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * JSON 转换工具 + * + * @author WeiHongBin + */ +@Slf4j +@Component +public class JSON { + + @Autowired + private ObjectMapper objectMapper; + + public String toJSON(Object jsonObj) { + try { + return objectMapper.writeValueAsString(jsonObj); + } catch (JsonProcessingException e) { + log.error("JSON 转换异常 转换异常的数据类型: " + jsonObj.getClass().getName(), e); + } + return jsonObj.toString(); + } + + + public Map toMap(String json) { + try { + return objectMapper.readValue(json, Map.class); + } catch (IOException e) { + log.error("JSON 转换异常", e); + } + return null; + } + + public List> toListMapStr(String json) { + try { + return objectMapper.readValue(json, new TypeReference>>() { + }); + } catch (IOException e) { + log.error("JSON 转换异常", e); + } + return null; + } + + + public List toListString(String json) { + try { + return objectMapper.readValue(json, new TypeReference>() { + }); + } catch (IOException e) { + log.error("JSON 转换异常", e); + } + return null; + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/FileVO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/FileVO.java new file mode 100644 index 000000000..0921ee88e --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/FileVO.java @@ -0,0 +1,17 @@ +package com.luban.api.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @author WeiHongBin + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "文件视图对象") +public class FileVO { + private String url; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/Result.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/Result.java new file mode 100644 index 000000000..e3b2e2e5c --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/Result.java @@ -0,0 +1,84 @@ +package com.luban.api.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Component; + +/** + * 统一返回 + * + * @author WeiHongBin + */ +@Schema(description = "返回响应数据") +@Component +@Data +public class Result { + @Schema(title = "返回状态码") + private Integer code; + @Schema(title = "返回消息") + private String msg; + @Schema(title = "返回当前状态") + private HttpStatus status; + @Schema(title = "返回对象") + private T data; + + public Result() { + this.msg = "成功"; + setStatus(HttpStatus.OK); + } + + public void setStatus(HttpStatus status) { + this.status = status; + setCode(status.value()); + } + + private void setCode(Integer code) { + this.code = code; + } + + public Result(T data) { + setStatus(HttpStatus.OK); + this.msg = "成功"; + this.data = data; + } + + public Result(String msg, HttpStatus status, T data) { + this.msg = msg; + setStatus(status); + this.data = data; + } + + public Result(String msg, HttpStatus status) { + this.msg = msg; + setStatus(status); + } + + public Result ok(T data) { + setStatus(HttpStatus.OK); + this.msg = "成功"; + this.data = data; + return this; + } + + public Result error(HttpStatus status, String msg) { + setStatus(status); + this.msg = msg; + this.data = null; + return this; + } + + public boolean isOK() { + return this.getStatus() == HttpStatus.OK; + } + + @Override + public String toString() { + return "Result{" + + "code=" + code + + ", msg='" + msg + '\'' + + ", status=" + status + + ", data=" + data + + '}'; + } +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/ScriptsVO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/ScriptsVO.java new file mode 100644 index 000000000..7c3edc831 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/ScriptsVO.java @@ -0,0 +1,28 @@ +package com.luban.api.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "Script视图对象") +public class ScriptsVO implements Serializable { + + private static final long serialVersionUID = 1L; + + private Integer id; + + private String title; + + private String content; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/WorkVO.java b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/WorkVO.java new file mode 100644 index 000000000..b97ed012c --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/java/com/luban/api/vo/WorkVO.java @@ -0,0 +1,37 @@ +package com.luban.api.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author WeiHongBin + */ +@Data +@EqualsAndHashCode +@Accessors(chain = true) +@Schema(title = "Work视图对象") +public class WorkVO { + + private Long id; + + private String title; + + private String description; + + private String coverImageUrl; + + private List pages; + + private LocalDateTime createTime; + + private LocalDateTime updateTime; + + private boolean isPublish; + + private boolean isTemplate; +} diff --git a/ruoyi-site/ruoyi-user-sso/src/main/resources/application-dev.yml b/ruoyi-site/ruoyi-user-sso/src/main/resources/application-dev.yml new file mode 100644 index 000000000..0549e095c --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/resources/application-dev.yml @@ -0,0 +1,174 @@ +--- # spring 配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + multipart: + max-file-size: 10MB + thymeleaf: + cache: false + prefix: classpath:/templates/ + check-template-location: true + mode: HTML + datasource: + type: com.zaxxer.hikari.HikariDataSource + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content + dynamic: + # 性能分析插件(有性能损耗 不建议生产环境使用) + p6spy: false + # 设置默认的数据源或者数据源组,默认值即为 master + primary: master + # 严格模式 匹配不到数据源则报错 + strict: true + datasource: + # 主库数据源 + master: + type: ${spring.datasource.type} + driverClassName: com.mysql.cj.jdbc.Driver + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) + url: jdbc:mysql://mysql:3306/mall-h5-core?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + username: root + password: root + # 从库数据源 + slave: + lazy: true + type: ${spring.datasource.type} + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://mysql:3306/mall-h5-core?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + username: + password: + hikari: + # 最大连接池数量 + maxPoolSize: 20 + # 最小空闲线程数量 + minIdle: 10 + # 配置获取连接等待超时的时间 + connectionTimeout: 30000 + # 校验超时时间 + validationTimeout: 5000 + # 空闲连接存活最大时间,默认10分钟 + idleTimeout: 600000 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 + maxLifetime: 1800000 + # 多久检查一次连接的活性 + keepaliveTime: 30000 + data: + redis: + # Redis数据库索引(默认为0) + database: 0 + # Redis服务器地址 + host: redis + # Redis服务器连接端口 + port: 6379 + # Redis服务器连接密码(默认为空) + password: Lzw8800580/ + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池最大连接数 + max-active: 200 + # 连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + # 连接池中的最大空闲连接 + max-idle: 10 + # 连接池中的最小空闲连接 + min-idle: 0 + + +springdoc: + api-docs: + # 是否开启接口文档 + enabled: true + # swagger-ui: + # # 持久化认证数据 + # persistAuthorization: true + info: + # 标题 + title: '标题:${spring.application.name}多租户管理系统_接口文档' + # 描述 + description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...' + # 版本 + version: '版本号: 1.0.0' + # 作者信息 + contact: + name: Lion Li + email: crazylionli@163.com + url: https://gitee.com/dromara/RuoYi-Vue-Plus + components: + # 鉴权方式配置 + security-schemes: + apiKey: + type: APIKEY + in: HEADER + name: Authorization + #这里定义了两个分组,可定义多个,也可以不定义 + group-configs: + - group: 1.演示模块 + packages-to-scan: org.dromara.demo + - group: 2.通用模块 + packages-to-scan: org.dromara.web + - group: 3.系统模块 + packages-to-scan: org.dromara.system + - group: 4.代码生成模块 + packages-to-scan: org.dromara.generator + + + + +# 多租户配置 +tenant: + # 是否开启 + enable: true + # 排除表 + excludes: + - sys_menu + - sys_tenant + - sys_tenant_package + - sys_saas_user_role + + + +# MyBatisPlus配置 +# https://baomidou.com/config/ +mybatis-plus: + # 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper + mapperPackage: com.luban.api.dao + # # 实体扫描,多个package用逗号或者分号分隔 + # typeAliasesPackage: com.luban.api.entity + global-config: + dbConfig: + # 主键类型 + # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID + # 如需改为自增 需要将数据库表全部设置为自增 + idType: ASSIGN_ID + +# dubbo +dubbo: + protocol: + name: tri + port: 20880 + application: + qos-enable: false + logger: slf4j + name: ${spring.application.name} + # 注册中心配置 + registry: + address: nacos://nacos-registry:8848 + group: DUBBO_GROUP + parameters: + namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b + # 消费者相关配置 + consumer: + # 结果缓存(LRU算法) + # 会有数据不一致问题 建议在注解局部开启 + cache: false + # 支持校验注解 + validation: jvalidationNew + # 调用重试 不包括第一次 0为不需要重试 + retries: 0 + # 初始化检查 + check: false diff --git a/ruoyi-site/ruoyi-user-sso/src/main/resources/application-local.yml b/ruoyi-site/ruoyi-user-sso/src/main/resources/application-local.yml new file mode 100644 index 000000000..3e93dfb98 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/resources/application-local.yml @@ -0,0 +1,174 @@ +--- # spring 配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages + servlet: + multipart: + max-file-size: 10MB + thymeleaf: + cache: false + prefix: classpath:/templates/ + check-template-location: true + mode: HTML + datasource: + type: com.zaxxer.hikari.HikariDataSource + # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content + dynamic: + # 性能分析插件(有性能损耗 不建议生产环境使用) + p6spy: false + # 设置默认的数据源或者数据源组,默认值即为 master + primary: master + # 严格模式 匹配不到数据源则报错 + strict: true + datasource: + # 主库数据源 + master: + type: ${spring.datasource.type} + driverClassName: com.mysql.cj.jdbc.Driver + # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 + # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) + url: jdbc:mysql://localhost:3306/mall-h5-core?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + username: root + password: root + # 从库数据源 + slave: + lazy: true + type: ${spring.datasource.type} + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/mall-h5-core?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + username: + password: + hikari: + # 最大连接池数量 + maxPoolSize: 20 + # 最小空闲线程数量 + minIdle: 10 + # 配置获取连接等待超时的时间 + connectionTimeout: 30000 + # 校验超时时间 + validationTimeout: 5000 + # 空闲连接存活最大时间,默认10分钟 + idleTimeout: 600000 + # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟 + maxLifetime: 1800000 + # 多久检查一次连接的活性 + keepaliveTime: 30000 + data: + redis: + # Redis数据库索引(默认为0) + database: 0 + # Redis服务器地址 + host: 127.0.0.1 + # Redis服务器连接端口 + port: 6379 + # Redis服务器连接密码(默认为空) + password: Lzw8800580/ + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池最大连接数 + max-active: 200 + # 连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + # 连接池中的最大空闲连接 + max-idle: 10 + # 连接池中的最小空闲连接 + min-idle: 0 + + +springdoc: + api-docs: + # 是否开启接口文档 + enabled: true + # swagger-ui: + # # 持久化认证数据 + # persistAuthorization: true + info: + # 标题 + title: '标题:${spring.application.name}多租户管理系统_接口文档' + # 描述 + description: '描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...' + # 版本 + version: '版本号: 1.0.0' + # 作者信息 + contact: + name: Lion Li + email: crazylionli@163.com + url: https://gitee.com/dromara/RuoYi-Vue-Plus + components: + # 鉴权方式配置 + security-schemes: + apiKey: + type: APIKEY + in: HEADER + name: Authorization + #这里定义了两个分组,可定义多个,也可以不定义 + group-configs: + - group: 1.演示模块 + packages-to-scan: org.dromara.demo + - group: 2.通用模块 + packages-to-scan: org.dromara.web + - group: 3.系统模块 + packages-to-scan: org.dromara.system + - group: 4.代码生成模块 + packages-to-scan: org.dromara.generator + + + + +# 多租户配置 +tenant: + # 是否开启 + enable: true + # 排除表 + excludes: + - sys_menu + - sys_tenant + - sys_tenant_package + - sys_saas_user_role + + + +# MyBatisPlus配置 +# https://baomidou.com/config/ +mybatis-plus: + # 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper + mapperPackage: com.luban.api.dao +# # 实体扫描,多个package用逗号或者分号分隔 +# typeAliasesPackage: com.luban.api.entity + global-config: + dbConfig: + # 主键类型 + # AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID + # 如需改为自增 需要将数据库表全部设置为自增 + idType: ASSIGN_ID + +# dubbo +dubbo: + protocol: + name: tri + port: 20880 + application: + qos-enable: false + logger: slf4j + name: ${spring.application.name} + # 注册中心配置 + registry: + address: nacos://127.0.0.1:8848 + group: DUBBO_GROUP + parameters: + namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b + # 消费者相关配置 + consumer: + # 结果缓存(LRU算法) + # 会有数据不一致问题 建议在注解局部开启 + cache: false + # 支持校验注解 + validation: jvalidationNew + # 调用重试 不包括第一次 0为不需要重试 + retries: 0 + # 初始化检查 + check: false diff --git a/ruoyi-site/ruoyi-user-sso/src/main/resources/application.yml b/ruoyi-site/ruoyi-user-sso/src/main/resources/application.yml new file mode 100644 index 000000000..1d650f5f8 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/resources/application.yml @@ -0,0 +1,12 @@ +# Tomcat +server: + port: 19200 + +# Spring +spring: + application: + # 应用名称 + name: mall-h5 + profiles: + # 环境配置 + active: @profiles.active@ diff --git a/ruoyi-site/ruoyi-user-sso/src/main/resources/engine-assets/engine.umd.js b/ruoyi-site/ruoyi-user-sso/src/main/resources/engine-assets/engine.umd.js new file mode 100644 index 000000000..9c7179cd6 --- /dev/null +++ b/ruoyi-site/ruoyi-user-sso/src/main/resources/engine-assets/engine.umd.js @@ -0,0 +1,205925 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("vue")); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["engine"] = factory(require("vue")); + else + root["engine"] = factory(root["Vue"]); +})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "fb15"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 0: +/*!********************************!*\ + !*** ./util.inspect (ignored) ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "0020": +/*!*******************************************************!*\ + !*** ./node_modules/ant-design-vue/es/table/index.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Table */ "372e"); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-ref */ "46cf"); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue_ref__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue */ "8bbf"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/props-util */ "daa3"); +/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../base */ "db14"); + + + + + + + + +vue__WEBPACK_IMPORTED_MODULE_4___default.a.use(vue_ref__WEBPACK_IMPORTED_MODULE_3___default.a, { name: 'ant-ref' }); + +var Table = { + name: 'ATable', + Column: _Table__WEBPACK_IMPORTED_MODULE_2__["default"].Column, + ColumnGroup: _Table__WEBPACK_IMPORTED_MODULE_2__["default"].ColumnGroup, + props: _Table__WEBPACK_IMPORTED_MODULE_2__["default"].props, + methods: { + normalize: function normalize() { + var _this = this; + + var elements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + var columns = []; + elements.forEach(function (element) { + if (!element.tag) { + return; + } + var key = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getKey"])(element); + var style = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getStyle"])(element); + var cls = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getClass"])(element); + var props = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getOptionProps"])(element); + var events = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getEvents"])(element); + var listeners = {}; + Object.keys(events).forEach(function (e) { + /* + Convert events on template Column to function props onPropAbcChange in Table.columns prop. + If you write template code like below: + + You will get these events: + { + 'prop-abc-change': this.f1, + 'update:prop-abc': [this.f2, e => this.dataAbc = e], + 'update:propAbc': e => this.dataAbc = e, + } + All of these events would be treat as column.onPropAbcChange, + but only one of them will be valid, which can not be determined. + */ + var k = void 0; + if (e.startsWith('update:')) { + k = 'on-' + e.substr('update:'.length) + '-change'; + } else { + k = 'on-' + e; + } + listeners[Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["camelize"])(k)] = events[e]; + }); + + var _getSlots = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getSlots"])(element), + children = _getSlots['default'], + restSlots = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_getSlots, ['default']); + + var column = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, restSlots, props, { style: style, 'class': cls }, listeners); + if (key) { + column.key = key; + } + if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getSlotOptions"])(element).__ANT_TABLE_COLUMN_GROUP) { + column.children = _this.normalize(typeof children === 'function' ? children() : children); + } else { + var customRender = element.data && element.data.scopedSlots && element.data.scopedSlots['default']; + column.customRender = column.customRender || customRender; + } + columns.push(column); + }); + return columns; + }, + updateColumns: function updateColumns() { + var _this2 = this; + + var cols = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + var columns = []; + var $slots = this.$slots, + $scopedSlots = this.$scopedSlots; + + cols.forEach(function (col) { + var _col$slots = col.slots, + slots = _col$slots === undefined ? {} : _col$slots, + _col$scopedSlots = col.scopedSlots, + scopedSlots = _col$scopedSlots === undefined ? {} : _col$scopedSlots, + restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(col, ['slots', 'scopedSlots']); + + var column = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, restProps); + Object.keys(slots).forEach(function (key) { + var name = slots[key]; + if (column[key] === undefined && $slots[name]) { + column[key] = $slots[name].length === 1 ? $slots[name][0] : $slots[name]; + } + }); + Object.keys(scopedSlots).forEach(function (key) { + var name = scopedSlots[key]; + if (column[key] === undefined && $scopedSlots[name]) { + column[key] = $scopedSlots[name]; + } + }); + // if (slotScopeName && $scopedSlots[slotScopeName]) { + // column.customRender = column.customRender || $scopedSlots[slotScopeName] + // } + if (col.children) { + column.children = _this2.updateColumns(column.children); + } + columns.push(column); + }); + return columns; + } + }, + render: function render() { + var h = arguments[0]; + var $slots = this.$slots, + normalize = this.normalize, + $scopedSlots = this.$scopedSlots; + + var props = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getOptionProps"])(this); + var columns = props.columns ? this.updateColumns(props.columns) : normalize($slots['default']); + var title = props.title, + footer = props.footer; + var slotTitle = $scopedSlots.title, + slotFooter = $scopedSlots.footer, + _$scopedSlots$expande = $scopedSlots.expandedRowRender, + expandedRowRender = _$scopedSlots$expande === undefined ? props.expandedRowRender : _$scopedSlots$expande, + expandIcon = $scopedSlots.expandIcon; + + title = title || slotTitle; + footer = footer || slotFooter; + var tProps = { + props: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, props, { + columns: columns, + title: title, + footer: footer, + expandedRowRender: expandedRowRender, + expandIcon: this.$props.expandIcon || expandIcon + }), + on: Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getListeners"])(this) + }; + return h(_Table__WEBPACK_IMPORTED_MODULE_2__["default"], tProps); + } +}; +/* istanbul ignore next */ +Table.install = function (Vue) { + Vue.use(_base__WEBPACK_IMPORTED_MODULE_6__["default"]); + Vue.component(Table.name, Table); + Vue.component(Table.Column.name, Table.Column); + Vue.component(Table.ColumnGroup.name, Table.ColumnGroup); +}; + +/* harmony default export */ __webpack_exports__["default"] = (Table); + +/***/ }), + +/***/ "0066": +/*!*************************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-tree-select/src/SelectNode.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _vc_tree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../vc-tree */ "7d1c"); +/* harmony import */ var _vc_tree__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vc_tree__WEBPACK_IMPORTED_MODULE_1__); + + +/** + * SelectNode wrapped the tree node. + * Let's use SelectNode instead of TreeNode + * since TreeNode is so confuse here. + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'SelectNode', + functional: true, + isTreeNode: true, + props: _vc_tree__WEBPACK_IMPORTED_MODULE_1__["TreeNode"].props, + render: function render(h, context) { + var props = context.props, + slots = context.slots, + listeners = context.listeners, + data = context.data, + scopedSlots = context.scopedSlots; + + var $slots = slots() || {}; + var children = $slots['default']; + var slotsKey = Object.keys($slots); + var scopedSlotsTemp = {}; // for vue 2.5.x + slotsKey.forEach(function (name) { + scopedSlotsTemp[name] = function () { + return $slots[name]; + }; + }); + var treeNodeProps = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, data, { + on: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, listeners, data.nativeOn), + props: props, + scopedSlots: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, scopedSlotsTemp, scopedSlots) + }); + return h( + _vc_tree__WEBPACK_IMPORTED_MODULE_1__["TreeNode"], + treeNodeProps, + [children] + ); + } +}); + +/***/ }), + +/***/ "00a8": +/*!*****************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-trigger/PopupInner.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "92fa"); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); +/* harmony import */ var _LazyRenderBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LazyRenderBox */ "e7b9"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/props-util */ "daa3"); + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + props: { + hiddenClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string.def(''), + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + visible: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool + }, + render: function render() { + var h = arguments[0]; + var _$props = this.$props, + prefixCls = _$props.prefixCls, + visible = _$props.visible, + hiddenClassName = _$props.hiddenClassName; + + var divProps = { + on: Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getListeners"])(this) + }; + + return h( + 'div', + babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([divProps, { 'class': !visible ? hiddenClassName : '' }]), + [h( + _LazyRenderBox__WEBPACK_IMPORTED_MODULE_2__["default"], + { 'class': prefixCls + '-content', attrs: { visible: visible } + }, + [this.$slots['default']] + )] + ); + } +}); + +/***/ }), + +/***/ "00ce": +/*!*********************************************!*\ + !*** ./node_modules/get-intrinsic/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $Error = __webpack_require__(/*! es-errors */ "a645"); +var $EvalError = __webpack_require__(/*! es-errors/eval */ "417f"); +var $RangeError = __webpack_require__(/*! es-errors/range */ "dc99"); +var $ReferenceError = __webpack_require__(/*! es-errors/ref */ "1409"); +var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "67ee"); +var $TypeError = __webpack_require__(/*! es-errors/type */ "0d25"); +var $URIError = __webpack_require__(/*! es-errors/uri */ "67d9"); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(/*! has-symbols */ "5156")(); +var hasProto = __webpack_require__(/*! has-proto */ "0a36")(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(/*! function-bind */ "0f7c"); +var hasOwn = __webpack_require__(/*! hasown */ "9671"); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ "00fd": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getRawTag.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var Symbol = __webpack_require__(/*! ./_Symbol */ "9e69"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +module.exports = getRawTag; + + +/***/ }), + +/***/ "010e": +/*!***********************************************!*\ + !*** ./node_modules/moment/locale/uz-latn.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Uzbek Latin [uz-latn] +//! author : Rasulbek Mirzayev : github.com/Rasulbeeek + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var uzLatn = moment.defineLocale('uz-latn', { + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( + '_' + ), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays: + 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( + '_' + ), + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Bugun soat] LT [da]', + nextDay: '[Ertaga] LT [da]', + nextWeek: 'dddd [kuni soat] LT [da]', + lastDay: '[Kecha soat] LT [da]', + lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", + sameElse: 'L', + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: 'Bir necha %s oldin', + s: 'soniya', + ss: '%d soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + return uzLatn; + +}))); + + +/***/ }), + +/***/ "0113": +/*!*****************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-table/src/TableRow.js ***! + \*****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "6042"); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "4d26"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../_util/vue-types */ "4d91"); +/* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TableCell */ "22d5"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../_util/props-util */ "daa3"); +/* harmony import */ var _util_BaseMixin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../_util/BaseMixin */ "b488"); +/* harmony import */ var _util_warning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../_util/warning */ "6a21"); + + + + + + + + + +function noop() {} +var TableRow = { + name: 'TableRow', + mixins: [_util_BaseMixin__WEBPACK_IMPORTED_MODULE_7__["default"]], + inject: { + store: { from: 'table-store', 'default': function _default() { + return {}; + } } + }, + props: Object(_util_props_util__WEBPACK_IMPORTED_MODULE_6__["initDefaultProps"])({ + customRow: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func, + // onRowClick: PropTypes.func, + // onRowDoubleClick: PropTypes.func, + // onRowContextMenu: PropTypes.func, + // onRowMouseEnter: PropTypes.func, + // onRowMouseLeave: PropTypes.func, + record: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].object, + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string, + // onHover: PropTypes.func, + columns: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].array, + index: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].number, + rowKey: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].number]).isRequired, + className: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string, + indent: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].number, + indentSize: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].number, + hasExpandIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func, + fixed: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool]), + renderExpandIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func, + renderExpandIconCell: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func, + components: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].any, + expandedRow: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool, + isAnyColumnsFixed: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool, + ancestorKeys: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].array.isRequired, + expandIconColumnIndex: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].number, + expandRowByClick: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool + // visible: PropTypes.bool, + // hovered: PropTypes.bool, + // height: PropTypes.any, + }, { + // expandIconColumnIndex: 0, + // expandRowByClick: false, + hasExpandIcon: function hasExpandIcon() {}, + renderExpandIcon: function renderExpandIcon() {}, + renderExpandIconCell: function renderExpandIconCell() {} + }), + + computed: { + visible: function visible() { + var expandedRowKeys = this.store.expandedRowKeys; + var ancestorKeys = this.$props.ancestorKeys; + + return !!(ancestorKeys.length === 0 || ancestorKeys.every(function (k) { + return expandedRowKeys.includes(k); + })); + }, + height: function height() { + var _store = this.store, + expandedRowsHeight = _store.expandedRowsHeight, + fixedColumnsBodyRowsHeight = _store.fixedColumnsBodyRowsHeight; + var _$props = this.$props, + fixed = _$props.fixed, + rowKey = _$props.rowKey; + + + if (!fixed) { + return null; + } + + if (expandedRowsHeight[rowKey]) { + return expandedRowsHeight[rowKey]; + } + + if (fixedColumnsBodyRowsHeight[rowKey]) { + return fixedColumnsBodyRowsHeight[rowKey]; + } + + return null; + }, + hovered: function hovered() { + var currentHoverKey = this.store.currentHoverKey; + var rowKey = this.$props.rowKey; + + return currentHoverKey === rowKey; + } + }, + + data: function data() { + // this.shouldRender = this.visible + return { + shouldRender: this.visible + }; + }, + mounted: function mounted() { + var _this = this; + + if (this.shouldRender) { + this.$nextTick(function () { + _this.saveRowRef(); + }); + } + }, + + watch: { + visible: { + handler: function handler(val) { + if (val) { + this.shouldRender = true; + } + }, + + immediate: true + } + }, + + updated: function updated() { + var _this2 = this; + + if (this.shouldRender && !this.rowRef) { + this.$nextTick(function () { + _this2.saveRowRef(); + }); + } + }, + + methods: { + onRowClick: function onRowClick(event) { + var rowPropFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop; + var record = this.record, + index = this.index; + + this.__emit('rowClick', record, index, event); + rowPropFunc(event); + }, + onRowDoubleClick: function onRowDoubleClick(event) { + var rowPropFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop; + var record = this.record, + index = this.index; + + this.__emit('rowDoubleClick', record, index, event); + rowPropFunc(event); + }, + onContextMenu: function onContextMenu(event) { + var rowPropFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop; + var record = this.record, + index = this.index; + + this.__emit('rowContextmenu', record, index, event); + rowPropFunc(event); + }, + onMouseEnter: function onMouseEnter(event) { + var rowPropFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop; + var record = this.record, + index = this.index, + rowKey = this.rowKey; + + this.__emit('hover', true, rowKey); + this.__emit('rowMouseenter', record, index, event); + rowPropFunc(event); + }, + onMouseLeave: function onMouseLeave(event) { + var rowPropFunc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop; + var record = this.record, + index = this.index, + rowKey = this.rowKey; + + this.__emit('hover', false, rowKey); + this.__emit('rowMouseleave', record, index, event); + rowPropFunc(event); + }, + setExpandedRowHeight: function setExpandedRowHeight() { + var store = this.store, + rowKey = this.rowKey; + var expandedRowsHeight = store.expandedRowsHeight; + + var height = this.rowRef.getBoundingClientRect().height; + expandedRowsHeight = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, expandedRowsHeight, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, rowKey, height)); + store.expandedRowsHeight = expandedRowsHeight; + }, + setRowHeight: function setRowHeight() { + var store = this.store, + rowKey = this.rowKey; + var fixedColumnsBodyRowsHeight = store.fixedColumnsBodyRowsHeight; + + var height = this.rowRef.getBoundingClientRect().height; + store.fixedColumnsBodyRowsHeight = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, fixedColumnsBodyRowsHeight, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, rowKey, height)); + }, + getStyle: function getStyle() { + var height = this.height, + visible = this.visible; + + var style = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_6__["getStyle"])(this); + if (height) { + style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, style, { height: height }); + } + + if (!visible && !style.display) { + style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, style, { display: 'none' }); + } + + return style; + }, + saveRowRef: function saveRowRef() { + this.rowRef = this.$el; + + var isAnyColumnsFixed = this.isAnyColumnsFixed, + fixed = this.fixed, + expandedRow = this.expandedRow, + ancestorKeys = this.ancestorKeys; + + + if (!isAnyColumnsFixed) { + return; + } + + if (!fixed && expandedRow) { + this.setExpandedRowHeight(); + } + + if (!fixed && ancestorKeys.length >= 0) { + this.setRowHeight(); + } + } + }, + + render: function render() { + var _this3 = this; + + var h = arguments[0]; + + if (!this.shouldRender) { + return null; + } + + var prefixCls = this.prefixCls, + columns = this.columns, + record = this.record, + rowKey = this.rowKey, + index = this.index, + _customRow = this.customRow, + customRow = _customRow === undefined ? noop : _customRow, + indent = this.indent, + indentSize = this.indentSize, + hovered = this.hovered, + height = this.height, + visible = this.visible, + components = this.components, + hasExpandIcon = this.hasExpandIcon, + renderExpandIcon = this.renderExpandIcon, + renderExpandIconCell = this.renderExpandIconCell; + + var BodyRow = components.body.row; + var BodyCell = components.body.cell; + + var className = ''; + + if (hovered) { + className += ' ' + prefixCls + '-hover'; + } + + var cells = []; + + renderExpandIconCell(cells); + + for (var i = 0; i < columns.length; i += 1) { + var column = columns[i]; + + Object(_util_warning__WEBPACK_IMPORTED_MODULE_8__["default"])(column.onCellClick === undefined, 'column[onCellClick] is deprecated, please use column[customCell] instead.'); + + cells.push(h(_TableCell__WEBPACK_IMPORTED_MODULE_5__["default"], { + attrs: { + prefixCls: prefixCls, + record: record, + indentSize: indentSize, + indent: indent, + index: index, + column: column, + + expandIcon: hasExpandIcon(i) && renderExpandIcon(), + component: BodyCell + }, + key: column.key || column.dataIndex })); + } + + var _ref = customRow(record, index) || {}, + customClass = _ref['class'], + customClassName = _ref.className, + customStyle = _ref.style, + rowProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref, ['class', 'className', 'style']); + + var style = { height: typeof height === 'number' ? height + 'px' : height }; + + if (!visible) { + style.display = 'none'; + } + + style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, style, customStyle); + var rowClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(prefixCls, className, prefixCls + '-level-' + indent, customClassName, customClass); + var rowPropEvents = rowProps.on || {}; + var bodyRowProps = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_6__["mergeProps"])(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, rowProps, { style: style }), { + on: { + click: function click(e) { + _this3.onRowClick(e, rowPropEvents.click); + }, + dblclick: function dblclick(e) { + _this3.onRowDoubleClick(e, rowPropEvents.dblclick); + }, + mouseenter: function mouseenter(e) { + _this3.onMouseEnter(e, rowPropEvents.mouseenter); + }, + mouseleave: function mouseleave(e) { + _this3.onMouseLeave(e, rowPropEvents.mouseleave); + }, + contextmenu: function contextmenu(e) { + _this3.onContextMenu(e, rowPropEvents.contextmenu); + } + }, + 'class': rowClassName + }, { + attrs: { + 'data-row-key': rowKey + } + }); + return h( + BodyRow, + bodyRowProps, + [cells] + ); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (TableRow); + +/***/ }), + +/***/ "014b": +/*!************************************************************!*\ + !*** ./node_modules/core-js/library/modules/es6.symbol.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(/*! ./_global */ "e53d"); +var has = __webpack_require__(/*! ./_has */ "07e3"); +var DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ "8e60"); +var $export = __webpack_require__(/*! ./_export */ "63b6"); +var redefine = __webpack_require__(/*! ./_redefine */ "9138"); +var META = __webpack_require__(/*! ./_meta */ "ebfd").KEY; +var $fails = __webpack_require__(/*! ./_fails */ "294c"); +var shared = __webpack_require__(/*! ./_shared */ "dbdb"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "45f2"); +var uid = __webpack_require__(/*! ./_uid */ "62a0"); +var wks = __webpack_require__(/*! ./_wks */ "5168"); +var wksExt = __webpack_require__(/*! ./_wks-ext */ "ccb9"); +var wksDefine = __webpack_require__(/*! ./_wks-define */ "6718"); +var enumKeys = __webpack_require__(/*! ./_enum-keys */ "47ee"); +var isArray = __webpack_require__(/*! ./_is-array */ "9003"); +var anObject = __webpack_require__(/*! ./_an-object */ "e4ae"); +var isObject = __webpack_require__(/*! ./_is-object */ "f772"); +var toObject = __webpack_require__(/*! ./_to-object */ "241eb"); +var toIObject = __webpack_require__(/*! ./_to-iobject */ "36c3"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "1bc3"); +var createDesc = __webpack_require__(/*! ./_property-desc */ "aebd"); +var _create = __webpack_require__(/*! ./_object-create */ "a159"); +var gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ "0395"); +var $GOPD = __webpack_require__(/*! ./_object-gopd */ "bf0b"); +var $GOPS = __webpack_require__(/*! ./_object-gops */ "9aa9"); +var $DP = __webpack_require__(/*! ./_object-dp */ "d9f6"); +var $keys = __webpack_require__(/*! ./_object-keys */ "c3a1"); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(/*! ./_object-gopn */ "6abf").f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(/*! ./_object-pie */ "355d").f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(/*! ./_library */ "b8e3")) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); + } +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ "35e8")($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), + +/***/ "0169": +/*!****************************************************!*\ + !*** ./src/components/core/plugins/charts/line.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _luban_h5_plugin_common_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @luban-h5/plugin-common-props */ "380b"); +/* harmony import */ var _utils_excel_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/excel-parser */ "b92b"); + + +var _window$VeIndex = window.VeIndex, + VeLine = _window$VeIndex.VeLine, + VeRadar = _window$VeIndex.VeRadar, + VePie = _window$VeIndex.VePie, + VeHistogram = _window$VeIndex.VeHistogram, + VeFunnel = _window$VeIndex.VeFunnel; + +// const title = str => str.slice(0, 1).toUpperCase() + str.slice(1) + +/* harmony default export */ __webpack_exports__["default"] = ({ + extra: { + defaultStyle: { + width: 320, + height: 400 + } + }, + name: 'lbp-line-chart', + // mixins: [ChartMixin], + props: { + dataset: _luban_h5_plugin_common_props__WEBPACK_IMPORTED_MODULE_0__["default"].excel({ + defaultValue: function defaultValue() { + return [['日期', '销售量'], ['1月1日', 123], ['1月2日', 1223], ['1月3日', 2123], ['1月4日', 4123], ['1月5日', 3123], ['1月6日', 7123]]; + } + }), + type: _luban_h5_plugin_common_props__WEBPACK_IMPORTED_MODULE_0__["default"].string({ + label: '类型', + defaultValue: 'line', + visible: false + }), + colors: _luban_h5_plugin_common_props__WEBPACK_IMPORTED_MODULE_0__["default"].colors({ + label: '颜色面板', + defaultValue: function defaultValue() { + return [ + // https://github.com/ElemeFE/v-charts/blob/01ebb541a5d905047dd52957ae0898d529342235/src/constants.js#L20 + '#19d4ae', '#5ab1ef', '#fa6e86', '#ffb980', '#0067a6', '#c4b4e4', '#d87a80', '#9cbbff', '#d9d0c7', '#87a997', '#d49ea2', '#5b4947', '#7ba3a8']; + } + }) + }, + data: function data() { + return { + option: {} + }; + }, + render: function render() { + var h = arguments[0]; + var chartData = _utils_excel_parser__WEBPACK_IMPORTED_MODULE_1__["default"].csv2VChartJson(this.dataset); + switch (this.type) { + case 'line': + return h(VeLine, { + "attrs": { + "data": chartData, + "colors": this.colors + } + }); + case 'histogram': + return h(VeHistogram, { + "attrs": { + "data": chartData, + "colors": this.colors + } + }); + case 'pie': + return h(VePie, { + "attrs": { + "data": chartData, + "colors": this.colors + } + }); + case 'funnel': + return h(VeFunnel, { + "attrs": { + "data": chartData, + "colors": this.colors + } + }); + case 'radar': + return h(VeRadar, { + "attrs": { + "data": chartData, + "colors": this.colors + } + }); + default: + return null; + } + }, + mounted: function mounted() { + // this.renderChart() + } +}); + +/***/ }), + +/***/ "01c2": +/*!********************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/time-picker/locale/en_US.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var locale = { + placeholder: 'Select time' +}; + +/* harmony default export */ __webpack_exports__["default"] = (locale); + +/***/ }), + +/***/ "01c9": +/*!***********************************************************!*\ + !*** ./node_modules/ant-design-vue/es/table/interface.js ***! + \***********************************************************/ +/*! exports provided: ColumnFilterItem, ColumnProps, TableLocale, RowSelectionType, TableRowSelection, TableProps, SelectionCheckboxAllProps, SelectionBoxProps, FilterMenuProps */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnFilterItem", function() { return ColumnFilterItem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColumnProps", function() { return ColumnProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableLocale", function() { return TableLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RowSelectionType", function() { return RowSelectionType; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableRowSelection", function() { return TableRowSelection; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TableProps", function() { return TableProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionCheckboxAllProps", function() { return SelectionCheckboxAllProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionBoxProps", function() { return SelectionBoxProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterMenuProps", function() { return FilterMenuProps; }); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); +/* harmony import */ var _pagination__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../pagination */ "de1b"); +/* harmony import */ var _spin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../spin */ "8592"); + + + + + +var PaginationProps = Object(_pagination__WEBPACK_IMPORTED_MODULE_2__["PaginationProps"])(); +var SpinProps = Object(_spin__WEBPACK_IMPORTED_MODULE_3__["SpinProps"])(); + +// export type CompareFn = ((a: T, b: T) => number); +var ColumnFilterItem = _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].shape({ + text: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + value: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + children: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array +}).loose; + +var ColumnProps = { + title: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + // key?: React.Key; + dataIndex: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + customRender: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + customCell: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + customHeaderCell: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + align: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['left', 'right', 'center']), + ellipsis: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + filters: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].arrayOf(ColumnFilterItem), + // onFilter: (value: any, record: T) => PropTypes.bool, + filterMultiple: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + filterDropdown: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + filterDropdownVisible: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + // onFilterDropdownVisibleChange?: (visible: boolean) => void; + sorter: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].boolean, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func]), + defaultSortOrder: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['ascend', 'descend']), + colSpan: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number, + width: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number]), + className: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + fixed: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['left', 'right'])]), + filterIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + filteredValue: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + filtered: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + defaultFilteredValue: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + sortOrder: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['ascend', 'descend'])]), + sortDirections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array + // children?: ColumnProps[]; + // onCellClick?: (record: T, event: any) => void; + // onCell?: (record: T) => any; + // onHeaderCell?: (props: ColumnProps) => any; +}; + +// export interface TableComponents { +// table?: any; +// header?: { +// wrapper?: any; +// row?: any; +// cell?: any; +// }; +// body?: { +// wrapper?: any; +// row?: any; +// cell?: any; +// }; +// } + +var TableLocale = _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].shape({ + filterTitle: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + filterConfirm: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + filterReset: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + emptyText: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + selectAll: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + selectInvert: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + sortTitle: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + expand: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + collapse: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string +}).loose; + +var RowSelectionType = _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['checkbox', 'radio']); +// export type SelectionSelectFn = (record: T, selected: boolean, selectedRows: Object[]) => any; + +var TableRowSelection = { + type: RowSelectionType, + selectedRowKeys: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + // onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => any; + getCheckboxProps: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + // onSelect?: SelectionSelectFn; + // onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any; + // onSelectInvert?: (selectedRows: Object[]) => any; + selections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool]), + hideDefaultSelections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + fixed: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + columnWidth: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number]), + selectWay: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['onSelect', 'onSelectMultiple', 'onSelectAll', 'onSelectInvert']), + columnTitle: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any +}; + +var TableProps = { + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + dropdownPrefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + rowSelection: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].shape(TableRowSelection).loose, null]), + pagination: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].shape(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, PaginationProps, { + position: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['top', 'bottom', 'both']) + })).loose, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool]), + size: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOf(['default', 'middle', 'small', 'large']), + dataSource: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + components: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].object, + columns: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + rowKey: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func]), + rowClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + expandedRowRender: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + defaultExpandAllRows: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + defaultExpandedRowKeys: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + expandedRowKeys: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + expandIconAsCell: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + expandIconColumnIndex: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number, + expandRowByClick: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + // onExpandedRowsChange?: (expandedRowKeys: string[] | number[]) => void; + // onExpand?: (expanded: boolean, record: T) => void; + // onChange?: (pagination: PaginationProps | boolean, filters: string[], sorter: Object) => any; + loading: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].shape(SpinProps).loose, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool]), + locale: TableLocale, + indentSize: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number, + // onRowClick?: (record: T, index: number, event: Event) => any; + customRow: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + customHeaderRow: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + useFixedHeader: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + bordered: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + showHeader: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + footer: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + title: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + scroll: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].object, + childrenColumnName: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string]), + bodyStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + sortDirections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + tableLayout: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + expandIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + transformCellText: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func + // className?: PropTypes.string, + // style?: React.CSSProperties; + // children?: React.ReactNode; +}; + +// export interface TableStateFilters { +// [key: string]: string[]; +// } + +// export interface TableState { +// pagination: PaginationProps; +// filters: TableStateFilters; +// sortColumn: ColumnProps | null; +// sortOrder: PropTypes.string, +// } + +// export type SelectionItemSelectFn = (key: string[]) => any; + +// export interface SelectionItem { +// key: PropTypes.string, +// text: PropTypes.any, +// onSelect: SelectionItemSelectFn; +// } + +var SelectionCheckboxAllProps = { + store: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + locale: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + disabled: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + getCheckboxPropsByItem: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + getRecordKey: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + data: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + // onSelect: (key: string, index: number, selectFunc: any) => void; + hideDefaultSelections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + selections: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].array, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool]), + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func +}; + +// export interface SelectionCheckboxAllState { +// checked: PropTypes.bool, +// indeterminate: PropTypes.bool, +// } + +var SelectionBoxProps = { + store: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + type: RowSelectionType, + defaultSelection: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].arrayOf([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number]), + rowIndex: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number]), + name: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + disabled: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].bool, + id: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string + // onChange: React.ChangeEventHandler; +}; + +// export interface SelectionBoxState { +// checked?: PropTypes.bool, +// } + +var FilterMenuProps = { + _propsSymbol: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].any, + locale: TableLocale, + selectedKeys: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].arrayOf([_util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].number]), + column: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].object, + confirmFilter: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + dropdownPrefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].string, + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func, + handleFilter: _util_vue_types__WEBPACK_IMPORTED_MODULE_1__["default"].func +}; + +// export interface FilterMenuState { +// selectedKeys: string[]; +// keyPathOfSelectedItem: { [key: string]: string }; +// visible?: PropTypes.bool, +// } + +/***/ }), + +/***/ "01f9": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/_iter-define.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(/*! ./_library */ "2d00"); +var $export = __webpack_require__(/*! ./_export */ "5ca1"); +var redefine = __webpack_require__(/*! ./_redefine */ "2aba"); +var hide = __webpack_require__(/*! ./_hide */ "32e9"); +var Iterators = __webpack_require__(/*! ./_iterators */ "84f2"); +var $iterCreate = __webpack_require__(/*! ./_iter-create */ "41a0"); +var setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ "7f20"); +var getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ "38fd"); +var ITERATOR = __webpack_require__(/*! ./_wks */ "2b4c")('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), + +/***/ "022e": +/*!**********************************************************!*\ + !*** ./node_modules/vant/es/mixins/close-on-popstate.js ***! + \**********************************************************/ +/*! exports provided: CloseOnPopstateMixin */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CloseOnPopstateMixin", function() { return CloseOnPopstateMixin; }); +/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/dom/event */ "1325"); +/* harmony import */ var _bind_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bind-event */ "5fbe"); + + +var CloseOnPopstateMixin = { + mixins: [Object(_bind_event__WEBPACK_IMPORTED_MODULE_1__["BindEventMixin"])(function (bind, isBind) { + this.handlePopstate(isBind && this.closeOnPopstate); + })], + props: { + closeOnPopstate: Boolean + }, + data: function data() { + return { + bindStatus: false + }; + }, + watch: { + closeOnPopstate: function closeOnPopstate(val) { + this.handlePopstate(val); + } + }, + methods: { + onPopstate: function onPopstate() { + this.close(); + this.shouldReopen = false; + }, + handlePopstate: function handlePopstate(bind) { + /* istanbul ignore if */ + if (this.$isServer) { + return; + } + + if (this.bindStatus !== bind) { + this.bindStatus = bind; + var action = bind ? _utils_dom_event__WEBPACK_IMPORTED_MODULE_0__["on"] : _utils_dom_event__WEBPACK_IMPORTED_MODULE_0__["off"]; + action(window, 'popstate', this.onPopstate); + } + } + } +}; + +/***/ }), + +/***/ "0252": +/*!**********************************************************************************!*\ + !*** ./node_modules/strapi-sdk-javascript/node_modules/axios/lib/core/settle.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var createError = __webpack_require__(/*! ./createError */ "9ca0"); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } +}; + + +/***/ }), + +/***/ "0264": +/*!***********************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-upload/index.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _src__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./src */ "a9a1"); +// rc-upload 2.9.4 + + +/* harmony default export */ __webpack_exports__["default"] = (_src__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "027b": +/*!**************************************************************************************!*\ + !*** ./node_modules/strapi-sdk-javascript/node_modules/axios/lib/helpers/cookies.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(/*! ./../utils */ "c181"); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); + + +/***/ }), + +/***/ "02de": +/*!*************************************************!*\ + !*** ./node_modules/vant/es/utils/dom/style.js ***! + \*************************************************/ +/*! exports provided: isHidden */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isHidden", function() { return isHidden; }); +function isHidden(el) { + var style = window.getComputedStyle(el); + var hidden = style.display === 'none'; // offsetParent returns null in the following situations: + // 1. The element or its parent element has the display property set to none. + // 2. The element has the position property set to fixed + + var parentHidden = el.offsetParent === null && style.position !== 'fixed'; + return hidden || parentHidden; +} + +/***/ }), + +/***/ "02ea": +/*!*******************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/locale-provider/default.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale/default */ "7320"); + + +/* harmony default export */ __webpack_exports__["default"] = (_locale_default__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "02f4": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_string-at.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(/*! ./_to-integer */ "4588"); +var defined = __webpack_require__(/*! ./_defined */ "be13"); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), + +/***/ "02fb": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/ml.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Malayalam [ml] +//! author : Floyd Pink : https://github.com/floydpink + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var ml = moment.defineLocale('ml', { + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split( + '_' + ), + monthsShort: + 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split( + '_' + ), + monthsParseExact: true, + weekdays: + 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split( + '_' + ), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു', + }, + calendar: { + sameDay: '[ഇന്ന്] LT', + nextDay: '[നാളെ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ഇന്നലെ] LT', + lastWeek: '[കഴിഞ്ഞ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + ss: '%d സെക്കൻഡ്', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം', + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + }, + }); + + return ml; + +}))); + + +/***/ }), + +/***/ "02fe": +/*!***********************************************************!*\ + !*** ./node_modules/vant/es/sku/components/SkuStepper.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils */ "a142"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "885d"); +/* harmony import */ var _stepper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../stepper */ "20fb"); + + + +var namespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["createNamespace"])('sku-stepper'); +var createComponent = namespace[0]; +var t = namespace[2]; +var QUOTA_LIMIT = _constants__WEBPACK_IMPORTED_MODULE_1__["LIMIT_TYPE"].QUOTA_LIMIT, + STOCK_LIMIT = _constants__WEBPACK_IMPORTED_MODULE_1__["LIMIT_TYPE"].STOCK_LIMIT; +/* harmony default export */ __webpack_exports__["default"] = (createComponent({ + props: { + stock: Number, + skuEventBus: Object, + skuStockNum: Number, + selectedNum: Number, + stepperTitle: String, + disableStepperInput: Boolean, + customStepperConfig: Object, + hideQuotaText: Boolean, + quota: { + type: Number, + default: 0 + }, + quotaUsed: { + type: Number, + default: 0 + }, + startSaleNum: { + type: Number, + default: 1 + } + }, + data: function data() { + return { + currentNum: this.selectedNum, + // 购买限制类型: 限购/库存 + limitType: STOCK_LIMIT + }; + }, + watch: { + currentNum: function currentNum(num) { + var intValue = parseInt(num, 10); + + if (intValue >= this.stepperMinLimit && intValue <= this.stepperLimit) { + this.skuEventBus.$emit('sku:numChange', intValue); + } + }, + stepperLimit: function stepperLimit(limit) { + if (limit < this.currentNum && this.stepperMinLimit <= limit) { + this.currentNum = limit; + } + + this.checkState(this.stepperMinLimit, limit); + }, + stepperMinLimit: function stepperMinLimit(start) { + if (start > this.currentNum || start > this.stepperLimit) { + this.currentNum = start; + } + + this.checkState(start, this.stepperLimit); + } + }, + computed: { + stepperLimit: function stepperLimit() { + var quotaLimit = this.quota - this.quotaUsed; + var limit; // 无限购时直接取库存,有限购时取限购数和库存数中小的那个 + + if (this.quota > 0 && quotaLimit <= this.stock) { + // 修正负的limit + limit = quotaLimit < 0 ? 0 : quotaLimit; + this.limitType = QUOTA_LIMIT; + } else { + limit = this.stock; + this.limitType = STOCK_LIMIT; + } + + return limit; + }, + stepperMinLimit: function stepperMinLimit() { + return this.startSaleNum < 1 ? 1 : this.startSaleNum; + }, + quotaText: function quotaText() { + var _this$customStepperCo = this.customStepperConfig, + quotaText = _this$customStepperCo.quotaText, + hideQuotaText = _this$customStepperCo.hideQuotaText; + if (hideQuotaText) return ''; + var text = ''; + + if (quotaText) { + text = quotaText; + } else { + var textArr = []; + + if (this.startSaleNum > 1) { + textArr.push(t('quotaStart', this.startSaleNum)); + } + + if (this.quota > 0) { + textArr.push(t('quotaLimit', this.quota)); + } + + text = textArr.join(t('comma')); + } + + return text; + } + }, + created: function created() { + this.checkState(this.stepperMinLimit, this.stepperLimit); + }, + methods: { + setCurrentNum: function setCurrentNum(num) { + this.currentNum = num; + this.checkState(this.stepperMinLimit, this.stepperLimit); + }, + onOverLimit: function onOverLimit(action) { + this.skuEventBus.$emit('sku:overLimit', { + action: action, + limitType: this.limitType, + quota: this.quota, + quotaUsed: this.quotaUsed, + startSaleNum: this.startSaleNum + }); + }, + onChange: function onChange(currentValue) { + var intValue = parseInt(currentValue, 10); + var handleStepperChange = this.customStepperConfig.handleStepperChange; + handleStepperChange && handleStepperChange(intValue); + this.$emit('change', intValue); + }, + checkState: function checkState(min, max) { + // 如果选择小于起售,则强制变为起售 + if (this.currentNum < min || min > max) { + this.currentNum = min; + } else if (this.currentNum > max) { + // 当前选择数量大于最大可选时,需要重置已选数量 + this.currentNum = max; + } + + this.skuEventBus.$emit('sku:stepperState', { + valid: min <= max, + min: min, + max: max, + limitType: this.limitType, + quota: this.quota, + quotaUsed: this.quotaUsed, + startSaleNum: this.startSaleNum + }); + } + }, + render: function render() { + var _this = this; + + var h = arguments[0]; + return h("div", { + "class": "van-sku-stepper-stock" + }, [h("div", { + "class": "van-sku__stepper-title" + }, [this.stepperTitle || t('num')]), h(_stepper__WEBPACK_IMPORTED_MODULE_2__["default"], { + "attrs": { + "integer": true, + "min": this.stepperMinLimit, + "max": this.stepperLimit, + "disableInput": this.disableStepperInput + }, + "class": "van-sku__stepper", + "on": { + "overlimit": this.onOverLimit, + "change": this.onChange + }, + "model": { + value: _this.currentNum, + callback: function callback($$v) { + _this.currentNum = $$v; + } + } + }), !this.hideQuotaText && this.quotaText && h("span", { + "class": "van-sku__stepper-quota" + }, ["(", this.quotaText, ")"])]); + } +})); + +/***/ }), + +/***/ "030f": +/*!********************************************************************!*\ + !*** ./node_modules/strapi-sdk-javascript/build/module/lib/sdk.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Strapi; }); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "0ca8"); +/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! js-cookie */ "a78e"); +/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! qs */ "4328"); +/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__); + + + +class Strapi { + /** + * Default constructor. + * @param baseURL Your Strapi host. + * @param axiosConfig Extend Axios configuration. + */ + constructor(baseURL, storeConfig, requestConfig) { + this.axios = axios__WEBPACK_IMPORTED_MODULE_0___default.a.create({ + baseURL, + paramsSerializer: qs__WEBPACK_IMPORTED_MODULE_2__["stringify"], + ...requestConfig + }); + this.storeConfig = { + cookie: { + key: 'jwt', + options: { + path: '/' + } + }, + localStorage: { + key: 'jwt' + }, + ...storeConfig + }; + if (this.isBrowser()) { + let existingToken; + if (this.storeConfig.cookie) { + existingToken = js_cookie__WEBPACK_IMPORTED_MODULE_1__["get"](this.storeConfig.cookie.key); + } + else if (this.storeConfig.localStorage) { + existingToken = JSON.parse(window.localStorage.getItem(this.storeConfig.localStorage.key)); + } + if (existingToken) { + this.setToken(existingToken, true); + } + } + } + /** + * Axios request + * @param method Request method + * @param url Server URL + * @param requestConfig Custom Axios config + */ + async request(method, url, requestConfig) { + try { + const response = await this.axios.request({ + method, + url, + ...requestConfig + }); + return response.data; + } + catch (error) { + if (error.response) { + throw new Error(error.response.data.message); + } + else { + throw error; + } + } + } + /** + * Register a new user. + * @param username + * @param email + * @param password + * @returns Authentication User token and profile + */ + async register(username, email, password) { + this.clearToken(); + const authentication = await this.request('post', '/auth/local/register', { + data: { + email, + password, + username + } + }); + this.setToken(authentication.jwt); + return authentication; + } + /** + * Login by getting an authentication token. + * @param identifier Can either be an email or a username. + * @param password + * @returns Authentication User token and profile + */ + async login(identifier, password) { + this.clearToken(); + const authentication = await this.request('post', '/auth/local', { + data: { + identifier, + password + } + }); + this.setToken(authentication.jwt); + return authentication; + } + /** + * Sends an email to a user with the link of your reset password page. + * This link contains an URL param code which is required to reset user password. + * Received link url format https://my-domain.com/rest-password?code=privateCode. + * @param email + * @param url Link that user will receive. + */ + async forgotPassword(email, url) { + this.clearToken(); + await this.request('post', '/auth/forgot-password', { + data: { + email, + url + } + }); + } + /** + * Reset the user password. + * @param code Is the url params received from the email link (see forgot password). + * @param password + * @param passwordConfirmation + */ + async resetPassword(code, password, passwordConfirmation) { + this.clearToken(); + await this.request('post', '/auth/reset-password', { + data: { + code, + password, + passwordConfirmation + } + }); + } + /** + * Retrieve the connect provider URL + * @param provider + */ + getProviderAuthenticationUrl(provider) { + return `${this.axios.defaults.baseURL}/connect/${provider}`; + } + /** + * Authenticate the user with the token present on the URL (for browser) or in `params` (on Node.js) + * @param provider + * @param params + */ + async authenticateProvider(provider, params) { + this.clearToken(); + // Handling browser query + if (this.isBrowser()) { + params = qs__WEBPACK_IMPORTED_MODULE_2__["parse"](window.location.search, { ignoreQueryPrefix: true }); + } + const authentication = await this.request('get', `/auth/${provider}/callback`, { + params + }); + this.setToken(authentication.jwt); + return authentication; + } + /** + * List entries + * @param contentTypePluralized + * @param params Filter and order queries. + */ + getEntries(contentTypePluralized, params) { + return this.request('get', `/${contentTypePluralized}`, { + params + }); + } + /** + * Get the total count of entries with the provided criteria + * @param contentType + * @param params Filter and order queries. + */ + getEntryCount(contentType, params) { + return this.request('get', `/${contentType}/count`, { + params + }); + } + /** + * Get a specific entry + * @param contentTypePluralized Type of entry pluralized + * @param id ID of entry + */ + getEntry(contentTypePluralized, id) { + return this.request('get', `/${contentTypePluralized}/${id}`); + } + /** + * Create data + * @param contentTypePluralized Type of entry pluralized + * @param data New entry + */ + createEntry(contentTypePluralized, data) { + return this.request('post', `/${contentTypePluralized}`, { + data + }); + } + /** + * Update data + * @param contentTypePluralized Type of entry pluralized + * @param id ID of entry + * @param data + */ + updateEntry(contentTypePluralized, id, data) { + return this.request('put', `/${contentTypePluralized}/${id}`, { + data + }); + } + /** + * Delete an entry + * @param contentTypePluralized Type of entry pluralized + * @param id ID of entry + */ + deleteEntry(contentTypePluralized, id) { + return this.request('delete', `/${contentTypePluralized}/${id}`); + } + /** + * Search for files + * @param query Keywords + */ + searchFiles(query) { + return this.request('get', `/upload/search/${decodeURIComponent(query)}`); + } + /** + * Get files + * @param params Filter and order queries + * @returns Object[] Files data + */ + getFiles(params) { + return this.request('get', '/upload/files', { + params + }); + } + /** + * Get file + * @param id ID of entry + */ + getFile(id) { + return this.request('get', `/upload/files/${id}`); + } + /** + * Upload files + * + * ### Browser example + * ```js + * const form = new FormData(); + * form.append('files', fileInputElement.files[0], 'file-name.ext'); + * form.append('files', fileInputElement.files[1], 'file-2-name.ext'); + * const files = await strapi.upload(form); + * ``` + * + * ### Node.js example + * ```js + * const FormData = require('form-data'); + * const fs = require('fs'); + * const form = new FormData(); + * form.append('files', fs.createReadStream('./file-name.ext'), 'file-name.ext'); + * const files = await strapi.upload(form, { + * headers: form.getHeaders() + * }); + * ``` + * + * @param data FormData + * @param requestConfig + */ + upload(data, requestConfig) { + return this.request('post', '/upload', { + data, + ...requestConfig + }); + } + /** + * Set token on Axios configuration + * @param token Retrieved by register or login + */ + setToken(token, comesFromStorage) { + this.axios.defaults.headers.common.Authorization = 'Bearer ' + token; + if (this.isBrowser() && !comesFromStorage) { + if (this.storeConfig.localStorage) { + window.localStorage.setItem(this.storeConfig.localStorage.key, JSON.stringify(token)); + } + if (this.storeConfig.cookie) { + js_cookie__WEBPACK_IMPORTED_MODULE_1__["set"](this.storeConfig.cookie.key, token, this.storeConfig.cookie.options); + } + } + } + /** + * Remove token from Axios configuration + */ + clearToken() { + delete this.axios.defaults.headers.common.Authorization; + if (this.isBrowser()) { + if (this.storeConfig.localStorage) { + window.localStorage.removeItem(this.storeConfig.localStorage.key); + } + if (this.storeConfig.cookie) { + js_cookie__WEBPACK_IMPORTED_MODULE_1__["remove"](this.storeConfig.cookie.key, this.storeConfig.cookie.options); + } + } + } + /** + * Check if it runs on browser + */ + isBrowser() { + return typeof window !== 'undefined'; + } +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2RrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9zZGsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUEyRCxNQUFNLE9BQU8sQ0FBQztBQUNoRixPQUFPLEtBQUssT0FBTyxNQUFNLFdBQVcsQ0FBQztBQUNyQyxPQUFPLEtBQUssRUFBRSxNQUFNLElBQUksQ0FBQztBQTZCekIsTUFBTSxDQUFDLE9BQU8sT0FBTyxNQUFNO0lBSXpCOzs7O09BSUc7SUFDSCxZQUNFLE9BQWUsRUFDZixXQUF5QixFQUN6QixhQUFrQztRQUVsQyxJQUFJLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUM7WUFDeEIsT0FBTztZQUNQLGdCQUFnQixFQUFFLEVBQUUsQ0FBQyxTQUFTO1lBQzlCLEdBQUcsYUFBYTtTQUNqQixDQUFDLENBQUM7UUFDSCxJQUFJLENBQUMsV0FBVyxHQUFHO1lBQ2pCLE1BQU0sRUFBRTtnQkFDTixHQUFHLEVBQUUsS0FBSztnQkFDVixPQUFPLEVBQUU7b0JBQ1AsSUFBSSxFQUFFLEdBQUc7aUJBQ1Y7YUFDRjtZQUNELFlBQVksRUFBRTtnQkFDWixHQUFHLEVBQUUsS0FBSzthQUNYO1lBQ0QsR0FBRyxXQUFXO1NBQ2YsQ0FBQztRQUVGLElBQUksSUFBSSxDQUFDLFNBQVMsRUFBRSxFQUFFO1lBQ3BCLElBQUksYUFBYSxDQUFDO1lBQ2xCLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEVBQUU7Z0JBQzNCLGFBQWEsR0FBRyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDO2FBQzFEO2lCQUFNLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxZQUFZLEVBQUU7Z0JBQ3hDLGFBQWEsR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsT0FBTyxDQUNwRCxJQUFJLENBQUMsV0FBVyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQ3hCLENBQUMsQ0FBQzthQUNkO1lBQ0QsSUFBSSxhQUFhLEVBQUU7Z0JBQ2pCLElBQUksQ0FBQyxRQUFRLENBQUMsYUFBYSxFQUFFLElBQUksQ0FBQyxDQUFDO2FBQ3BDO1NBQ0Y7SUFDSCxDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSSxLQUFLLENBQUMsT0FBTyxDQUNsQixNQUFjLEVBQ2QsR0FBVyxFQUNYLGFBQWtDO1FBRWxDLElBQUk7WUFDRixNQUFNLFFBQVEsR0FBa0IsTUFBTSxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQztnQkFDdkQsTUFBTTtnQkFDTixHQUFHO2dCQUNILEdBQUcsYUFBYTthQUNqQixDQUFDLENBQUM7WUFDSCxPQUFPLFFBQVEsQ0FBQyxJQUFJLENBQUM7U0FDdEI7UUFBQyxPQUFPLEtBQUssRUFBRTtZQUNkLElBQUksS0FBSyxDQUFDLFFBQVEsRUFBRTtnQkFDbEIsTUFBTSxJQUFJLEtBQUssQ0FBQyxLQUFLLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQzthQUM5QztpQkFBTTtnQkFDTCxNQUFNLEtBQUssQ0FBQzthQUNiO1NBQ0Y7SUFDSCxDQUFDO0lBRUQ7Ozs7OztPQU1HO0lBQ0ksS0FBSyxDQUFDLFFBQVEsQ0FDbkIsUUFBZ0IsRUFDaEIsS0FBYSxFQUNiLFFBQWdCO1FBRWhCLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUNsQixNQUFNLGNBQWMsR0FBbUIsTUFBTSxJQUFJLENBQUMsT0FBTyxDQUN2RCxNQUFNLEVBQ04sc0JBQXNCLEVBQ3RCO1lBQ0UsSUFBSSxFQUFFO2dCQUNKLEtBQUs7Z0JBQ0wsUUFBUTtnQkFDUixRQUFRO2FBQ1Q7U0FDRixDQUNGLENBQUM7UUFDRixJQUFJLENBQUMsUUFBUSxDQUFDLGNBQWMsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNsQyxPQUFPLGNBQWMsQ0FBQztJQUN4QixDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSSxLQUFLLENBQUMsS0FBSyxDQUNoQixVQUFrQixFQUNsQixRQUFnQjtRQUVoQixJQUFJLENBQUMsVUFBVSxFQUFFLENBQUM7UUFDbEIsTUFBTSxjQUFjLEdBQW1CLE1BQU0sSUFBSSxDQUFDLE9BQU8sQ0FDdkQsTUFBTSxFQUNOLGFBQWEsRUFDYjtZQUNFLElBQUksRUFBRTtnQkFDSixVQUFVO2dCQUNWLFFBQVE7YUFDVDtTQUNGLENBQ0YsQ0FBQztRQUNGLElBQUksQ0FBQyxRQUFRLENBQUMsY0FBYyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ2xDLE9BQU8sY0FBYyxDQUFDO0lBQ3hCLENBQUM7SUFFRDs7Ozs7O09BTUc7SUFDSSxLQUFLLENBQUMsY0FBYyxDQUFDLEtBQWEsRUFBRSxHQUFXO1FBQ3BELElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUNsQixNQUFNLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLHVCQUF1QixFQUFFO1lBQ2xELElBQUksRUFBRTtnQkFDSixLQUFLO2dCQUNMLEdBQUc7YUFDSjtTQUNGLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7Ozs7T0FLRztJQUNJLEtBQUssQ0FBQyxhQUFhLENBQ3hCLElBQVksRUFDWixRQUFnQixFQUNoQixvQkFBNEI7UUFFNUIsSUFBSSxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBQ2xCLE1BQU0sSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEVBQUUsc0JBQXNCLEVBQUU7WUFDakQsSUFBSSxFQUFFO2dCQUNKLElBQUk7Z0JBQ0osUUFBUTtnQkFDUixvQkFBb0I7YUFDckI7U0FDRixDQUFDLENBQUM7SUFDTCxDQUFDO0lBRUQ7OztPQUdHO0lBQ0ksNEJBQTRCLENBQUMsUUFBa0I7UUFDcEQsT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsUUFBUSxDQUFDLE9BQU8sWUFBWSxRQUFRLEVBQUUsQ0FBQztJQUM5RCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLEtBQUssQ0FBQyxvQkFBb0IsQ0FDL0IsUUFBa0IsRUFDbEIsTUFBc0I7UUFFdEIsSUFBSSxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBQ2xCLHlCQUF5QjtRQUN6QixJQUFJLElBQUksQ0FBQyxTQUFTLEVBQUUsRUFBRTtZQUNwQixNQUFNLEdBQUcsRUFBRSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLE1BQU0sRUFBRSxFQUFFLGlCQUFpQixFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7U0FDeEU7UUFDRCxNQUFNLGNBQWMsR0FBbUIsTUFBTSxJQUFJLENBQUMsT0FBTyxDQUN2RCxLQUFLLEVBQ0wsU0FBUyxRQUFRLFdBQVcsRUFDNUI7WUFDRSxNQUFNO1NBQ1AsQ0FDRixDQUFDO1FBQ0YsSUFBSSxDQUFDLFFBQVEsQ0FBQyxjQUFjLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDbEMsT0FBTyxjQUFjLENBQUM7SUFDeEIsQ0FBQztJQUVEOzs7O09BSUc7SUFDSSxVQUFVLENBQ2YscUJBQTZCLEVBQzdCLE1BQXFDO1FBRXJDLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsSUFBSSxxQkFBcUIsRUFBRSxFQUFFO1lBQ3RELE1BQU07U0FDUCxDQUFDLENBQUM7SUFDTCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLGFBQWEsQ0FDbEIsV0FBbUIsRUFDbkIsTUFBcUM7UUFFckMsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRSxJQUFJLFdBQVcsUUFBUSxFQUFFO1lBQ2xELE1BQU07U0FDUCxDQUFDLENBQUM7SUFDTCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLFFBQVEsQ0FBQyxxQkFBNkIsRUFBRSxFQUFVO1FBQ3ZELE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsSUFBSSxxQkFBcUIsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ2hFLENBQUM7SUFFRDs7OztPQUlHO0lBQ0ksV0FBVyxDQUNoQixxQkFBNkIsRUFDN0IsSUFBZ0M7UUFFaEMsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxJQUFJLHFCQUFxQixFQUFFLEVBQUU7WUFDdkQsSUFBSTtTQUNMLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7Ozs7T0FLRztJQUNJLFdBQVcsQ0FDaEIscUJBQTZCLEVBQzdCLEVBQVUsRUFDVixJQUFnQztRQUVoQyxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLElBQUkscUJBQXFCLElBQUksRUFBRSxFQUFFLEVBQUU7WUFDNUQsSUFBSTtTQUNMLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7OztPQUlHO0lBQ0ksV0FBVyxDQUNoQixxQkFBNkIsRUFDN0IsRUFBVTtRQUVWLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLEVBQUUsSUFBSSxxQkFBcUIsSUFBSSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ25FLENBQUM7SUFFRDs7O09BR0c7SUFDSSxXQUFXLENBQUMsS0FBYTtRQUM5QixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLGtCQUFrQixrQkFBa0IsQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDNUUsQ0FBQztJQUVEOzs7O09BSUc7SUFDSSxRQUFRLENBQUMsTUFBcUM7UUFDbkQsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRSxlQUFlLEVBQUU7WUFDMUMsTUFBTTtTQUNQLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7O09BR0c7SUFDSSxPQUFPLENBQUMsRUFBVTtRQUN2QixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLGlCQUFpQixFQUFFLEVBQUUsQ0FBQyxDQUFDO0lBQ3BELENBQUM7SUFFRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O09Bd0JHO0lBQ0ksTUFBTSxDQUNYLElBQWMsRUFDZCxhQUFrQztRQUVsQyxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLFNBQVMsRUFBRTtZQUNyQyxJQUFJO1lBQ0osR0FBRyxhQUFhO1NBQ2pCLENBQUMsQ0FBQztJQUNMLENBQUM7SUFFRDs7O09BR0c7SUFDSSxRQUFRLENBQUMsS0FBYSxFQUFFLGdCQUEwQjtRQUN2RCxJQUFJLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLGFBQWEsR0FBRyxTQUFTLEdBQUcsS0FBSyxDQUFDO1FBQ3JFLElBQUksSUFBSSxDQUFDLFNBQVMsRUFBRSxJQUFJLENBQUMsZ0JBQWdCLEVBQUU7WUFDekMsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLFlBQVksRUFBRTtnQkFDakMsTUFBTSxDQUFDLFlBQVksQ0FBQyxPQUFPLENBQ3pCLElBQUksQ0FBQyxXQUFXLENBQUMsWUFBWSxDQUFDLEdBQUcsRUFDakMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsQ0FDdEIsQ0FBQzthQUNIO1lBQ0QsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sRUFBRTtnQkFDM0IsT0FBTyxDQUFDLEdBQUcsQ0FDVCxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxHQUFHLEVBQzNCLEtBQUssRUFDTCxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQ2hDLENBQUM7YUFDSDtTQUNGO0lBQ0gsQ0FBQztJQUVEOztPQUVHO0lBQ0ksVUFBVTtRQUNmLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUM7UUFDeEQsSUFBSSxJQUFJLENBQUMsU0FBUyxFQUFFLEVBQUU7WUFDcEIsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLFlBQVksRUFBRTtnQkFDakMsTUFBTSxDQUFDLFlBQVksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLENBQUM7YUFDbkU7WUFDRCxJQUFJLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxFQUFFO2dCQUMzQixPQUFPLENBQUMsTUFBTSxDQUNaLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLEdBQUcsRUFDM0IsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUNoQyxDQUFDO2FBQ0g7U0FDRjtJQUNILENBQUM7SUFFRDs7T0FFRztJQUNLLFNBQVM7UUFDZixPQUFPLE9BQU8sTUFBTSxLQUFLLFdBQVcsQ0FBQztJQUN2QyxDQUFDO0NBQ0YifQ== + +/***/ }), + +/***/ "0331": +/*!***********************************************************!*\ + !*** ./node_modules/ant-design-vue/es/statistic/utils.js ***! + \***********************************************************/ +/*! exports provided: formatTimeStr, formatCountdown */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatTimeStr", function() { return formatTimeStr; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatCountdown", function() { return formatCountdown; }); +/* harmony import */ var babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/slicedToArray */ "b24f"); +/* harmony import */ var babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "c1df"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/padStart */ "4106"); +/* harmony import */ var lodash_padStart__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_padStart__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _util_interopDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/interopDefault */ "2cf8"); + + + + + + +// Countdown +var timeUnits = [['Y', 1000 * 60 * 60 * 24 * 365], // years +['M', 1000 * 60 * 60 * 24 * 30], // months +['D', 1000 * 60 * 60 * 24], // days +['H', 1000 * 60 * 60], // hours +['m', 1000 * 60], // minutes +['s', 1000], // seconds +['S', 1]]; + +function formatTimeStr(duration, format) { + var leftDuration = duration; + + var escapeRegex = /\[[^\]]*\]/g; + var keepList = (format.match(escapeRegex) || []).map(function (str) { + return str.slice(1, -1); + }); + var templateText = format.replace(escapeRegex, '[]'); + + var replacedText = timeUnits.reduce(function (current, _ref) { + var _ref2 = babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2), + name = _ref2[0], + unit = _ref2[1]; + + if (current.indexOf(name) !== -1) { + var value = Math.floor(leftDuration / unit); + leftDuration -= value * unit; + return current.replace(new RegExp(name + '+', 'g'), function (match) { + var len = match.length; + return lodash_padStart__WEBPACK_IMPORTED_MODULE_2___default()(value.toString(), len, '0'); + }); + } + return current; + }, templateText); + + var index = 0; + return replacedText.replace(escapeRegex, function () { + var match = keepList[index]; + index += 1; + return match; + }); +} + +function formatCountdown(value, config) { + var _config$format = config.format, + format = _config$format === undefined ? '' : _config$format; + + var target = Object(_util_interopDefault__WEBPACK_IMPORTED_MODULE_3__["default"])(moment__WEBPACK_IMPORTED_MODULE_1__)(value).valueOf(); + var current = Object(_util_interopDefault__WEBPACK_IMPORTED_MODULE_3__["default"])(moment__WEBPACK_IMPORTED_MODULE_1__)().valueOf(); + var diff = Math.max(target - current, 0); + return formatTimeStr(diff, format); +} + +/***/ }), + +/***/ "0390": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/_advance-string-index.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var at = __webpack_require__(/*! ./_string-at */ "02f4")(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + + +/***/ }), + +/***/ "0395": +/*!******************************************************************!*\ + !*** ./node_modules/core-js/library/modules/_object-gopn-ext.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(/*! ./_to-iobject */ "36c3"); +var gOPN = __webpack_require__(/*! ./_object-gopn */ "6abf").f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), + +/***/ "03b8": +/*!***********************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-switch/index.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Switch */ "e471"); +// base rc-switch 1.9.0 + + +/* harmony default export */ __webpack_exports__["default"] = (_Switch__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "03dd": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseKeys.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__(/*! ./_isPrototype */ "eac5"), + nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "57a5"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +module.exports = baseKeys; + + +/***/ }), + +/***/ "03ec": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/cv.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Chuvash [cv] +//! author : Anatoly Mironov : https://github.com/mirontoli + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var cv = moment.defineLocale('cv', { + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split( + '_' + ), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays: + 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split( + '_' + ), + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + }, + calendar: { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L', + }, + relativeTime: { + future: function (output) { + var affix = /сехет$/i.exec(output) + ? 'рен' + : /ҫул$/i.exec(output) + ? 'тан' + : 'ран'; + return output + affix; + }, + past: '%s каялла', + s: 'пӗр-ик ҫеккунт', + ss: '%d ҫеккунт', + m: 'пӗр минут', + mm: '%d минут', + h: 'пӗр сехет', + hh: '%d сехет', + d: 'пӗр кун', + dd: '%d кун', + M: 'пӗр уйӑх', + MM: '%d уйӑх', + y: 'пӗр ҫул', + yy: '%d ҫул', + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal: '%d-мӗш', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + return cv; + +}))); + + +/***/ }), + +/***/ "0447": +/*!***********************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-table/src/TableHeaderRow.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "92fa"); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "6042"); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "4d26"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../_util/vue-types */ "4d91"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../_util/props-util */ "daa3"); + + + + + + + + +var TableHeaderRow = { + inject: { + store: { from: 'table-store', 'default': function _default() { + return {}; + } } + }, + props: { + index: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].number, + fixed: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].string, + columns: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].array, + rows: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].array, + row: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].array, + components: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].object, + customHeaderRow: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].func, + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_5__["default"].string + }, + name: 'TableHeaderRow', + computed: { + height: function height() { + var fixedColumnsHeadRowsHeight = this.store.fixedColumnsHeadRowsHeight; + var _$props = this.$props, + columns = _$props.columns, + rows = _$props.rows, + fixed = _$props.fixed; + + var headerHeight = fixedColumnsHeadRowsHeight[0]; + + if (!fixed) { + return null; + } + + if (headerHeight && columns) { + if (headerHeight === 'auto') { + return 'auto'; + } + return headerHeight / rows.length + 'px'; + } + return null; + } + }, + render: function render(h) { + var row = this.row, + index = this.index, + height = this.height, + components = this.components, + customHeaderRow = this.customHeaderRow, + prefixCls = this.prefixCls; + + var HeaderRow = components.header.row; + var HeaderCell = components.header.cell; + var rowProps = customHeaderRow(row.map(function (cell) { + return cell.column; + }), index); + var customStyle = rowProps ? rowProps.style : {}; + var style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({ height: height }, customStyle); + if (style.height === null) { + delete style.height; + } + return h( + HeaderRow, + babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([rowProps, { style: style }]), + [row.map(function (cell, i) { + var _classNames; + + var column = cell.column, + isLast = cell.isLast, + children = cell.children, + className = cell.className, + cellProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(cell, ['column', 'isLast', 'children', 'className']); + + var customProps = column.customHeaderCell ? column.customHeaderCell(column) : {}; + var headerCellProps = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_6__["mergeProps"])({ + attrs: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({}, cellProps) + }, babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({}, customProps, { + key: column.key || column.dataIndex || i + })); + + if (column.align) { + headerCellProps.style = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({}, customProps.style, { textAlign: column.align }); + } + + headerCellProps['class'] = classnames__WEBPACK_IMPORTED_MODULE_4___default()(customProps['class'], customProps.className, column['class'], column.className, (_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, prefixCls + '-align-' + column.align, !!column.align), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, prefixCls + '-row-cell-ellipsis', !!column.ellipsis), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, prefixCls + '-row-cell-break-word', !!column.width), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, prefixCls + '-row-cell-last', isLast), _classNames)); + + if (typeof HeaderCell === 'function') { + return HeaderCell(h, headerCellProps, children); + } + return h( + HeaderCell, + headerCellProps, + [children] + ); + })] + ); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (TableHeaderRow); + +/***/ }), + +/***/ "044b": +/*!*****************************************!*\ + !*** ./node_modules/is-buffer/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +module.exports = function isBuffer (obj) { + return obj != null && obj.constructor != null && + typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + + +/***/ }), + +/***/ "0464": +/*!******************************************!*\ + !*** ./node_modules/omit.js/es/index.js ***! + \******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); + +function omit(obj, fields) { + var shallowCopy = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, obj); + for (var i = 0; i < fields.length; i++) { + var key = fields[i]; + delete shallowCopy[key]; + } + return shallowCopy; +} + +/* harmony default export */ __webpack_exports__["default"] = (omit); + +/***/ }), + +/***/ "046c": +/*!*******************************************************!*\ + !*** ./node_modules/vant/es/sku/utils/time-helper.js ***! + \*******************************************************/ +/*! exports provided: stringToDate, dateToString */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToDate", function() { return stringToDate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateToString", function() { return dateToString; }); +/* harmony import */ var _utils_format_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/format/string */ "68ed"); + // 字符串转 Date +// 只处理 YYYY-MM-DD 或者 YYYY-MM-DD HH:MM 格式 + +function stringToDate(timeString) { + if (!timeString) { + return null; + } + + return new Date(timeString.replace(/-/g, '/')); +} // Date 转字符串 +// type: date or datetime + +function dateToString(date, type) { + if (type === void 0) { + type = 'date'; + } + + if (!date) { + return ''; + } + + var year = date.getFullYear(); + var month = date.getMonth() + 1; + var day = date.getDate(); + var timeString = year + "-" + Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_0__["padZero"])(month) + "-" + Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_0__["padZero"])(day); + + if (type === 'datetime') { + var hours = date.getHours(); + var minute = date.getMinutes(); + timeString += " " + Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_0__["padZero"])(hours) + ":" + Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_0__["padZero"])(minute); + } + + return timeString; +} + +/***/ }), + +/***/ "0497": +/*!*****************************************************!*\ + !*** ./node_modules/string-convert/camel2hyphen.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +var camel2hyphen = function (str) { + return str + .replace(/[A-Z]/g, function (match) { + return '-' + match.toLowerCase(); + }) + .toLowerCase(); +}; + +module.exports = camel2hyphen; + +/***/ }), + +/***/ "0524": +/*!*************************************************!*\ + !*** ./src/components/core/enum/data-source.js ***! + \*************************************************/ +/*! exports provided: default, REFRESH_ENUM, REFRESH_DEFAULT_INTERVAL */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REFRESH_ENUM", function() { return REFRESH_ENUM; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REFRESH_DEFAULT_INTERVAL", function() { return REFRESH_DEFAULT_INTERVAL; }); +/* harmony import */ var _utils_enum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/enum */ "08f3"); + +var HTTP_API = 'httpApi'; +var STATIC = 'static'; +var CSV = 'csv'; + +// [label, value, code] +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_enum__WEBPACK_IMPORTED_MODULE_0__["getEnum"])([['静态数据源', STATIC, 'STATIC'], ['http/https', HTTP_API, 'HTTP_API'], ['CSV', CSV, 'CSV']])); +var REFRESH_ENUM = Object(_utils_enum__WEBPACK_IMPORTED_MODULE_0__["getEnum"])([['单次触发', 'once', 'ONCE'], ['定时更新', 'fixed', 'FIXED']]); +var REFRESH_DEFAULT_INTERVAL = 2; + +/***/ }), + +/***/ "054e": +/*!**********************************************************!*\ + !*** ./node_modules/ant-design-vue/es/skeleton/Title.js ***! + \**********************************************************/ +/*! exports provided: SkeletonTitleProps, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SkeletonTitleProps", function() { return SkeletonTitleProps; }); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); + + +var skeletonTitleProps = { + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_0__["default"].string, + width: _util_vue_types__WEBPACK_IMPORTED_MODULE_0__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_0__["default"].number, _util_vue_types__WEBPACK_IMPORTED_MODULE_0__["default"].string]) +}; + +var SkeletonTitleProps = _util_vue_types__WEBPACK_IMPORTED_MODULE_0__["default"].shape(skeletonTitleProps); + +var Title = { + props: skeletonTitleProps, + render: function render() { + var h = arguments[0]; + var _$props = this.$props, + prefixCls = _$props.prefixCls, + width = _$props.width; + + var zWidth = typeof width === 'number' ? width + 'px' : width; + return h('h3', { 'class': prefixCls, style: { width: zWidth } }); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Title); + +/***/ }), + +/***/ "0558": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/is.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Icelandic [is] +//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + function plural(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nokkrar sekúndur' + : 'nokkrum sekúndum'; + case 'ss': + if (plural(number)) { + return ( + result + + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') + ); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural(number)) { + return ( + result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum') + ); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural(number)) { + return ( + result + + (withoutSuffix || isFuture + ? 'klukkustundir' + : 'klukkustundum') + ); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + var is = moment.defineLocale('is', { + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays: + 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', + }, + calendar: { + sameDay: '[í dag kl.] LT', + nextDay: '[á morgun kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[í gær kl.] LT', + lastWeek: '[síðasta] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: translate, + ss: translate, + m: translate, + mm: translate, + h: 'klukkustund', + hh: translate, + d: translate, + dd: translate, + M: translate, + MM: translate, + y: translate, + yy: translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + return is; + +}))); + + +/***/ }), + +/***/ "05a8": +/*!********************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-dropdown/src/Dropdown.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../_util/vue-types */ "4d91"); +/* harmony import */ var _vc_trigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../vc-trigger */ "8496"); +/* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./placements */ "74f0"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../_util/props-util */ "daa3"); +/* harmony import */ var _util_BaseMixin__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../_util/BaseMixin */ "b488"); +/* harmony import */ var _util_vnode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../_util/vnode */ "7b05"); + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = ({ + mixins: [_util_BaseMixin__WEBPACK_IMPORTED_MODULE_6__["default"]], + props: { + minOverlayWidthMatchTrigger: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].bool, + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string.def('rc-dropdown'), + transitionName: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, + overlayClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string.def(''), + openClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string, + animation: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].any, + align: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].object, + overlayStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].object.def(function () { + return {}; + }), + placement: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].string.def('bottomLeft'), + overlay: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].any, + trigger: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].array.def(['hover']), + alignPoint: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].bool, + showAction: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].array.def([]), + hideAction: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].array.def([]), + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].func, + visible: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].bool, + defaultVisible: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].bool.def(false), + mouseEnterDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].number.def(0.15), + mouseLeaveDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_2__["default"].number.def(0.1) + }, + data: function data() { + var sVisible = this.defaultVisible; + if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'visible')) { + sVisible = this.visible; + } + return { + sVisible: sVisible + }; + }, + + watch: { + visible: function visible(val) { + if (val !== undefined) { + this.setState({ + sVisible: val + }); + } + } + }, + methods: { + onClick: function onClick(e) { + // do no call onVisibleChange, if you need click to hide, use onClick and control visible + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'visible')) { + this.setState({ + sVisible: false + }); + } + this.$emit('overlayClick', e); + if (this.childOriginEvents.click) { + this.childOriginEvents.click(e); + } + }, + onVisibleChange: function onVisibleChange(visible) { + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'visible')) { + this.setState({ + sVisible: visible + }); + } + this.__emit('visibleChange', visible); + }, + getMinOverlayWidthMatchTrigger: function getMinOverlayWidthMatchTrigger() { + var props = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getOptionProps"])(this); + var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger, + alignPoint = props.alignPoint; + + if ('minOverlayWidthMatchTrigger' in props) { + return minOverlayWidthMatchTrigger; + } + + return !alignPoint; + }, + getOverlayElement: function getOverlayElement() { + var overlay = this.overlay || this.$slots.overlay || this.$scopedSlots.overlay; + var overlayElement = void 0; + if (typeof overlay === 'function') { + overlayElement = overlay(); + } else { + overlayElement = overlay; + } + return overlayElement; + }, + getMenuElement: function getMenuElement() { + var _this = this; + + var onClick = this.onClick, + prefixCls = this.prefixCls, + $slots = this.$slots; + + this.childOriginEvents = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getEvents"])($slots.overlay[0]); + var overlayElement = this.getOverlayElement(); + var extraOverlayProps = { + props: { + prefixCls: prefixCls + '-menu', + getPopupContainer: function getPopupContainer() { + return _this.getPopupDomNode(); + } + }, + on: { + click: onClick + } + }; + if (typeof overlayElement.type === 'string') { + delete extraOverlayProps.props.prefixCls; + } + return Object(_util_vnode__WEBPACK_IMPORTED_MODULE_7__["cloneElement"])($slots.overlay[0], extraOverlayProps); + }, + getMenuElementOrLambda: function getMenuElementOrLambda() { + var overlay = this.overlay || this.$slots.overlay || this.$scopedSlots.overlay; + if (typeof overlay === 'function') { + return this.getMenuElement; + } + return this.getMenuElement(); + }, + getPopupDomNode: function getPopupDomNode() { + return this.$refs.trigger.getPopupDomNode(); + }, + getOpenClassName: function getOpenClassName() { + var _$props = this.$props, + openClassName = _$props.openClassName, + prefixCls = _$props.prefixCls; + + if (openClassName !== undefined) { + return openClassName; + } + return prefixCls + '-open'; + }, + afterVisibleChange: function afterVisibleChange(visible) { + if (visible && this.getMinOverlayWidthMatchTrigger()) { + var overlayNode = this.getPopupDomNode(); + var rootNode = this.$el; + if (rootNode && overlayNode && rootNode.offsetWidth > overlayNode.offsetWidth) { + overlayNode.style.minWidth = rootNode.offsetWidth + 'px'; + if (this.$refs.trigger && this.$refs.trigger._component && this.$refs.trigger._component.$refs && this.$refs.trigger._component.$refs.alignInstance) { + this.$refs.trigger._component.$refs.alignInstance.forceAlign(); + } + } + } + }, + renderChildren: function renderChildren() { + var children = this.$slots['default'] && this.$slots['default'][0]; + var sVisible = this.sVisible; + + return sVisible && children ? Object(_util_vnode__WEBPACK_IMPORTED_MODULE_7__["cloneElement"])(children, { 'class': this.getOpenClassName() }) : children; + } + }, + + render: function render() { + var h = arguments[0]; + + var _$props2 = this.$props, + prefixCls = _$props2.prefixCls, + transitionName = _$props2.transitionName, + animation = _$props2.animation, + align = _$props2.align, + placement = _$props2.placement, + getPopupContainer = _$props2.getPopupContainer, + showAction = _$props2.showAction, + hideAction = _$props2.hideAction, + overlayClassName = _$props2.overlayClassName, + overlayStyle = _$props2.overlayStyle, + trigger = _$props2.trigger, + otherProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_$props2, ['prefixCls', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']); + + var triggerHideAction = hideAction; + if (!triggerHideAction && trigger.indexOf('contextmenu') !== -1) { + triggerHideAction = ['click']; + } + + var triggerProps = { + props: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, otherProps, { + prefixCls: prefixCls, + popupClassName: overlayClassName, + popupStyle: overlayStyle, + builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_4__["default"], + action: trigger, + showAction: showAction, + hideAction: triggerHideAction || [], + popupPlacement: placement, + popupAlign: align, + popupTransitionName: transitionName, + popupAnimation: animation, + popupVisible: this.sVisible, + afterPopupVisibleChange: this.afterVisibleChange, + getPopupContainer: getPopupContainer + }), + on: { + popupVisibleChange: this.onVisibleChange + }, + ref: 'trigger' + }; + return h( + _vc_trigger__WEBPACK_IMPORTED_MODULE_3__["default"], + triggerProps, + [this.renderChildren(), h( + 'template', + { slot: 'popup' }, + [this.$slots.overlay && this.getMenuElement()] + )] + ); + } +}); + +/***/ }), + +/***/ "05d9": +/*!***********************************************************!*\ + !*** ./src/components/core/plugins/lbp-qq-map/src/Map.js ***! + \***********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es6.promise */ "551c"); +/* harmony import */ var core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_0__); + +function isScriptLoaded(src) { + return !!document.querySelector('script[src="' + src + '"]'); +} +/* harmony default export */ __webpack_exports__["default"] = ({ + map: null, + load: function load(key) { + return new Promise(function (resolve, reject) { + var src = '//map.qq.com/api/js?v=2.exp&libraries=place&callback=init&key=' + key; + if (isScriptLoaded(src)) { + resolve(window.qq); + return; + } + window.init = function () { + resolve(window.qq); // 注意这里 + }; + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = src; + script.onerror = reject; + document.head.appendChild(script); + }); + }, + getPosition: function getPosition(_ref) { + var lat = _ref.lat, + lng = _ref.lng; + return new window.qq.maps.LatLng(lat, lng); // 地图的中心地理坐标 + } +}); + +/***/ }), + +/***/ "0607": +/*!**********************************************!*\ + !*** ./node_modules/vant/lib/info/index.css ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// style-loader: Adds some css to the DOM by adding a \n ' + domainScript + '\n \n \n
\n \n ' + domainInput + '\n \n
\n \n \n '; + }, + initIframeSrc: function initIframeSrc() { + if (this.domain) { + this.getIframeNode().src = 'javascript:void((function(){\n var d = document;\n d.open();\n d.domain=\'' + this.domain + '\';\n d.write(\'\');\n d.close();\n })())'; + } + }, + initIframe: function initIframe() { + var iframeNode = this.getIframeNode(); + var win = iframeNode.contentWindow; + var doc = void 0; + this.domain = this.domain || ''; + this.initIframeSrc(); + try { + doc = win.document; + } catch (e) { + this.domain = document.domain; + this.initIframeSrc(); + win = iframeNode.contentWindow; + doc = win.document; + } + doc.open('text/html', 'replace'); + doc.write(this.getIframeHTML(this.domain)); + doc.close(); + this.getFormInputNode().onchange = this.onChange; + }, + endUpload: function endUpload() { + if (this.uploading) { + this.file = {}; + // hack avoid batch + this.uploading = false; + this.setState({ + uploading: false + }); + this.initIframe(); + } + }, + startUpload: function startUpload() { + if (!this.uploading) { + this.uploading = true; + this.setState({ + uploading: true + }); + } + }, + updateIframeWH: function updateIframeWH() { + var rootNode = this.$el; + var iframeNode = this.getIframeNode(); + iframeNode.style.height = rootNode.offsetHeight + 'px'; + iframeNode.style.width = rootNode.offsetWidth + 'px'; + }, + abort: function abort(file) { + if (file) { + var uid = file; + if (file && file.uid) { + uid = file.uid; + } + if (uid === this.file.uid) { + this.endUpload(); + } + } else { + this.endUpload(); + } + }, + post: function post(file) { + var _this2 = this; + + var formNode = this.getFormNode(); + var dataSpan = this.getFormDataNode(); + var data = this.$props.data; + + if (typeof data === 'function') { + data = data(file); + } + var inputs = document.createDocumentFragment(); + for (var key in data) { + if (data.hasOwnProperty(key)) { + var input = document.createElement('input'); + input.setAttribute('name', key); + input.value = data[key]; + inputs.appendChild(input); + } + } + dataSpan.appendChild(inputs); + new Promise(function (resolve) { + var action = _this2.action; + + if (typeof action === 'function') { + return resolve(action(file)); + } + resolve(action); + }).then(function (action) { + formNode.setAttribute('action', action); + formNode.submit(); + dataSpan.innerHTML = ''; + _this2.$emit('start', file); + }); + } + }, + mounted: function mounted() { + var _this3 = this; + + this.$nextTick(function () { + _this3.updateIframeWH(); + _this3.initIframe(); + }); + }, + updated: function updated() { + var _this4 = this; + + this.$nextTick(function () { + _this4.updateIframeWH(); + }); + }, + render: function render() { + var _classNames; + + var h = arguments[0]; + var _$props = this.$props, + Tag = _$props.componentTag, + disabled = _$props.disabled, + prefixCls = _$props.prefixCls; + + var iframeStyle = babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, IFRAME_STYLE, { + display: this.uploading || disabled ? 'none' : '' + }); + var cls = classnames__WEBPACK_IMPORTED_MODULE_4___default()((_classNames = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls, true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, prefixCls + '-disabled', disabled), _classNames)); + + return h( + Tag, + { + attrs: { className: cls }, + style: { position: 'relative', zIndex: 0 } }, + [h('iframe', { ref: 'iframeRef', on: { + 'load': this.onLoad + }, + style: iframeStyle }), this.$slots['default']] + ); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (IframeUploader); + +/***/ }), + +/***/ "84f2": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_iterators.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), + +/***/ "851f": +/*!************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/statistic/Number.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var lodash_padEnd__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/padEnd */ "07a9"); +/* harmony import */ var lodash_padEnd__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_padEnd__WEBPACK_IMPORTED_MODULE_0__); + + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'AStatisticNumber', + functional: true, + render: function render(h, context) { + var _context$props = context.props, + value = _context$props.value, + formatter = _context$props.formatter, + precision = _context$props.precision, + decimalSeparator = _context$props.decimalSeparator, + _context$props$groupS = _context$props.groupSeparator, + groupSeparator = _context$props$groupS === undefined ? '' : _context$props$groupS, + prefixCls = _context$props.prefixCls; + + var valueNode = void 0; + + if (typeof formatter === 'function') { + // Customize formatter + valueNode = formatter({ value: value, h: h }); + } else { + // Internal formatter + var val = String(value); + var cells = val.match(/^(-?)(\d*)(\.(\d+))?$/); + // Process if illegal number + if (!cells) { + valueNode = val; + } else { + var negative = cells[1]; + var int = cells[2] || '0'; + var decimal = cells[4] || ''; + + int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator); + if (typeof precision === 'number') { + decimal = lodash_padEnd__WEBPACK_IMPORTED_MODULE_0___default()(decimal, precision, '0').slice(0, precision); + } + + if (decimal) { + decimal = '' + decimalSeparator + decimal; + } + + valueNode = [h( + 'span', + { key: 'int', 'class': prefixCls + '-content-value-int' }, + [negative, int] + ), decimal && h( + 'span', + { key: 'decimal', 'class': prefixCls + '-content-value-decimal' }, + [decimal] + )]; + } + } + + return h( + 'span', + { 'class': prefixCls + '-content-value' }, + [valueNode] + ); + } +}); + +/***/ }), + +/***/ "8520": +/*!********************************************************!*\ + !*** ./node_modules/@ant-design/icons-vue/es/index.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _components_Icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Icon */ "e6b1"); + + +/* harmony default export */ __webpack_exports__["default"] = (_components_Icon__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "8592": +/*!******************************************************!*\ + !*** ./node_modules/ant-design-vue/es/spin/index.js ***! + \******************************************************/ +/*! exports provided: SpinProps, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Spin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Spin */ "b1e0"); +/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../base */ "db14"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SpinProps", function() { return _Spin__WEBPACK_IMPORTED_MODULE_0__["SpinProps"]; }); + + + + + + +_Spin__WEBPACK_IMPORTED_MODULE_0__["default"].setDefaultIndicator = _Spin__WEBPACK_IMPORTED_MODULE_0__["setDefaultIndicator"]; + +/* istanbul ignore next */ +_Spin__WEBPACK_IMPORTED_MODULE_0__["default"].install = function (Vue) { + Vue.use(_base__WEBPACK_IMPORTED_MODULE_1__["default"]); + Vue.component(_Spin__WEBPACK_IMPORTED_MODULE_0__["default"].name, _Spin__WEBPACK_IMPORTED_MODULE_0__["default"]); +}; + +/* harmony default export */ __webpack_exports__["default"] = (_Spin__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/***/ }), + +/***/ "85e3": +/*!***************************************!*\ + !*** ./node_modules/lodash/_apply.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +module.exports = apply; + + +/***/ }), + +/***/ "8604": +/*!**************************************!*\ + !*** ./node_modules/lodash/hasIn.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "26e8"), + hasPath = __webpack_require__(/*! ./_hasPath */ "e2c0"); + +/** + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} + +module.exports = hasIn; + + +/***/ }), + +/***/ "8615": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es7.object.values.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-object-values-entries +var $export = __webpack_require__(/*! ./_export */ "5ca1"); +var $values = __webpack_require__(/*! ./_object-to-array */ "504c")(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + + +/***/ }), + +/***/ "8689": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/my.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Burmese [my] +//! author : Squar team, mysquar.com +//! author : David Rossellat : https://github.com/gholadr +//! author : Tin Aung Lin : https://github.com/thanyawzinmin + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var symbolMap = { + 1: '၁', + 2: '၂', + 3: '၃', + 4: '၄', + 5: '၅', + 6: '၆', + 7: '၇', + 8: '၈', + 9: '၉', + 0: '၀', + }, + numberMap = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0', + }; + + var my = moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split( + '_' + ), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split( + '_' + ), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L', + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss: '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်', + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + return my; + +}))); + + +/***/ }), + +/***/ "86a4": +/*!*************************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-tree-select/src/strategies.js ***! + \*************************************************************************/ +/*! exports provided: SHOW_ALL, SHOW_PARENT, SHOW_CHILD */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SHOW_ALL", function() { return SHOW_ALL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SHOW_PARENT", function() { return SHOW_PARENT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SHOW_CHILD", function() { return SHOW_CHILD; }); +var SHOW_ALL = 'SHOW_ALL'; +var SHOW_PARENT = 'SHOW_PARENT'; +var SHOW_CHILD = 'SHOW_CHILD'; + +/***/ }), + +/***/ "86cc": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/_object-dp.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(/*! ./_an-object */ "cb7c"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ "c69a"); +var toPrimitive = __webpack_require__(/*! ./_to-primitive */ "6a99"); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(/*! ./_descriptors */ "9e1e") ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ "872a": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseAssignValue.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var defineProperty = __webpack_require__(/*! ./_defineProperty */ "3b4a"); + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +module.exports = baseAssignValue; + + +/***/ }), + +/***/ "8757": +/*!*******************************************************!*\ + !*** ./node_modules/ant-design-vue/es/empty/empty.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = ({ + functional: true, + PRESENTED_IMAGE_DEFAULT: true, + render: function render() { + var h = arguments[0]; + + return h( + "svg", + { + attrs: { width: "184", height: "152", viewBox: "0 0 184 152", xmlns: "http://www.w3.org/2000/svg" } + }, + [h( + "g", + { + attrs: { fill: "none", fillRule: "evenodd" } + }, + [h( + "g", + { + attrs: { transform: "translate(24 31.67)" } + }, + [h("ellipse", { + attrs: { + fillOpacity: ".8", + fill: "#F5F5F7", + cx: "67.797", + cy: "106.89", + rx: "67.797", + ry: "12.668" + } + }), h("path", { + attrs: { + d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z", + fill: "#AEB8C2" + } + }), h("path", { + attrs: { + d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z", + fill: "url(#linearGradient-1)", + transform: "translate(13.56)" + } + }), h("path", { + attrs: { + d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z", + fill: "#F5F5F7" + } + }), h("path", { + attrs: { + d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z", + fill: "#DCE0E6" + } + })] + ), h("path", { + attrs: { + d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z", + fill: "#DCE0E6" + } + }), h( + "g", + { + attrs: { transform: "translate(149.65 15.383)", fill: "#FFF" } + }, + [h("ellipse", { + attrs: { cx: "20.654", cy: "3.167", rx: "2.849", ry: "2.815" } + }), h("path", { + attrs: { d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z" } + })] + )] + )] + ); + } +}); + +/***/ }), + +/***/ "8827": +/*!**************************************************************!*\ + !*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), + +/***/ "8840": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/gl.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Galician [gl] +//! author : Juan G. Hurtado : https://github.com/juanghurtado + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var gl = moment.defineLocale('gl', { + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( + '_' + ), + monthsShort: + 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextDay: function () { + return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextWeek: function () { + return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; + }, + lastDay: function () { + return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; + }, + lastWeek: function () { + return ( + '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past: 'hai %s', + s: 'uns segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + return gl; + +}))); + + +/***/ }), + +/***/ "885d": +/*!***********************************************!*\ + !*** ./node_modules/vant/es/sku/constants.js ***! + \***********************************************/ +/*! exports provided: LIMIT_TYPE, UNSELECTED_SKU_VALUE_ID, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIMIT_TYPE", function() { return LIMIT_TYPE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNSELECTED_SKU_VALUE_ID", function() { return UNSELECTED_SKU_VALUE_ID; }); +var LIMIT_TYPE = { + QUOTA_LIMIT: 0, + STOCK_LIMIT: 1 +}; +var UNSELECTED_SKU_VALUE_ID = ''; +/* harmony default export */ __webpack_exports__["default"] = ({ + LIMIT_TYPE: LIMIT_TYPE, + UNSELECTED_SKU_VALUE_ID: UNSELECTED_SKU_VALUE_ID +}); + +/***/ }), + +/***/ "8868": +/*!*****************************************************!*\ + !*** ./node_modules/vant/es/address-edit/Detail.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "c31d"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "a142"); +/* harmony import */ var _utils_validate_system__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/validate/system */ "32d7"); +/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cell */ "7744"); +/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../field */ "565f"); + +// Utils + + // Components + + + + +var _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createNamespace"])('address-edit-detail'), + createComponent = _createNamespace[0], + bem = _createNamespace[1], + t = _createNamespace[2]; + +var android = Object(_utils_validate_system__WEBPACK_IMPORTED_MODULE_2__["isAndroid"])(); +/* harmony default export */ __webpack_exports__["default"] = (createComponent({ + props: { + value: String, + errorMessage: String, + focused: Boolean, + detailRows: [Number, String], + searchResult: Array, + detailMaxlength: [Number, String], + showSearchResult: Boolean + }, + computed: { + shouldShowSearchResult: function shouldShowSearchResult() { + return this.focused && this.searchResult && this.showSearchResult; + } + }, + methods: { + onSelect: function onSelect(express) { + this.$emit('select-search', express); + this.$emit('input', ((express.address || '') + " " + (express.name || '')).trim()); + }, + onFinish: function onFinish() { + this.$refs.field.blur(); + }, + genFinish: function genFinish() { + var h = this.$createElement; + var show = this.value && this.focused && android; + + if (show) { + return h("div", { + "class": bem('finish'), + "on": { + "click": this.onFinish + } + }, [t('complete')]); + } + }, + genSearchResult: function genSearchResult() { + var _this = this; + + var h = this.$createElement; + var value = this.value, + shouldShowSearchResult = this.shouldShowSearchResult, + searchResult = this.searchResult; + + if (shouldShowSearchResult) { + return searchResult.map(function (express) { + return h(_cell__WEBPACK_IMPORTED_MODULE_3__["default"], { + "key": express.name + express.address, + "attrs": { + "clickable": true, + "border": false, + "icon": "location-o", + "label": express.address + }, + "class": bem('search-item'), + "on": { + "click": function click() { + _this.onSelect(express); + } + }, + "scopedSlots": { + title: function title() { + if (express.name) { + var text = express.name.replace(value, "" + value + ""); + return h("div", { + "domProps": { + "innerHTML": text + } + }); + } + } + } + }); + }); + } + } + }, + render: function render() { + var h = arguments[0]; + return h(_cell__WEBPACK_IMPORTED_MODULE_3__["default"], { + "class": bem() + }, [h(_field__WEBPACK_IMPORTED_MODULE_4__["default"], { + "attrs": { + "autosize": true, + "rows": this.detailRows, + "clearable": !android, + "type": "textarea", + "value": this.value, + "errorMessage": this.errorMessage, + "border": !this.shouldShowSearchResult, + "label": t('label'), + "maxlength": this.detailMaxlength, + "placeholder": t('placeholder') + }, + "ref": "field", + "scopedSlots": { + icon: this.genFinish + }, + "on": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.$listeners) + }), this.genSearchResult()]); + } +})); + +/***/ }), + +/***/ "887f": +/*!**********************************************!*\ + !*** ./node_modules/vant/es/tabs/Content.js ***! + \**********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "c31d"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "a142"); +/* harmony import */ var _mixins_touch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/touch */ "3875"); + + + + +var _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["createNamespace"])('tabs'), + createComponent = _createNamespace[0], + bem = _createNamespace[1]; + +var MIN_SWIPE_DISTANCE = 50; +/* harmony default export */ __webpack_exports__["default"] = (createComponent({ + mixins: [_mixins_touch__WEBPACK_IMPORTED_MODULE_2__["TouchMixin"]], + props: { + count: Number, + duration: [Number, String], + animated: Boolean, + swipeable: Boolean, + currentIndex: Number + }, + computed: { + style: function style() { + if (this.animated) { + return { + transform: "translate3d(" + -1 * this.currentIndex * 100 + "%, 0, 0)", + transitionDuration: this.duration + "s" + }; + } + }, + listeners: function listeners() { + if (this.swipeable) { + return { + touchstart: this.touchStart, + touchmove: this.touchMove, + touchend: this.onTouchEnd, + touchcancel: this.onTouchEnd + }; + } + } + }, + methods: { + // watch swipe touch end + onTouchEnd: function onTouchEnd() { + var direction = this.direction, + deltaX = this.deltaX, + currentIndex = this.currentIndex; + /* istanbul ignore else */ + + if (direction === 'horizontal' && this.offsetX >= MIN_SWIPE_DISTANCE) { + /* istanbul ignore else */ + if (deltaX > 0 && currentIndex !== 0) { + this.$emit('change', currentIndex - 1); + } else if (deltaX < 0 && currentIndex !== this.count - 1) { + this.$emit('change', currentIndex + 1); + } + } + }, + genChildren: function genChildren() { + var h = this.$createElement; + + if (this.animated) { + return h("div", { + "class": bem('track'), + "style": this.style + }, [this.slots()]); + } + + return this.slots(); + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + "class": bem('content', { + animated: this.animated + }), + "on": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, this.listeners) + }, [this.genChildren()]); + } +})); + +/***/ }), + +/***/ "8891": +/*!**********************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-tabs/src/TabBarRootNode.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "92fa"); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "6042"); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _util_vnode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../_util/vnode */ "7b05"); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../_util/vue-types */ "4d91"); +/* harmony import */ var _util_BaseMixin__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../_util/BaseMixin */ "b488"); + + + + + + +function noop() {} +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'TabBarRootNode', + mixins: [_util_BaseMixin__WEBPACK_IMPORTED_MODULE_5__["default"]], + props: { + saveRef: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func.def(noop), + getRef: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func.def(noop), + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def(''), + tabBarPosition: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def('top'), + extraContent: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].any + }, + methods: { + onKeyDown: function onKeyDown(e) { + this.__emit('keydown', e); + } + }, + render: function render() { + var h = arguments[0]; + var prefixCls = this.prefixCls, + onKeyDown = this.onKeyDown, + tabBarPosition = this.tabBarPosition, + extraContent = this.extraContent; + + var cls = babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()({}, prefixCls + '-bar', true); + var topOrBottom = tabBarPosition === 'top' || tabBarPosition === 'bottom'; + var tabBarExtraContentStyle = topOrBottom ? { float: 'right' } : {}; + var children = this.$slots['default']; + var newChildren = children; + if (extraContent) { + newChildren = [Object(_util_vnode__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(extraContent, { + key: 'extra', + style: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, tabBarExtraContentStyle) + }), Object(_util_vnode__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(children, { key: 'content' })]; + newChildren = topOrBottom ? newChildren : newChildren.reverse(); + } + + return h( + 'div', + babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{ + attrs: { + role: 'tablist', + + tabIndex: '0' + }, + 'class': cls, on: { + 'keydown': onKeyDown + } + }, { + directives: [{ + name: 'ant-ref', + value: this.saveRef('root') + }] + }]), + [newChildren] + ); + } +}); + +/***/ }), + +/***/ "8898": +/*!****************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-cascader/Cascader.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! babel-runtime/helpers/toConsumableArray */ "9b57"); +/* harmony import */ var babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/props-util */ "daa3"); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); +/* harmony import */ var _vc_trigger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../vc-trigger */ "8496"); +/* harmony import */ var _Menus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Menus */ "7a5b"); +/* harmony import */ var _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/KeyCode */ "18a7"); +/* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! array-tree-filter */ "b8ad"); +/* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(array_tree_filter__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var shallow_equal_arrays__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! shallow-equal/arrays */ "c2b3"); +/* harmony import */ var shallow_equal_arrays__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(shallow_equal_arrays__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var _util_BaseMixin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../_util/BaseMixin */ "b488"); +/* harmony import */ var _util_vnode__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/vnode */ "7b05"); + + + + + + + + + + + + + + +var BUILT_IN_PLACEMENTS = { + bottomLeft: { + points: ['tl', 'bl'], + offset: [0, 4], + overflow: { + adjustX: 1, + adjustY: 1 + } + }, + topLeft: { + points: ['bl', 'tl'], + offset: [0, -4], + overflow: { + adjustX: 1, + adjustY: 1 + } + }, + bottomRight: { + points: ['tr', 'br'], + offset: [0, 4], + overflow: { + adjustX: 1, + adjustY: 1 + } + }, + topRight: { + points: ['br', 'tr'], + offset: [0, -4], + overflow: { + adjustX: 1, + adjustY: 1 + } + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ({ + mixins: [_util_BaseMixin__WEBPACK_IMPORTED_MODULE_10__["default"]], + model: { + prop: 'value', + event: 'change' + }, + props: { + value: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].array, + defaultValue: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].array, + options: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].array, + // onChange: PropTypes.func, + // onPopupVisibleChange: PropTypes.func, + popupVisible: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool, + disabled: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool.def(false), + transitionName: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def(''), + popupClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def(''), + popupStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].object.def(function () { + return {}; + }), + popupPlacement: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def('bottomLeft'), + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def('rc-cascader'), + dropdownMenuColumnStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].object, + builtinPlacements: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].object.def(BUILT_IN_PLACEMENTS), + loadData: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func, + changeOnSelect: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].bool, + // onKeyDown: PropTypes.func, + expandTrigger: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].string.def('click'), + fieldNames: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].object.def(function () { + return { + label: 'label', + value: 'value', + children: 'children' + }; + }), + expandIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].any, + loadingIcon: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].any, + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_4__["default"].func + }, + data: function data() { + var initialValue = []; + var value = this.value, + defaultValue = this.defaultValue, + popupVisible = this.popupVisible; + + if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["hasProp"])(this, 'value')) { + initialValue = value || []; + } else if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["hasProp"])(this, 'defaultValue')) { + initialValue = defaultValue || []; + } + // warning(!('filedNames' in props), + // '`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead.'); + + return { + sPopupVisible: popupVisible, + sActiveValue: initialValue, + sValue: initialValue + }; + }, + + watch: { + value: function value(val, oldValue) { + if (!shallow_equal_arrays__WEBPACK_IMPORTED_MODULE_9___default()(val, oldValue)) { + var newValues = { + sValue: val || [] + }; + // allow activeValue diff from value + // https://github.com/ant-design/ant-design/issues/2767 + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["hasProp"])(this, 'loadData')) { + newValues.sActiveValue = val || []; + } + this.setState(newValues); + } + }, + popupVisible: function popupVisible(val) { + this.setState({ + sPopupVisible: val + }); + } + }, + methods: { + getPopupDOMNode: function getPopupDOMNode() { + return this.$refs.trigger.getPopupDomNode(); + }, + getFieldName: function getFieldName(name) { + var defaultFieldNames = this.defaultFieldNames, + fieldNames = this.fieldNames; + + return fieldNames[name] || defaultFieldNames[name]; + }, + getFieldNames: function getFieldNames() { + return this.fieldNames; + }, + getCurrentLevelOptions: function getCurrentLevelOptions() { + var _this = this; + + var _options = this.options, + options = _options === undefined ? [] : _options, + _sActiveValue = this.sActiveValue, + sActiveValue = _sActiveValue === undefined ? [] : _sActiveValue; + + var result = array_tree_filter__WEBPACK_IMPORTED_MODULE_8___default()(options, function (o, level) { + return o[_this.getFieldName('value')] === sActiveValue[level]; + }, { childrenKeyName: this.getFieldName('children') }); + if (result[result.length - 2]) { + return result[result.length - 2][this.getFieldName('children')]; + } + return [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(options)).filter(function (o) { + return !o.disabled; + }); + }, + getActiveOptions: function getActiveOptions(activeValue) { + var _this2 = this; + + return array_tree_filter__WEBPACK_IMPORTED_MODULE_8___default()(this.options || [], function (o, level) { + return o[_this2.getFieldName('value')] === activeValue[level]; + }, { childrenKeyName: this.getFieldName('children') }); + }, + setPopupVisible: function setPopupVisible(popupVisible) { + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["hasProp"])(this, 'popupVisible')) { + this.setState({ sPopupVisible: popupVisible }); + } + // sync activeValue with value when panel open + if (popupVisible && !this.sPopupVisible) { + this.setState({ + sActiveValue: this.sValue + }); + } + this.__emit('popupVisibleChange', popupVisible); + }, + handleChange: function handleChange(options, setProps, e) { + var _this3 = this; + + if (e.type !== 'keydown' || e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ENTER) { + this.__emit('change', options.map(function (o) { + return o[_this3.getFieldName('value')]; + }), options); + this.setPopupVisible(setProps.visible); + } + }, + handlePopupVisibleChange: function handlePopupVisibleChange(popupVisible) { + this.setPopupVisible(popupVisible); + }, + handleMenuSelect: function handleMenuSelect(targetOption, menuIndex, e) { + // Keep focused state for keyboard support + var triggerNode = this.$refs.trigger.getRootDomNode(); + if (triggerNode && triggerNode.focus) { + triggerNode.focus(); + } + var changeOnSelect = this.changeOnSelect, + loadData = this.loadData, + expandTrigger = this.expandTrigger; + + if (!targetOption || targetOption.disabled) { + return; + } + var sActiveValue = this.sActiveValue; + + sActiveValue = sActiveValue.slice(0, menuIndex + 1); + sActiveValue[menuIndex] = targetOption[this.getFieldName('value')]; + var activeOptions = this.getActiveOptions(sActiveValue); + if (targetOption.isLeaf === false && !targetOption[this.getFieldName('children')] && loadData) { + if (changeOnSelect) { + this.handleChange(activeOptions, { visible: true }, e); + } + this.setState({ sActiveValue: sActiveValue }); + loadData(activeOptions); + return; + } + var newState = {}; + if (!targetOption[this.getFieldName('children')] || !targetOption[this.getFieldName('children')].length) { + this.handleChange(activeOptions, { visible: false }, e); + // set value to activeValue when select leaf option + newState.sValue = sActiveValue; + // add e.type judgement to prevent `onChange` being triggered by mouseEnter + } else if (changeOnSelect && (e.type === 'click' || e.type === 'keydown')) { + if (expandTrigger === 'hover') { + this.handleChange(activeOptions, { visible: false }, e); + } else { + this.handleChange(activeOptions, { visible: true }, e); + } + // set value to activeValue on every select + newState.sValue = sActiveValue; + } + newState.sActiveValue = sActiveValue; + // not change the value by keyboard + if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["hasProp"])(this, 'value') || e.type === 'keydown' && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ENTER) { + delete newState.sValue; + } + this.setState(newState); + }, + handleItemDoubleClick: function handleItemDoubleClick() { + var changeOnSelect = this.$props.changeOnSelect; + + if (changeOnSelect) { + this.setPopupVisible(false); + } + }, + handleKeyDown: function handleKeyDown(e) { + var _this4 = this; + + var $slots = this.$slots; + + var children = $slots['default'] && $slots['default'][0]; + // https://github.com/ant-design/ant-design/issues/6717 + // Don't bind keyboard support when children specify the onKeyDown + if (children) { + var keydown = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getEvents"])(children).keydown; + if (keydown) { + keydown(e); + return; + } + } + var activeValue = [].concat(babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(this.sActiveValue)); + var currentLevel = activeValue.length - 1 < 0 ? 0 : activeValue.length - 1; + var currentOptions = this.getCurrentLevelOptions(); + var currentIndex = currentOptions.map(function (o) { + return o[_this4.getFieldName('value')]; + }).indexOf(activeValue[currentLevel]); + if (e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].DOWN && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].UP && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].LEFT && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].RIGHT && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ENTER && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].SPACE && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].BACKSPACE && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ESC && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].TAB) { + return; + } + // Press any keys above to reopen menu + if (!this.sPopupVisible && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].BACKSPACE && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].LEFT && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].RIGHT && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ESC && e.keyCode !== _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].TAB) { + this.setPopupVisible(true); + return; + } + if (e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].DOWN || e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].UP) { + e.preventDefault(); + var nextIndex = currentIndex; + if (nextIndex !== -1) { + if (e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].DOWN) { + nextIndex += 1; + nextIndex = nextIndex >= currentOptions.length ? 0 : nextIndex; + } else { + nextIndex -= 1; + nextIndex = nextIndex < 0 ? currentOptions.length - 1 : nextIndex; + } + } else { + nextIndex = 0; + } + activeValue[currentLevel] = currentOptions[nextIndex][this.getFieldName('value')]; + } else if (e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].LEFT || e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].BACKSPACE) { + e.preventDefault(); + activeValue.splice(activeValue.length - 1, 1); + } else if (e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].RIGHT) { + e.preventDefault(); + if (currentOptions[currentIndex] && currentOptions[currentIndex][this.getFieldName('children')]) { + activeValue.push(currentOptions[currentIndex][this.getFieldName('children')][0][this.getFieldName('value')]); + } + } else if (e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].ESC || e.keyCode === _util_KeyCode__WEBPACK_IMPORTED_MODULE_7__["default"].TAB) { + this.setPopupVisible(false); + return; + } + if (!activeValue || activeValue.length === 0) { + this.setPopupVisible(false); + } + var activeOptions = this.getActiveOptions(activeValue); + var targetOption = activeOptions[activeOptions.length - 1]; + this.handleMenuSelect(targetOption, activeOptions.length - 1, e); + this.__emit('keydown', e); + } + }, + + render: function render() { + var h = arguments[0]; + var $props = this.$props, + sActiveValue = this.sActiveValue, + handleMenuSelect = this.handleMenuSelect, + sPopupVisible = this.sPopupVisible, + handlePopupVisibleChange = this.handlePopupVisibleChange, + handleKeyDown = this.handleKeyDown; + + var listeners = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getListeners"])(this); + + var prefixCls = $props.prefixCls, + transitionName = $props.transitionName, + popupClassName = $props.popupClassName, + _$props$options = $props.options, + options = _$props$options === undefined ? [] : _$props$options, + disabled = $props.disabled, + builtinPlacements = $props.builtinPlacements, + popupPlacement = $props.popupPlacement, + restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()($props, ['prefixCls', 'transitionName', 'popupClassName', 'options', 'disabled', 'builtinPlacements', 'popupPlacement']); + // Did not show popup when there is no options + + + var menus = h('div'); + var emptyMenuClassName = ''; + if (options && options.length > 0) { + var loadingIcon = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getComponentFromProp"])(this, 'loadingIcon'); + var expandIcon = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getComponentFromProp"])(this, 'expandIcon') || '>'; + var menusProps = { + props: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, $props, { + fieldNames: this.getFieldNames(), + defaultFieldNames: this.defaultFieldNames, + activeValue: sActiveValue, + visible: sPopupVisible, + loadingIcon: loadingIcon, + expandIcon: expandIcon + }), + on: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, listeners, { + select: handleMenuSelect, + itemDoubleClick: this.handleItemDoubleClick + }) + }; + menus = h(_Menus__WEBPACK_IMPORTED_MODULE_6__["default"], menusProps); + } else { + emptyMenuClassName = ' ' + prefixCls + '-menus-empty'; + } + var triggerProps = { + props: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, restProps, { + disabled: disabled, + popupPlacement: popupPlacement, + builtinPlacements: builtinPlacements, + popupTransitionName: transitionName, + action: disabled ? [] : ['click'], + popupVisible: disabled ? false : sPopupVisible, + prefixCls: prefixCls + '-menus', + popupClassName: popupClassName + emptyMenuClassName + }), + on: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, listeners, { + popupVisibleChange: handlePopupVisibleChange + }), + ref: 'trigger' + }; + var children = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_3__["getSlot"])(this, 'default')[0]; + return h( + _vc_trigger__WEBPACK_IMPORTED_MODULE_5__["default"], + triggerProps, + [children && Object(_util_vnode__WEBPACK_IMPORTED_MODULE_11__["cloneElement"])(children, { + on: { + keydown: handleKeyDown + }, + attrs: { + tabIndex: disabled ? undefined : 0 + } + }), h( + 'template', + { slot: 'popup' }, + [menus] + )] + ); + } +}); + +/***/ }), + +/***/ "88ee": +/*!**************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-trigger/Trigger.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ "8bbf"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-ref */ "46cf"); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue_ref__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); +/* harmony import */ var _vc_util_Dom_contains__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../vc-util/Dom/contains */ "6bb4"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/props-util */ "daa3"); +/* harmony import */ var _util_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../_util/requestAnimationTimeout */ "d41d"); +/* harmony import */ var _vc_util_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../vc-util/Dom/addEventListener */ "c8c6"); +/* harmony import */ var _util_warning__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/warning */ "6a21"); +/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Popup */ "f3dd"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils */ "cb7d"); +/* harmony import */ var _util_BaseMixin__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/BaseMixin */ "b488"); +/* harmony import */ var _util_vnode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/vnode */ "7b05"); +/* harmony import */ var _util_ContainerRender__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../_util/ContainerRender */ "98d3"); + + + + + + + + + + + + + + + +vue__WEBPACK_IMPORTED_MODULE_1___default.a.use(vue_ref__WEBPACK_IMPORTED_MODULE_2___default.a, { name: 'ant-ref' }); + +function returnEmptyString() { + return ''; +} + +function returnDocument() { + return window.document; +} +var ALL_HANDLERS = ['click', 'mousedown', 'touchstart', 'mouseenter', 'mouseleave', 'focus', 'blur', 'contextmenu']; + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'Trigger', + mixins: [_util_BaseMixin__WEBPACK_IMPORTED_MODULE_11__["default"]], + props: { + action: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].arrayOf(_util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string)]).def([]), + showAction: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any.def([]), + hideAction: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any.def([]), + getPopupClassNameFromAlign: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any.def(returnEmptyString), + // onPopupVisibleChange: PropTypes.func.def(noop), + afterPopupVisibleChange: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].func.def(_utils__WEBPACK_IMPORTED_MODULE_10__["noop"]), + popup: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any, + popupStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].object.def(function () { + return {}; + }), + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string.def('rc-trigger-popup'), + popupClassName: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string.def(''), + popupPlacement: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, + builtinPlacements: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].object, + popupTransitionName: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].object]), + popupAnimation: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any, + mouseEnterDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].number.def(0), + mouseLeaveDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].number.def(0.1), + zIndex: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].number, + focusDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].number.def(0), + blurDelay: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].number.def(0.15), + getPopupContainer: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].func, + getDocument: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].func.def(returnDocument), + forceRender: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool, + destroyPopupOnHide: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool.def(false), + mask: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool.def(false), + maskClosable: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool.def(true), + // onPopupAlign: PropTypes.func.def(noop), + popupAlign: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].object.def(function () { + return {}; + }), + popupVisible: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool, + defaultPopupVisible: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool.def(false), + maskTransitionName: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].oneOfType([_util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].object]), + maskAnimation: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, + stretch: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, + alignPoint: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].bool // Maybe we can support user pass position in the future + }, + provide: function provide() { + return { + vcTriggerContext: this + }; + }, + + inject: { + vcTriggerContext: { 'default': function _default() { + return {}; + } }, + savePopupRef: { 'default': function _default() { + return _utils__WEBPACK_IMPORTED_MODULE_10__["noop"]; + } }, + dialogContext: { 'default': function _default() { + return null; + } } + }, + data: function data() { + var _this = this; + + var props = this.$props; + var popupVisible = void 0; + if (Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'popupVisible')) { + popupVisible = !!props.popupVisible; + } else { + popupVisible = !!props.defaultPopupVisible; + } + ALL_HANDLERS.forEach(function (h) { + _this['fire' + h] = function (e) { + _this.fireEvents(h, e); + }; + }); + return { + prevPopupVisible: popupVisible, + sPopupVisible: popupVisible, + point: null + }; + }, + + watch: { + popupVisible: function popupVisible(val) { + if (val !== undefined) { + this.prevPopupVisible = this.sPopupVisible; + this.sPopupVisible = val; + } + } + }, + deactivated: function deactivated() { + this.setPopupVisible(false); + }, + mounted: function mounted() { + var _this2 = this; + + this.$nextTick(function () { + _this2.renderComponent(null); + _this2.updatedCal(); + }); + }, + updated: function updated() { + var _this3 = this; + + var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() { + if (_this3.sPopupVisible !== _this3.prevPopupVisible) { + _this3.afterPopupVisibleChange(_this3.sPopupVisible); + } + _this3.prevPopupVisible = _this3.sPopupVisible; + }; + this.renderComponent(null, triggerAfterPopupVisibleChange); + this.$nextTick(function () { + _this3.updatedCal(); + }); + }, + beforeDestroy: function beforeDestroy() { + this.clearDelayTimer(); + this.clearOutsideHandler(); + clearTimeout(this.mouseDownTimeout); + }, + + methods: { + updatedCal: function updatedCal() { + var props = this.$props; + var state = this.$data; + + // We must listen to `mousedown` or `touchstart`, edge case: + // https://github.com/ant-design/ant-design/issues/5804 + // https://github.com/react-component/calendar/issues/250 + // https://github.com/react-component/trigger/issues/50 + if (state.sPopupVisible) { + var currentDocument = void 0; + if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextmenuToShow())) { + currentDocument = props.getDocument(); + this.clickOutsideHandler = Object(_vc_util_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_7__["default"])(currentDocument, 'mousedown', this.onDocumentClick); + } + // always hide on mobile + if (!this.touchOutsideHandler) { + currentDocument = currentDocument || props.getDocument(); + this.touchOutsideHandler = Object(_vc_util_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_7__["default"])(currentDocument, 'touchstart', this.onDocumentClick); + } + // close popup when trigger type contains 'onContextmenu' and document is scrolling. + if (!this.contextmenuOutsideHandler1 && this.isContextmenuToShow()) { + currentDocument = currentDocument || props.getDocument(); + this.contextmenuOutsideHandler1 = Object(_vc_util_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_7__["default"])(currentDocument, 'scroll', this.onContextmenuClose); + } + // close popup when trigger type contains 'onContextmenu' and window is blur. + if (!this.contextmenuOutsideHandler2 && this.isContextmenuToShow()) { + this.contextmenuOutsideHandler2 = Object(_vc_util_Dom_addEventListener__WEBPACK_IMPORTED_MODULE_7__["default"])(window, 'blur', this.onContextmenuClose); + } + } else { + this.clearOutsideHandler(); + } + }, + onMouseenter: function onMouseenter(e) { + var mouseEnterDelay = this.$props.mouseEnterDelay; + + this.fireEvents('mouseenter', e); + this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); + }, + onMouseMove: function onMouseMove(e) { + this.fireEvents('mousemove', e); + this.setPoint(e); + }, + onMouseleave: function onMouseleave(e) { + this.fireEvents('mouseleave', e); + this.delaySetPopupVisible(false, this.$props.mouseLeaveDelay); + }, + onPopupMouseenter: function onPopupMouseenter() { + this.clearDelayTimer(); + }, + onPopupMouseleave: function onPopupMouseleave(e) { + if (e && e.relatedTarget && !e.relatedTarget.setTimeout && this._component && this._component.getPopupDomNode && Object(_vc_util_Dom_contains__WEBPACK_IMPORTED_MODULE_4__["default"])(this._component.getPopupDomNode(), e.relatedTarget)) { + return; + } + this.delaySetPopupVisible(false, this.$props.mouseLeaveDelay); + }, + onFocus: function onFocus(e) { + this.fireEvents('focus', e); + // incase focusin and focusout + this.clearDelayTimer(); + if (this.isFocusToShow()) { + this.focusTime = Date.now(); + this.delaySetPopupVisible(true, this.$props.focusDelay); + } + }, + onMousedown: function onMousedown(e) { + this.fireEvents('mousedown', e); + this.preClickTime = Date.now(); + }, + onTouchstart: function onTouchstart(e) { + this.fireEvents('touchstart', e); + this.preTouchTime = Date.now(); + }, + onBlur: function onBlur(e) { + if (!Object(_vc_util_Dom_contains__WEBPACK_IMPORTED_MODULE_4__["default"])(e.target, e.relatedTarget || document.activeElement)) { + this.fireEvents('blur', e); + this.clearDelayTimer(); + if (this.isBlurToHide()) { + this.delaySetPopupVisible(false, this.$props.blurDelay); + } + } + }, + onContextmenu: function onContextmenu(e) { + e.preventDefault(); + this.fireEvents('contextmenu', e); + this.setPopupVisible(true, e); + }, + onContextmenuClose: function onContextmenuClose() { + if (this.isContextmenuToShow()) { + this.close(); + } + }, + onClick: function onClick(event) { + this.fireEvents('click', event); + // focus will trigger click + if (this.focusTime) { + var preTime = void 0; + if (this.preClickTime && this.preTouchTime) { + preTime = Math.min(this.preClickTime, this.preTouchTime); + } else if (this.preClickTime) { + preTime = this.preClickTime; + } else if (this.preTouchTime) { + preTime = this.preTouchTime; + } + if (Math.abs(preTime - this.focusTime) < 20) { + return; + } + this.focusTime = 0; + } + this.preClickTime = 0; + this.preTouchTime = 0; + // Only prevent default when all the action is click. + // https://github.com/ant-design/ant-design/issues/17043 + // https://github.com/ant-design/ant-design/issues/17291 + if (this.isClickToShow() && (this.isClickToHide() || this.isBlurToHide()) && event && event.preventDefault) { + event.preventDefault(); + } + if (event && event.domEvent) { + event.domEvent.preventDefault(); + } + var nextVisible = !this.$data.sPopupVisible; + if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) { + this.setPopupVisible(!this.$data.sPopupVisible, event); + } + }, + onPopupMouseDown: function onPopupMouseDown() { + var _this4 = this; + + var _vcTriggerContext = this.vcTriggerContext, + vcTriggerContext = _vcTriggerContext === undefined ? {} : _vcTriggerContext; + + this.hasPopupMouseDown = true; + + clearTimeout(this.mouseDownTimeout); + this.mouseDownTimeout = setTimeout(function () { + _this4.hasPopupMouseDown = false; + }, 0); + + if (vcTriggerContext.onPopupMouseDown) { + vcTriggerContext.onPopupMouseDown.apply(vcTriggerContext, arguments); + } + }, + onDocumentClick: function onDocumentClick(event) { + if (this.$props.mask && !this.$props.maskClosable) { + return; + } + var target = event.target; + var root = this.$el; + if (!Object(_vc_util_Dom_contains__WEBPACK_IMPORTED_MODULE_4__["default"])(root, target) && !this.hasPopupMouseDown) { + this.close(); + } + }, + getPopupDomNode: function getPopupDomNode() { + if (this._component && this._component.getPopupDomNode) { + return this._component.getPopupDomNode(); + } + return null; + }, + getRootDomNode: function getRootDomNode() { + return this.$el; + // return this.$el.children[0] || this.$el + }, + handleGetPopupClassFromAlign: function handleGetPopupClassFromAlign(align) { + var className = []; + var props = this.$props; + var popupPlacement = props.popupPlacement, + builtinPlacements = props.builtinPlacements, + prefixCls = props.prefixCls, + alignPoint = props.alignPoint, + getPopupClassNameFromAlign = props.getPopupClassNameFromAlign; + + if (popupPlacement && builtinPlacements) { + className.push(Object(_utils__WEBPACK_IMPORTED_MODULE_10__["getAlignPopupClassName"])(builtinPlacements, prefixCls, align, alignPoint)); + } + if (getPopupClassNameFromAlign) { + className.push(getPopupClassNameFromAlign(align)); + } + return className.join(' '); + }, + getPopupAlign: function getPopupAlign() { + var props = this.$props; + var popupPlacement = props.popupPlacement, + popupAlign = props.popupAlign, + builtinPlacements = props.builtinPlacements; + + if (popupPlacement && builtinPlacements) { + return Object(_utils__WEBPACK_IMPORTED_MODULE_10__["getAlignFromPlacement"])(builtinPlacements, popupPlacement, popupAlign); + } + return popupAlign; + }, + savePopup: function savePopup(node) { + this._component = node; + this.savePopupRef(node); + }, + getComponent: function getComponent() { + var h = this.$createElement; + + var self = this; + var mouseProps = {}; + if (this.isMouseEnterToShow()) { + mouseProps.mouseenter = self.onPopupMouseenter; + } + if (this.isMouseLeaveToHide()) { + mouseProps.mouseleave = self.onPopupMouseleave; + } + mouseProps.mousedown = this.onPopupMouseDown; + mouseProps.touchstart = this.onPopupMouseDown; + var handleGetPopupClassFromAlign = self.handleGetPopupClassFromAlign, + getRootDomNode = self.getRootDomNode, + getContainer = self.getContainer; + var _self$$props = self.$props, + prefixCls = _self$$props.prefixCls, + destroyPopupOnHide = _self$$props.destroyPopupOnHide, + popupClassName = _self$$props.popupClassName, + action = _self$$props.action, + popupAnimation = _self$$props.popupAnimation, + popupTransitionName = _self$$props.popupTransitionName, + popupStyle = _self$$props.popupStyle, + mask = _self$$props.mask, + maskAnimation = _self$$props.maskAnimation, + maskTransitionName = _self$$props.maskTransitionName, + zIndex = _self$$props.zIndex, + stretch = _self$$props.stretch, + alignPoint = _self$$props.alignPoint; + var _$data = this.$data, + sPopupVisible = _$data.sPopupVisible, + point = _$data.point; + + var align = this.getPopupAlign(); + var popupProps = { + props: { + prefixCls: prefixCls, + destroyPopupOnHide: destroyPopupOnHide, + visible: sPopupVisible, + point: alignPoint && point, + action: action, + align: align, + animation: popupAnimation, + getClassNameFromAlign: handleGetPopupClassFromAlign, + stretch: stretch, + getRootDomNode: getRootDomNode, + mask: mask, + zIndex: zIndex, + transitionName: popupTransitionName, + maskAnimation: maskAnimation, + maskTransitionName: maskTransitionName, + getContainer: getContainer, + popupClassName: popupClassName, + popupStyle: popupStyle + }, + on: babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + align: Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getListeners"])(this).popupAlign || _utils__WEBPACK_IMPORTED_MODULE_10__["noop"] + }, mouseProps), + directives: [{ + name: 'ant-ref', + value: this.savePopup + }] + }; + return h( + _Popup__WEBPACK_IMPORTED_MODULE_9__["default"], + popupProps, + [Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getComponentFromProp"])(self, 'popup')] + ); + }, + getContainer: function getContainer() { + var props = this.$props, + dialogContext = this.dialogContext; + + var popupContainer = document.createElement('div'); + // Make sure default popup container will never cause scrollbar appearing + // https://github.com/react-component/trigger/issues/41 + popupContainer.style.position = 'absolute'; + popupContainer.style.top = '0'; + popupContainer.style.left = '0'; + popupContainer.style.width = '100%'; + var mountNode = props.getPopupContainer ? props.getPopupContainer(this.$el, dialogContext) : props.getDocument().body; + mountNode.appendChild(popupContainer); + this.popupContainer = popupContainer; + return popupContainer; + }, + setPopupVisible: function setPopupVisible(sPopupVisible, event) { + var alignPoint = this.alignPoint, + prevPopupVisible = this.sPopupVisible; + + this.clearDelayTimer(); + if (prevPopupVisible !== sPopupVisible) { + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'popupVisible')) { + this.setState({ + sPopupVisible: sPopupVisible, + prevPopupVisible: prevPopupVisible + }); + } + var listeners = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getListeners"])(this); + listeners.popupVisibleChange && listeners.popupVisibleChange(sPopupVisible); + } + // Always record the point position since mouseEnterDelay will delay the show + if (alignPoint && event) { + this.setPoint(event); + } + }, + setPoint: function setPoint(point) { + var alignPoint = this.$props.alignPoint; + + if (!alignPoint || !point) return; + + this.setState({ + point: { + pageX: point.pageX, + pageY: point.pageY + } + }); + }, + delaySetPopupVisible: function delaySetPopupVisible(visible, delayS, event) { + var _this5 = this; + + var delay = delayS * 1000; + this.clearDelayTimer(); + if (delay) { + var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; + this.delayTimer = Object(_util_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__["requestAnimationTimeout"])(function () { + _this5.setPopupVisible(visible, point); + _this5.clearDelayTimer(); + }, delay); + } else { + this.setPopupVisible(visible, event); + } + }, + clearDelayTimer: function clearDelayTimer() { + if (this.delayTimer) { + Object(_util_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__["cancelAnimationTimeout"])(this.delayTimer); + this.delayTimer = null; + } + }, + clearOutsideHandler: function clearOutsideHandler() { + if (this.clickOutsideHandler) { + this.clickOutsideHandler.remove(); + this.clickOutsideHandler = null; + } + + if (this.contextmenuOutsideHandler1) { + this.contextmenuOutsideHandler1.remove(); + this.contextmenuOutsideHandler1 = null; + } + + if (this.contextmenuOutsideHandler2) { + this.contextmenuOutsideHandler2.remove(); + this.contextmenuOutsideHandler2 = null; + } + + if (this.touchOutsideHandler) { + this.touchOutsideHandler.remove(); + this.touchOutsideHandler = null; + } + }, + createTwoChains: function createTwoChains(event) { + var fn = function fn() {}; + var events = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getListeners"])(this); + if (this.childOriginEvents[event] && events[event]) { + return this['fire' + event]; + } + fn = this.childOriginEvents[event] || events[event] || fn; + return fn; + }, + isClickToShow: function isClickToShow() { + var _$props = this.$props, + action = _$props.action, + showAction = _$props.showAction; + + return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; + }, + isContextmenuToShow: function isContextmenuToShow() { + var _$props2 = this.$props, + action = _$props2.action, + showAction = _$props2.showAction; + + return action.indexOf('contextmenu') !== -1 || showAction.indexOf('contextmenu') !== -1; + }, + isClickToHide: function isClickToHide() { + var _$props3 = this.$props, + action = _$props3.action, + hideAction = _$props3.hideAction; + + return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; + }, + isMouseEnterToShow: function isMouseEnterToShow() { + var _$props4 = this.$props, + action = _$props4.action, + showAction = _$props4.showAction; + + return action.indexOf('hover') !== -1 || showAction.indexOf('mouseenter') !== -1; + }, + isMouseLeaveToHide: function isMouseLeaveToHide() { + var _$props5 = this.$props, + action = _$props5.action, + hideAction = _$props5.hideAction; + + return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseleave') !== -1; + }, + isFocusToShow: function isFocusToShow() { + var _$props6 = this.$props, + action = _$props6.action, + showAction = _$props6.showAction; + + return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; + }, + isBlurToHide: function isBlurToHide() { + var _$props7 = this.$props, + action = _$props7.action, + hideAction = _$props7.hideAction; + + return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; + }, + forcePopupAlign: function forcePopupAlign() { + if (this.$data.sPopupVisible && this._component && this._component.$refs.alignInstance) { + this._component.$refs.alignInstance.forceAlign(); + } + }, + fireEvents: function fireEvents(type, e) { + if (this.childOriginEvents[type]) { + this.childOriginEvents[type](e); + } + this.__emit(type, e); + }, + close: function close() { + this.setPopupVisible(false); + } + }, + render: function render() { + var _this6 = this; + + var h = arguments[0]; + var sPopupVisible = this.sPopupVisible; + + var children = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["filterEmpty"])(this.$slots['default']); + var _$props8 = this.$props, + forceRender = _$props8.forceRender, + alignPoint = _$props8.alignPoint; + + + if (children.length > 1) { + Object(_util_warning__WEBPACK_IMPORTED_MODULE_8__["default"])(false, 'Trigger $slots.default.length > 1, just support only one default', true); + } + var child = children[0]; + this.childOriginEvents = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getDataEvents"])(child); + var newChildProps = { + props: {}, + nativeOn: {}, + key: 'trigger' + }; + + if (this.isContextmenuToShow()) { + newChildProps.nativeOn.contextmenu = this.onContextmenu; + } else { + newChildProps.nativeOn.contextmenu = this.createTwoChains('contextmenu'); + } + + if (this.isClickToHide() || this.isClickToShow()) { + newChildProps.nativeOn.click = this.onClick; + newChildProps.nativeOn.mousedown = this.onMousedown; + newChildProps.nativeOn.touchstart = this.onTouchstart; + } else { + newChildProps.nativeOn.click = this.createTwoChains('click'); + newChildProps.nativeOn.mousedown = this.createTwoChains('mousedown'); + newChildProps.nativeOn.touchstart = this.createTwoChains('onTouchstart'); + } + if (this.isMouseEnterToShow()) { + newChildProps.nativeOn.mouseenter = this.onMouseenter; + if (alignPoint) { + newChildProps.nativeOn.mousemove = this.onMouseMove; + } + } else { + newChildProps.nativeOn.mouseenter = this.createTwoChains('mouseenter'); + } + if (this.isMouseLeaveToHide()) { + newChildProps.nativeOn.mouseleave = this.onMouseleave; + } else { + newChildProps.nativeOn.mouseleave = this.createTwoChains('mouseleave'); + } + + if (this.isFocusToShow() || this.isBlurToHide()) { + newChildProps.nativeOn.focus = this.onFocus; + newChildProps.nativeOn.blur = this.onBlur; + } else { + newChildProps.nativeOn.focus = this.createTwoChains('focus'); + newChildProps.nativeOn.blur = function (e) { + if (e && (!e.relatedTarget || !Object(_vc_util_Dom_contains__WEBPACK_IMPORTED_MODULE_4__["default"])(e.target, e.relatedTarget))) { + _this6.createTwoChains('blur')(e); + } + }; + } + + this.trigger = Object(_util_vnode__WEBPACK_IMPORTED_MODULE_12__["cloneElement"])(child, newChildProps); + + return h(_util_ContainerRender__WEBPACK_IMPORTED_MODULE_13__["default"], { + attrs: { + parent: this, + visible: sPopupVisible, + autoMount: false, + forceRender: forceRender, + getComponent: this.getComponent, + getContainer: this.getContainer, + children: function children(_ref) { + var renderComponent = _ref.renderComponent; + + _this6.renderComponent = renderComponent; + return _this6.trigger; + } + } + }); + } +}); + +/***/ }), + +/***/ "898b": +/*!******************************************!*\ + !*** ./node_modules/moment/locale/es.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +//! moment.js locale configuration +//! locale : Spanish [es] +//! author : Julio Napurí : https://github.com/julionc + +;(function (global, factory) { + true ? factory(__webpack_require__(/*! ../moment */ "c1df")) : + undefined +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + var monthsShortDot = + 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex = + /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + var es = moment.defineLocale('es', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: + /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: + /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + w: 'una semana', + ww: '%d semanas', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + invalidDate: 'Fecha inválida', + }); + + return es; + +}))); + + +/***/ }), + +/***/ "89b0": +/*!****************************************************************!*\ + !*** ./node_modules/ant-design-vue/es/vc-progress/src/Line.js ***! + \****************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ "92fa"); +/* harmony import */ var babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/objectWithoutProperties */ "8e8e"); +/* harmony import */ var babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ "8bbf"); +/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-ref */ "46cf"); +/* harmony import */ var vue_ref__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue_ref__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../_util/props-util */ "daa3"); +/* harmony import */ var _enhancer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./enhancer */ "5aa9"); +/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./types */ "c91b"); + + + + + + + + +vue__WEBPACK_IMPORTED_MODULE_2___default.a.use(vue_ref__WEBPACK_IMPORTED_MODULE_3___default.a, { name: 'ant-ref' }); + +var Line = { + props: Object(_util_props_util__WEBPACK_IMPORTED_MODULE_4__["initDefaultProps"])(_types__WEBPACK_IMPORTED_MODULE_6__["propTypes"], _types__WEBPACK_IMPORTED_MODULE_6__["defaultProps"]), + created: function created() { + this.paths = {}; + }, + render: function render() { + var _this = this; + + var h = arguments[0]; + + var _$props = this.$props, + percent = _$props.percent, + prefixCls = _$props.prefixCls, + strokeColor = _$props.strokeColor, + strokeLinecap = _$props.strokeLinecap, + strokeWidth = _$props.strokeWidth, + trailColor = _$props.trailColor, + trailWidth = _$props.trailWidth, + transition = _$props.transition, + restProps = babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_$props, ['percent', 'prefixCls', 'strokeColor', 'strokeLinecap', 'strokeWidth', 'trailColor', 'trailWidth', 'transition']); + + delete restProps.gapPosition; + + var percentList = Array.isArray(percent) ? percent : [percent]; + var strokeColorList = Array.isArray(strokeColor) ? strokeColor : [strokeColor]; + + var center = strokeWidth / 2; + var right = 100 - strokeWidth / 2; + var pathString = 'M ' + (strokeLinecap === 'round' ? center : 0) + ',' + center + '\n L ' + (strokeLinecap === 'round' ? right : 100) + ',' + center; + var viewBoxString = '0 0 100 ' + strokeWidth; + + var stackPtg = 0; + + var pathFirst = { + attrs: { + d: pathString, + 'stroke-linecap': strokeLinecap, + stroke: trailColor, + 'stroke-width': trailWidth || strokeWidth, + 'fill-opacity': '0' + }, + 'class': prefixCls + '-line-trail' + }; + return h( + 'svg', + babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{ + 'class': prefixCls + '-line', + attrs: { viewBox: viewBoxString, + preserveAspectRatio: 'none' + } + }, restProps]), + [h('path', pathFirst), percentList.map(function (ptg, index) { + var pathStyle = { + strokeDasharray: ptg + 'px, 100px', + strokeDashoffset: '-' + stackPtg + 'px', + transition: transition || 'stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear' + }; + var color = strokeColorList[index] || strokeColorList[strokeColorList.length - 1]; + + stackPtg += ptg; + + var pathProps = { + key: index, + attrs: { + d: pathString, + 'stroke-linecap': strokeLinecap, + stroke: color, + 'stroke-width': strokeWidth, + 'fill-opacity': '0' + }, + 'class': prefixCls + '-line-path', + style: pathStyle, + directives: [{ + name: 'ant-ref', + value: function value(c) { + _this.paths[index] = c; + } + }] + }; + + return h('path', pathProps); + })] + ); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(_enhancer__WEBPACK_IMPORTED_MODULE_5__["default"])(Line)); + +/***/ }), + +/***/ "89d3": +/*!************************************************************!*\ + !*** ./node_modules/vant/es/sku/components/SkuMessages.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils */ "a142"); +/* harmony import */ var _utils_validate_email__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/validate/email */ "b4d4"); +/* harmony import */ var _utils_validate_number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/validate/number */ "90c6"); +/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../cell */ "7744"); +/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../field */ "565f"); +/* harmony import */ var _SkuImgUploader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SkuImgUploader */ "c569"); +/* harmony import */ var _SkuDateTimeField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SkuDateTimeField */ "4b71"); +// Utils + + + // Components + + + + + + +var _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__["createNamespace"])('sku-messages'), + createComponent = _createNamespace[0], + bem = _createNamespace[1], + t = _createNamespace[2]; + +/* harmony default export */ __webpack_exports__["default"] = (createComponent({ + props: { + messageConfig: Object, + goodsId: [Number, String], + messages: { + type: Array, + default: function _default() { + return []; + } + } + }, + data: function data() { + return { + messageValues: this.resetMessageValues(this.messages) + }; + }, + watch: { + messages: function messages(val) { + this.messageValues = this.resetMessageValues(val); + } + }, + methods: { + resetMessageValues: function resetMessageValues(messages) { + var messageConfig = this.messageConfig; + var _messageConfig$initia = messageConfig.initialMessages, + initialMessages = _messageConfig$initia === void 0 ? {} : _messageConfig$initia; + return (messages || []).map(function (message) { + return { + value: initialMessages[message.name] || '' + }; + }); + }, + getType: function getType(message) { + if (+message.multiple === 1) { + return 'textarea'; + } + + if (message.type === 'id_no') { + return 'text'; + } + + return message.datetime > 0 ? 'datetime' : message.type; + }, + getMessages: function getMessages() { + var messages = {}; + this.messageValues.forEach(function (item, index) { + messages["message_" + index] = item.value; + }); + return messages; + }, + getCartMessages: function getCartMessages() { + var _this = this; + + var messages = {}; + this.messageValues.forEach(function (item, index) { + var message = _this.messages[index]; + messages[message.name] = item.value; + }); + return messages; + }, + getPlaceholder: function getPlaceholder(message) { + var type = +message.multiple === 1 ? 'textarea' : message.type; + var map = this.messageConfig.placeholderMap || {}; + return message.placeholder || map[type] || t("placeholder." + type); + }, + validateMessages: function validateMessages() { + var values = this.messageValues; + + for (var i = 0; i < values.length; i++) { + var value = values[i].value; + var message = this.messages[i]; + + if (value === '') { + // 必填字段的校验 + if (String(message.required) === '1') { + var textType = t(message.type === 'image' ? 'upload' : 'fill'); + return textType + message.name; + } + } else { + if (message.type === 'tel' && !Object(_utils_validate_number__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(value)) { + return t('invalid.tel'); + } + + if (message.type === 'mobile' && !/^\d{6,20}$/.test(value)) { + return t('invalid.mobile'); + } + + if (message.type === 'email' && !Object(_utils_validate_email__WEBPACK_IMPORTED_MODULE_1__["isEmail"])(value)) { + return t('invalid.email'); + } + + if (message.type === 'id_no' && (value.length < 15 || value.length > 18)) { + return t('invalid.id_no'); + } + } + } + }, + + /** + * The phone number copied from IOS mobile phone address book + * will add spaces and invisible Unicode characters + * which cannot pass the /^\d+$/ verification + * so keep numbers and dots + */ + getFormatter: function getFormatter(message) { + return function formatter(value) { + if (message.type === 'mobile' || message.type === 'tel') { + return value.replace(/[^\d.]/g, ''); + } + + return value; + }; + }, + getExtraDesc: function getExtraDesc(message) { + var h = this.$createElement; + var extraDesc = message.extraDesc; + + if (extraDesc) { + return h("div", { + "class": bem('extra-message') + }, [extraDesc]); + } + }, + genMessage: function genMessage(message, index) { + var _this2 = this; + + var h = this.$createElement; + + if (message.type === 'image') { + return h(_cell__WEBPACK_IMPORTED_MODULE_3__["default"], { + "key": this.goodsId + "-" + index, + "attrs": { + "title": message.name, + "required": String(message.required) === '1', + "valueClass": bem('image-cell-value') + }, + "class": bem('image-cell') + }, [h(_SkuImgUploader__WEBPACK_IMPORTED_MODULE_5__["default"], { + "attrs": { + "maxSize": this.messageConfig.uploadMaxSize, + "uploadImg": this.messageConfig.uploadImg, + "customUpload": this.messageConfig.customUpload + }, + "model": { + value: _this2.messageValues[index].value, + callback: function callback($$v) { + _this2.$set(_this2.messageValues[index], "value", $$v); + } + } + }), h("div", { + "class": bem('image-cell-label') + }, [t('imageLabel')])]); + } // 时间和日期使用的vant选择器 + + + var isDateOrTime = ['date', 'time'].indexOf(message.type) > -1; + + if (isDateOrTime) { + return h(_SkuDateTimeField__WEBPACK_IMPORTED_MODULE_6__["default"], { + "attrs": { + "label": message.name, + "required": String(message.required) === '1', + "placeholder": this.getPlaceholder(message), + "type": this.getType(message) + }, + "key": this.goodsId + "-" + index, + "model": { + value: _this2.messageValues[index].value, + callback: function callback($$v) { + _this2.$set(_this2.messageValues[index], "value", $$v); + } + } + }); + } + + return h("div", { + "class": bem('cell-block') + }, [h(_field__WEBPACK_IMPORTED_MODULE_4__["default"], { + "attrs": { + "maxlength": "200", + "center": !message.multiple, + "label": message.name, + "required": String(message.required) === '1', + "placeholder": this.getPlaceholder(message), + "type": this.getType(message), + "formatter": this.getFormatter(message), + "border": false + }, + "key": this.goodsId + "-" + index, + "model": { + value: _this2.messageValues[index].value, + callback: function callback($$v) { + _this2.$set(_this2.messageValues[index], "value", $$v); + } + } + }), this.getExtraDesc(message)]); + } + }, + render: function render() { + var h = arguments[0]; + return h("div", { + "class": bem() + }, [this.messages.map(this.genMessage)]); + } +})); + +/***/ }), + +/***/ "89d9": +/*!********************************************!*\ + !*** ./node_modules/lodash/_basePickBy.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__(/*! ./_baseGet */ "656b"), + baseSet = __webpack_require__(/*! ./_baseSet */ "159a"), + castPath = __webpack_require__(/*! ./_castPath */ "e2e4"); + +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; +} + +module.exports = basePickBy; + + +/***/ }), + +/***/ "89ee": +/*!*******************************************************!*\ + !*** ./node_modules/ant-design-vue/es/radio/Group.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babel-runtime/helpers/defineProperty */ "6042"); +/* harmony import */ var babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! babel-runtime/helpers/extends */ "41b2"); +/* harmony import */ var babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "4d26"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _util_vue_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_util/vue-types */ "4d91"); +/* harmony import */ var _Radio__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Radio */ "d338"); +/* harmony import */ var _util_props_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../_util/props-util */ "daa3"); +/* harmony import */ var _config_provider_configConsumerProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider/configConsumerProps */ "9cba"); + + + + + + + +function noop() {} + +/* harmony default export */ __webpack_exports__["default"] = ({ + name: 'ARadioGroup', + model: { + prop: 'value' + }, + props: { + prefixCls: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string, + defaultValue: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any, + value: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].any, + size: { + 'default': 'default', + validator: function validator(value) { + return ['large', 'default', 'small'].includes(value); + } + }, + options: { + 'default': function _default() { + return []; + }, + type: Array + }, + disabled: Boolean, + name: String, + buttonStyle: _util_vue_types__WEBPACK_IMPORTED_MODULE_3__["default"].string.def('outline') + }, + data: function data() { + var value = this.value, + defaultValue = this.defaultValue; + + this.updatingValue = false; + return { + stateValue: value === undefined ? defaultValue : value + }; + }, + provide: function provide() { + return { + radioGroupContext: this + }; + }, + + inject: { + configProvider: { 'default': function _default() { + return _config_provider_configConsumerProps__WEBPACK_IMPORTED_MODULE_6__["ConfigConsumerProps"]; + } } + }, + computed: { + radioOptions: function radioOptions() { + var disabled = this.disabled; + + return this.options.map(function (option) { + return typeof option === 'string' ? { label: option, value: option } : babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, option, { disabled: option.disabled === undefined ? disabled : option.disabled }); + }); + }, + classes: function classes() { + var _ref; + + var prefixCls = this.prefixCls, + size = this.size; + + return _ref = {}, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, '' + prefixCls, true), babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_ref, prefixCls + '-' + size, size), _ref; + } + }, + watch: { + value: function value(val) { + this.updatingValue = false; + this.stateValue = val; + } + }, + methods: { + onRadioChange: function onRadioChange(ev) { + var _this = this; + + var lastValue = this.stateValue; + var value = ev.target.value; + + if (!Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["hasProp"])(this, 'value')) { + this.stateValue = value; + } + // nextTick for https://github.com/vueComponent/ant-design-vue/issues/1280 + if (!this.updatingValue && value !== lastValue) { + this.updatingValue = true; + this.$emit('input', value); + this.$emit('change', ev); + } + this.$nextTick(function () { + _this.updatingValue = false; + }); + } + }, + render: function render() { + var _this2 = this; + + var h = arguments[0]; + + var _getListeners = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getListeners"])(this), + _getListeners$mouseen = _getListeners.mouseenter, + mouseenter = _getListeners$mouseen === undefined ? noop : _getListeners$mouseen, + _getListeners$mousele = _getListeners.mouseleave, + mouseleave = _getListeners$mousele === undefined ? noop : _getListeners$mousele; + + var props = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["getOptionProps"])(this); + var customizePrefixCls = props.prefixCls, + options = props.options, + buttonStyle = props.buttonStyle; + + var getPrefixCls = this.configProvider.getPrefixCls; + var prefixCls = getPrefixCls('radio', customizePrefixCls); + + var groupPrefixCls = prefixCls + '-group'; + var classString = classnames__WEBPACK_IMPORTED_MODULE_2___default()(groupPrefixCls, groupPrefixCls + '-' + buttonStyle, babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, groupPrefixCls + '-' + props.size, props.size)); + + var children = Object(_util_props_util__WEBPACK_IMPORTED_MODULE_5__["filterEmpty"])(this.$slots['default']); + + // 如果存在 options, 优先使用 + if (options && options.length > 0) { + children = options.map(function (option) { + if (typeof option === 'string') { + return h( + _Radio__WEBPACK_IMPORTED_MODULE_4__["default"], + { + key: option, + attrs: { prefixCls: prefixCls, + disabled: props.disabled, + value: option, + checked: _this2.stateValue === option + } + }, + [option] + ); + } else { + return h( + _Radio__WEBPACK_IMPORTED_MODULE_4__["default"], + { + key: 'radio-group-value-options-' + option.value, + attrs: { prefixCls: prefixCls, + disabled: option.disabled || props.disabled, + value: option.value, + checked: _this2.stateValue === option.value + } + }, + [option.label] + ); + } + }); + } + + return h( + 'div', + { 'class': classString, on: { + 'mouseenter': mouseenter, + 'mouseleave': mouseleave + } + }, + [children] + ); + } +}); + +/***/ }), + +/***/ "8a5a": +/*!*************************************************!*\ + !*** ./node_modules/vant/lib/overlay/index.css ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// style-loader: Adds some css to the DOM by adding a + + + +
+
+
+ +
+ +
+
+
+
+
+ 手机扫码分享给好友 +
+
+ +
+
+
+
+ + + + + + + + diff --git a/script/docker_app/docker-compose.yml b/script/docker_app/docker-compose.yml index bb4168615..c96261e37 100644 --- a/script/docker_app/docker-compose.yml +++ b/script/docker_app/docker-compose.yml @@ -37,15 +37,15 @@ services: networks: - docker_default # # 前端 -# sso-server-vue3: -# image: sso-server-vue3:latest -# container_name: sso-server-vue3 -# ports: -# - 8701:80 -# environment: -# - 'TZ="Asia/Shanghai"' -# networks: -# - docker_default + sso-server-vue3: + image: sso-server-vue3:latest + container_name: sso-server-vue3 + ports: + - 8701:80 + environment: + - 'TZ="Asia/Shanghai"' + networks: + - docker_default networks: docker_default: external: true