Files
tra-app/unpackage/dist/dev/app-plus/app-service.js
T
2025-06-13 18:00:28 +08:00

10074 lines
343 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) {
const promise = this.constructor;
return this.then(
(value) => promise.resolve(callback()).then(() => value),
(reason) => promise.resolve(callback()).then(() => {
throw reason;
})
);
};
}
;
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
const global2 = uni.requireGlobal();
ArrayBuffer = global2.ArrayBuffer;
Int8Array = global2.Int8Array;
Uint8Array = global2.Uint8Array;
Uint8ClampedArray = global2.Uint8ClampedArray;
Int16Array = global2.Int16Array;
Uint16Array = global2.Uint16Array;
Int32Array = global2.Int32Array;
Uint32Array = global2.Uint32Array;
Float32Array = global2.Float32Array;
Float64Array = global2.Float64Array;
BigInt64Array = global2.BigInt64Array;
BigUint64Array = global2.BigUint64Array;
}
;
if (uni.restoreGlobal) {
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
}
(function(vue) {
"use strict";
var _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
const _export_sfc = (sfc, props2) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props2) {
target[key] = val;
}
return target;
};
const _sfc_main$l = {
name: "nav-bar",
props: {
isEnabled: {
type: Boolean,
default: true
},
height: {
type: String,
default: "var(--status-bar-height)"
},
backgroundColor: {
type: String,
default: "transparent"
// 默认背景颜色为白色
}
},
created() {
},
data() {
return {
// statusBarHeight: '0px'
};
},
methods: {}
};
function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
return $props.isEnabled ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: "nav-bar-div",
style: vue.normalizeStyle({ height: $props.height, backgroundColor: $props.backgroundColor })
},
[
vue.createCommentVNode(" 导航栏内容 ")
],
4
/* STYLE */
)) : vue.createCommentVNode("v-if", true);
}
const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-e9345f2e"], ["__file", "E:/jlyh/tra-app/components/nav-bar/nav-bar.vue"]]);
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
function resolveEasycom(component, easycom) {
return typeof component === "string" ? easycom : component;
}
const mpMixin = {};
function email(value) {
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
}
function mobile(value) {
return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value);
}
function url(value) {
return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value);
}
function date(value) {
if (!value)
return false;
if (number(value))
value = +value;
return !/Invalid|NaN/.test(new Date(value).toString());
}
function dateISO(value) {
return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
}
function number(value) {
return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value);
}
function string(value) {
return typeof value === "string";
}
function digits(value) {
return /^\d+$/.test(value);
}
function idCard(value) {
return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
value
);
}
function carNo(value) {
const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
if (value.length === 7) {
return creg.test(value);
}
if (value.length === 8) {
return xreg.test(value);
}
return false;
}
function amount(value) {
return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
}
function chinese(value) {
const reg = /^[\u4e00-\u9fa5]+$/gi;
return reg.test(value);
}
function letter(value) {
return /^[a-zA-Z]*$/.test(value);
}
function enOrNum(value) {
const reg = /^[0-9a-zA-Z]*$/g;
return reg.test(value);
}
function contains(value, param) {
return value.indexOf(param) >= 0;
}
function range$1(value, param) {
return value >= param[0] && value <= param[1];
}
function rangeLength(value, param) {
return value.length >= param[0] && value.length <= param[1];
}
function landline(value) {
const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
return reg.test(value);
}
function empty(value) {
switch (typeof value) {
case "undefined":
return true;
case "string":
if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0)
return true;
break;
case "boolean":
if (!value)
return true;
break;
case "number":
if (value === 0 || isNaN(value))
return true;
break;
case "object":
if (value === null || value.length === 0)
return true;
for (const i in value) {
return false;
}
return true;
}
return false;
}
function jsonString(value) {
if (typeof value === "string") {
try {
const obj = JSON.parse(value);
if (typeof obj === "object" && obj) {
return true;
}
return false;
} catch (e) {
return false;
}
}
return false;
}
function array(value) {
if (typeof Array.isArray === "function") {
return Array.isArray(value);
}
return Object.prototype.toString.call(value) === "[object Array]";
}
function object(value) {
return Object.prototype.toString.call(value) === "[object Object]";
}
function code(value, len = 6) {
return new RegExp(`^\\d{${len}}$`).test(value);
}
function func(value) {
return typeof value === "function";
}
function promise(value) {
return object(value) && func(value.then) && func(value.catch);
}
function image(value) {
const newValue = value.split("?")[0];
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
return IMAGE_REGEXP.test(newValue);
}
function video(value) {
const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i;
return VIDEO_REGEXP.test(value);
}
function regExp(o) {
return o && Object.prototype.toString.call(o) === "[object RegExp]";
}
const test = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
amount,
array,
carNo,
chinese,
code,
contains,
date,
dateISO,
digits,
email,
empty,
enOrNum,
func,
idCard,
image,
jsonString,
landline,
letter,
mobile,
number,
object,
promise,
range: range$1,
rangeLength,
regExp,
string,
url,
video
}, Symbol.toStringTag, { value: "Module" }));
function strip(num, precision = 15) {
return +parseFloat(Number(num).toPrecision(precision));
}
function digitLength(num) {
const eSplit = num.toString().split(/[eE]/);
const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0);
return len > 0 ? len : 0;
}
function float2Fixed(num) {
if (num.toString().indexOf("e") === -1) {
return Number(num.toString().replace(".", ""));
}
const dLen = digitLength(num);
return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num);
}
function checkBoundary(num) {
{
if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
formatAppLog("warn", "at uni_modules/uv-ui-tools/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`);
}
}
}
function iteratorOperation(arr, operation) {
const [num1, num2, ...others] = arr;
let res = operation(num1, num2);
others.forEach((num) => {
res = operation(res, num);
});
return res;
}
function times(...nums) {
if (nums.length > 2) {
return iteratorOperation(nums, times);
}
const [num1, num2] = nums;
const num1Changed = float2Fixed(num1);
const num2Changed = float2Fixed(num2);
const baseNum = digitLength(num1) + digitLength(num2);
const leftValue = num1Changed * num2Changed;
checkBoundary(leftValue);
return leftValue / Math.pow(10, baseNum);
}
function divide(...nums) {
if (nums.length > 2) {
return iteratorOperation(nums, divide);
}
const [num1, num2] = nums;
const num1Changed = float2Fixed(num1);
const num2Changed = float2Fixed(num2);
checkBoundary(num1Changed);
checkBoundary(num2Changed);
return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1))));
}
function round(num, ratio) {
const base = Math.pow(10, ratio);
let result = divide(Math.round(Math.abs(times(num, base))), base);
if (num < 0 && result !== 0) {
result = times(result, -1);
}
return result;
}
function range(min = 0, max = 0, value = 0) {
return Math.max(min, Math.min(max, Number(value)));
}
function getPx(value, unit = false) {
if (number(value)) {
return unit ? `${value}px` : Number(value);
}
if (/(rpx|upx)$/.test(value)) {
return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value)));
}
return unit ? `${parseInt(value)}px` : parseInt(value);
}
function sleep(value = 30) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, value);
});
}
function os() {
return uni.getSystemInfoSync().platform.toLowerCase();
}
function sys() {
return uni.getSystemInfoSync();
}
function random(min, max) {
if (min >= 0 && max > 0 && max >= min) {
const gab = max - min + 1;
return Math.floor(Math.random() * gab + min);
}
return 0;
}
function guid(len = 32, firstU = true, radix = null) {
const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
const uuid = [];
radix = radix || chars.length;
if (len) {
for (let i = 0; i < len; i++)
uuid[i] = chars[0 | Math.random() * radix];
} else {
let r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
uuid[14] = "4";
for (let i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[i == 19 ? r & 3 | 8 : r];
}
}
}
if (firstU) {
uuid.shift();
return `u${uuid.join("")}`;
}
return uuid.join("");
}
function $parent(name = void 0) {
let parent = this.$parent;
while (parent) {
if (parent.$options && parent.$options.name !== name) {
parent = parent.$parent;
} else {
return parent;
}
}
return false;
}
function addStyle(customStyle, target = "object") {
if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") {
return customStyle;
}
if (target === "object") {
customStyle = trim(customStyle);
const styleArray = customStyle.split(";");
const style = {};
for (let i = 0; i < styleArray.length; i++) {
if (styleArray[i]) {
const item = styleArray[i].split(":");
style[trim(item[0])] = trim(item[1]);
}
}
return style;
}
let string2 = "";
for (const i in customStyle) {
const key = i.replace(/([A-Z])/g, "-$1").toLowerCase();
string2 += `${key}:${customStyle[i]};`;
}
return trim(string2);
}
function addUnit(value = "auto", unit = ((_b) => (_b = ((_a) => (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config)()) == null ? void 0 : _b.unit)() ? ((_d) => (_d = ((_c) => (_c = uni == null ? void 0 : uni.$uv) == null ? void 0 : _c.config)()) == null ? void 0 : _d.unit)() : "px") {
value = String(value);
return number(value) ? `${value}${unit}` : value;
}
function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) {
if (obj === null || typeof obj !== "object")
return obj;
if (cache.has(obj))
return cache.get(obj);
let clone;
if (obj instanceof Date) {
clone = new Date(obj.getTime());
} else if (obj instanceof RegExp) {
clone = new RegExp(obj);
} else if (obj instanceof Map) {
clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache)]));
} else if (obj instanceof Set) {
clone = new Set(Array.from(obj, (value) => deepClone(value, cache)));
} else if (Array.isArray(obj)) {
clone = obj.map((value) => deepClone(value, cache));
} else if (Object.prototype.toString.call(obj) === "[object Object]") {
clone = Object.create(Object.getPrototypeOf(obj));
cache.set(obj, clone);
for (const [key, value] of Object.entries(obj)) {
clone[key] = deepClone(value, cache);
}
} else {
clone = Object.assign({}, obj);
}
cache.set(obj, clone);
return clone;
}
function deepMerge(target = {}, source = {}) {
target = deepClone(target);
if (typeof target !== "object" || target === null || typeof source !== "object" || source === null)
return target;
const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
for (const prop in source) {
if (!source.hasOwnProperty(prop))
continue;
const sourceValue = source[prop];
const targetValue = merged[prop];
if (sourceValue instanceof Date) {
merged[prop] = new Date(sourceValue);
} else if (sourceValue instanceof RegExp) {
merged[prop] = new RegExp(sourceValue);
} else if (sourceValue instanceof Map) {
merged[prop] = new Map(sourceValue);
} else if (sourceValue instanceof Set) {
merged[prop] = new Set(sourceValue);
} else if (typeof sourceValue === "object" && sourceValue !== null) {
merged[prop] = deepMerge(targetValue, sourceValue);
} else {
merged[prop] = sourceValue;
}
}
return merged;
}
function error(err) {
{
formatAppLog("error", "at uni_modules/uv-ui-tools/libs/function/index.js:250", `uvui提示:${err}`);
}
}
function randomArray(array2 = []) {
return array2.sort(() => Math.random() - 0.5);
}
if (!String.prototype.padStart) {
String.prototype.padStart = function(maxLength, fillString = " ") {
if (Object.prototype.toString.call(fillString) !== "[object String]") {
throw new TypeError(
"fillString must be String"
);
}
const str = this;
if (str.length >= maxLength)
return String(str);
const fillLength = maxLength - str.length;
let times2 = Math.ceil(fillLength / fillString.length);
while (times2 >>= 1) {
fillString += fillString;
if (times2 === 1) {
fillString += fillString;
}
}
return fillString.slice(0, fillLength) + str;
};
}
function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") {
let date2;
if (!dateTime) {
date2 = /* @__PURE__ */ new Date();
} else if (/^\d{10}$/.test(dateTime == null ? void 0 : dateTime.toString().trim())) {
date2 = new Date(dateTime * 1e3);
} else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
date2 = new Date(Number(dateTime));
} else if (typeof dateTime === "string" && dateTime.includes("-") && !dateTime.includes("T")) {
date2 = new Date(dateTime.replace(/-/g, "/"));
} else {
date2 = new Date(dateTime);
}
const timeSource = {
"y": date2.getFullYear().toString(),
// 年
"m": (date2.getMonth() + 1).toString().padStart(2, "0"),
// 月
"d": date2.getDate().toString().padStart(2, "0"),
// 日
"h": date2.getHours().toString().padStart(2, "0"),
// 时
"M": date2.getMinutes().toString().padStart(2, "0"),
// 分
"s": date2.getSeconds().toString().padStart(2, "0")
// 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (const key in timeSource) {
const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
if (ret) {
const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
}
}
return formatStr;
}
function timeFrom(timestamp = null, format = "yyyy-mm-dd") {
if (timestamp == null)
timestamp = Number(/* @__PURE__ */ new Date());
timestamp = parseInt(timestamp);
if (timestamp.toString().length == 10)
timestamp *= 1e3;
let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp;
timer = parseInt(timer / 1e3);
let tips = "";
switch (true) {
case timer < 300:
tips = "刚刚";
break;
case (timer >= 300 && timer < 3600):
tips = `${parseInt(timer / 60)}分钟前`;
break;
case (timer >= 3600 && timer < 86400):
tips = `${parseInt(timer / 3600)}小时前`;
break;
case (timer >= 86400 && timer < 2592e3):
tips = `${parseInt(timer / 86400)}天前`;
break;
default:
if (format === false) {
if (timer >= 2592e3 && timer < 365 * 86400) {
tips = `${parseInt(timer / (86400 * 30))}个月前`;
} else {
tips = `${parseInt(timer / (86400 * 365))}年前`;
}
} else {
tips = timeFormat(timestamp, format);
}
}
return tips;
}
function trim(str, pos = "both") {
str = String(str);
if (pos == "both") {
return str.replace(/^\s+|\s+$/g, "");
}
if (pos == "left") {
return str.replace(/^\s*/, "");
}
if (pos == "right") {
return str.replace(/(\s*$)/g, "");
}
if (pos == "all") {
return str.replace(/\s+/g, "");
}
return str;
}
function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
const prefix = isPrefix ? "?" : "";
const _result = [];
if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1)
arrayFormat = "brackets";
for (const key in data) {
const value = data[key];
if (["", void 0, null].indexOf(value) >= 0) {
continue;
}
if (value.constructor === Array) {
switch (arrayFormat) {
case "indices":
for (let i = 0; i < value.length; i++) {
_result.push(`${key}[${i}]=${value[i]}`);
}
break;
case "brackets":
value.forEach((_value) => {
_result.push(`${key}[]=${_value}`);
});
break;
case "repeat":
value.forEach((_value) => {
_result.push(`${key}=${_value}`);
});
break;
case "comma":
let commaStr = "";
value.forEach((_value) => {
commaStr += (commaStr ? "," : "") + _value;
});
_result.push(`${key}=${commaStr}`);
break;
default:
value.forEach((_value) => {
_result.push(`${key}[]=${_value}`);
});
}
} else {
_result.push(`${key}=${value}`);
}
}
return _result.length ? prefix + _result.join("&") : "";
}
function toast(title, duration = 2e3) {
uni.showToast({
title: String(title),
icon: "none",
duration
});
}
function type2icon(type = "success", fill = false) {
if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1)
type = "success";
let iconName = "";
switch (type) {
case "primary":
iconName = "info-circle";
break;
case "info":
iconName = "info-circle";
break;
case "error":
iconName = "close-circle";
break;
case "warning":
iconName = "error-circle";
break;
case "success":
iconName = "checkmark-circle";
break;
default:
iconName = "checkmark-circle";
}
if (fill)
iconName += "-fill";
return iconName;
}
function priceFormat(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") {
number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, "");
const n = !isFinite(+number2) ? 0 : +number2;
const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator;
const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint;
let s = "";
s = (prec ? round(n, prec) + "" : `${Math.round(n)}`).split(".");
const re = /(-?\d+)(\d{3})/;
while (re.test(s[0])) {
s[0] = s[0].replace(re, `$1${sep}$2`);
}
if ((s[1] || "").length < prec) {
s[1] = s[1] || "";
s[1] += new Array(prec - s[1].length + 1).join("0");
}
return s.join(dec);
}
function getDuration(value, unit = true) {
const valueNum = parseInt(value);
if (unit) {
if (/s$/.test(value))
return value;
return value > 30 ? `${value}ms` : `${value}s`;
}
if (/ms$/.test(value))
return valueNum;
if (/s$/.test(value))
return valueNum > 30 ? valueNum : valueNum * 1e3;
return valueNum;
}
function padZero(value) {
return `00${value}`.slice(-2);
}
function formValidate(instance, event) {
const formItem = $parent.call(instance, "uv-form-item");
const form = $parent.call(instance, "uv-form");
if (formItem && form) {
form.validateField(formItem.prop, () => {
}, event);
}
}
function getProperty(obj, key) {
if (!obj) {
return;
}
if (typeof key !== "string" || key === "") {
return "";
}
if (key.indexOf(".") !== -1) {
const keys = key.split(".");
let firstObj = obj[keys[0]] || {};
for (let i = 1; i < keys.length; i++) {
if (firstObj) {
firstObj = firstObj[keys[i]];
}
}
return firstObj;
}
return obj[key];
}
function setProperty(obj, key, value) {
if (!obj) {
return;
}
const inFn = function(_obj, keys, v) {
if (keys.length === 1) {
_obj[keys[0]] = v;
return;
}
while (keys.length > 1) {
const k = keys[0];
if (!_obj[k] || typeof _obj[k] !== "object") {
_obj[k] = {};
}
keys.shift();
inFn(_obj[k], keys, v);
}
};
if (typeof key !== "string" || key === "")
;
else if (key.indexOf(".") !== -1) {
const keys = key.split(".");
inFn(obj, keys, value);
} else {
obj[key] = value;
}
}
function page() {
var _a;
const pages2 = getCurrentPages();
const route2 = (_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route;
return `/${route2 ? route2 : ""}`;
}
function pages() {
const pages2 = getCurrentPages();
return pages2;
}
function getHistoryPage(back = 0) {
const pages2 = getCurrentPages();
const len = pages2.length;
return pages2[len - 1 + back];
}
function setConfig({
props: props2 = {},
config = {},
color = {},
zIndex = {}
}) {
const {
deepMerge: deepMerge2
} = uni.$uv;
uni.$uv.config = deepMerge2(uni.$uv.config, config);
uni.$uv.props = deepMerge2(uni.$uv.props, props2);
uni.$uv.color = deepMerge2(uni.$uv.color, color);
uni.$uv.zIndex = deepMerge2(uni.$uv.zIndex, zIndex);
}
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
$parent,
addStyle,
addUnit,
deepClone,
deepMerge,
error,
formValidate,
getDuration,
getHistoryPage,
getProperty,
getPx,
guid,
os,
padZero,
page,
pages,
priceFormat,
queryParams,
random,
randomArray,
range,
setConfig,
setProperty,
sleep,
sys,
timeFormat,
timeFrom,
toast,
trim,
type2icon
}, Symbol.toStringTag, { value: "Module" }));
class Router {
constructor() {
this.config = {
type: "navigateTo",
url: "",
delta: 1,
// navigateBack页面后退时,回退的层数
params: {},
// 传递的参数
animationType: "pop-in",
// 窗口动画,只在APP有效
animationDuration: 300,
// 窗口动画持续时间,单位毫秒,只在APP有效
intercept: false,
// 是否需要拦截
events: {}
// 页面间通信接口,用于监听被打开页面发送到当前页面的数据。hbuilderx 2.8.9+ 开始支持。
};
this.route = this.route.bind(this);
}
// 判断url前面是否有"/",如果没有则加上,否则无法跳转
addRootPath(url2) {
return url2[0] === "/" ? url2 : `/${url2}`;
}
// 整合路由参数
mixinParam(url2, params) {
url2 = url2 && this.addRootPath(url2);
let query = "";
if (/.*\/.*\?.*=.*/.test(url2)) {
query = queryParams(params, false);
return url2 += `&${query}`;
}
query = queryParams(params);
return url2 += query;
}
// 对外的方法名称
async route(options = {}, params = {}) {
let mergeConfig = {};
if (typeof options === "string") {
mergeConfig.url = this.mixinParam(options, params);
mergeConfig.type = "navigateTo";
} else {
mergeConfig = deepMerge(this.config, options);
mergeConfig.url = this.mixinParam(options.url, options.params);
}
if (mergeConfig.url === page())
return;
if (params.intercept) {
mergeConfig.intercept = params.intercept;
}
mergeConfig.params = params;
mergeConfig = deepMerge(this.config, mergeConfig);
if (typeof mergeConfig.intercept === "function") {
const isNext = await new Promise((resolve, reject) => {
mergeConfig.intercept(mergeConfig, resolve);
});
isNext && this.openPage(mergeConfig);
} else {
this.openPage(mergeConfig);
}
}
// 执行路由跳转
openPage(config) {
const {
url: url2,
type,
delta,
animationType,
animationDuration,
events
} = config;
if (config.type == "navigateTo" || config.type == "to") {
uni.navigateTo({
url: url2,
animationType,
animationDuration,
events
});
}
if (config.type == "redirectTo" || config.type == "redirect") {
uni.redirectTo({
url: url2
});
}
if (config.type == "switchTab" || config.type == "tab") {
uni.switchTab({
url: url2
});
}
if (config.type == "reLaunch" || config.type == "launch") {
uni.reLaunch({
url: url2
});
}
if (config.type == "navigateBack" || config.type == "back") {
uni.navigateBack({
delta
});
}
}
}
const route = new Router().route;
let timeout = null;
function debounce(func2, wait = 500, immediate = false) {
if (timeout !== null)
clearTimeout(timeout);
if (immediate) {
const callNow = !timeout;
timeout = setTimeout(() => {
timeout = null;
}, wait);
if (callNow)
typeof func2 === "function" && func2();
} else {
timeout = setTimeout(() => {
typeof func2 === "function" && func2();
}, wait);
}
}
let flag;
function throttle(func2, wait = 500, immediate = true) {
if (immediate) {
if (!flag) {
flag = true;
typeof func2 === "function" && func2();
setTimeout(() => {
flag = false;
}, wait);
}
} else if (!flag) {
flag = true;
setTimeout(() => {
flag = false;
typeof func2 === "function" && func2();
}, wait);
}
}
const mixin = {
// 定义每个组件都可能需要用到的外部样式以及类名
props: {
// 每个组件都有的父组件传递的样式,可以为字符串或者对象形式
customStyle: {
type: [Object, String],
default: () => ({})
},
customClass: {
type: String,
default: ""
},
// 跳转的页面路径
url: {
type: String,
default: ""
},
// 页面跳转的类型
linkType: {
type: String,
default: "navigateTo"
}
},
data() {
return {};
},
onLoad() {
this.$uv.getRect = this.$uvGetRect;
},
created() {
this.$uv.getRect = this.$uvGetRect;
},
computed: {
$uv() {
var _a, _b;
return {
...index,
test,
route,
debounce,
throttle,
unit: (_b = (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config) == null ? void 0 : _b.unit
};
},
/**
* 生成bem规则类名
* 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用
* 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式
* @param {String} name 组件名称
* @param {Array} fixed 一直会存在的类名
* @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名
* @returns {Array|string}
*/
bem() {
return function(name, fixed, change) {
const prefix = `uv-${name}--`;
const classes = {};
if (fixed) {
fixed.map((item) => {
classes[prefix + this[item]] = true;
});
}
if (change) {
change.map((item) => {
this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item];
});
}
return Object.keys(classes);
};
}
},
methods: {
// 跳转某一个页面
openPage(urlKey = "url") {
const url2 = this[urlKey];
if (url2) {
uni[this.linkType]({
url: url2
});
}
},
// 查询节点信息
// 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
// 解决办法为在组件根部再套一个没有任何作用的view元素
$uvGetRect(selector, all) {
return new Promise((resolve) => {
uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => {
if (all && Array.isArray(rect) && rect.length) {
resolve(rect);
}
if (!all && rect) {
resolve(rect);
}
}).exec();
});
},
getParentData(parentName = "") {
if (!this.parent)
this.parent = {};
this.parent = this.$uv.$parent.call(this, parentName);
if (this.parent.children) {
this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
}
if (this.parent && this.parentData) {
Object.keys(this.parentData).map((key) => {
this.parentData[key] = this.parent[key];
});
}
},
// 阻止事件冒泡
preventEvent(e) {
e && typeof e.stopPropagation === "function" && e.stopPropagation();
},
// 空操作
noop(e) {
this.preventEvent(e);
}
},
onReachBottom() {
uni.$emit("uvOnReachBottom");
},
beforeDestroy() {
if (this.parent && array(this.parent.children)) {
const childrenList = this.parent.children;
childrenList.map((child, index2) => {
if (child === this) {
childrenList.splice(index2, 1);
}
});
}
},
// 兼容vue3
unmounted() {
if (this.parent && array(this.parent.children)) {
const childrenList = this.parent.children;
childrenList.map((child, index2) => {
if (child === this) {
childrenList.splice(index2, 1);
}
});
}
}
};
const icons = {
"uvicon-level": "e68f",
"uvicon-checkbox-mark": "e659",
"uvicon-folder": "e694",
"uvicon-movie": "e67c",
"uvicon-star-fill": "e61e",
"uvicon-star": "e618",
"uvicon-phone-fill": "e6ac",
"uvicon-phone": "e6ba",
"uvicon-apple-fill": "e635",
"uvicon-backspace": "e64d",
"uvicon-attach": "e640",
"uvicon-empty-data": "e671",
"uvicon-empty-address": "e68a",
"uvicon-empty-favor": "e662",
"uvicon-empty-car": "e657",
"uvicon-empty-order": "e66b",
"uvicon-empty-list": "e672",
"uvicon-empty-search": "e677",
"uvicon-empty-permission": "e67d",
"uvicon-empty-news": "e67e",
"uvicon-empty-history": "e685",
"uvicon-empty-coupon": "e69b",
"uvicon-empty-page": "e60e",
"uvicon-empty-wifi-off": "e6cc",
"uvicon-reload": "e627",
"uvicon-order": "e695",
"uvicon-server-man": "e601",
"uvicon-search": "e632",
"uvicon-more-dot-fill": "e66f",
"uvicon-scan": "e631",
"uvicon-map": "e665",
"uvicon-map-fill": "e6a8",
"uvicon-tags": "e621",
"uvicon-tags-fill": "e613",
"uvicon-eye": "e664",
"uvicon-eye-fill": "e697",
"uvicon-eye-off": "e69c",
"uvicon-eye-off-outline": "e688",
"uvicon-mic": "e66d",
"uvicon-mic-off": "e691",
"uvicon-calendar": "e65c",
"uvicon-trash": "e623",
"uvicon-trash-fill": "e6ce",
"uvicon-play-left": "e6bf",
"uvicon-play-right": "e6b3",
"uvicon-minus": "e614",
"uvicon-plus": "e625",
"uvicon-info-circle": "e69f",
"uvicon-info-circle-fill": "e6a7",
"uvicon-question-circle": "e622",
"uvicon-question-circle-fill": "e6bc",
"uvicon-close": "e65a",
"uvicon-checkmark": "e64a",
"uvicon-checkmark-circle": "e643",
"uvicon-checkmark-circle-fill": "e668",
"uvicon-setting": "e602",
"uvicon-setting-fill": "e6d0",
"uvicon-heart": "e6a2",
"uvicon-heart-fill": "e68b",
"uvicon-camera": "e642",
"uvicon-camera-fill": "e650",
"uvicon-more-circle": "e69e",
"uvicon-more-circle-fill": "e684",
"uvicon-chat": "e656",
"uvicon-chat-fill": "e63f",
"uvicon-bag": "e647",
"uvicon-error-circle": "e66e",
"uvicon-error-circle-fill": "e655",
"uvicon-close-circle": "e64e",
"uvicon-close-circle-fill": "e666",
"uvicon-share": "e629",
"uvicon-share-fill": "e6bb",
"uvicon-share-square": "e6c4",
"uvicon-shopping-cart": "e6cb",
"uvicon-shopping-cart-fill": "e630",
"uvicon-bell": "e651",
"uvicon-bell-fill": "e604",
"uvicon-list": "e690",
"uvicon-list-dot": "e6a9",
"uvicon-zhifubao-circle-fill": "e617",
"uvicon-weixin-circle-fill": "e6cd",
"uvicon-weixin-fill": "e620",
"uvicon-qq-fill": "e608",
"uvicon-qq-circle-fill": "e6b9",
"uvicon-moments-circel-fill": "e6c2",
"uvicon-moments": "e6a0",
"uvicon-car": "e64f",
"uvicon-car-fill": "e648",
"uvicon-warning-fill": "e6c7",
"uvicon-warning": "e6c1",
"uvicon-clock-fill": "e64b",
"uvicon-clock": "e66c",
"uvicon-edit-pen": "e65d",
"uvicon-edit-pen-fill": "e679",
"uvicon-email": "e673",
"uvicon-email-fill": "e683",
"uvicon-minus-circle": "e6a5",
"uvicon-plus-circle": "e603",
"uvicon-plus-circle-fill": "e611",
"uvicon-file-text": "e687",
"uvicon-file-text-fill": "e67f",
"uvicon-pushpin": "e6d1",
"uvicon-pushpin-fill": "e6b6",
"uvicon-grid": "e68c",
"uvicon-grid-fill": "e698",
"uvicon-play-circle": "e6af",
"uvicon-play-circle-fill": "e62a",
"uvicon-pause-circle-fill": "e60c",
"uvicon-pause": "e61c",
"uvicon-pause-circle": "e696",
"uvicon-gift-fill": "e6b0",
"uvicon-gift": "e680",
"uvicon-kefu-ermai": "e660",
"uvicon-server-fill": "e610",
"uvicon-coupon-fill": "e64c",
"uvicon-coupon": "e65f",
"uvicon-integral": "e693",
"uvicon-integral-fill": "e6b1",
"uvicon-home-fill": "e68e",
"uvicon-home": "e67b",
"uvicon-account": "e63a",
"uvicon-account-fill": "e653",
"uvicon-thumb-down-fill": "e628",
"uvicon-thumb-down": "e60a",
"uvicon-thumb-up": "e612",
"uvicon-thumb-up-fill": "e62c",
"uvicon-lock-fill": "e6a6",
"uvicon-lock-open": "e68d",
"uvicon-lock-opened-fill": "e6a1",
"uvicon-lock": "e69d",
"uvicon-red-packet": "e6c3",
"uvicon-photo-fill": "e6b4",
"uvicon-photo": "e60d",
"uvicon-volume-off-fill": "e6c8",
"uvicon-volume-off": "e6bd",
"uvicon-volume-fill": "e624",
"uvicon-volume": "e605",
"uvicon-download": "e670",
"uvicon-arrow-up-fill": "e636",
"uvicon-arrow-down-fill": "e638",
"uvicon-play-left-fill": "e6ae",
"uvicon-play-right-fill": "e6ad",
"uvicon-arrow-downward": "e634",
"uvicon-arrow-leftward": "e63b",
"uvicon-arrow-rightward": "e644",
"uvicon-arrow-upward": "e641",
"uvicon-arrow-down": "e63e",
"uvicon-arrow-right": "e63c",
"uvicon-arrow-left": "e646",
"uvicon-arrow-up": "e633",
"uvicon-skip-back-left": "e6c5",
"uvicon-skip-forward-right": "e61f",
"uvicon-arrow-left-double": "e637",
"uvicon-man": "e675",
"uvicon-woman": "e626",
"uvicon-en": "e6b8",
"uvicon-twitte": "e607",
"uvicon-twitter-circle-fill": "e6cf"
};
const props$b = {
props: {
// 图标类名
name: {
type: String,
default: ""
},
// 图标颜色,可接受主题色
color: {
type: String,
default: "#606266"
},
// 字体大小,单位px
size: {
type: [String, Number],
default: "16px"
},
// 是否显示粗体
bold: {
type: Boolean,
default: false
},
// 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
index: {
type: [String, Number],
default: null
},
// 触摸图标时的类名
hoverClass: {
type: String,
default: ""
},
// 自定义扩展前缀,方便用户扩展自己的图标库
customPrefix: {
type: String,
default: "uvicon"
},
// 图标右边或者下面的文字
label: {
type: [String, Number],
default: ""
},
// label的位置,只能右边或者下边
labelPos: {
type: String,
default: "right"
},
// label的大小
labelSize: {
type: [String, Number],
default: "15px"
},
// label的颜色
labelColor: {
type: String,
default: "#606266"
},
// label与图标的距离
space: {
type: [String, Number],
default: "3px"
},
// 图片的mode
imgMode: {
type: String,
default: "aspectFit"
},
// 用于显示图片小图标时,图片的宽度
width: {
type: [String, Number],
default: ""
},
// 用于显示图片小图标时,图片的高度
height: {
type: [String, Number],
default: ""
},
// 用于解决某些情况下,让图标垂直居中的用途
top: {
type: [String, Number],
default: 0
},
// 是否阻止事件传播
stop: {
type: Boolean,
default: false
},
...(_f = (_e = uni.$uv) == null ? void 0 : _e.props) == null ? void 0 : _f.icon
}
};
const _sfc_main$k = {
name: "uv-icon",
emits: ["click"],
mixins: [mpMixin, mixin, props$b],
data() {
return {
colorType: [
"primary",
"success",
"info",
"error",
"warning"
]
};
},
computed: {
uClasses() {
let classes = [];
classes.push(this.customPrefix);
classes.push(this.customPrefix + "-" + this.name);
if (this.color && this.colorType.includes(this.color))
classes.push("uv-icon__icon--" + this.color);
return classes;
},
iconStyle() {
let style = {};
style = {
fontSize: this.$uv.addUnit(this.size),
lineHeight: this.$uv.addUnit(this.size),
fontWeight: this.bold ? "bold" : "normal",
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
top: this.$uv.addUnit(this.top)
};
if (this.color && !this.colorType.includes(this.color))
style.color = this.color;
return style;
},
// 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式
isImg() {
const isBase64 = this.name.indexOf("data:") > -1 && this.name.indexOf("base64") > -1;
return this.name.indexOf("/") !== -1 || isBase64;
},
imgStyle() {
let style = {};
style.width = this.width ? this.$uv.addUnit(this.width) : this.$uv.addUnit(this.size);
style.height = this.height ? this.$uv.addUnit(this.height) : this.$uv.addUnit(this.size);
return style;
},
// 通过图标名,查找对应的图标
icon() {
const code2 = icons["uvicon-" + this.name];
return code2 ? unescape(`%u${code2}`) : ["uvicon"].indexOf(this.customPrefix) > -1 ? this.name : "";
}
},
methods: {
clickHandler(e) {
this.$emit("click", this.index);
this.stop && this.preventEvent(e);
}
}
};
function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: vue.normalizeClass(["uv-icon", ["uv-icon--" + _ctx.labelPos]]),
onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
},
[
$options.isImg ? (vue.openBlock(), vue.createElementBlock("image", {
key: 0,
class: "uv-icon__img",
src: _ctx.name,
mode: _ctx.imgMode,
style: vue.normalizeStyle([$options.imgStyle, _ctx.$uv.addStyle(_ctx.customStyle)])
}, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", {
key: 1,
class: vue.normalizeClass(["uv-icon__icon", $options.uClasses]),
style: vue.normalizeStyle([$options.iconStyle, _ctx.$uv.addStyle(_ctx.customStyle)]),
"hover-class": _ctx.hoverClass
}, vue.toDisplayString($options.icon), 15, ["hover-class"])),
vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '),
_ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock(
"text",
{
key: 2,
class: "uv-icon__label",
style: vue.normalizeStyle({
color: _ctx.labelColor,
fontSize: _ctx.$uv.addUnit(_ctx.labelSize),
marginLeft: _ctx.labelPos == "right" ? _ctx.$uv.addUnit(_ctx.space) : 0,
marginTop: _ctx.labelPos == "bottom" ? _ctx.$uv.addUnit(_ctx.space) : 0,
marginRight: _ctx.labelPos == "left" ? _ctx.$uv.addUnit(_ctx.space) : 0,
marginBottom: _ctx.labelPos == "top" ? _ctx.$uv.addUnit(_ctx.space) : 0
})
},
vue.toDisplayString(_ctx.label),
5
/* TEXT, STYLE */
)) : vue.createCommentVNode("v-if", true)
],
2
/* CLASS */
);
}
const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]);
const props$a = {
props: {
value: {
type: [String, Number],
default: ""
},
modelValue: {
type: [String, Number],
default: ""
},
// 输入框类型
// number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
// idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
// digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
// text-文本输入键盘
type: {
type: String,
default: "text"
},
// 是否禁用输入框
disabled: {
type: Boolean,
default: false
},
// 禁用状态时的背景色
disabledColor: {
type: String,
default: "#f5f7fa"
},
// 是否显示清除控件
clearable: {
type: Boolean,
default: false
},
// 是否密码类型
password: {
type: Boolean,
default: false
},
// 最大输入长度,设置为 -1 的时候不限制最大长度
maxlength: {
type: [String, Number],
default: -1
},
// 输入框为空时的占位符
placeholder: {
type: String,
default: null
},
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
placeholderClass: {
type: String,
default: "input-placeholder"
},
// 指定placeholder的样式
placeholderStyle: {
type: [String, Object],
default: "color: #c0c4cc"
},
// 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
// https://uniapp.dcloud.io/component/input
// https://uniapp.dcloud.io/component/textarea
confirmType: {
type: String,
default: "done"
},
// 点击键盘右下角按钮时是否保持键盘不收起,H5无效
confirmHold: {
type: Boolean,
default: false
},
// focus时,点击页面的时候不收起键盘,微信小程序有效
holdKeyboard: {
type: Boolean,
default: false
},
// 自动获取焦点
// 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
focus: {
type: Boolean,
default: false
},
// 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
autoBlur: {
type: Boolean,
default: false
},
// 指定focus时光标的位置
cursor: {
type: [String, Number],
default: -1
},
// 输入框聚焦时底部与键盘的距离
cursorSpacing: {
type: [String, Number],
default: 30
},
// 光标起始位置,自动聚集时有效,需与selection-end搭配使用
selectionStart: {
type: [String, Number],
default: -1
},
// 光标结束位置,自动聚集时有效,需与selection-start搭配使用
selectionEnd: {
type: [String, Number],
default: -1
},
// 键盘弹起时,是否自动上推页面
adjustPosition: {
type: Boolean,
default: true
},
// 输入框内容对齐方式,可选值为:left|center|right
inputAlign: {
type: String,
default: "left"
},
// 输入框字体的大小
fontSize: {
type: [String, Number],
default: "14px"
},
// 输入框字体颜色
color: {
type: String,
default: "#303133"
},
// 输入框前置图标
prefixIcon: {
type: String,
default: ""
},
// 前置图标样式,对象或字符串
prefixIconStyle: {
type: [String, Object],
default: ""
},
// 输入框后置图标
suffixIcon: {
type: String,
default: ""
},
// 后置图标样式,对象或字符串
suffixIconStyle: {
type: [String, Object],
default: ""
},
// 边框类型,surround-四周边框,bottom-底部边框,none-无边框
border: {
type: String,
default: "surround"
},
// 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
readonly: {
type: Boolean,
default: false
},
// 输入框形状,circle-圆形,square-方形
shape: {
type: String,
default: "square"
},
// 用于处理或者过滤输入框内容的方法
formatter: {
type: [Function, null],
default: null
},
// 是否忽略组件内对文本合成系统事件的处理
ignoreCompositionEvent: {
type: Boolean,
default: true
},
...(_h = (_g = uni.$uv) == null ? void 0 : _g.props) == null ? void 0 : _h.input
}
};
const _sfc_main$j = {
name: "uv-input",
mixins: [mpMixin, mixin, props$a],
data() {
return {
// 输入框的值
innerValue: "",
// 是否处于获得焦点状态
focused: false,
// 过滤处理方法
innerFormatter: (value) => value
};
},
created() {
this.innerValue = this.modelValue;
},
watch: {
value(newVal) {
this.innerValue = newVal;
},
modelValue(newVal) {
this.innerValue = newVal;
}
},
computed: {
// 是否显示清除控件
isShowClear() {
const { clearable, readonly, focused, innerValue } = this;
return !!clearable && !readonly && !!focused && innerValue !== "";
},
// 组件的类名
inputClass() {
let classes = [], { border, disabled, shape } = this;
border === "surround" && (classes = classes.concat(["uv-border", "uv-input--radius"]));
classes.push(`uv-input--${shape}`);
border === "bottom" && (classes = classes.concat([
"uv-border-bottom",
"uv-input--no-radius"
]));
return classes.join(" ");
},
// 组件的样式
wrapperStyle() {
const style = {};
if (this.disabled) {
style.backgroundColor = this.disabledColor;
}
if (this.border === "none") {
style.padding = "0";
} else {
style.paddingTop = "6px";
style.paddingBottom = "6px";
style.paddingLeft = "9px";
style.paddingRight = "9px";
}
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
},
// 输入框的样式
inputStyle() {
const style = {
color: this.color,
fontSize: this.$uv.addUnit(this.fontSize),
textAlign: this.inputAlign
};
if (this.disabled || this.readonly) {
style["pointer-events"] = "none";
}
return style;
}
},
methods: {
// 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用
setFormatter(e) {
this.innerFormatter = e;
},
// 当键盘输入时,触发input事件
onInput(e) {
let { value = "" } = e.detail || {};
const formatter = this.formatter || this.innerFormatter;
const formatValue = formatter(value);
this.innerValue = value;
this.$nextTick(() => {
this.innerValue = formatValue;
this.valueChange();
});
},
// 输入框失去焦点时触发
onBlur(event) {
this.$emit("blur", event.detail.value);
this.$uv.sleep(100).then(() => {
this.focused = false;
});
this.$uv.formValidate(this, "blur");
},
// 输入框聚焦时触发
onFocus(event) {
this.focused = true;
this.$emit("focus");
},
// 点击完成按钮时触发
onConfirm(event) {
this.$emit("confirm", this.innerValue);
},
// 键盘高度发生变化的时候触发此事件
// 兼容性:微信小程序2.7.0+、App 3.1.0+
onkeyboardheightchange(e) {
this.$emit("keyboardheightchange", e);
},
// 内容发生变化,进行处理
valueChange() {
if (this.isClear)
this.innerValue = "";
const value = this.innerValue;
this.$nextTick(() => {
this.$emit("input", value);
this.$emit("update:modelValue", value);
this.$emit("change", value);
this.$uv.formValidate(this, "change");
});
},
// 点击清除控件
onClear() {
this.innerValue = "";
this.isClear = true;
this.$uv.sleep(200).then((res) => {
this.isClear = false;
});
this.$nextTick(() => {
this.$emit("clear");
this.valueChange();
});
},
/**
* 在安卓nvue上,事件无法冒泡
* 在某些时间,我们希望监听uv-from-item的点击事件,此时会导致点击uv-form-item内的uv-input后
* 无法触发uv-form-item的点击事件,这里通过手动调用uv-form-item的方法进行触发
*/
clickHandler() {
}
}
};
function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4);
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: vue.normalizeClass(["uv-input", $options.inputClass]),
style: vue.normalizeStyle([$options.wrapperStyle])
},
[
vue.createElementVNode("view", { class: "uv-input__content" }, [
vue.createElementVNode("view", { class: "uv-input__content__prefix-icon" }, [
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
_ctx.prefixIcon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 0,
name: _ctx.prefixIcon,
size: "18",
customStyle: _ctx.prefixIconStyle
}, null, 8, ["name", "customStyle"])) : vue.createCommentVNode("v-if", true)
], true)
]),
vue.createElementVNode("view", {
class: "uv-input__content__field-wrapper",
onClick: _cache[5] || (_cache[5] = (...args) => $options.clickHandler && $options.clickHandler(...args))
}, [
vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false)type均失效,此时\r\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\r\n "),
vue.createElementVNode("input", {
class: "uv-input__content__field-wrapper__field",
style: vue.normalizeStyle([$options.inputStyle]),
type: _ctx.type,
focus: _ctx.focus,
cursor: _ctx.cursor,
value: $data.innerValue,
"auto-blur": _ctx.autoBlur,
disabled: _ctx.disabled || _ctx.readonly,
maxlength: _ctx.maxlength,
placeholder: _ctx.placeholder,
"placeholder-style": _ctx.placeholderStyle,
"placeholder-class": _ctx.placeholderClass,
"confirm-type": _ctx.confirmType,
"confirm-hold": _ctx.confirmHold,
"hold-keyboard": _ctx.holdKeyboard,
"cursor-spacing": _ctx.cursorSpacing,
"adjust-position": _ctx.adjustPosition,
"selection-end": _ctx.selectionEnd,
"selection-start": _ctx.selectionStart,
password: _ctx.password || _ctx.type === "password" || void 0,
ignoreCompositionEvent: _ctx.ignoreCompositionEvent,
onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)),
onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)),
onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)),
onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)),
onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
}, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"])
]),
$options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "uv-input__content__clear",
onClick: _cache[6] || (_cache[6] = (...args) => $options.onClear && $options.onClear(...args))
}, [
vue.createVNode(_component_uv_icon, {
name: "close",
size: "11",
color: "#ffffff",
customStyle: "line-height: 12px"
})
])) : vue.createCommentVNode("v-if", true),
vue.createElementVNode("view", { class: "uv-input__content__subfix-icon" }, [
vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
_ctx.suffixIcon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 0,
name: _ctx.suffixIcon,
size: "18",
customStyle: _ctx.suffixIconStyle
}, null, 8, ["name", "customStyle"])) : vue.createCommentVNode("v-if", true)
], true)
])
])
],
6
/* CLASS, STYLE */
);
}
const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-651602aa"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-input/components/uv-input/uv-input.vue"]]);
const props$9 = {
props: {
// 显示的内容,字符串
text: {
type: [Array],
default: ""
},
// 是否显示左侧的音量图标
icon: {
type: [String, Boolean, null],
default: "volume"
},
// 通告模式,link-显示右箭头,closable-显示右侧关闭图标
mode: {
type: String,
default: ""
},
// 文字颜色,各图标也会使用文字颜色
color: {
type: String,
default: "#f9ae3d"
},
// 背景颜色
bgColor: {
type: String,
default: "#fdf6ec"
},
// 字体大小,单位px
fontSize: {
type: [String, Number],
default: 14
},
// 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
speed: {
type: [String, Number],
default: 80
},
// direction = row时,是否使用步进形式滚动
step: {
type: Boolean,
default: false
},
// 滚动一个周期的时间长,单位ms
duration: {
type: [String, Number],
default: 1500
},
// 是否禁止用手滑动切换,仅`direction="column"生效`
// 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
disableTouch: {
type: Boolean,
default: true
},
// 是否禁止滚动,仅`direction="column"生效`
disableScroll: {
type: Boolean,
default: false
},
...(_j = (_i = uni.$uv) == null ? void 0 : _i.props) == null ? void 0 : _j.columnNotice
}
};
const _sfc_main$i = {
emits: ["click", "close", "change"],
mixins: [mpMixin, mixin, props$9],
watch: {
text: {
immediate: true,
handler(newValue, oldValue) {
if (!this.$uv.test.array(newValue)) {
this.$uv.error("noticebar组件direction为column时,要求text参数为数组形式");
}
}
}
},
computed: {
// 文字内容的样式
textStyle() {
let style = {};
style.color = this.color;
style.fontSize = this.$uv.addUnit(this.fontSize);
return style;
},
// 垂直或者水平滚动
vertical() {
if (this.mode == "horizontal")
return false;
else
return true;
},
// NVUE中的swiper在css中样式不生效
swiperStyle() {
const style = {};
return style;
}
},
data() {
return {
index: 0
};
},
methods: {
noticeChange(e) {
this.index = e.detail.current;
this.$emit("change", this.index);
},
// 点击通告栏
clickHandler() {
this.$emit("click", this.index);
},
// 点击关闭按钮
close() {
this.$emit("close");
}
}
};
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4);
return vue.openBlock(), vue.createElementBlock("view", {
class: "uv-notice",
onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args))
}, [
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
_ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "uv-notice__left-icon"
}, [
vue.createVNode(_component_uv_icon, {
name: _ctx.icon,
color: _ctx.color,
size: "19"
}, null, 8, ["name", "color"])
])) : vue.createCommentVNode("v-if", true)
], true),
vue.createElementVNode("swiper", {
"disable-touch": _ctx.disableTouch,
vertical: _ctx.step ? false : true,
circular: "",
interval: _ctx.duration,
autoplay: !_ctx.disableScroll,
class: "uv-notice__swiper",
style: vue.normalizeStyle([$options.swiperStyle]),
onChange: _cache[0] || (_cache[0] = (...args) => $options.noticeChange && $options.noticeChange(...args))
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList(_ctx.text, (item, index2) => {
return vue.openBlock(), vue.createElementBlock("swiper-item", {
key: index2,
class: "uv-notice__swiper__item"
}, [
vue.createElementVNode(
"text",
{
class: "uv-notice__swiper__item__text uv-line-1",
style: vue.normalizeStyle([$options.textStyle])
},
vue.toDisplayString(item),
5
/* TEXT, STYLE */
)
]);
}),
128
/* KEYED_FRAGMENT */
))
], 44, ["disable-touch", "vertical", "interval", "autoplay"]),
["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "uv-notice__right-icon"
}, [
_ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 0,
name: "arrow-right",
size: 17,
color: _ctx.color
}, null, 8, ["color"])) : vue.createCommentVNode("v-if", true),
_ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 1,
name: "close",
size: 16,
color: _ctx.color,
onClick: $options.close
}, null, 8, ["color", "onClick"])) : vue.createCommentVNode("v-if", true)
])) : vue.createCommentVNode("v-if", true)
]);
}
const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-243b8fd9"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-column-notice/uv-column-notice.vue"]]);
const props$8 = {
props: {
// 显示的内容,字符串
text: {
type: String,
default: ""
},
// 是否显示左侧的音量图标
icon: {
type: [String, Boolean, null],
default: "volume"
},
// 通告模式,link-显示右箭头,closable-显示右侧关闭图标
mode: {
type: String,
default: ""
},
// 文字颜色,各图标也会使用文字颜色
color: {
type: String,
default: "#f9ae3d"
},
// 背景颜色
bgColor: {
type: String,
default: "#fdf6ec"
},
// 字体大小,单位px
fontSize: {
type: [String, Number],
default: 14
},
// 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度
speed: {
type: [String, Number],
default: 80
},
...(_l = (_k = uni.$uv) == null ? void 0 : _k.props) == null ? void 0 : _l.rowNotice
}
};
const _sfc_main$h = {
name: "uv-row-notice",
emits: ["click", "close"],
mixins: [mpMixin, mixin, props$8],
data() {
return {
animationDuration: "0",
// 动画执行时间
animationPlayState: "paused",
// 动画的开始和结束执行
// nvue下,内容发生变化,导致滚动宽度也变化,需要标志为是否需要重新计算宽度
// 不能在内容变化时直接重新计算,因为nvue的animation模块上一次的滚动不是刚好结束,会有影响
nvueInit: true,
show: true
};
},
watch: {
text: {
immediate: true,
handler(newValue, oldValue) {
this.vue();
if (!this.$uv.test.string(newValue)) {
this.$uv.error("noticebar组件direction为row时,要求text参数为字符串形式");
}
}
},
fontSize() {
this.vue();
},
speed() {
this.vue();
}
},
computed: {
// 文字内容的样式
textStyle() {
let style = {};
style.color = this.color;
style.fontSize = this.$uv.addUnit(this.fontSize);
return style;
},
animationStyle() {
let style = {};
style.animationDuration = this.animationDuration;
style.animationPlayState = this.animationPlayState;
return style;
},
// 内部对用户传入的数据进一步分割,放到多个text标签循环,否则如果用户传入的字符串很长(100个字符以上)
// 放在一个text标签中进行滚动,在低端安卓机上,动画可能会出现抖动现象,需要分割到多个text中可解决此问题
innerText() {
let result = [], len = 20;
const textArr = this.text ? this.text.split("") : [];
for (let i = 0; i < textArr.length; i += len) {
result.push(textArr.slice(i, i + len).join(""));
}
return result;
}
},
mounted() {
var pages2 = getCurrentPages();
var page2 = pages2[pages2.length - 1];
var currentWebview = page2.$getAppWebview();
currentWebview.addEventListener("hide", () => {
this.webviewHide = true;
});
currentWebview.addEventListener("show", () => {
this.webviewHide = false;
});
this.init();
},
methods: {
init() {
this.vue();
if (!this.$uv.test.string(this.text)) {
this.$uv.error("noticebar组件direction为row时,要求text参数为字符串形式");
}
},
// vue版处理
async vue() {
let textWidth = 0;
await this.$uv.sleep();
textWidth = (await this.$uvGetRect(".uv-notice__content__text")).width;
(await this.$uvGetRect(".uv-notice__content")).width;
this.animationDuration = `${textWidth / this.$uv.getPx(this.speed)}s`;
this.animationPlayState = "paused";
setTimeout(() => {
this.animationPlayState = "running";
}, 10);
},
// nvue版处理
async nvue() {
},
loopAnimation(textWidth, boxWidth) {
},
getNvueRect(el) {
},
// 点击通告栏
clickHandler(index2) {
this.$emit("click");
},
// 点击右侧按钮,需要判断点击的是关闭图标还是箭头图标
close() {
this.$emit("close");
}
}
};
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4);
return vue.openBlock(), vue.createElementBlock("view", {
class: "uv-notice",
onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
}, [
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
_ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "uv-notice__left-icon"
}, [
vue.createVNode(_component_uv_icon, {
name: _ctx.icon,
color: _ctx.color,
size: "19"
}, null, 8, ["name", "color"])
])) : vue.createCommentVNode("v-if", true)
], true),
vue.createElementVNode(
"view",
{
class: "uv-notice__content",
ref: "uv-notice__content"
},
[
vue.createElementVNode(
"view",
{
ref: "uv-notice__content__text",
class: "uv-notice__content__text",
style: vue.normalizeStyle([$options.animationStyle])
},
[
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($options.innerText, (item, index2) => {
return vue.openBlock(), vue.createElementBlock(
"text",
{
key: index2,
style: vue.normalizeStyle([$options.textStyle])
},
vue.toDisplayString(item),
5
/* TEXT, STYLE */
);
}),
128
/* KEYED_FRAGMENT */
))
],
4
/* STYLE */
)
],
512
/* NEED_PATCH */
),
["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "uv-notice__right-icon"
}, [
_ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 0,
name: "arrow-right",
size: 17,
color: _ctx.color
}, null, 8, ["color"])) : vue.createCommentVNode("v-if", true),
_ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 1,
onClick: $options.close,
name: "close",
size: 16,
color: _ctx.color
}, null, 8, ["onClick", "color"])) : vue.createCommentVNode("v-if", true)
])) : vue.createCommentVNode("v-if", true)
]);
}
const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-8e15132c"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-row-notice/uv-row-notice.vue"]]);
const props$7 = {
props: {
// 显示的内容,数组
text: {
type: [Array, String],
default: () => []
},
// 通告滚动模式,row-横向滚动,column-竖向滚动
direction: {
type: String,
default: "row"
},
// direction = row时,是否使用步进形式滚动
step: {
type: Boolean,
default: false
},
// 是否显示左侧的音量图标
icon: {
type: [String, Boolean, null],
default: "volume"
},
// 通告模式,link-显示右箭头,closable-显示右侧关闭图标
mode: {
type: String,
default: ""
},
// 文字颜色,各图标也会使用文字颜色
color: {
type: String,
default: "#f9ae3d"
},
// 背景颜色
bgColor: {
type: String,
default: "#fdf6ec"
},
// 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
speed: {
type: [String, Number],
default: 80
},
// 字体大小
fontSize: {
type: [String, Number],
default: 14
},
// 滚动一个周期的时间长,单位ms
duration: {
type: [String, Number],
default: 2e3
},
// 跳转的页面路径
url: {
type: String,
default: ""
},
// 页面跳转的类型
linkType: {
type: String,
default: "navigateTo"
},
// 是否禁止用手滑动切换
// 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
disableTouch: {
type: Boolean,
default: true
},
// 是否禁止滚动,仅`direction="column"生效`
disableScroll: {
type: Boolean,
default: false
},
...(_n = (_m = uni.$uv) == null ? void 0 : _m.props) == null ? void 0 : _n.noticeBar
}
};
const _sfc_main$g = {
name: "uv-notice-bar",
emits: ["click", "close", "change"],
mixins: [mpMixin, mixin, props$7],
data() {
return {
show: true
};
},
methods: {
// 点击通告栏
click(index2) {
this.$emit("click", index2);
if (this.url && this.linkType) {
this.openPage();
}
},
// 点击关闭按钮
close() {
this.show = false;
this.$emit("close");
},
// 竖向滚动时触发
change(index2) {
this.$emit("change", index2);
}
}
};
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_column_notice = resolveEasycom(vue.resolveDynamicComponent("uv-column-notice"), __easycom_0$2);
const _component_uv_row_notice = resolveEasycom(vue.resolveDynamicComponent("uv-row-notice"), __easycom_1$1);
return $data.show ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: "uv-notice-bar",
style: vue.normalizeStyle([{
backgroundColor: _ctx.bgColor
}, _ctx.$uv.addStyle(_ctx.customStyle)])
},
[
_ctx.direction === "column" || _ctx.direction === "row" && _ctx.step ? (vue.openBlock(), vue.createBlock(_component_uv_column_notice, {
key: 0,
color: _ctx.color,
bgColor: _ctx.bgColor,
text: _ctx.text,
mode: _ctx.mode,
step: _ctx.step,
icon: _ctx.icon,
"disable-touch": _ctx.disableTouch,
"disable-scroll": _ctx.disableScroll,
fontSize: _ctx.fontSize,
duration: _ctx.duration,
onClose: $options.close,
onClick: $options.click,
onChange: $options.change
}, null, 8, ["color", "bgColor", "text", "mode", "step", "icon", "disable-touch", "disable-scroll", "fontSize", "duration", "onClose", "onClick", "onChange"])) : (vue.openBlock(), vue.createBlock(_component_uv_row_notice, {
key: 1,
color: _ctx.color,
bgColor: _ctx.bgColor,
text: _ctx.text,
mode: _ctx.mode,
fontSize: _ctx.fontSize,
speed: _ctx.speed,
url: _ctx.url,
linkType: _ctx.linkType,
icon: _ctx.icon,
onClose: $options.close,
onClick: $options.click
}, null, 8, ["color", "bgColor", "text", "mode", "fontSize", "speed", "url", "linkType", "icon", "onClose", "onClick"]))
],
4
/* STYLE */
)) : vue.createCommentVNode("v-if", true);
}
const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-ecf69ee0"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-notice-bar/components/uv-notice-bar/uv-notice-bar.vue"]]);
const props$6 = {
props: {
// 是否展示骨架组件
loading: {
type: Boolean,
default: true
},
// 是否开启动画效果
animate: {
type: Boolean,
default: true
},
// 段落占位图行数
rows: {
type: [String, Number],
default: 0
},
// 段落占位图的宽度
rowsWidth: {
type: [String, Number, Array],
default: "100%"
},
// 段落占位图的高度
rowsHeight: {
type: [String, Number, Array],
default: 18
},
// 段落占位图的左边距
rowsLeft: {
type: [String, Number, Array],
default: 0
},
// 是否展示标题占位图
title: {
type: Boolean,
default: true
},
// 段落标题的宽度
titleWidth: {
type: [String, Number],
default: "50%"
},
// 段落标题的高度
titleHeight: {
type: [String, Number],
default: 18
},
// 是否展示头像占位图
avatar: {
type: Boolean,
default: false
},
// 头像占位图大小
avatarSize: {
type: [String, Number],
default: 32
},
// 头像占位图的形状,circle-圆形,square-方形
avatarShape: {
type: String,
default: "circle"
},
...(_p = (_o = uni.$uv) == null ? void 0 : _o.props) == null ? void 0 : _p.skeleton
}
};
const _sfc_main$f = {
name: "uv-skeleton",
mixins: [mpMixin, mixin, props$6],
data() {
return {
width: 0
};
},
watch: {
loading() {
this.getComponentWidth();
}
},
computed: {
rowsArray() {
if (/%$/.test(this.rowsHeight)) {
this.$uv.error("rowsHeight参数不支持百分比单位");
}
const rows = [];
for (let i = 0; i < this.rows; i++) {
let item = {}, rowWidth = this.$uv.test.array(this.rowsWidth) ? this.rowsWidth[i] || (i === this.row - 1 ? "70%" : "100%") : i === this.rows - 1 ? "70%" : this.rowsWidth, rowHeight = this.$uv.test.array(this.rowsHeight) ? this.rowsHeight[i] || "18px" : this.rowsHeight, rowLeft = this.$uv.test.array(this.rowsLeft) ? this.rowsLeft[i] || 0 : this.rowsLeft;
item.marginTop = !this.title && i === 0 ? 0 : this.title && i === 0 ? "20px" : "12px";
if (/%$/.test(rowWidth)) {
item.width = this.$uv.addUnit(this.width * parseInt(rowWidth) / 100);
} else {
item.width = this.$uv.addUnit(rowWidth);
}
item.height = this.$uv.addUnit(rowHeight);
item.marginLeft = this.$uv.addUnit(rowLeft);
rows.push(item);
}
return rows;
},
uTitleWidth() {
let tWidth = 0;
if (/%$/.test(this.titleWidth)) {
tWidth = this.$uv.addUnit(this.width * parseInt(this.titleWidth) / 100);
} else {
tWidth = this.$uv.addUnit(this.titleWidth);
}
return this.$uv.addUnit(tWidth);
}
},
mounted() {
this.init();
},
methods: {
init() {
this.getComponentWidth();
},
async setNvueAnimation() {
},
// 获取组件的宽度
async getComponentWidth() {
await this.$uv.sleep(20);
this.$uvGetRect(".uv-skeleton__wrapper__content").then((size) => {
this.width = size.width;
});
}
}
};
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "uv-skeleton" }, [
_ctx.loading ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: "uv-skeleton__wrapper",
ref: "uv-skeleton__wrapper",
style: { "display": "flex", "flex-direction": "row" }
},
[
_ctx.avatar ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: vue.normalizeClass(["uv-skeleton__wrapper__avatar", [`uv-skeleton__wrapper__avatar--${_ctx.avatarShape}`, _ctx.animate && "animate"]]),
style: vue.normalizeStyle({
height: _ctx.$uv.addUnit(_ctx.avatarSize),
width: _ctx.$uv.addUnit(_ctx.avatarSize)
})
},
null,
6
/* CLASS, STYLE */
)) : vue.createCommentVNode("v-if", true),
vue.createElementVNode(
"view",
{
class: "uv-skeleton__wrapper__content",
ref: "uv-skeleton__wrapper__content",
style: { "flex": "1" }
},
[
_ctx.title ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: vue.normalizeClass(["uv-skeleton__wrapper__content__title", [_ctx.animate && "animate"]]),
style: vue.normalizeStyle({
width: $options.uTitleWidth,
height: _ctx.$uv.addUnit(_ctx.titleHeight)
})
},
null,
6
/* CLASS, STYLE */
)) : vue.createCommentVNode("v-if", true),
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($options.rowsArray, (item, index2) => {
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: vue.normalizeClass(["uv-skeleton__wrapper__content__rows", [_ctx.animate && "animate"]]),
key: index2,
style: vue.normalizeStyle({
width: item.width,
height: item.height,
marginTop: item.marginTop,
marginLeft: item.marginLeft
})
},
null,
6
/* CLASS, STYLE */
);
}),
128
/* KEYED_FRAGMENT */
))
],
512
/* NEED_PATCH */
)
],
512
/* NEED_PATCH */
)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true)
]);
}
const __easycom_3$1 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-0b5f3d7f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.vue"]]);
const props$5 = {
props: {
color: {
type: String,
default: "#d6d7d9"
},
// 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
length: {
type: [String, Number],
default: "100%"
},
// 线条方向,col-竖向,row-横向
direction: {
type: String,
default: "row"
},
// 是否显示细边框
hairline: {
type: Boolean,
default: true
},
// 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
margin: {
type: [String, Number],
default: 0
},
// 是否虚线,true-虚线,false-实线
dashed: {
type: Boolean,
default: false
},
...(_r = (_q = uni.$uv) == null ? void 0 : _q.props) == null ? void 0 : _r.line
}
};
const _sfc_main$e = {
name: "uv-line",
mixins: [mpMixin, mixin, props$5],
computed: {
lineStyle() {
const style = {};
style.margin = this.margin;
if (this.direction === "row") {
style.borderBottomWidth = "1px";
style.borderBottomStyle = this.dashed ? "dashed" : "solid";
style.width = this.$uv.addUnit(this.length);
if (this.hairline)
style.transform = "scaleY(0.5)";
} else {
style.borderLeftWidth = "1px";
style.borderLeftStyle = this.dashed ? "dashed" : "solid";
style.height = this.$uv.addUnit(this.length);
if (this.hairline)
style.transform = "scaleX(0.5)";
}
style.borderColor = this.color;
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
}
}
};
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: "uv-line",
style: vue.normalizeStyle([$options.lineStyle])
},
null,
4
/* STYLE */
);
}
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-dcf8cb8f"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-line/components/uv-line/uv-line.vue"]]);
const props$4 = {
props: {
// 是否虚线
dashed: {
type: Boolean,
default: false
},
// 是否细线
hairline: {
type: Boolean,
default: true
},
// 是否以点替代文字,优先于text字段起作用
dot: {
type: Boolean,
default: false
},
// 内容文本的位置,left-左边,center-中间,right-右边
textPosition: {
type: String,
default: "center"
},
// 文本内容
text: {
type: [String, Number],
default: ""
},
// 文本大小
textSize: {
type: [String, Number],
default: 14
},
// 文本颜色
textColor: {
type: String,
default: "#909399"
},
// 线条颜色
lineColor: {
type: String,
default: "#dcdfe6"
},
...(_t = (_s = uni.$uv) == null ? void 0 : _s.props) == null ? void 0 : _t.divider
}
};
const _sfc_main$d = {
name: "uv-divider",
mixins: [mpMixin, mixin, props$4],
emits: ["click"],
computed: {
textStyle() {
const style = {};
style.fontSize = this.$uv.addUnit(this.textSize);
style.color = this.textColor;
return style;
},
// 左边线条的的样式
leftLineStyle() {
const style = {};
if (this.textPosition === "left") {
style.width = "80rpx";
} else {
style.flex = 1;
}
return style;
},
// 右边线条的的样式
rightLineStyle() {
const style = {};
if (this.textPosition === "right") {
style.width = "80rpx";
} else {
style.flex = 1;
}
return style;
}
},
methods: {
// divider组件被点击时触发
click() {
this.$emit("click");
}
}
};
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_line = resolveEasycom(vue.resolveDynamicComponent("uv-line"), __easycom_0$1);
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: "uv-divider",
style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)]),
onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args))
},
[
vue.createVNode(_component_uv_line, {
color: _ctx.lineColor,
customStyle: $options.leftLineStyle,
hairline: _ctx.hairline,
dashed: _ctx.dashed
}, null, 8, ["color", "customStyle", "hairline", "dashed"]),
_ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", {
key: 0,
class: "uv-divider__dot"
}, "●")) : _ctx.text ? (vue.openBlock(), vue.createElementBlock(
"text",
{
key: 1,
class: "uv-divider__text",
style: vue.normalizeStyle([$options.textStyle])
},
vue.toDisplayString(_ctx.text),
5
/* TEXT, STYLE */
)) : vue.createCommentVNode("v-if", true),
vue.createVNode(_component_uv_line, {
color: _ctx.lineColor,
customStyle: $options.rightLineStyle,
hairline: _ctx.hairline,
dashed: _ctx.dashed
}, null, 8, ["color", "customStyle", "hairline", "dashed"])
],
4
/* STYLE */
);
}
const __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-222d1a38"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-divider/components/uv-divider/uv-divider.vue"]]);
const _sfc_main$c = {
name: "tabbar-shadow",
data() {
return {};
}
};
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", null, [
vue.createElementVNode("view", { class: "tabbar-shadow" })
]);
}
const __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-d22390bb"], ["__file", "E:/jlyh/tra-app/components/tabbar-shadow/tabbar-shadow.vue"]]);
function msg(title, duration = 1e3) {
uni.showToast({
title,
duration,
icon: "none",
mask: true
});
}
function show(title, msg2, showCancel = true) {
let res = new Promise((resolve, reject) => {
uni.showModal({
title,
content: msg2,
showCancel,
success: function(res2) {
resolve(res2.confirm);
},
fail: function(res2) {
reject(false);
}
});
});
return res;
}
const loading = (title = "加载中", mask = true) => uni.showLoading({
title,
mask
});
const hideLoading = () => uni.hideLoading();
const navigateTo = (url2) => uni.navigateTo({
url: url2
});
const reLaunch = (url2) => {
uni.reLaunch({
url: url2
});
};
const switchTab = (url2) => {
uni.switchTab({
url: url2
});
};
const navigateBack = (delta = 1, fun = () => {
}) => {
uni.navigateBack({
delta,
success() {
fun();
}
});
};
const redirectTo = (url2) => uni.redirectTo({
url: url2
});
const dateToTime = (dateString) => {
let date2 = new Date(dateString);
let timestamp = date2.getTime();
return timestamp;
};
const formatDate2 = (timestamp, format = "yyyy-MM-dd HH:mm:ss") => {
if (!timestamp)
return "";
let date2;
try {
if (timestamp) {
if (typeof timestamp == "number" && timestamp <= 9999999999) {
timestamp *= 1e3;
}
date2 = new Date(timestamp);
} else {
date2 = /* @__PURE__ */ new Date();
}
} catch (e) {
return "";
}
let day = date2.getDate();
let month = date2.getMonth() + 1;
let year = date2.getFullYear();
let hours = date2.getHours();
let minutes = date2.getMinutes();
let seconds = date2.getSeconds();
return format.replace("yyyy", year).replace("MM", month.toString().padStart(2, "0")).replace("dd", day.toString().padStart(2, "0")).replace("HH", hours.toString().padStart(2, "0")).replace("mm", minutes.toString().padStart(2, "0")).replace("ss", seconds.toString().padStart(2, "0"));
};
const getToken = () => uni.getStorageSync("token");
const objToJson = (obj) => encodeURLComponent("page_data", obj);
const jsonToObj = () => uni.getStorageSync("page_data");
const setPageCache = (name, obj) => {
uni.setStorageSync(name, obj);
};
const getPageCache = (name) => {
const cache = uni.getStorageSync(name);
uni.removeStorageSync(name);
return cache;
};
function setValue(key, value) {
uni.setStorageSync(key, value);
}
function getValue(key) {
return uni.getStorageSync(key);
}
function isLogin() {
return !!getToken();
}
const common = {
getPageCache,
setPageCache,
objToJson,
jsonToObj,
hideLoading,
loading,
msg,
show,
redirectTo,
navigateTo,
navigateBack,
formatDate2,
setValue,
getValue,
isLogin,
reLaunch,
switchTab,
dateToTime
};
const _imports_0$2 = "/static/images/index/bg.png";
const _imports_1$1 = "/static/images/index/logo_text.png";
const _imports_2$1 = "/static/images/index/message.png";
const _imports_3$1 = "/static/images/index/fttz.png";
const _imports_4$1 = "/static/images/index/navigation_course.png";
const _imports_5$1 = "/static/images/index/navigation_question_answering.png";
const _imports_6 = "/static/images/index/navigation_ai.png";
const _imports_7 = "/static/images/index/navigation_learning_tasks.png";
const _imports_8 = "/static/images/index/navigation_examination.png";
const _imports_9 = "/static/images/index/navigation_practice.png";
const _imports_10 = "/static/images/index/navigation_wrong_question.png";
const _imports_11 = "/static/images/index/navigation_learning_analysis.png";
const _imports_12 = "/static/images/index/hot.png";
const _imports_13 = "/static/images/test/1.png";
const _imports_14 = "/static/images/index/recommend.png";
const _imports_15 = "/static/images/index/new.png";
const placeholderStyle = "color:#76A3EB;font-size:26rpx";
const _sfc_main$b = {
__name: "index",
setup(__props, { expose: __expose }) {
__expose();
const customStyles = {
backgroundColor: "#DCE9FF",
paddingLeft: "40rpx",
paddingTop: "5px",
paddingBottom: "5px"
};
const suffixIconStyle = {
color: "#2c8ef2",
fontSize: "28px"
};
const notice_text = vue.ref(["绿色金融政策解析与商业银行绿色水水水水水水水水水水水水水", "绿色金融政策解析与商业银行红色"]);
const hot_class_list = vue.ref([{
img: "",
title: "",
date: "",
num: ""
}, {
img: "",
title: "",
date: "",
num: ""
}]);
vue.onMounted(() => {
setTimeout(() => {
hot_class_list.value = [
{
img: "11",
title: "最新课程最新课程最新课程程最新课程程最新课程程最新课程",
date: "2025/4/21",
num: "44"
},
{
img: "1124",
title: "最新课程",
date: "2025/4/21",
num: "31"
}
];
}, 1e3);
});
const __returned__ = { customStyles, placeholderStyle, suffixIconStyle, notice_text, hot_class_list, onMounted: vue.onMounted, ref: vue.ref, get common() {
return common;
} };
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
return __returned__;
}
};
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
const _component_nav_bar = resolveEasycom(vue.resolveDynamicComponent("nav-bar"), __easycom_0$5);
const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_0$3);
const _component_uv_notice_bar = resolveEasycom(vue.resolveDynamicComponent("uv-notice-bar"), __easycom_2$1);
const _component_uv_skeleton = resolveEasycom(vue.resolveDynamicComponent("uv-skeleton"), __easycom_3$1);
const _component_uv_divider = resolveEasycom(vue.resolveDynamicComponent("uv-divider"), __easycom_4);
const _component_tabbar_shadow = resolveEasycom(vue.resolveDynamicComponent("tabbar-shadow"), __easycom_5);
return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [
vue.createVNode(_component_nav_bar),
vue.createElementVNode("view", { class: "bg_div" }, [
vue.createCommentVNode(" 背景图 "),
vue.createElementVNode("image", {
src: _imports_0$2,
class: "bg_img"
}),
vue.createCommentVNode(" 文字logo "),
vue.createElementVNode("view", {
class: "title_logo",
onClick: _cache[0] || (_cache[0] = ($event) => $setup.common.navigateTo("/pages/login/login"))
}, [
vue.createElementVNode("image", {
src: _imports_1$1,
class: "log_img"
}),
vue.createElementVNode("view", { class: "fl1" })
]),
vue.createCommentVNode(" 搜索框 "),
vue.createElementVNode("view", { class: "search_div" }, [
vue.createVNode(_component_uv_input, {
shape: "circle",
customStyle: $setup.customStyles,
placeholderStyle: $setup.placeholderStyle,
placeholder: "请输入关键字",
suffixIcon: "search",
suffixIconStyle: $setup.suffixIconStyle
}),
vue.createElementVNode("view", { class: "message_div" }, [
vue.createElementVNode("image", {
src: _imports_2$1,
class: "message_img"
}),
vue.createElementVNode("view", { class: "message_text" }, "消息"),
vue.createElementVNode("view", { class: "message_num" }, " 30 ")
])
]),
vue.createCommentVNode(" 滚动通知 "),
vue.createElementVNode("view", { class: "notice_div" }, [
vue.withDirectives(vue.createVNode(_component_uv_notice_bar, {
text: $setup.notice_text,
bgColor: null,
color: "rgba(255,255,255,0.7)",
fontSize: "10px",
speed: 40,
direction: "column"
}, null, 8, ["text"]), [
[vue.vShow, $setup.notice_text.length]
])
]),
vue.createCommentVNode(" 学习时长和飞天兔子,为了挡住部分兔子只能多一个盒子 "),
vue.createElementVNode("view", { class: "study_duration_and_profile_div" }, [
vue.createCommentVNode(" 飞天兔子 "),
vue.createElementVNode("view", { class: "profile_div" }, [
vue.createElementVNode("image", {
src: _imports_3$1,
class: "profile"
})
]),
vue.createCommentVNode(" 学习时长 "),
vue.createElementVNode("view", { class: "study_duration_div" }, [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "top" }, "累计学习时长"),
vue.createElementVNode("view", { class: "bottom" }, "256h")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "top" }, "累计训练时长"),
vue.createElementVNode("view", { class: "bottom" }, "224h")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "top" }, "累计考试次数"),
vue.createElementVNode("view", { class: "bottom" }, "25")
])
])
]),
vue.createElementVNode("view", { class: "navigation_div" }, [
vue.createElementVNode("view", { class: "group" }, [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_4$1
}),
vue.createElementVNode("view", { class: "title" }, "课程中心")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_5$1
}),
vue.createElementVNode("view", { class: "title" }, "AI问答")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_6
}),
vue.createElementVNode("view", { class: "title" }, "AI陪练")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_7
}),
vue.createElementVNode("view", { class: "title" }, "学习任务")
])
]),
vue.createElementVNode("view", { class: "group" }, [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_8
}),
vue.createElementVNode("view", { class: "title" }, "考试中心")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_9
}),
vue.createElementVNode("view", { class: "title" }, "竞赛练习")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_10
}),
vue.createElementVNode("view", { class: "title" }, "错题本")
]),
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("image", {
class: "icon",
src: _imports_11
}),
vue.createElementVNode("view", { class: "title" }, "学习分析")
])
])
]),
vue.createCommentVNode(" 热门课程分模块标题 "),
vue.createElementVNode("view", { class: "module_title_div" }, [
vue.createElementVNode("view", { class: "icon" }, [
vue.createElementVNode("image", {
class: "img_100",
src: _imports_12
})
]),
vue.createElementVNode("view", { class: "text font_pf" }, "热门课程")
]),
vue.createCommentVNode(" 热门课程 "),
vue.createElementVNode("view", { class: "hot_class_div" }, [
vue.createElementVNode("scroll-view", {
class: "scroll-view",
"scroll-x": true,
"show-scrollbar": false
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($setup.hot_class_list, (item, index2) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "scroll-view-item",
key: index2
}, [
vue.createElementVNode("view", { class: "item_div" }, [
vue.createVNode(_component_uv_skeleton, {
loading: !item.title,
rows: 3,
avatar: "",
"avatar-shape": "square",
title: false
}, {
default: vue.withCtx(() => [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "left" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_13
})
]),
vue.createElementVNode("view", { class: "right" }, [
vue.createElementVNode(
"view",
{ class: "title ellipsis-text" },
vue.toDisplayString(item.title),
1
/* TEXT */
),
vue.createElementVNode(
"view",
{ class: "note ellipsis-text" },
" 发布:" + vue.toDisplayString(item.date) + " 丨已学:" + vue.toDisplayString(item.num),
1
/* TEXT */
),
vue.createElementVNode("view", { class: "button_div" }, [
vue.createElementVNode("view", { class: "button" }, "去学习")
])
])
])
]),
_: 2
/* DYNAMIC */
}, 1032, ["loading"])
])
]);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
vue.createCommentVNode(" 推荐课程分模块标题 "),
vue.createElementVNode("view", { class: "module_title_div" }, [
vue.createElementVNode("view", { class: "icon" }, [
vue.createElementVNode("image", {
class: "img_100",
src: _imports_14
})
]),
vue.createElementVNode("view", { class: "text font_pf" }, "推荐课程")
]),
vue.createCommentVNode(" 推荐课程 "),
vue.createElementVNode("view", { class: "hot_class_div" }, [
vue.createElementVNode("scroll-view", {
class: "scroll-view",
"scroll-x": true,
"show-scrollbar": false
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($setup.hot_class_list, (item, index2) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "scroll-view-item",
key: index2
}, [
vue.createElementVNode("view", { class: "item_div" }, [
vue.createVNode(_component_uv_skeleton, {
loading: !item.title,
rows: 3,
avatar: "",
"avatar-shape": "square",
title: false
}, {
default: vue.withCtx(() => [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "left" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_13
})
]),
vue.createElementVNode("view", { class: "right" }, [
vue.createElementVNode(
"view",
{ class: "title ellipsis-text" },
vue.toDisplayString(item.title),
1
/* TEXT */
),
vue.createElementVNode(
"view",
{ class: "note ellipsis-text" },
" 发布:" + vue.toDisplayString(item.date) + " 丨已学:" + vue.toDisplayString(item.num),
1
/* TEXT */
),
vue.createElementVNode("view", { class: "button_div" }, [
vue.createElementVNode("view", { class: "button" }, "去学习")
])
])
])
]),
_: 2
/* DYNAMIC */
}, 1032, ["loading"])
])
]);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
vue.createCommentVNode(" 最新课程分模块标题 "),
vue.createElementVNode("view", { class: "module_title_div" }, [
vue.createElementVNode("view", { class: "icon" }, [
vue.createElementVNode("image", {
class: "img_100",
src: _imports_15
})
]),
vue.createElementVNode("view", { class: "text font_pf" }, "最新课程")
]),
vue.createCommentVNode(" 最新课程 "),
vue.createElementVNode("view", { class: "hot_class_div" }, [
vue.createElementVNode("scroll-view", {
class: "scroll-view",
"scroll-x": true,
"show-scrollbar": false
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($setup.hot_class_list, (item, index2) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "scroll-view-item",
key: index2
}, [
vue.createElementVNode("view", { class: "item_div" }, [
vue.createVNode(_component_uv_skeleton, {
loading: !item.title,
rows: 3,
avatar: "",
"avatar-shape": "square",
title: false
}, {
default: vue.withCtx(() => [
vue.createElementVNode("view", { class: "item" }, [
vue.createElementVNode("view", { class: "left" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_13
})
]),
vue.createElementVNode("view", { class: "right" }, [
vue.createElementVNode(
"view",
{ class: "title ellipsis-text" },
vue.toDisplayString(item.title),
1
/* TEXT */
),
vue.createElementVNode(
"view",
{ class: "note ellipsis-text" },
" 发布:" + vue.toDisplayString(item.date) + " 丨已学:" + vue.toDisplayString(item.num),
1
/* TEXT */
),
vue.createElementVNode("view", { class: "button_div" }, [
vue.createElementVNode("view", { class: "button" }, "去学习")
])
])
])
]),
_: 2
/* DYNAMIC */
}, 1032, ["loading"])
])
]);
}),
128
/* KEYED_FRAGMENT */
))
])
]),
vue.createElementVNode("view", { class: "bottom_line" }, [
vue.createVNode(_component_uv_divider, {
text: "我是有底线的",
lineColor: "#9cB0DC",
hairline: true
})
])
]),
vue.createVNode(_component_tabbar_shadow)
]);
}
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-1cf27b2a"], ["__file", "E:/jlyh/tra-app/pages/index/index.vue"]]);
const _imports_0$1 = "/static/images/common/default_img.png";
const _sfc_main$a = {};
function _sfc_render$9(_ctx, _cache) {
return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [
vue.createElementVNode("view", { class: "empty_div" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_0$1
}),
vue.createElementVNode("view", { class: "text" }, " 页面建设中,敬请期待… ")
])
]);
}
const PagesStudyIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-ffedcc8e"], ["__file", "E:/jlyh/tra-app/pages/study/index.vue"]]);
const _sfc_main$9 = {};
function _sfc_render$8(_ctx, _cache) {
return vue.openBlock(), vue.createElementBlock("view", { class: "" }, " 智能问答页面,开发中,敬请期待... ");
}
const PagesIntelligentAnsweringIndex = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/jlyh/tra-app/pages/intelligent_answering/index.vue"]]);
const _sfc_main$8 = {};
function _sfc_render$7(_ctx, _cache) {
return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [
vue.createElementVNode("view", { class: "empty_div" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_0$1
}),
vue.createElementVNode("view", { class: "text" }, " 页面建设中,敬请期待… ")
])
]);
}
const PagesSceneIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-e48602d7"], ["__file", "E:/jlyh/tra-app/pages/scene/index.vue"]]);
const _sfc_main$7 = {};
function _sfc_render$6(_ctx, _cache) {
return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [
vue.createElementVNode("view", { class: "empty_div" }, [
vue.createElementVNode("image", {
class: "img",
src: _imports_0$1
}),
vue.createElementVNode("view", { class: "text" }, " 页面建设中,敬请期待… ")
])
]);
}
const PagesMeIndex = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-c8e26b33"], ["__file", "E:/jlyh/tra-app/pages/me/index.vue"]]);
function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) {
const startRGB = hexToRgb(startColor, false);
const startR = startRGB[0];
const startG = startRGB[1];
const startB = startRGB[2];
const endRGB = hexToRgb(endColor, false);
const endR = endRGB[0];
const endG = endRGB[1];
const endB = endRGB[2];
const sR = (endR - startR) / step;
const sG = (endG - startG) / step;
const sB = (endB - startB) / step;
const colorArr = [];
for (let i = 0; i < step; i++) {
let hex = rgbToHex(`rgb(${Math.round(sR * i + startR)},${Math.round(sG * i + startG)},${Math.round(sB * i + startB)})`);
if (i === 0)
hex = rgbToHex(startColor);
if (i === step - 1)
hex = rgbToHex(endColor);
colorArr.push(hex);
}
return colorArr;
}
function hexToRgb(sColor, str = true) {
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
sColor = String(sColor).toLowerCase();
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
let sColorNew = "#";
for (let i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
sColor = sColorNew;
}
const sColorChange = [];
for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`));
}
if (!str) {
return sColorChange;
}
return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`;
}
if (/^(rgb|RGB)/.test(sColor)) {
const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
return arr.map((val) => Number(val));
}
return sColor;
}
function rgbToHex(rgb) {
const _this = rgb;
const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
if (/^(rgb|RGB)/.test(_this)) {
const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
let strHex = "#";
for (let i = 0; i < aColor.length; i++) {
let hex = Number(aColor[i]).toString(16);
hex = String(hex).length == 1 ? `${0}${hex}` : hex;
if (hex === "0") {
hex += hex;
}
strHex += hex;
}
if (strHex.length !== 7) {
strHex = _this;
}
return strHex;
}
if (reg.test(_this)) {
const aNum = _this.replace(/#/, "").split("");
if (aNum.length === 6) {
return _this;
}
if (aNum.length === 3) {
let numHex = "#";
for (let i = 0; i < aNum.length; i += 1) {
numHex += aNum[i] + aNum[i];
}
return numHex;
}
} else {
return _this;
}
}
const props$3 = {
props: {
// 是否显示组件
show: {
type: Boolean,
default: true
},
// 颜色
color: {
type: String,
default: "#909193"
},
// 提示文字颜色
textColor: {
type: String,
default: "#909193"
},
// 文字和图标是否垂直排列
vertical: {
type: Boolean,
default: false
},
// 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
mode: {
type: String,
default: "spinner"
},
// 图标大小,单位默认px
size: {
type: [String, Number],
default: 24
},
// 文字大小
textSize: {
type: [String, Number],
default: 15
},
// 文字样式
textStyle: {
type: Object,
default() {
return {};
}
},
// 文字内容
text: {
type: [String, Number],
default: ""
},
// 动画模式 https://www.runoob.com/cssref/css3-pr-animation-timing-function.html
timingFunction: {
type: String,
default: "linear"
},
// 动画执行周期时间
duration: {
type: [String, Number],
default: 1200
},
// mode=circle时的暗边颜色
inactiveColor: {
type: String,
default: ""
},
...(_v = (_u = uni.$uv) == null ? void 0 : _u.props) == null ? void 0 : _v.loadingIcon
}
};
const _sfc_main$6 = {
name: "uv-loading-icon",
mixins: [mpMixin, mixin, props$3],
data() {
return {
// Array.form可以通过一个伪数组对象创建指定长度的数组
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from
array12: Array.from({
length: 12
}),
// 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行
// 在iOS nvue上,则会一开始默认执行两个周期的动画
aniAngel: 360,
// 动画旋转角度
webviewHide: false,
// 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗
loading: false
// 是否运行中,针对nvue使用
};
},
computed: {
// 当为circle类型时,给其另外三边设置一个更轻一些的颜色
// 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色
// 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好)
otherBorderColor() {
const lightColor = colorGradient(this.color, "#ffffff", 100)[80];
if (this.mode === "circle") {
return this.inactiveColor ? this.inactiveColor : lightColor;
} else {
return "transparent";
}
}
},
watch: {
show(n) {
}
},
mounted() {
this.init();
},
methods: {
init() {
setTimeout(() => {
this.show && this.addEventListenerToWebview();
}, 20);
},
// 监听webview的显示与隐藏
addEventListenerToWebview() {
const pages2 = getCurrentPages();
const page2 = pages2[pages2.length - 1];
const currentWebview = page2.$getAppWebview();
currentWebview.addEventListener("hide", () => {
this.webviewHide = true;
});
currentWebview.addEventListener("show", () => {
this.webviewHide = false;
});
}
}
};
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: vue.normalizeClass(["uv-loading-icon", [_ctx.vertical && "uv-loading-icon--vertical"]]),
style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)])
},
[
!$data.webviewHide ? (vue.openBlock(), vue.createElementBlock(
"view",
{
key: 0,
class: vue.normalizeClass(["uv-loading-icon__spinner", [`uv-loading-icon__spinner--${_ctx.mode}`]]),
ref: "ani",
style: vue.normalizeStyle({
color: _ctx.color,
width: _ctx.$uv.addUnit(_ctx.size),
height: _ctx.$uv.addUnit(_ctx.size),
borderTopColor: _ctx.color,
borderBottomColor: $options.otherBorderColor,
borderLeftColor: $options.otherBorderColor,
borderRightColor: $options.otherBorderColor,
"animation-duration": `${_ctx.duration}ms`,
"animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : ""
})
},
[
_ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
{ key: 0 },
vue.renderList($data.array12, (item, index2) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index2,
class: "uv-loading-icon__dot"
});
}),
128
/* KEYED_FRAGMENT */
)) : vue.createCommentVNode("v-if", true)
],
6
/* CLASS, STYLE */
)) : vue.createCommentVNode("v-if", true),
_ctx.text ? (vue.openBlock(), vue.createElementBlock(
"text",
{
key: 1,
class: "uv-loading-icon__text",
style: vue.normalizeStyle([{
fontSize: _ctx.$uv.addUnit(_ctx.textSize),
color: _ctx.textColor
}, _ctx.$uv.addStyle(_ctx.textStyle)])
},
vue.toDisplayString(_ctx.text),
5
/* TEXT, STYLE */
)) : vue.createCommentVNode("v-if", true)
],
6
/* CLASS, STYLE */
)) : vue.createCommentVNode("v-if", true);
}
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-29b619ea"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]);
const props$2 = {
props: {
// 是否细边框
hairline: {
type: Boolean,
default: true
},
// 按钮的预置样式,infoprimaryerrorwarningsuccess
type: {
type: String,
default: "info"
},
// 按钮尺寸,largenormalsmallmini
size: {
type: String,
default: "normal"
},
// 按钮形状,circle(两边为半圆),square(带圆角)
shape: {
type: String,
default: "square"
},
// 按钮是否镂空
plain: {
type: Boolean,
default: false
},
// 是否禁止状态
disabled: {
type: Boolean,
default: false
},
// 是否加载中
loading: {
type: Boolean,
default: false
},
// 加载中提示文字
loadingText: {
type: [String, Number],
default: ""
},
// 加载状态图标类型
loadingMode: {
type: String,
default: "spinner"
},
// 加载图标大小
loadingSize: {
type: [String, Number],
default: 14
},
// 开放能力,具体请看uniapp稳定关于button组件部分说明
// https://uniapp.dcloud.io/component/button
openType: {
type: String,
default: ""
},
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
// 取值为submit(提交表单),reset(重置表单)
formType: {
type: String,
default: ""
},
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
// 只微信小程序、QQ小程序有效
appParameter: {
type: String,
default: ""
},
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
hoverStopPropagation: {
type: Boolean,
default: true
},
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
lang: {
type: String,
default: "en"
},
// 会话来源,open-type="contact"时有效。只微信小程序有效
sessionFrom: {
type: String,
default: ""
},
// 会话内消息卡片标题,open-type="contact"时有效
// 默认当前标题,只微信小程序有效
sendMessageTitle: {
type: String,
default: ""
},
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
// 默认当前分享路径,只微信小程序有效
sendMessagePath: {
type: String,
default: ""
},
// 会话内消息卡片图片,open-type="contact"时有效
// 默认当前页面截图,只微信小程序有效
sendMessageImg: {
type: String,
default: ""
},
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
showMessageCard: {
type: Boolean,
default: true
},
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
dataName: {
type: String,
default: ""
},
// 节流,一定时间内只能触发一次
throttleTime: {
type: [String, Number],
default: 0
},
// 按住后多久出现点击态,单位毫秒
hoverStartTime: {
type: [String, Number],
default: 0
},
// 手指松开后点击态保留时间,单位毫秒
hoverStayTime: {
type: [String, Number],
default: 200
},
// 按钮文字,之所以通过props传入,是因为slot传入的话
// nvue中无法控制文字的样式
text: {
type: [String, Number],
default: ""
},
// 按钮图标
icon: {
type: String,
default: ""
},
// 按钮图标大小
iconSize: {
type: [String, Number],
default: ""
},
// 按钮图标颜色
iconColor: {
type: String,
default: "#000000"
},
// 按钮颜色,支持传入linear-gradient渐变色
color: {
type: String,
default: ""
},
// 自定义按钮文本样式
customTextStyle: {
type: [Object, String],
default: ""
},
...(_x = (_w = uni.$uv) == null ? void 0 : _w.props) == null ? void 0 : _x.button
}
};
const _sfc_main$5 = {
name: "uv-button",
mixins: [mpMixin, mixin, props$2],
emits: ["click"],
data() {
return {};
},
computed: {
// 生成bem风格的类名
bemClass() {
if (!this.color) {
return this.bem(
"button",
["type", "shape", "size"],
["disabled", "plain", "hairline"]
);
} else {
return this.bem(
"button",
["shape", "size"],
["disabled", "plain", "hairline"]
);
}
},
loadingColor() {
if (this.plain) {
return this.color ? this.color : "#3c9cff";
}
if (this.type === "info") {
return "#c9c9c9";
}
return "rgb(200, 200, 200)";
},
iconColorCom() {
if (this.iconColor)
return this.iconColor;
if (this.plain) {
return this.color ? this.color : this.type;
} else {
return this.type === "info" ? "#000000" : "#ffffff";
}
},
baseColor() {
let style = {};
if (this.color) {
style.color = this.plain ? this.color : "white";
if (!this.plain) {
style["background-color"] = this.color;
}
if (this.color.indexOf("gradient") !== -1) {
style.borderTopWidth = 0;
style.borderRightWidth = 0;
style.borderBottomWidth = 0;
style.borderLeftWidth = 0;
if (!this.plain) {
style.backgroundImage = this.color;
}
} else {
style.borderColor = this.color;
style.borderWidth = "1px";
style.borderStyle = "solid";
}
}
return style;
},
// nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置
nvueTextStyle() {
let style = {};
if (this.type === "info") {
style.color = "#323233";
}
if (this.color) {
style.color = this.plain ? this.color : "white";
}
style.fontSize = this.textSize + "px";
return style;
},
// 字体大小
textSize() {
let fontSize = 14, { size } = this;
if (size === "large")
fontSize = 16;
if (size === "normal")
fontSize = 14;
if (size === "small")
fontSize = 12;
if (size === "mini")
fontSize = 10;
return fontSize;
},
// 设置图标大小
getIconSize() {
const size = this.iconSize ? this.iconSize : this.textSize * 1.35;
return this.$uv.addUnit(size);
},
// 设置外层盒子的宽度,其他样式不需要
btnWrapperStyle() {
const style = {};
const customStyle = this.$uv.addStyle(this.customStyle);
if (customStyle.width)
style.width = customStyle.width;
return style;
}
},
methods: {
clickHandler() {
if (!this.disabled && !this.loading) {
throttle(() => {
this.$emit("click");
}, this.throttleTime);
}
}
}
};
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_loading_icon = resolveEasycom(vue.resolveDynamicComponent("uv-loading-icon"), __easycom_0);
const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4);
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: "uv-button-wrapper",
style: vue.normalizeStyle([$options.btnWrapperStyle])
},
[
vue.createElementVNode("button", {
"hover-start-time": Number(_ctx.hoverStartTime),
"hover-stay-time": Number(_ctx.hoverStayTime),
"form-type": _ctx.formType,
"open-type": _ctx.openType,
"app-parameter": _ctx.appParameter,
"hover-stop-propagation": _ctx.hoverStopPropagation,
"send-message-title": _ctx.sendMessageTitle,
"send-message-path": _ctx.sendMessagePath,
lang: _ctx.lang,
"data-name": _ctx.dataName,
"session-from": _ctx.sessionFrom,
"send-message-img": _ctx.sendMessageImg,
"show-message-card": _ctx.showMessageCard,
"hover-class": !_ctx.disabled && !_ctx.loading ? "uv-button--active" : "",
class: vue.normalizeClass(["uv-button uv-reset-button", $options.bemClass]),
style: vue.normalizeStyle([$options.baseColor, _ctx.$uv.addStyle(_ctx.customStyle)]),
onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args))
}, [
_ctx.loading ? (vue.openBlock(), vue.createElementBlock(
vue.Fragment,
{ key: 0 },
[
vue.createVNode(_component_uv_loading_icon, {
mode: _ctx.loadingMode,
size: _ctx.loadingSize * 1.15,
color: $options.loadingColor
}, null, 8, ["mode", "size", "color"]),
vue.createElementVNode(
"text",
{
class: "uv-button__loading-text",
style: vue.normalizeStyle([
{ fontSize: $options.textSize + "px" },
_ctx.$uv.addStyle(_ctx.customTextStyle)
])
},
vue.toDisplayString(_ctx.loadingText || _ctx.text),
5
/* TEXT, STYLE */
)
],
64
/* STABLE_FRAGMENT */
)) : (vue.openBlock(), vue.createElementBlock(
vue.Fragment,
{ key: 1 },
[
_ctx.icon ? (vue.openBlock(), vue.createBlock(_component_uv_icon, {
key: 0,
name: _ctx.icon,
color: $options.iconColorCom,
size: $options.getIconSize,
customStyle: { marginRight: "2px" }
}, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true),
vue.renderSlot(_ctx.$slots, "default", {}, () => [
vue.createElementVNode(
"text",
{
class: "uv-button__text",
style: vue.normalizeStyle([
{ fontSize: $options.textSize + "px" },
_ctx.$uv.addStyle(_ctx.customTextStyle)
])
},
vue.toDisplayString(_ctx.text),
5
/* TEXT, STYLE */
)
], true),
vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
],
64
/* STABLE_FRAGMENT */
))
], 14, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"])
],
4
/* STYLE */
);
}
const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-ae8e42c7"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-button/components/uv-button/uv-button.vue"]]);
const props$1 = {
props: {
// checkbox的名称
name: {
type: [String, Number, Boolean],
default: ""
},
// 形状,square为方形,circle为圆型
shape: {
type: String,
default: ""
},
// 整体的大小
size: {
type: [String, Number],
default: ""
},
// 是否默认选中
checked: {
type: Boolean,
default: false
},
// 是否禁用
disabled: {
type: [String, Boolean],
default: ""
},
// 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
activeColor: {
type: String,
default: ""
},
// 未选中的颜色
inactiveColor: {
type: String,
default: ""
},
// 图标的大小,单位px
iconSize: {
type: [String, Number],
default: ""
},
// 图标颜色
iconColor: {
type: String,
default: ""
},
// label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
label: {
type: [String, Number, Boolean],
default: ""
},
// label的字体大小,px单位
labelSize: {
type: [String, Number],
default: ""
},
// label的颜色
labelColor: {
type: String,
default: ""
},
// 是否禁止点击提示语选中复选框
labelDisabled: {
type: [String, Boolean],
default: ""
},
...(_z = (_y = uni.$uv) == null ? void 0 : _y.props) == null ? void 0 : _z.checkbox
}
};
const _sfc_main$4 = {
name: "uv-checkbox",
mixins: [mpMixin, mixin, props$1],
data() {
return {
isChecked: false,
// 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
// 故只能使用如此方法
parentData: {
iconSize: 12,
labelDisabled: null,
disabled: null,
shape: "square",
activeColor: null,
inactiveColor: null,
size: 18,
value: null,
modelValue: null,
iconColor: null,
placement: "row",
borderBottom: false,
iconPlacement: "left",
labelSize: 14,
labelColor: "#303133"
}
};
},
computed: {
// 是否禁用,如果父组件uv-raios-group禁用的话,将会忽略子组件的配置
elDisabled() {
return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
},
// 是否禁用label点击
elLabelDisabled() {
return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
},
// 组件尺寸,对应size的值,默认值为21px
elSize() {
return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
},
// 组件的勾选图标的尺寸,默认12px
elIconSize() {
return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
},
// 组件选中激活时的颜色
elActiveColor() {
return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff";
},
// 组件选未中激活时的颜色
elInactiveColor() {
return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc";
},
// label的颜色
elLabelColor() {
return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266";
},
// 组件的形状
elShape() {
return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle";
},
// label大小
elLabelSize() {
return this.$uv.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15");
},
elIconColor() {
const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff";
if (this.elDisabled) {
return this.isChecked ? this.elInactiveColor : "transparent";
} else {
return this.isChecked ? iconColor : "transparent";
}
},
iconClasses() {
let classes = [];
classes.push("uv-checkbox__icon-wrap--" + this.elShape);
if (this.elDisabled) {
classes.push("uv-checkbox__icon-wrap--disabled");
}
if (this.isChecked && this.elDisabled) {
classes.push("uv-checkbox__icon-wrap--disabled--checked");
}
return classes;
},
iconWrapStyle() {
const style = {};
style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff";
style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
style.width = this.$uv.addUnit(this.elSize);
style.height = this.$uv.addUnit(this.elSize);
if (this.parentData.iconPlacement === "right") {
style.marginRight = 0;
}
return style;
},
checkboxStyle() {
const style = {};
if (this.parentData.borderBottom && this.parentData.placement === "row") {
this.$uv.error("检测到您将borderBottom设置为true,需要同时将uv-checkbox-group的placement设置为column才有效");
}
if (this.parentData.borderBottom && this.parentData.placement === "column") {
style.paddingBottom = "8px";
}
return this.$uv.deepMerge(style, this.$uv.addStyle(this.customStyle));
}
},
created() {
this.init();
},
methods: {
init() {
this.updateParentData();
if (!this.parent) {
this.$uv.error("uv-checkbox必须搭配uv-checkbox-group组件使用");
}
this.$nextTick(() => {
let parentValue = [];
if (this.parentData.value.length) {
parentValue = this.parentData.value;
} else if (this.parentData.modelValue.length) {
parentValue = this.parentData.modelValue;
}
if (this.checked) {
this.isChecked = true;
} else if (this.$uv.test.array(parentValue)) {
this.isChecked = parentValue.some((item) => {
return item === this.name;
});
}
});
},
updateParentData() {
this.getParentData("uv-checkbox-group");
},
// 横向两端排列时,点击组件即可触发选中事件
wrapperClickHandler(e) {
this.parentData.iconPlacement === "right" && this.iconClickHandler(e);
},
// 点击图标
iconClickHandler(e) {
this.preventEvent(e);
if (!this.elDisabled) {
this.setRadioCheckedStatus();
}
},
// 点击label
labelClickHandler(e) {
this.preventEvent(e);
if (!this.elLabelDisabled && !this.elDisabled) {
this.setRadioCheckedStatus();
}
},
emitEvent() {
this.$emit("change", this.isChecked);
this.$nextTick(() => {
this.$uv.formValidate(this, "change");
});
},
// 改变组件选中状态
// 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有uv-checkbox实例
// 将本组件外的其他uv-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
setRadioCheckedStatus() {
this.isChecked = !this.isChecked;
this.emitEvent();
typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this);
}
},
watch: {
checked() {
this.isChecked = this.checked;
}
}
};
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_icon = resolveEasycom(vue.resolveDynamicComponent("uv-icon"), __easycom_0$4);
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: vue.normalizeClass(["uv-checkbox", [`uv-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "uv-border-bottom"]]),
style: vue.normalizeStyle([$options.checkboxStyle]),
onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"]))
},
[
vue.createElementVNode(
"view",
{
class: vue.normalizeClass(["uv-checkbox__icon-wrap", $options.iconClasses]),
onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])),
style: vue.normalizeStyle([$options.iconWrapStyle])
},
[
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
vue.createVNode(_component_uv_icon, {
class: "uv-checkbox__icon-wrap__icon",
name: "checkbox-mark",
size: $options.elIconSize,
color: $options.elIconColor
}, null, 8, ["size", "color"])
], true)
],
6
/* CLASS, STYLE */
),
vue.createElementVNode("view", {
class: "uv-checkbox__label-wrap",
onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"]))
}, [
vue.renderSlot(_ctx.$slots, "default", {}, () => [
vue.createElementVNode(
"text",
{
style: vue.normalizeStyle({
color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor,
fontSize: $options.elLabelSize,
lineHeight: $options.elLabelSize
})
},
vue.toDisplayString(_ctx.label),
5
/* TEXT, STYLE */
)
], true)
])
],
6
/* CLASS, STYLE */
);
}
const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-a311a468"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox/uv-checkbox.vue"]]);
const props = {
props: {
// 绑定的值
value: {
type: Array,
default: () => []
},
modelValue: {
type: Array,
default: () => []
},
// 标识符
name: {
type: String,
default: ""
},
// 形状,circle-圆形,square-方形
shape: {
type: String,
default: "square"
},
// 是否禁用全部checkbox
disabled: {
type: Boolean,
default: false
},
// 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
activeColor: {
type: String,
default: "#2979ff"
},
// 未选中的颜色
inactiveColor: {
type: String,
default: "#c8c9cc"
},
// 整个组件的尺寸,默认px
size: {
type: [String, Number],
default: 18
},
// 布局方式,row-横向,column-纵向
placement: {
type: String,
default: "row"
},
// label的字体大小,px单位
labelSize: {
type: [String, Number],
default: 14
},
// label的字体颜色
labelColor: {
type: [String],
default: "#303133"
},
// 是否禁止点击文本操作
labelDisabled: {
type: Boolean,
default: false
},
// 图标颜色
iconColor: {
type: String,
default: "#fff"
},
// 图标的大小,单位px
iconSize: {
type: [String, Number],
default: 12
},
// 勾选图标的对齐方式,left-左边,right-右边
iconPlacement: {
type: String,
default: "left"
},
// 竖向配列时,是否显示下划线
borderBottom: {
type: Boolean,
default: false
},
...(_B = (_A = uni.$uv) == null ? void 0 : _A.props) == null ? void 0 : _B.checkboxGroup
}
};
const _sfc_main$3 = {
name: "uv-checkbox-group",
mixins: [mpMixin, mixin, props],
computed: {
// 这里computed的变量,都是子组件uv-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化
// 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(uv-checkbox-group)
// 拉取父组件新的变化后的参数
parentData() {
let value = [];
if (this.value.length) {
value = this.value;
} else if (this.modelValue.length) {
value = this.modelValue;
}
return [
value,
this.disabled,
this.inactiveColor,
this.activeColor,
this.size,
this.labelDisabled,
this.shape,
this.iconSize,
this.borderBottom,
this.placement,
this.labelSize,
this.labelColor
];
},
bemClass() {
return this.bem("checkbox-group", ["placement"]);
}
},
watch: {
// 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件
parentData() {
if (this.children.length) {
this.children.map((child) => {
typeof child.init === "function" && child.init();
});
}
}
},
data() {
return {};
},
created() {
this.children = [];
},
methods: {
// 将其他的checkbox设置为未选中的状态
unCheckedOther(childInstance) {
const values = [];
this.children.map((child) => {
if (child.isChecked) {
values.push(child.name);
}
});
this.$emit("update:modelValue", values);
this.$emit("change", values);
}
}
};
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock(
"view",
{
class: vue.normalizeClass(["uv-checkbox-group", $options.bemClass]),
style: vue.normalizeStyle([_ctx.$uv.addStyle(this.customStyle)])
},
[
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
],
6
/* CLASS, STYLE */
);
}
const __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-0735f505"], ["__file", "E:/jlyh/tra-app/uni_modules/uv-checkbox/components/uv-checkbox-group/uv-checkbox-group.vue"]]);
var define_import_meta_env_default = { VITE_APP_BASE_API_Url: "http://25.18.122.66:9786", VITE_CJS_IGNORE_WARNING: "true", VITE_ROOT_DIR: "E:/jlyh/tra-app", VITE_USER_NODE_ENV: "development", BASE_URL: "/", MODE: "development", DEV: true, PROD: false, SSR: false };
const ENV = define_import_meta_env_default;
const get_base_url = (url2) => {
{
return ENV.VITE_APP_BASE_API_Url + "/traapp";
}
};
function request({
url: url2,
method,
data,
meta,
isStream
}) {
const base_url = get_base_url();
const header = {
"content-type": "application/x-www-form-urlencoded; charset=UTF-8"
};
let token = getToken();
if (token) {
header["summary"] = token;
}
return new Promise((resolve, reject) => {
uni.request({
url: `${base_url}${url2}`,
data,
method,
header,
success: (response) => {
if (isStream) {
return resolve(response);
}
const res = response.data;
if (!res) {
common.msg("系统异常.");
return reject();
}
if (res.rtnCode === "0000") {
return resolve(res);
}
if (res.rtnCode === "0005" || res.rtnCode === "QQ0005") {
common.show("未登录", "现在去登录").then(() => {
common.navigateTo("/pages/login/login");
});
}
return reject(res);
}
});
});
}
const setToken = (data) => uni.setStorageSync("token", data);
const setUserInfo = (data) => uni.setStorageSync("userInfo", data);
const useAccountLoginApp = (data) => request({
url: "/access/userLogin",
method: "post",
data
}).then(async ({ rtnCode, body }) => {
if (rtnCode === "0000") {
setToken(body);
const user_data = await queryCurrentUser();
setUserInfo(user_data.body);
return user_data.body;
}
return Promise.reject({ rtnCode, body });
});
const queryCurrentUser = (data) => request({
url: "/access/queryCurrentUser",
method: "post",
data
});
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
var cryptoJs = { exports: {} };
var core = { exports: {} };
var hasRequiredCore;
function requireCore() {
if (hasRequiredCore)
return core.exports;
hasRequiredCore = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory();
}
})(commonjsGlobal, function() {
var CryptoJS2 = CryptoJS2 || function(Math2, undefined$1) {
var create = Object.create || /* @__PURE__ */ function() {
function F() {
}
return function(obj) {
var subtype;
F.prototype = obj;
subtype = new F();
F.prototype = null;
return subtype;
};
}();
var C = {};
var C_lib = C.lib = {};
var Base = C_lib.Base = /* @__PURE__ */ function() {
return {
/**
* Creates a new object that inherits from this object.
*
* @param {Object} overrides Properties to copy into the new object.
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* field: 'value',
*
* method: function () {
* }
* });
*/
extend: function(overrides) {
var subtype = create(this);
if (overrides) {
subtype.mixIn(overrides);
}
if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
subtype.init = function() {
subtype.$super.init.apply(this, arguments);
};
}
subtype.init.prototype = subtype;
subtype.$super = this;
return subtype;
},
/**
* Extends this object and runs the init method.
* Arguments to create() will be passed to init().
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var instance = MyType.create();
*/
create: function() {
var instance = this.extend();
instance.init.apply(instance, arguments);
return instance;
},
/**
* Initializes a newly created object.
* Override this method to add some logic when your objects are created.
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* init: function () {
* // ...
* }
* });
*/
init: function() {
},
/**
* Copies properties into this object.
*
* @param {Object} properties The properties to mix in.
*
* @example
*
* MyType.mixIn({
* field: 'value'
* });
*/
mixIn: function(properties) {
for (var propertyName in properties) {
if (properties.hasOwnProperty(propertyName)) {
this[propertyName] = properties[propertyName];
}
}
if (properties.hasOwnProperty("toString")) {
this.toString = properties.toString;
}
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = instance.clone();
*/
clone: function() {
return this.init.prototype.extend(this);
}
};
}();
var WordArray = C_lib.WordArray = Base.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of 32-bit words.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.create();
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
*/
init: function(words, sigBytes) {
words = this.words = words || [];
if (sigBytes != undefined$1) {
this.sigBytes = sigBytes;
} else {
this.sigBytes = words.length * 4;
}
},
/**
* Converts this word array to a string.
*
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
*
* @return {string} The stringified word array.
*
* @example
*
* var string = wordArray + '';
* var string = wordArray.toString();
* var string = wordArray.toString(CryptoJS.enc.Utf8);
*/
toString: function(encoder) {
return (encoder || Hex).stringify(this);
},
/**
* Concatenates a word array to this word array.
*
* @param {WordArray} wordArray The word array to append.
*
* @return {WordArray} This word array.
*
* @example
*
* wordArray1.concat(wordArray2);
*/
concat: function(wordArray) {
var thisWords = this.words;
var thatWords = wordArray.words;
var thisSigBytes = this.sigBytes;
var thatSigBytes = wordArray.sigBytes;
this.clamp();
if (thisSigBytes % 4) {
for (var i = 0; i < thatSigBytes; i++) {
var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
}
} else {
for (var i = 0; i < thatSigBytes; i += 4) {
thisWords[thisSigBytes + i >>> 2] = thatWords[i >>> 2];
}
}
this.sigBytes += thatSigBytes;
return this;
},
/**
* Removes insignificant bits.
*
* @example
*
* wordArray.clamp();
*/
clamp: function() {
var words = this.words;
var sigBytes = this.sigBytes;
words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
words.length = Math2.ceil(sigBytes / 4);
},
/**
* Creates a copy of this word array.
*
* @return {WordArray} The clone.
*
* @example
*
* var clone = wordArray.clone();
*/
clone: function() {
var clone = Base.clone.call(this);
clone.words = this.words.slice(0);
return clone;
},
/**
* Creates a word array filled with random bytes.
*
* @param {number} nBytes The number of random bytes to generate.
*
* @return {WordArray} The random word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.random(16);
*/
random: function(nBytes) {
var words = [];
var r = function(m_w) {
var m_w = m_w;
var m_z = 987654321;
var mask = 4294967295;
return function() {
m_z = 36969 * (m_z & 65535) + (m_z >> 16) & mask;
m_w = 18e3 * (m_w & 65535) + (m_w >> 16) & mask;
var result = (m_z << 16) + m_w & mask;
result /= 4294967296;
result += 0.5;
return result * (Math2.random() > 0.5 ? 1 : -1);
};
};
for (var i = 0, rcache; i < nBytes; i += 4) {
var _r2 = r((rcache || Math2.random()) * 4294967296);
rcache = _r2() * 987654071;
words.push(_r2() * 4294967296 | 0);
}
return new WordArray.init(words, nBytes);
}
});
var C_enc = C.enc = {};
var Hex = C_enc.Hex = {
/**
* Converts a word array to a hex string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The hex string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
*/
stringify: function(wordArray) {
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var hexChars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
hexChars.push((bite >>> 4).toString(16));
hexChars.push((bite & 15).toString(16));
}
return hexChars.join("");
},
/**
* Converts a hex string to a word array.
*
* @param {string} hexStr The hex string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
*/
parse: function(hexStr) {
var hexStrLength = hexStr.length;
var words = [];
for (var i = 0; i < hexStrLength; i += 2) {
words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
}
return new WordArray.init(words, hexStrLength / 2);
}
};
var Latin1 = C_enc.Latin1 = {
/**
* Converts a word array to a Latin1 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Latin1 string.
*
* @static
*
* @example
*
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
*/
stringify: function(wordArray) {
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var latin1Chars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
latin1Chars.push(String.fromCharCode(bite));
}
return latin1Chars.join("");
},
/**
* Converts a Latin1 string to a word array.
*
* @param {string} latin1Str The Latin1 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
*/
parse: function(latin1Str) {
var latin1StrLength = latin1Str.length;
var words = [];
for (var i = 0; i < latin1StrLength; i++) {
words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
}
return new WordArray.init(words, latin1StrLength);
}
};
var Utf8 = C_enc.Utf8 = {
/**
* Converts a word array to a UTF-8 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-8 string.
*
* @static
*
* @example
*
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
*/
stringify: function(wordArray) {
try {
return decodeURIComponent(escape(Latin1.stringify(wordArray)));
} catch (e) {
throw new Error("Malformed UTF-8 data");
}
},
/**
* Converts a UTF-8 string to a word array.
*
* @param {string} utf8Str The UTF-8 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
*/
parse: function(utf8Str) {
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
}
};
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
/**
* Resets this block algorithm's data buffer to its initial state.
*
* @example
*
* bufferedBlockAlgorithm.reset();
*/
reset: function() {
this._data = new WordArray.init();
this._nDataBytes = 0;
},
/**
* Adds new data to this block algorithm's buffer.
*
* @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
*
* @example
*
* bufferedBlockAlgorithm._append('data');
* bufferedBlockAlgorithm._append(wordArray);
*/
_append: function(data) {
if (typeof data == "string") {
data = Utf8.parse(data);
}
this._data.concat(data);
this._nDataBytes += data.sigBytes;
},
/**
* Processes available data blocks.
*
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
*
* @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
*
* @return {WordArray} The processed data.
*
* @example
*
* var processedData = bufferedBlockAlgorithm._process();
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
*/
_process: function(doFlush) {
var data = this._data;
var dataWords = data.words;
var dataSigBytes = data.sigBytes;
var blockSize = this.blockSize;
var blockSizeBytes = blockSize * 4;
var nBlocksReady = dataSigBytes / blockSizeBytes;
if (doFlush) {
nBlocksReady = Math2.ceil(nBlocksReady);
} else {
nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
}
var nWordsReady = nBlocksReady * blockSize;
var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
if (nWordsReady) {
for (var offset = 0; offset < nWordsReady; offset += blockSize) {
this._doProcessBlock(dataWords, offset);
}
var processedWords = dataWords.splice(0, nWordsReady);
data.sigBytes -= nBytesReady;
}
return new WordArray.init(processedWords, nBytesReady);
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = bufferedBlockAlgorithm.clone();
*/
clone: function() {
var clone = Base.clone.call(this);
clone._data = this._data.clone();
return clone;
},
_minBufferSize: 0
});
C_lib.Hasher = BufferedBlockAlgorithm.extend({
/**
* Configuration options.
*/
cfg: Base.extend(),
/**
* Initializes a newly created hasher.
*
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
*
* @example
*
* var hasher = CryptoJS.algo.SHA256.create();
*/
init: function(cfg) {
this.cfg = this.cfg.extend(cfg);
this.reset();
},
/**
* Resets this hasher to its initial state.
*
* @example
*
* hasher.reset();
*/
reset: function() {
BufferedBlockAlgorithm.reset.call(this);
this._doReset();
},
/**
* Updates this hasher with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {Hasher} This hasher.
*
* @example
*
* hasher.update('message');
* hasher.update(wordArray);
*/
update: function(messageUpdate) {
this._append(messageUpdate);
this._process();
return this;
},
/**
* Finalizes the hash computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The hash.
*
* @example
*
* var hash = hasher.finalize();
* var hash = hasher.finalize('message');
* var hash = hasher.finalize(wordArray);
*/
finalize: function(messageUpdate) {
if (messageUpdate) {
this._append(messageUpdate);
}
var hash = this._doFinalize();
return hash;
},
blockSize: 512 / 32,
/**
* Creates a shortcut function to a hasher's object interface.
*
* @param {Hasher} hasher The hasher to create a helper for.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
*/
_createHelper: function(hasher) {
return function(message, cfg) {
return new hasher.init(cfg).finalize(message);
};
},
/**
* Creates a shortcut function to the HMAC's object interface.
*
* @param {Hasher} hasher The hasher to use in this HMAC helper.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
*/
_createHmacHelper: function(hasher) {
return function(message, key) {
return new C_algo.HMAC.init(hasher, key).finalize(message);
};
}
});
var C_algo = C.algo = {};
return C;
}(Math);
return CryptoJS2;
});
})(core);
return core.exports;
}
var x64Core = { exports: {} };
var hasRequiredX64Core;
function requireX64Core() {
if (hasRequiredX64Core)
return x64Core.exports;
hasRequiredX64Core = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function(undefined$1) {
var C = CryptoJS2;
var C_lib = C.lib;
var Base = C_lib.Base;
var X32WordArray = C_lib.WordArray;
var C_x64 = C.x64 = {};
C_x64.Word = Base.extend({
/**
* Initializes a newly created 64-bit word.
*
* @param {number} high The high 32 bits.
* @param {number} low The low 32 bits.
*
* @example
*
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
*/
init: function(high, low) {
this.high = high;
this.low = low;
}
/**
* Bitwise NOTs this word.
*
* @return {X64Word} A new x64-Word object after negating.
*
* @example
*
* var negated = x64Word.not();
*/
// not: function () {
// var high = ~this.high;
// var low = ~this.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ANDs this word with the passed word.
*
* @param {X64Word} word The x64-Word to AND with this word.
*
* @return {X64Word} A new x64-Word object after ANDing.
*
* @example
*
* var anded = x64Word.and(anotherX64Word);
*/
// and: function (word) {
// var high = this.high & word.high;
// var low = this.low & word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to OR with this word.
*
* @return {X64Word} A new x64-Word object after ORing.
*
* @example
*
* var ored = x64Word.or(anotherX64Word);
*/
// or: function (word) {
// var high = this.high | word.high;
// var low = this.low | word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise XORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to XOR with this word.
*
* @return {X64Word} A new x64-Word object after XORing.
*
* @example
*
* var xored = x64Word.xor(anotherX64Word);
*/
// xor: function (word) {
// var high = this.high ^ word.high;
// var low = this.low ^ word.low;
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the left.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftL(25);
*/
// shiftL: function (n) {
// if (n < 32) {
// var high = (this.high << n) | (this.low >>> (32 - n));
// var low = this.low << n;
// } else {
// var high = this.low << (n - 32);
// var low = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the right.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftR(7);
*/
// shiftR: function (n) {
// if (n < 32) {
// var low = (this.low >>> n) | (this.high << (32 - n));
// var high = this.high >>> n;
// } else {
// var low = this.high >>> (n - 32);
// var high = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Rotates this word n bits to the left.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotL(25);
*/
// rotL: function (n) {
// return this.shiftL(n).or(this.shiftR(64 - n));
// },
/**
* Rotates this word n bits to the right.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotR(7);
*/
// rotR: function (n) {
// return this.shiftR(n).or(this.shiftL(64 - n));
// },
/**
* Adds this word with the passed word.
*
* @param {X64Word} word The x64-Word to add with this word.
*
* @return {X64Word} A new x64-Word object after adding.
*
* @example
*
* var added = x64Word.add(anotherX64Word);
*/
// add: function (word) {
// var low = (this.low + word.low) | 0;
// var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
// var high = (this.high + word.high + carry) | 0;
// return X64Word.create(high, low);
// }
});
C_x64.WordArray = Base.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.x64.WordArray.create();
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ]);
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ], 10);
*/
init: function(words, sigBytes) {
words = this.words = words || [];
if (sigBytes != undefined$1) {
this.sigBytes = sigBytes;
} else {
this.sigBytes = words.length * 8;
}
},
/**
* Converts this 64-bit word array to a 32-bit word array.
*
* @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
*
* @example
*
* var x32WordArray = x64WordArray.toX32();
*/
toX32: function() {
var x64Words = this.words;
var x64WordsLength = x64Words.length;
var x32Words = [];
for (var i = 0; i < x64WordsLength; i++) {
var x64Word = x64Words[i];
x32Words.push(x64Word.high);
x32Words.push(x64Word.low);
}
return X32WordArray.create(x32Words, this.sigBytes);
},
/**
* Creates a copy of this word array.
*
* @return {X64WordArray} The clone.
*
* @example
*
* var clone = x64WordArray.clone();
*/
clone: function() {
var clone = Base.clone.call(this);
var words = clone.words = this.words.slice(0);
var wordsLength = words.length;
for (var i = 0; i < wordsLength; i++) {
words[i] = words[i].clone();
}
return clone;
}
});
})();
return CryptoJS2;
});
})(x64Core);
return x64Core.exports;
}
var libTypedarrays = { exports: {} };
var hasRequiredLibTypedarrays;
function requireLibTypedarrays() {
if (hasRequiredLibTypedarrays)
return libTypedarrays.exports;
hasRequiredLibTypedarrays = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
if (typeof ArrayBuffer != "function") {
return;
}
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var superInit = WordArray.init;
var subInit = WordArray.init = function(typedArray) {
if (typedArray instanceof ArrayBuffer) {
typedArray = new Uint8Array(typedArray);
}
if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {
typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
}
if (typedArray instanceof Uint8Array) {
var typedArrayByteLength = typedArray.byteLength;
var words = [];
for (var i = 0; i < typedArrayByteLength; i++) {
words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
}
superInit.call(this, words, typedArrayByteLength);
} else {
superInit.apply(this, arguments);
}
};
subInit.prototype = WordArray;
})();
return CryptoJS2.lib.WordArray;
});
})(libTypedarrays);
return libTypedarrays.exports;
}
var encUtf16 = { exports: {} };
var hasRequiredEncUtf16;
function requireEncUtf16() {
if (hasRequiredEncUtf16)
return encUtf16.exports;
hasRequiredEncUtf16 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_enc = C.enc;
C_enc.Utf16 = C_enc.Utf16BE = {
/**
* Converts a word array to a UTF-16 BE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 BE string.
*
* @static
*
* @example
*
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
*/
stringify: function(wordArray) {
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535;
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join("");
},
/**
* Converts a UTF-16 BE string to a word array.
*
* @param {string} utf16Str The UTF-16 BE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
*/
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
}
return WordArray.create(words, utf16StrLength * 2);
}
};
C_enc.Utf16LE = {
/**
* Converts a word array to a UTF-16 LE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 LE string.
*
* @static
*
* @example
*
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
*/
stringify: function(wordArray) {
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535);
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join("");
},
/**
* Converts a UTF-16 LE string to a word array.
*
* @param {string} utf16Str The UTF-16 LE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
*/
parse: function(utf16Str) {
var utf16StrLength = utf16Str.length;
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
}
return WordArray.create(words, utf16StrLength * 2);
}
};
function swapEndian(word) {
return word << 8 & 4278255360 | word >>> 8 & 16711935;
}
})();
return CryptoJS2.enc.Utf16;
});
})(encUtf16);
return encUtf16.exports;
}
var encBase64 = { exports: {} };
var hasRequiredEncBase64;
function requireEncBase64() {
if (hasRequiredEncBase64)
return encBase64.exports;
hasRequiredEncBase64 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_enc = C.enc;
C_enc.Base64 = {
/**
* Converts a word array to a Base64 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Base64 string.
*
* @static
*
* @example
*
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
*/
stringify: function(wordArray) {
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var map = this._map;
wordArray.clamp();
var base64Chars = [];
for (var i = 0; i < sigBytes; i += 3) {
var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
var triplet = byte1 << 16 | byte2 << 8 | byte3;
for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
}
}
var paddingChar = map.charAt(64);
if (paddingChar) {
while (base64Chars.length % 4) {
base64Chars.push(paddingChar);
}
}
return base64Chars.join("");
},
/**
* Converts a Base64 string to a word array.
*
* @param {string} base64Str The Base64 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
*/
parse: function(base64Str) {
var base64StrLength = base64Str.length;
var map = this._map;
var reverseMap = this._reverseMap;
if (!reverseMap) {
reverseMap = this._reverseMap = [];
for (var j = 0; j < map.length; j++) {
reverseMap[map.charCodeAt(j)] = j;
}
}
var paddingChar = map.charAt(64);
if (paddingChar) {
var paddingIndex = base64Str.indexOf(paddingChar);
if (paddingIndex !== -1) {
base64StrLength = paddingIndex;
}
}
return parseLoop(base64Str, base64StrLength, reverseMap);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
};
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
for (var i = 0; i < base64StrLength; i++) {
if (i % 4) {
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
words[nBytes >>> 2] |= (bits1 | bits2) << 24 - nBytes % 4 * 8;
nBytes++;
}
}
return WordArray.create(words, nBytes);
}
})();
return CryptoJS2.enc.Base64;
});
})(encBase64);
return encBase64.exports;
}
var md5 = { exports: {} };
var hasRequiredMd5;
function requireMd5() {
if (hasRequiredMd5)
return md5.exports;
hasRequiredMd5 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function(Math2) {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
var T = [];
(function() {
for (var i = 0; i < 64; i++) {
T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0;
}
})();
var MD5 = C_algo.MD5 = Hasher.extend({
_doReset: function() {
this._hash = new WordArray.init([
1732584193,
4023233417,
2562383102,
271733878
]);
},
_doProcessBlock: function(M, offset) {
for (var i = 0; i < 16; i++) {
var offset_i = offset + i;
var M_offset_i = M[offset_i];
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
}
var H = this._hash.words;
var M_offset_0 = M[offset + 0];
var M_offset_1 = M[offset + 1];
var M_offset_2 = M[offset + 2];
var M_offset_3 = M[offset + 3];
var M_offset_4 = M[offset + 4];
var M_offset_5 = M[offset + 5];
var M_offset_6 = M[offset + 6];
var M_offset_7 = M[offset + 7];
var M_offset_8 = M[offset + 8];
var M_offset_9 = M[offset + 9];
var M_offset_10 = M[offset + 10];
var M_offset_11 = M[offset + 11];
var M_offset_12 = M[offset + 12];
var M_offset_13 = M[offset + 13];
var M_offset_14 = M[offset + 14];
var M_offset_15 = M[offset + 15];
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
a = II(a, b, c, d, M_offset_0, 6, T[48]);
d = II(d, a, b, c, M_offset_7, 10, T[49]);
c = II(c, d, a, b, M_offset_14, 15, T[50]);
b = II(b, c, d, a, M_offset_5, 21, T[51]);
a = II(a, b, c, d, M_offset_12, 6, T[52]);
d = II(d, a, b, c, M_offset_3, 10, T[53]);
c = II(c, d, a, b, M_offset_10, 15, T[54]);
b = II(b, c, d, a, M_offset_1, 21, T[55]);
a = II(a, b, c, d, M_offset_8, 6, T[56]);
d = II(d, a, b, c, M_offset_15, 10, T[57]);
c = II(c, d, a, b, M_offset_6, 15, T[58]);
b = II(b, c, d, a, M_offset_13, 21, T[59]);
a = II(a, b, c, d, M_offset_4, 6, T[60]);
d = II(d, a, b, c, M_offset_11, 10, T[61]);
c = II(c, d, a, b, M_offset_2, 15, T[62]);
b = II(b, c, d, a, M_offset_9, 21, T[63]);
H[0] = H[0] + a | 0;
H[1] = H[1] + b | 0;
H[2] = H[2] + c | 0;
H[3] = H[3] + d | 0;
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
var nBitsTotalL = nBitsTotal;
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
data.sigBytes = (dataWords.length + 1) * 4;
this._process();
var hash = this._hash;
var H = hash.words;
for (var i = 0; i < 4; i++) {
var H_i = H[i];
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
}
return hash;
},
clone: function() {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function FF(a, b, c, d, x, s, t) {
var n = a + (b & c | ~b & d) + x + t;
return (n << s | n >>> 32 - s) + b;
}
function GG(a, b, c, d, x, s, t) {
var n = a + (b & d | c & ~d) + x + t;
return (n << s | n >>> 32 - s) + b;
}
function HH(a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + x + t;
return (n << s | n >>> 32 - s) + b;
}
function II(a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + x + t;
return (n << s | n >>> 32 - s) + b;
}
C.MD5 = Hasher._createHelper(MD5);
C.HmacMD5 = Hasher._createHmacHelper(MD5);
})(Math);
return CryptoJS2.MD5;
});
})(md5);
return md5.exports;
}
var sha1 = { exports: {} };
var hasRequiredSha1;
function requireSha1() {
if (hasRequiredSha1)
return sha1.exports;
hasRequiredSha1 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
var W = [];
var SHA1 = C_algo.SHA1 = Hasher.extend({
_doReset: function() {
this._hash = new WordArray.init([
1732584193,
4023233417,
2562383102,
271733878,
3285377520
]);
},
_doProcessBlock: function(M, offset) {
var H = this._hash.words;
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
for (var i = 0; i < 80; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
W[i] = n << 1 | n >>> 31;
}
var t = (a << 5 | a >>> 27) + e + W[i];
if (i < 20) {
t += (b & c | ~b & d) + 1518500249;
} else if (i < 40) {
t += (b ^ c ^ d) + 1859775393;
} else if (i < 60) {
t += (b & c | b & d | c & d) - 1894007588;
} else {
t += (b ^ c ^ d) - 899497514;
}
e = d;
d = c;
c = b << 30 | b >>> 2;
b = a;
a = t;
}
H[0] = H[0] + a | 0;
H[1] = H[1] + b | 0;
H[2] = H[2] + c | 0;
H[3] = H[3] + d | 0;
H[4] = H[4] + e | 0;
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296);
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
this._process();
return this._hash;
},
clone: function() {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
C.SHA1 = Hasher._createHelper(SHA1);
C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
})();
return CryptoJS2.SHA1;
});
})(sha1);
return sha1.exports;
}
var sha256 = { exports: {} };
var hasRequiredSha256;
function requireSha256() {
if (hasRequiredSha256)
return sha256.exports;
hasRequiredSha256 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function(Math2) {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
var H = [];
var K = [];
(function() {
function isPrime(n2) {
var sqrtN = Math2.sqrt(n2);
for (var factor = 2; factor <= sqrtN; factor++) {
if (!(n2 % factor)) {
return false;
}
}
return true;
}
function getFractionalBits(n2) {
return (n2 - (n2 | 0)) * 4294967296 | 0;
}
var n = 2;
var nPrime = 0;
while (nPrime < 64) {
if (isPrime(n)) {
if (nPrime < 8) {
H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
}
K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
nPrime++;
}
n++;
}
})();
var W = [];
var SHA256 = C_algo.SHA256 = Hasher.extend({
_doReset: function() {
this._hash = new WordArray.init(H.slice(0));
},
_doProcessBlock: function(M, offset) {
var H2 = this._hash.words;
var a = H2[0];
var b = H2[1];
var c = H2[2];
var d = H2[3];
var e = H2[4];
var f = H2[5];
var g = H2[6];
var h = H2[7];
for (var i = 0; i < 64; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var gamma0x = W[i - 15];
var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
var gamma1x = W[i - 2];
var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
}
var ch = e & f ^ ~e & g;
var maj = a & b ^ a & c ^ b & c;
var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
var t1 = h + sigma1 + ch + K[i] + W[i];
var t2 = sigma0 + maj;
h = g;
g = f;
f = e;
e = d + t1 | 0;
d = c;
c = b;
b = a;
a = t1 + t2 | 0;
}
H2[0] = H2[0] + a | 0;
H2[1] = H2[1] + b | 0;
H2[2] = H2[2] + c | 0;
H2[3] = H2[3] + d | 0;
H2[4] = H2[4] + e | 0;
H2[5] = H2[5] + f | 0;
H2[6] = H2[6] + g | 0;
H2[7] = H2[7] + h | 0;
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
this._process();
return this._hash;
},
clone: function() {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
C.SHA256 = Hasher._createHelper(SHA256);
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
})(Math);
return CryptoJS2.SHA256;
});
})(sha256);
return sha256.exports;
}
var sha224 = { exports: {} };
var hasRequiredSha224;
function requireSha224() {
if (hasRequiredSha224)
return sha224.exports;
hasRequiredSha224 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireSha256());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var SHA256 = C_algo.SHA256;
var SHA224 = C_algo.SHA224 = SHA256.extend({
_doReset: function() {
this._hash = new WordArray.init([
3238371032,
914150663,
812702999,
4144912697,
4290775857,
1750603025,
1694076839,
3204075428
]);
},
_doFinalize: function() {
var hash = SHA256._doFinalize.call(this);
hash.sigBytes -= 4;
return hash;
}
});
C.SHA224 = SHA256._createHelper(SHA224);
C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
})();
return CryptoJS2.SHA224;
});
})(sha224);
return sha224.exports;
}
var sha512 = { exports: {} };
var hasRequiredSha512;
function requireSha512() {
if (hasRequiredSha512)
return sha512.exports;
hasRequiredSha512 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireX64Core());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var Hasher = C_lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
var C_algo = C.algo;
function X64Word_create() {
return X64Word.create.apply(X64Word, arguments);
}
var K = [
X64Word_create(1116352408, 3609767458),
X64Word_create(1899447441, 602891725),
X64Word_create(3049323471, 3964484399),
X64Word_create(3921009573, 2173295548),
X64Word_create(961987163, 4081628472),
X64Word_create(1508970993, 3053834265),
X64Word_create(2453635748, 2937671579),
X64Word_create(2870763221, 3664609560),
X64Word_create(3624381080, 2734883394),
X64Word_create(310598401, 1164996542),
X64Word_create(607225278, 1323610764),
X64Word_create(1426881987, 3590304994),
X64Word_create(1925078388, 4068182383),
X64Word_create(2162078206, 991336113),
X64Word_create(2614888103, 633803317),
X64Word_create(3248222580, 3479774868),
X64Word_create(3835390401, 2666613458),
X64Word_create(4022224774, 944711139),
X64Word_create(264347078, 2341262773),
X64Word_create(604807628, 2007800933),
X64Word_create(770255983, 1495990901),
X64Word_create(1249150122, 1856431235),
X64Word_create(1555081692, 3175218132),
X64Word_create(1996064986, 2198950837),
X64Word_create(2554220882, 3999719339),
X64Word_create(2821834349, 766784016),
X64Word_create(2952996808, 2566594879),
X64Word_create(3210313671, 3203337956),
X64Word_create(3336571891, 1034457026),
X64Word_create(3584528711, 2466948901),
X64Word_create(113926993, 3758326383),
X64Word_create(338241895, 168717936),
X64Word_create(666307205, 1188179964),
X64Word_create(773529912, 1546045734),
X64Word_create(1294757372, 1522805485),
X64Word_create(1396182291, 2643833823),
X64Word_create(1695183700, 2343527390),
X64Word_create(1986661051, 1014477480),
X64Word_create(2177026350, 1206759142),
X64Word_create(2456956037, 344077627),
X64Word_create(2730485921, 1290863460),
X64Word_create(2820302411, 3158454273),
X64Word_create(3259730800, 3505952657),
X64Word_create(3345764771, 106217008),
X64Word_create(3516065817, 3606008344),
X64Word_create(3600352804, 1432725776),
X64Word_create(4094571909, 1467031594),
X64Word_create(275423344, 851169720),
X64Word_create(430227734, 3100823752),
X64Word_create(506948616, 1363258195),
X64Word_create(659060556, 3750685593),
X64Word_create(883997877, 3785050280),
X64Word_create(958139571, 3318307427),
X64Word_create(1322822218, 3812723403),
X64Word_create(1537002063, 2003034995),
X64Word_create(1747873779, 3602036899),
X64Word_create(1955562222, 1575990012),
X64Word_create(2024104815, 1125592928),
X64Word_create(2227730452, 2716904306),
X64Word_create(2361852424, 442776044),
X64Word_create(2428436474, 593698344),
X64Word_create(2756734187, 3733110249),
X64Word_create(3204031479, 2999351573),
X64Word_create(3329325298, 3815920427),
X64Word_create(3391569614, 3928383900),
X64Word_create(3515267271, 566280711),
X64Word_create(3940187606, 3454069534),
X64Word_create(4118630271, 4000239992),
X64Word_create(116418474, 1914138554),
X64Word_create(174292421, 2731055270),
X64Word_create(289380356, 3203993006),
X64Word_create(460393269, 320620315),
X64Word_create(685471733, 587496836),
X64Word_create(852142971, 1086792851),
X64Word_create(1017036298, 365543100),
X64Word_create(1126000580, 2618297676),
X64Word_create(1288033470, 3409855158),
X64Word_create(1501505948, 4234509866),
X64Word_create(1607167915, 987167468),
X64Word_create(1816402316, 1246189591)
];
var W = [];
(function() {
for (var i = 0; i < 80; i++) {
W[i] = X64Word_create();
}
})();
var SHA512 = C_algo.SHA512 = Hasher.extend({
_doReset: function() {
this._hash = new X64WordArray.init([
new X64Word.init(1779033703, 4089235720),
new X64Word.init(3144134277, 2227873595),
new X64Word.init(1013904242, 4271175723),
new X64Word.init(2773480762, 1595750129),
new X64Word.init(1359893119, 2917565137),
new X64Word.init(2600822924, 725511199),
new X64Word.init(528734635, 4215389547),
new X64Word.init(1541459225, 327033209)
]);
},
_doProcessBlock: function(M, offset) {
var H = this._hash.words;
var H0 = H[0];
var H1 = H[1];
var H2 = H[2];
var H3 = H[3];
var H4 = H[4];
var H5 = H[5];
var H6 = H[6];
var H7 = H[7];
var H0h = H0.high;
var H0l = H0.low;
var H1h = H1.high;
var H1l = H1.low;
var H2h = H2.high;
var H2l = H2.low;
var H3h = H3.high;
var H3l = H3.low;
var H4h = H4.high;
var H4l = H4.low;
var H5h = H5.high;
var H5l = H5.low;
var H6h = H6.high;
var H6l = H6.low;
var H7h = H7.high;
var H7l = H7.low;
var ah = H0h;
var al = H0l;
var bh = H1h;
var bl = H1l;
var ch = H2h;
var cl = H2l;
var dh = H3h;
var dl = H3l;
var eh = H4h;
var el = H4l;
var fh = H5h;
var fl = H5l;
var gh = H6h;
var gl = H6l;
var hh = H7h;
var hl = H7l;
for (var i = 0; i < 80; i++) {
var Wi = W[i];
if (i < 16) {
var Wih = Wi.high = M[offset + i * 2] | 0;
var Wil = Wi.low = M[offset + i * 2 + 1] | 0;
} else {
var gamma0x = W[i - 15];
var gamma0xh = gamma0x.high;
var gamma0xl = gamma0x.low;
var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);
var gamma1x = W[i - 2];
var gamma1xh = gamma1x.high;
var gamma1xl = gamma1x.low;
var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);
var Wi7 = W[i - 7];
var Wi7h = Wi7.high;
var Wi7l = Wi7.low;
var Wi16 = W[i - 16];
var Wi16h = Wi16.high;
var Wi16l = Wi16.low;
var Wil = gamma0l + Wi7l;
var Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
var Wil = Wil + gamma1l;
var Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
var Wil = Wil + Wi16l;
var Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
Wi.high = Wih;
Wi.low = Wil;
}
var chh = eh & fh ^ ~eh & gh;
var chl = el & fl ^ ~el & gl;
var majh = ah & bh ^ ah & ch ^ bh & ch;
var majl = al & bl ^ al & cl ^ bl & cl;
var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);
var Ki = K[i];
var Kih = Ki.high;
var Kil = Ki.low;
var t1l = hl + sigma1l;
var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
var t1l = t1l + chl;
var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
var t1l = t1l + Kil;
var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
var t1l = t1l + Wil;
var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);
var t2l = sigma0l + majl;
var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);
hh = gh;
hl = gl;
gh = fh;
gl = fl;
fh = eh;
fl = el;
el = dl + t1l | 0;
eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
dh = ch;
dl = cl;
ch = bh;
cl = bl;
bh = ah;
bl = al;
al = t1l + t2l | 0;
ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
}
H0l = H0.low = H0l + al;
H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
H1l = H1.low = H1l + bl;
H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
H2l = H2.low = H2l + cl;
H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
H3l = H3.low = H3l + dl;
H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
H4l = H4.low = H4l + el;
H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
H5l = H5.low = H5l + fl;
H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
H6l = H6.low = H6l + gl;
H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
H7l = H7.low = H7l + hl;
H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296);
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
this._process();
var hash = this._hash.toX32();
return hash;
},
clone: function() {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
},
blockSize: 1024 / 32
});
C.SHA512 = Hasher._createHelper(SHA512);
C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
})();
return CryptoJS2.SHA512;
});
})(sha512);
return sha512.exports;
}
var sha384 = { exports: {} };
var hasRequiredSha384;
function requireSha384() {
if (hasRequiredSha384)
return sha384.exports;
hasRequiredSha384 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireX64Core(), requireSha512());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
var C_algo = C.algo;
var SHA512 = C_algo.SHA512;
var SHA384 = C_algo.SHA384 = SHA512.extend({
_doReset: function() {
this._hash = new X64WordArray.init([
new X64Word.init(3418070365, 3238371032),
new X64Word.init(1654270250, 914150663),
new X64Word.init(2438529370, 812702999),
new X64Word.init(355462360, 4144912697),
new X64Word.init(1731405415, 4290775857),
new X64Word.init(2394180231, 1750603025),
new X64Word.init(3675008525, 1694076839),
new X64Word.init(1203062813, 3204075428)
]);
},
_doFinalize: function() {
var hash = SHA512._doFinalize.call(this);
hash.sigBytes -= 16;
return hash;
}
});
C.SHA384 = SHA512._createHelper(SHA384);
C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
})();
return CryptoJS2.SHA384;
});
})(sha384);
return sha384.exports;
}
var sha3 = { exports: {} };
var hasRequiredSha3;
function requireSha3() {
if (hasRequiredSha3)
return sha3.exports;
hasRequiredSha3 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireX64Core());
}
})(commonjsGlobal, function(CryptoJS2) {
(function(Math2) {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var C_algo = C.algo;
var RHO_OFFSETS = [];
var PI_INDEXES = [];
var ROUND_CONSTANTS = [];
(function() {
var x = 1, y = 0;
for (var t = 0; t < 24; t++) {
RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
var newX = y % 5;
var newY = (2 * x + 3 * y) % 5;
x = newX;
y = newY;
}
for (var x = 0; x < 5; x++) {
for (var y = 0; y < 5; y++) {
PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
}
}
var LFSR = 1;
for (var i = 0; i < 24; i++) {
var roundConstantMsw = 0;
var roundConstantLsw = 0;
for (var j = 0; j < 7; j++) {
if (LFSR & 1) {
var bitPosition = (1 << j) - 1;
if (bitPosition < 32) {
roundConstantLsw ^= 1 << bitPosition;
} else {
roundConstantMsw ^= 1 << bitPosition - 32;
}
}
if (LFSR & 128) {
LFSR = LFSR << 1 ^ 113;
} else {
LFSR <<= 1;
}
}
ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
}
})();
var T = [];
(function() {
for (var i = 0; i < 25; i++) {
T[i] = X64Word.create();
}
})();
var SHA3 = C_algo.SHA3 = Hasher.extend({
/**
* Configuration options.
*
* @property {number} outputLength
* The desired number of bits in the output hash.
* Only values permitted are: 224, 256, 384, 512.
* Default: 512
*/
cfg: Hasher.cfg.extend({
outputLength: 512
}),
_doReset: function() {
var state = this._state = [];
for (var i = 0; i < 25; i++) {
state[i] = new X64Word.init();
}
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
},
_doProcessBlock: function(M, offset) {
var state = this._state;
var nBlockSizeLanes = this.blockSize / 2;
for (var i = 0; i < nBlockSizeLanes; i++) {
var M2i = M[offset + 2 * i];
var M2i1 = M[offset + 2 * i + 1];
M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360;
M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360;
var lane = state[i];
lane.high ^= M2i1;
lane.low ^= M2i;
}
for (var round2 = 0; round2 < 24; round2++) {
for (var x = 0; x < 5; x++) {
var tMsw = 0, tLsw = 0;
for (var y = 0; y < 5; y++) {
var lane = state[x + 5 * y];
tMsw ^= lane.high;
tLsw ^= lane.low;
}
var Tx = T[x];
Tx.high = tMsw;
Tx.low = tLsw;
}
for (var x = 0; x < 5; x++) {
var Tx4 = T[(x + 4) % 5];
var Tx1 = T[(x + 1) % 5];
var Tx1Msw = Tx1.high;
var Tx1Lsw = Tx1.low;
var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
for (var y = 0; y < 5; y++) {
var lane = state[x + 5 * y];
lane.high ^= tMsw;
lane.low ^= tLsw;
}
}
for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
var lane = state[laneIndex];
var laneMsw = lane.high;
var laneLsw = lane.low;
var rhoOffset = RHO_OFFSETS[laneIndex];
if (rhoOffset < 32) {
var tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
var tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
} else {
var tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
var tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
}
var TPiLane = T[PI_INDEXES[laneIndex]];
TPiLane.high = tMsw;
TPiLane.low = tLsw;
}
var T0 = T[0];
var state0 = state[0];
T0.high = state0.high;
T0.low = state0.low;
for (var x = 0; x < 5; x++) {
for (var y = 0; y < 5; y++) {
var laneIndex = x + 5 * y;
var lane = state[laneIndex];
var TLane = T[laneIndex];
var Tx1Lane = T[(x + 1) % 5 + 5 * y];
var Tx2Lane = T[(x + 2) % 5 + 5 * y];
lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
}
}
var lane = state[0];
var roundConstant = ROUND_CONSTANTS[round2];
lane.high ^= roundConstant.high;
lane.low ^= roundConstant.low;
}
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
var blockSizeBits = this.blockSize * 32;
dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32;
dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128;
data.sigBytes = dataWords.length * 4;
this._process();
var state = this._state;
var outputLengthBytes = this.cfg.outputLength / 8;
var outputLengthLanes = outputLengthBytes / 8;
var hashWords = [];
for (var i = 0; i < outputLengthLanes; i++) {
var lane = state[i];
var laneMsw = lane.high;
var laneLsw = lane.low;
laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360;
laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360;
hashWords.push(laneLsw);
hashWords.push(laneMsw);
}
return new WordArray.init(hashWords, outputLengthBytes);
},
clone: function() {
var clone = Hasher.clone.call(this);
var state = clone._state = this._state.slice(0);
for (var i = 0; i < 25; i++) {
state[i] = state[i].clone();
}
return clone;
}
});
C.SHA3 = Hasher._createHelper(SHA3);
C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
})(Math);
return CryptoJS2.SHA3;
});
})(sha3);
return sha3.exports;
}
var ripemd160 = { exports: {} };
var hasRequiredRipemd160;
function requireRipemd160() {
if (hasRequiredRipemd160)
return ripemd160.exports;
hasRequiredRipemd160 = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
(function(Math2) {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
var _zl = WordArray.create([
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
7,
4,
13,
1,
10,
6,
15,
3,
12,
0,
9,
5,
2,
14,
11,
8,
3,
10,
14,
4,
9,
15,
8,
1,
2,
7,
0,
6,
13,
11,
5,
12,
1,
9,
11,
10,
0,
8,
12,
4,
13,
3,
7,
15,
14,
5,
6,
2,
4,
0,
5,
9,
7,
12,
2,
10,
14,
1,
3,
8,
11,
6,
15,
13
]);
var _zr = WordArray.create([
5,
14,
7,
0,
9,
2,
11,
4,
13,
6,
15,
8,
1,
10,
3,
12,
6,
11,
3,
7,
0,
13,
5,
10,
14,
15,
8,
12,
4,
9,
1,
2,
15,
5,
1,
3,
7,
14,
6,
9,
11,
8,
12,
2,
10,
0,
4,
13,
8,
6,
4,
1,
3,
11,
15,
0,
5,
12,
2,
13,
9,
7,
10,
14,
12,
15,
10,
4,
1,
5,
8,
7,
6,
2,
13,
14,
0,
3,
9,
11
]);
var _sl = WordArray.create([
11,
14,
15,
12,
5,
8,
7,
9,
11,
13,
14,
15,
6,
7,
9,
8,
7,
6,
8,
13,
11,
9,
7,
15,
7,
12,
15,
9,
11,
7,
13,
12,
11,
13,
6,
7,
14,
9,
13,
15,
14,
8,
13,
6,
5,
12,
7,
5,
11,
12,
14,
15,
14,
15,
9,
8,
9,
14,
5,
6,
8,
6,
5,
12,
9,
15,
5,
11,
6,
8,
13,
12,
5,
12,
13,
14,
11,
8,
5,
6
]);
var _sr = WordArray.create([
8,
9,
9,
11,
13,
15,
15,
5,
7,
7,
8,
11,
14,
14,
12,
6,
9,
13,
15,
7,
12,
8,
9,
11,
7,
7,
12,
7,
6,
15,
13,
11,
9,
7,
15,
11,
8,
6,
6,
14,
12,
13,
5,
14,
13,
13,
7,
5,
15,
5,
8,
11,
14,
14,
6,
14,
6,
9,
12,
9,
12,
5,
15,
8,
8,
5,
12,
9,
12,
5,
14,
6,
8,
13,
6,
5,
15,
13,
11,
11
]);
var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]);
var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]);
var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
_doReset: function() {
this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
},
_doProcessBlock: function(M, offset) {
for (var i = 0; i < 16; i++) {
var offset_i = offset + i;
var M_offset_i = M[offset_i];
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
}
var H = this._hash.words;
var hl = _hl.words;
var hr = _hr.words;
var zl = _zl.words;
var zr = _zr.words;
var sl = _sl.words;
var sr = _sr.words;
var al, bl, cl, dl, el;
var ar, br, cr, dr, er;
ar = al = H[0];
br = bl = H[1];
cr = cl = H[2];
dr = dl = H[3];
er = el = H[4];
var t;
for (var i = 0; i < 80; i += 1) {
t = al + M[offset + zl[i]] | 0;
if (i < 16) {
t += f1(bl, cl, dl) + hl[0];
} else if (i < 32) {
t += f2(bl, cl, dl) + hl[1];
} else if (i < 48) {
t += f3(bl, cl, dl) + hl[2];
} else if (i < 64) {
t += f4(bl, cl, dl) + hl[3];
} else {
t += f5(bl, cl, dl) + hl[4];
}
t = t | 0;
t = rotl(t, sl[i]);
t = t + el | 0;
al = el;
el = dl;
dl = rotl(cl, 10);
cl = bl;
bl = t;
t = ar + M[offset + zr[i]] | 0;
if (i < 16) {
t += f5(br, cr, dr) + hr[0];
} else if (i < 32) {
t += f4(br, cr, dr) + hr[1];
} else if (i < 48) {
t += f3(br, cr, dr) + hr[2];
} else if (i < 64) {
t += f2(br, cr, dr) + hr[3];
} else {
t += f1(br, cr, dr) + hr[4];
}
t = t | 0;
t = rotl(t, sr[i]);
t = t + er | 0;
ar = er;
er = dr;
dr = rotl(cr, 10);
cr = br;
br = t;
}
t = H[1] + cl + dr | 0;
H[1] = H[2] + dl + er | 0;
H[2] = H[3] + el + ar | 0;
H[3] = H[4] + al + br | 0;
H[4] = H[0] + bl + cr | 0;
H[0] = t;
},
_doFinalize: function() {
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360;
data.sigBytes = (dataWords.length + 1) * 4;
this._process();
var hash = this._hash;
var H = hash.words;
for (var i = 0; i < 5; i++) {
var H_i = H[i];
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
}
return hash;
},
clone: function() {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function f1(x, y, z) {
return x ^ y ^ z;
}
function f2(x, y, z) {
return x & y | ~x & z;
}
function f3(x, y, z) {
return (x | ~y) ^ z;
}
function f4(x, y, z) {
return x & z | y & ~z;
}
function f5(x, y, z) {
return x ^ (y | ~z);
}
function rotl(x, n) {
return x << n | x >>> 32 - n;
}
C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
})();
return CryptoJS2.RIPEMD160;
});
})(ripemd160);
return ripemd160.exports;
}
var hmac = { exports: {} };
var hasRequiredHmac;
function requireHmac() {
if (hasRequiredHmac)
return hmac.exports;
hasRequiredHmac = 1;
(function(module, exports) {
(function(root, factory) {
{
module.exports = factory(requireCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var Base = C_lib.Base;
var C_enc = C.enc;
var Utf8 = C_enc.Utf8;
var C_algo = C.algo;
C_algo.HMAC = Base.extend({
/**
* Initializes a newly created HMAC.
*
* @param {Hasher} hasher The hash algorithm to use.
* @param {WordArray|string} key The secret key.
*
* @example
*
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
*/
init: function(hasher, key) {
hasher = this._hasher = new hasher.init();
if (typeof key == "string") {
key = Utf8.parse(key);
}
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
if (key.sigBytes > hasherBlockSizeBytes) {
key = hasher.finalize(key);
}
key.clamp();
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
var oKeyWords = oKey.words;
var iKeyWords = iKey.words;
for (var i = 0; i < hasherBlockSize; i++) {
oKeyWords[i] ^= 1549556828;
iKeyWords[i] ^= 909522486;
}
oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
this.reset();
},
/**
* Resets this HMAC to its initial state.
*
* @example
*
* hmacHasher.reset();
*/
reset: function() {
var hasher = this._hasher;
hasher.reset();
hasher.update(this._iKey);
},
/**
* Updates this HMAC with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {HMAC} This HMAC instance.
*
* @example
*
* hmacHasher.update('message');
* hmacHasher.update(wordArray);
*/
update: function(messageUpdate) {
this._hasher.update(messageUpdate);
return this;
},
/**
* Finalizes the HMAC computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The HMAC.
*
* @example
*
* var hmac = hmacHasher.finalize();
* var hmac = hmacHasher.finalize('message');
* var hmac = hmacHasher.finalize(wordArray);
*/
finalize: function(messageUpdate) {
var hasher = this._hasher;
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
var hmac2 = hasher.finalize(this._oKey.clone().concat(innerHash));
return hmac2;
}
});
})();
});
})(hmac);
return hmac.exports;
}
var pbkdf2 = { exports: {} };
var hasRequiredPbkdf2;
function requirePbkdf2() {
if (hasRequiredPbkdf2)
return pbkdf2.exports;
hasRequiredPbkdf2 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireSha1(), requireHmac());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var SHA1 = C_algo.SHA1;
var HMAC = C_algo.HMAC;
var PBKDF2 = C_algo.PBKDF2 = Base.extend({
/**
* Configuration options.
*
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
* @property {Hasher} hasher The hasher to use. Default: SHA1
* @property {number} iterations The number of iterations to perform. Default: 1
*/
cfg: Base.extend({
keySize: 128 / 32,
hasher: SHA1,
iterations: 1
}),
/**
* Initializes a newly created key derivation function.
*
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
*
* @example
*
* var kdf = CryptoJS.algo.PBKDF2.create();
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
*/
init: function(cfg) {
this.cfg = this.cfg.extend(cfg);
},
/**
* Computes the Password-Based Key Derivation Function 2.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
*
* @return {WordArray} The derived key.
*
* @example
*
* var key = kdf.compute(password, salt);
*/
compute: function(password, salt) {
var cfg = this.cfg;
var hmac2 = HMAC.create(cfg.hasher, password);
var derivedKey = WordArray.create();
var blockIndex = WordArray.create([1]);
var derivedKeyWords = derivedKey.words;
var blockIndexWords = blockIndex.words;
var keySize = cfg.keySize;
var iterations = cfg.iterations;
while (derivedKeyWords.length < keySize) {
var block = hmac2.update(salt).finalize(blockIndex);
hmac2.reset();
var blockWords = block.words;
var blockWordsLength = blockWords.length;
var intermediate = block;
for (var i = 1; i < iterations; i++) {
intermediate = hmac2.finalize(intermediate);
hmac2.reset();
var intermediateWords = intermediate.words;
for (var j = 0; j < blockWordsLength; j++) {
blockWords[j] ^= intermediateWords[j];
}
}
derivedKey.concat(block);
blockIndexWords[0]++;
}
derivedKey.sigBytes = keySize * 4;
return derivedKey;
}
});
C.PBKDF2 = function(password, salt, cfg) {
return PBKDF2.create(cfg).compute(password, salt);
};
})();
return CryptoJS2.PBKDF2;
});
})(pbkdf2);
return pbkdf2.exports;
}
var evpkdf = { exports: {} };
var hasRequiredEvpkdf;
function requireEvpkdf() {
if (hasRequiredEvpkdf)
return evpkdf.exports;
hasRequiredEvpkdf = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireSha1(), requireHmac());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var MD5 = C_algo.MD5;
var EvpKDF = C_algo.EvpKDF = Base.extend({
/**
* Configuration options.
*
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
* @property {number} iterations The number of iterations to perform. Default: 1
*/
cfg: Base.extend({
keySize: 128 / 32,
hasher: MD5,
iterations: 1
}),
/**
* Initializes a newly created key derivation function.
*
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
*
* @example
*
* var kdf = CryptoJS.algo.EvpKDF.create();
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
*/
init: function(cfg) {
this.cfg = this.cfg.extend(cfg);
},
/**
* Derives a key from a password.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
*
* @return {WordArray} The derived key.
*
* @example
*
* var key = kdf.compute(password, salt);
*/
compute: function(password, salt) {
var cfg = this.cfg;
var hasher = cfg.hasher.create();
var derivedKey = WordArray.create();
var derivedKeyWords = derivedKey.words;
var keySize = cfg.keySize;
var iterations = cfg.iterations;
while (derivedKeyWords.length < keySize) {
if (block) {
hasher.update(block);
}
var block = hasher.update(password).finalize(salt);
hasher.reset();
for (var i = 1; i < iterations; i++) {
block = hasher.finalize(block);
hasher.reset();
}
derivedKey.concat(block);
}
derivedKey.sigBytes = keySize * 4;
return derivedKey;
}
});
C.EvpKDF = function(password, salt, cfg) {
return EvpKDF.create(cfg).compute(password, salt);
};
})();
return CryptoJS2.EvpKDF;
});
})(evpkdf);
return evpkdf.exports;
}
var cipherCore = { exports: {} };
var hasRequiredCipherCore;
function requireCipherCore() {
if (hasRequiredCipherCore)
return cipherCore.exports;
hasRequiredCipherCore = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEvpkdf());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.lib.Cipher || function(undefined$1) {
var C = CryptoJS2;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
var C_enc = C.enc;
C_enc.Utf8;
var Base64 = C_enc.Base64;
var C_algo = C.algo;
var EvpKDF = C_algo.EvpKDF;
var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
/**
* Configuration options.
*
* @property {WordArray} iv The IV to use for this operation.
*/
cfg: Base.extend(),
/**
* Creates this cipher in encryption mode.
*
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {Cipher} A cipher instance.
*
* @static
*
* @example
*
* var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
*/
createEncryptor: function(key, cfg) {
return this.create(this._ENC_XFORM_MODE, key, cfg);
},
/**
* Creates this cipher in decryption mode.
*
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {Cipher} A cipher instance.
*
* @static
*
* @example
*
* var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
*/
createDecryptor: function(key, cfg) {
return this.create(this._DEC_XFORM_MODE, key, cfg);
},
/**
* Initializes a newly created cipher.
*
* @param {number} xformMode Either the encryption or decryption transormation mode constant.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @example
*
* var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
*/
init: function(xformMode, key, cfg) {
this.cfg = this.cfg.extend(cfg);
this._xformMode = xformMode;
this._key = key;
this.reset();
},
/**
* Resets this cipher to its initial state.
*
* @example
*
* cipher.reset();
*/
reset: function() {
BufferedBlockAlgorithm.reset.call(this);
this._doReset();
},
/**
* Adds data to be encrypted or decrypted.
*
* @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
*
* @return {WordArray} The data after processing.
*
* @example
*
* var encrypted = cipher.process('data');
* var encrypted = cipher.process(wordArray);
*/
process: function(dataUpdate) {
this._append(dataUpdate);
return this._process();
},
/**
* Finalizes the encryption or decryption process.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
*
* @return {WordArray} The data after final processing.
*
* @example
*
* var encrypted = cipher.finalize();
* var encrypted = cipher.finalize('data');
* var encrypted = cipher.finalize(wordArray);
*/
finalize: function(dataUpdate) {
if (dataUpdate) {
this._append(dataUpdate);
}
var finalProcessedData = this._doFinalize();
return finalProcessedData;
},
keySize: 128 / 32,
ivSize: 128 / 32,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
/**
* Creates shortcut functions to a cipher's object interface.
*
* @param {Cipher} cipher The cipher to create a helper for.
*
* @return {Object} An object with encrypt and decrypt shortcut functions.
*
* @static
*
* @example
*
* var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
*/
_createHelper: /* @__PURE__ */ function() {
function selectCipherStrategy(key) {
if (typeof key == "string") {
return PasswordBasedCipher;
} else {
return SerializableCipher;
}
}
return function(cipher) {
return {
encrypt: function(message, key, cfg) {
return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
},
decrypt: function(ciphertext, key, cfg) {
return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
}
};
};
}()
});
C_lib.StreamCipher = Cipher.extend({
_doFinalize: function() {
var finalProcessedBlocks = this._process(true);
return finalProcessedBlocks;
},
blockSize: 1
});
var C_mode = C.mode = {};
var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
/**
* Creates this mode for encryption.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @static
*
* @example
*
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
*/
createEncryptor: function(cipher, iv) {
return this.Encryptor.create(cipher, iv);
},
/**
* Creates this mode for decryption.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @static
*
* @example
*
* var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
*/
createDecryptor: function(cipher, iv) {
return this.Decryptor.create(cipher, iv);
},
/**
* Initializes a newly created mode.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @example
*
* var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
*/
init: function(cipher, iv) {
this._cipher = cipher;
this._iv = iv;
}
});
var CBC = C_mode.CBC = function() {
var CBC2 = BlockCipherMode.extend();
CBC2.Encryptor = CBC2.extend({
/**
* Processes the data block at offset.
*
* @param {Array} words The data words to operate on.
* @param {number} offset The offset where the block starts.
*
* @example
*
* mode.processBlock(data.words, offset);
*/
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
xorBlock.call(this, words, offset, blockSize);
cipher.encryptBlock(words, offset);
this._prevBlock = words.slice(offset, offset + blockSize);
}
});
CBC2.Decryptor = CBC2.extend({
/**
* Processes the data block at offset.
*
* @param {Array} words The data words to operate on.
* @param {number} offset The offset where the block starts.
*
* @example
*
* mode.processBlock(data.words, offset);
*/
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
var thisBlock = words.slice(offset, offset + blockSize);
cipher.decryptBlock(words, offset);
xorBlock.call(this, words, offset, blockSize);
this._prevBlock = thisBlock;
}
});
function xorBlock(words, offset, blockSize) {
var iv = this._iv;
if (iv) {
var block = iv;
this._iv = undefined$1;
} else {
var block = this._prevBlock;
}
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= block[i];
}
}
return CBC2;
}();
var C_pad = C.pad = {};
var Pkcs7 = C_pad.Pkcs7 = {
/**
* Pads data using the algorithm defined in PKCS #5/7.
*
* @param {WordArray} data The data to pad.
* @param {number} blockSize The multiple that the data should be padded to.
*
* @static
*
* @example
*
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
*/
pad: function(data, blockSize) {
var blockSizeBytes = blockSize * 4;
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes;
var paddingWords = [];
for (var i = 0; i < nPaddingBytes; i += 4) {
paddingWords.push(paddingWord);
}
var padding = WordArray.create(paddingWords, nPaddingBytes);
data.concat(padding);
},
/**
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
*
* @param {WordArray} data The data to unpad.
*
* @static
*
* @example
*
* CryptoJS.pad.Pkcs7.unpad(wordArray);
*/
unpad: function(data) {
var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
data.sigBytes -= nPaddingBytes;
}
};
C_lib.BlockCipher = Cipher.extend({
/**
* Configuration options.
*
* @property {Mode} mode The block mode to use. Default: CBC
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
*/
cfg: Cipher.cfg.extend({
mode: CBC,
padding: Pkcs7
}),
reset: function() {
Cipher.reset.call(this);
var cfg = this.cfg;
var iv = cfg.iv;
var mode = cfg.mode;
if (this._xformMode == this._ENC_XFORM_MODE) {
var modeCreator = mode.createEncryptor;
} else {
var modeCreator = mode.createDecryptor;
this._minBufferSize = 1;
}
if (this._mode && this._mode.__creator == modeCreator) {
this._mode.init(this, iv && iv.words);
} else {
this._mode = modeCreator.call(mode, this, iv && iv.words);
this._mode.__creator = modeCreator;
}
},
_doProcessBlock: function(words, offset) {
this._mode.processBlock(words, offset);
},
_doFinalize: function() {
var padding = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
padding.pad(this._data, this.blockSize);
var finalProcessedBlocks = this._process(true);
} else {
var finalProcessedBlocks = this._process(true);
padding.unpad(finalProcessedBlocks);
}
return finalProcessedBlocks;
},
blockSize: 128 / 32
});
var CipherParams = C_lib.CipherParams = Base.extend({
/**
* Initializes a newly created cipher params object.
*
* @param {Object} cipherParams An object with any of the possible cipher parameters.
*
* @example
*
* var cipherParams = CryptoJS.lib.CipherParams.create({
* ciphertext: ciphertextWordArray,
* key: keyWordArray,
* iv: ivWordArray,
* salt: saltWordArray,
* algorithm: CryptoJS.algo.AES,
* mode: CryptoJS.mode.CBC,
* padding: CryptoJS.pad.PKCS7,
* blockSize: 4,
* formatter: CryptoJS.format.OpenSSL
* });
*/
init: function(cipherParams) {
this.mixIn(cipherParams);
},
/**
* Converts this cipher params object to a string.
*
* @param {Format} formatter (Optional) The formatting strategy to use.
*
* @return {string} The stringified cipher params.
*
* @throws Error If neither the formatter nor the default formatter is set.
*
* @example
*
* var string = cipherParams + '';
* var string = cipherParams.toString();
* var string = cipherParams.toString(CryptoJS.format.OpenSSL);
*/
toString: function(formatter) {
return (formatter || this.formatter).stringify(this);
}
});
var C_format = C.format = {};
var OpenSSLFormatter = C_format.OpenSSL = {
/**
* Converts a cipher params object to an OpenSSL-compatible string.
*
* @param {CipherParams} cipherParams The cipher params object.
*
* @return {string} The OpenSSL-compatible string.
*
* @static
*
* @example
*
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
*/
stringify: function(cipherParams) {
var ciphertext = cipherParams.ciphertext;
var salt = cipherParams.salt;
if (salt) {
var wordArray = WordArray.create([1398893684, 1701076831]).concat(salt).concat(ciphertext);
} else {
var wordArray = ciphertext;
}
return wordArray.toString(Base64);
},
/**
* Converts an OpenSSL-compatible string to a cipher params object.
*
* @param {string} openSSLStr The OpenSSL-compatible string.
*
* @return {CipherParams} The cipher params object.
*
* @static
*
* @example
*
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
*/
parse: function(openSSLStr) {
var ciphertext = Base64.parse(openSSLStr);
var ciphertextWords = ciphertext.words;
if (ciphertextWords[0] == 1398893684 && ciphertextWords[1] == 1701076831) {
var salt = WordArray.create(ciphertextWords.slice(2, 4));
ciphertextWords.splice(0, 4);
ciphertext.sigBytes -= 16;
}
return CipherParams.create({ ciphertext, salt });
}
};
var SerializableCipher = C_lib.SerializableCipher = Base.extend({
/**
* Configuration options.
*
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
*/
cfg: Base.extend({
format: OpenSSLFormatter
}),
/**
* Encrypts a message.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {WordArray|string} message The message to encrypt.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {CipherParams} A cipher params object.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
*/
encrypt: function(cipher, message, key, cfg) {
cfg = this.cfg.extend(cfg);
var encryptor = cipher.createEncryptor(key, cfg);
var ciphertext = encryptor.finalize(message);
var cipherCfg = encryptor.cfg;
return CipherParams.create({
ciphertext,
key,
iv: cipherCfg.iv,
algorithm: cipher,
mode: cipherCfg.mode,
padding: cipherCfg.padding,
blockSize: cipher.blockSize,
formatter: cfg.format
});
},
/**
* Decrypts serialized ciphertext.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {WordArray} The plaintext.
*
* @static
*
* @example
*
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
*/
decrypt: function(cipher, ciphertext, key, cfg) {
cfg = this.cfg.extend(cfg);
ciphertext = this._parse(ciphertext, cfg.format);
var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
return plaintext;
},
/**
* Converts serialized ciphertext to CipherParams,
* else assumed CipherParams already and returns ciphertext unchanged.
*
* @param {CipherParams|string} ciphertext The ciphertext.
* @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
*
* @return {CipherParams} The unserialized ciphertext.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
*/
_parse: function(ciphertext, format) {
if (typeof ciphertext == "string") {
return format.parse(ciphertext, this);
} else {
return ciphertext;
}
}
});
var C_kdf = C.kdf = {};
var OpenSSLKdf = C_kdf.OpenSSL = {
/**
* Derives a key and IV from a password.
*
* @param {string} password The password to derive from.
* @param {number} keySize The size in words of the key to generate.
* @param {number} ivSize The size in words of the IV to generate.
* @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
*
* @return {CipherParams} A cipher params object with the key, IV, and salt.
*
* @static
*
* @example
*
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
*/
execute: function(password, keySize, ivSize, salt) {
if (!salt) {
salt = WordArray.random(64 / 8);
}
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
key.sigBytes = keySize * 4;
return CipherParams.create({ key, iv, salt });
}
};
var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
/**
* Configuration options.
*
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
*/
cfg: SerializableCipher.cfg.extend({
kdf: OpenSSLKdf
}),
/**
* Encrypts a message using a password.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {WordArray|string} message The message to encrypt.
* @param {string} password The password.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {CipherParams} A cipher params object.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
*/
encrypt: function(cipher, message, password, cfg) {
cfg = this.cfg.extend(cfg);
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
cfg.iv = derivedParams.iv;
var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
ciphertext.mixIn(derivedParams);
return ciphertext;
},
/**
* Decrypts serialized ciphertext using a password.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
* @param {string} password The password.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {WordArray} The plaintext.
*
* @static
*
* @example
*
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
*/
decrypt: function(cipher, ciphertext, password, cfg) {
cfg = this.cfg.extend(cfg);
ciphertext = this._parse(ciphertext, cfg.format);
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
cfg.iv = derivedParams.iv;
var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
return plaintext;
}
});
}();
});
})(cipherCore);
return cipherCore.exports;
}
var modeCfb = { exports: {} };
var hasRequiredModeCfb;
function requireModeCfb() {
if (hasRequiredModeCfb)
return modeCfb.exports;
hasRequiredModeCfb = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.mode.CFB = function() {
var CFB = CryptoJS2.lib.BlockCipherMode.extend();
CFB.Encryptor = CFB.extend({
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
this._prevBlock = words.slice(offset, offset + blockSize);
}
});
CFB.Decryptor = CFB.extend({
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
var thisBlock = words.slice(offset, offset + blockSize);
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
this._prevBlock = thisBlock;
}
});
function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
var iv = this._iv;
if (iv) {
var keystream = iv.slice(0);
this._iv = void 0;
} else {
var keystream = this._prevBlock;
}
cipher.encryptBlock(keystream, 0);
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
return CFB;
}();
return CryptoJS2.mode.CFB;
});
})(modeCfb);
return modeCfb.exports;
}
var modeCtr = { exports: {} };
var hasRequiredModeCtr;
function requireModeCtr() {
if (hasRequiredModeCtr)
return modeCtr.exports;
hasRequiredModeCtr = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.mode.CTR = function() {
var CTR = CryptoJS2.lib.BlockCipherMode.extend();
var Encryptor = CTR.Encryptor = CTR.extend({
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
var iv = this._iv;
var counter = this._counter;
if (iv) {
counter = this._counter = iv.slice(0);
this._iv = void 0;
}
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
CTR.Decryptor = Encryptor;
return CTR;
}();
return CryptoJS2.mode.CTR;
});
})(modeCtr);
return modeCtr.exports;
}
var modeCtrGladman = { exports: {} };
var hasRequiredModeCtrGladman;
function requireModeCtrGladman() {
if (hasRequiredModeCtrGladman)
return modeCtrGladman.exports;
hasRequiredModeCtrGladman = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
CryptoJS2.mode.CTRGladman = function() {
var CTRGladman = CryptoJS2.lib.BlockCipherMode.extend();
function incWord(word) {
if ((word >> 24 & 255) === 255) {
var b1 = word >> 16 & 255;
var b2 = word >> 8 & 255;
var b3 = word & 255;
if (b1 === 255) {
b1 = 0;
if (b2 === 255) {
b2 = 0;
if (b3 === 255) {
b3 = 0;
} else {
++b3;
}
} else {
++b2;
}
} else {
++b1;
}
word = 0;
word += b1 << 16;
word += b2 << 8;
word += b3;
} else {
word += 1 << 24;
}
return word;
}
function incCounter(counter) {
if ((counter[0] = incWord(counter[0])) === 0) {
counter[1] = incWord(counter[1]);
}
return counter;
}
var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
var iv = this._iv;
var counter = this._counter;
if (iv) {
counter = this._counter = iv.slice(0);
this._iv = void 0;
}
incCounter(counter);
var keystream = counter.slice(0);
cipher.encryptBlock(keystream, 0);
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
CTRGladman.Decryptor = Encryptor;
return CTRGladman;
}();
return CryptoJS2.mode.CTRGladman;
});
})(modeCtrGladman);
return modeCtrGladman.exports;
}
var modeOfb = { exports: {} };
var hasRequiredModeOfb;
function requireModeOfb() {
if (hasRequiredModeOfb)
return modeOfb.exports;
hasRequiredModeOfb = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.mode.OFB = function() {
var OFB = CryptoJS2.lib.BlockCipherMode.extend();
var Encryptor = OFB.Encryptor = OFB.extend({
processBlock: function(words, offset) {
var cipher = this._cipher;
var blockSize = cipher.blockSize;
var iv = this._iv;
var keystream = this._keystream;
if (iv) {
keystream = this._keystream = iv.slice(0);
this._iv = void 0;
}
cipher.encryptBlock(keystream, 0);
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
OFB.Decryptor = Encryptor;
return OFB;
}();
return CryptoJS2.mode.OFB;
});
})(modeOfb);
return modeOfb.exports;
}
var modeEcb = { exports: {} };
var hasRequiredModeEcb;
function requireModeEcb() {
if (hasRequiredModeEcb)
return modeEcb.exports;
hasRequiredModeEcb = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.mode.ECB = function() {
var ECB = CryptoJS2.lib.BlockCipherMode.extend();
ECB.Encryptor = ECB.extend({
processBlock: function(words, offset) {
this._cipher.encryptBlock(words, offset);
}
});
ECB.Decryptor = ECB.extend({
processBlock: function(words, offset) {
this._cipher.decryptBlock(words, offset);
}
});
return ECB;
}();
return CryptoJS2.mode.ECB;
});
})(modeEcb);
return modeEcb.exports;
}
var padAnsix923 = { exports: {} };
var hasRequiredPadAnsix923;
function requirePadAnsix923() {
if (hasRequiredPadAnsix923)
return padAnsix923.exports;
hasRequiredPadAnsix923 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.pad.AnsiX923 = {
pad: function(data, blockSize) {
var dataSigBytes = data.sigBytes;
var blockSizeBytes = blockSize * 4;
var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
var lastBytePos = dataSigBytes + nPaddingBytes - 1;
data.clamp();
data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
data.sigBytes += nPaddingBytes;
},
unpad: function(data) {
var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
data.sigBytes -= nPaddingBytes;
}
};
return CryptoJS2.pad.Ansix923;
});
})(padAnsix923);
return padAnsix923.exports;
}
var padIso10126 = { exports: {} };
var hasRequiredPadIso10126;
function requirePadIso10126() {
if (hasRequiredPadIso10126)
return padIso10126.exports;
hasRequiredPadIso10126 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.pad.Iso10126 = {
pad: function(data, blockSize) {
var blockSizeBytes = blockSize * 4;
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
data.concat(CryptoJS2.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS2.lib.WordArray.create([nPaddingBytes << 24], 1));
},
unpad: function(data) {
var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 255;
data.sigBytes -= nPaddingBytes;
}
};
return CryptoJS2.pad.Iso10126;
});
})(padIso10126);
return padIso10126.exports;
}
var padIso97971 = { exports: {} };
var hasRequiredPadIso97971;
function requirePadIso97971() {
if (hasRequiredPadIso97971)
return padIso97971.exports;
hasRequiredPadIso97971 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.pad.Iso97971 = {
pad: function(data, blockSize) {
data.concat(CryptoJS2.lib.WordArray.create([2147483648], 1));
CryptoJS2.pad.ZeroPadding.pad(data, blockSize);
},
unpad: function(data) {
CryptoJS2.pad.ZeroPadding.unpad(data);
data.sigBytes--;
}
};
return CryptoJS2.pad.Iso97971;
});
})(padIso97971);
return padIso97971.exports;
}
var padZeropadding = { exports: {} };
var hasRequiredPadZeropadding;
function requirePadZeropadding() {
if (hasRequiredPadZeropadding)
return padZeropadding.exports;
hasRequiredPadZeropadding = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.pad.ZeroPadding = {
pad: function(data, blockSize) {
var blockSizeBytes = blockSize * 4;
data.clamp();
data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
},
unpad: function(data) {
var dataWords = data.words;
var i = data.sigBytes - 1;
while (!(dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255)) {
i--;
}
data.sigBytes = i + 1;
}
};
return CryptoJS2.pad.ZeroPadding;
});
})(padZeropadding);
return padZeropadding.exports;
}
var padNopadding = { exports: {} };
var hasRequiredPadNopadding;
function requirePadNopadding() {
if (hasRequiredPadNopadding)
return padNopadding.exports;
hasRequiredPadNopadding = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
CryptoJS2.pad.NoPadding = {
pad: function() {
},
unpad: function() {
}
};
return CryptoJS2.pad.NoPadding;
});
})(padNopadding);
return padNopadding.exports;
}
var formatHex = { exports: {} };
var hasRequiredFormatHex;
function requireFormatHex() {
if (hasRequiredFormatHex)
return formatHex.exports;
hasRequiredFormatHex = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function(undefined$1) {
var C = CryptoJS2;
var C_lib = C.lib;
var CipherParams = C_lib.CipherParams;
var C_enc = C.enc;
var Hex = C_enc.Hex;
var C_format = C.format;
C_format.Hex = {
/**
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
*
* @param {CipherParams} cipherParams The cipher params object.
*
* @return {string} The hexadecimally encoded string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
*/
stringify: function(cipherParams) {
return cipherParams.ciphertext.toString(Hex);
},
/**
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
*
* @param {string} input The hexadecimally encoded string.
*
* @return {CipherParams} The cipher params object.
*
* @static
*
* @example
*
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
*/
parse: function(input) {
var ciphertext = Hex.parse(input);
return CipherParams.create({ ciphertext });
}
};
})();
return CryptoJS2.format.Hex;
});
})(formatHex);
return formatHex.exports;
}
var aes = { exports: {} };
var hasRequiredAes;
function requireAes() {
if (hasRequiredAes)
return aes.exports;
hasRequiredAes = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var BlockCipher = C_lib.BlockCipher;
var C_algo = C.algo;
var SBOX = [];
var INV_SBOX = [];
var SUB_MIX_0 = [];
var SUB_MIX_1 = [];
var SUB_MIX_2 = [];
var SUB_MIX_3 = [];
var INV_SUB_MIX_0 = [];
var INV_SUB_MIX_1 = [];
var INV_SUB_MIX_2 = [];
var INV_SUB_MIX_3 = [];
(function() {
var d = [];
for (var i = 0; i < 256; i++) {
if (i < 128) {
d[i] = i << 1;
} else {
d[i] = i << 1 ^ 283;
}
}
var x = 0;
var xi = 0;
for (var i = 0; i < 256; i++) {
var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
sx = sx >>> 8 ^ sx & 255 ^ 99;
SBOX[x] = sx;
INV_SBOX[sx] = x;
var x2 = d[x];
var x4 = d[x2];
var x8 = d[x4];
var t = d[sx] * 257 ^ sx * 16843008;
SUB_MIX_0[x] = t << 24 | t >>> 8;
SUB_MIX_1[x] = t << 16 | t >>> 16;
SUB_MIX_2[x] = t << 8 | t >>> 24;
SUB_MIX_3[x] = t;
var t = x8 * 16843009 ^ x4 * 65537 ^ x2 * 257 ^ x * 16843008;
INV_SUB_MIX_0[sx] = t << 24 | t >>> 8;
INV_SUB_MIX_1[sx] = t << 16 | t >>> 16;
INV_SUB_MIX_2[sx] = t << 8 | t >>> 24;
INV_SUB_MIX_3[sx] = t;
if (!x) {
x = xi = 1;
} else {
x = x2 ^ d[d[d[x8 ^ x2]]];
xi ^= d[d[xi]];
}
}
})();
var RCON = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
var AES = C_algo.AES = BlockCipher.extend({
_doReset: function() {
if (this._nRounds && this._keyPriorReset === this._key) {
return;
}
var key = this._keyPriorReset = this._key;
var keyWords = key.words;
var keySize = key.sigBytes / 4;
var nRounds = this._nRounds = keySize + 6;
var ksRows = (nRounds + 1) * 4;
var keySchedule = this._keySchedule = [];
for (var ksRow = 0; ksRow < ksRows; ksRow++) {
if (ksRow < keySize) {
keySchedule[ksRow] = keyWords[ksRow];
} else {
var t = keySchedule[ksRow - 1];
if (!(ksRow % keySize)) {
t = t << 8 | t >>> 24;
t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
t ^= RCON[ksRow / keySize | 0] << 24;
} else if (keySize > 6 && ksRow % keySize == 4) {
t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 255] << 16 | SBOX[t >>> 8 & 255] << 8 | SBOX[t & 255];
}
keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
}
}
var invKeySchedule = this._invKeySchedule = [];
for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
var ksRow = ksRows - invKsRow;
if (invKsRow % 4) {
var t = keySchedule[ksRow];
} else {
var t = keySchedule[ksRow - 4];
}
if (invKsRow < 4 || ksRow <= 4) {
invKeySchedule[invKsRow] = t;
} else {
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 255]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 255]] ^ INV_SUB_MIX_3[SBOX[t & 255]];
}
}
},
encryptBlock: function(M, offset) {
this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
},
decryptBlock: function(M, offset) {
var t = M[offset + 1];
M[offset + 1] = M[offset + 3];
M[offset + 3] = t;
this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
var t = M[offset + 1];
M[offset + 1] = M[offset + 3];
M[offset + 3] = t;
},
_doCryptBlock: function(M, offset, keySchedule, SUB_MIX_02, SUB_MIX_12, SUB_MIX_22, SUB_MIX_32, SBOX2) {
var nRounds = this._nRounds;
var s0 = M[offset] ^ keySchedule[0];
var s1 = M[offset + 1] ^ keySchedule[1];
var s2 = M[offset + 2] ^ keySchedule[2];
var s3 = M[offset + 3] ^ keySchedule[3];
var ksRow = 4;
for (var round2 = 1; round2 < nRounds; round2++) {
var t0 = SUB_MIX_02[s0 >>> 24] ^ SUB_MIX_12[s1 >>> 16 & 255] ^ SUB_MIX_22[s2 >>> 8 & 255] ^ SUB_MIX_32[s3 & 255] ^ keySchedule[ksRow++];
var t1 = SUB_MIX_02[s1 >>> 24] ^ SUB_MIX_12[s2 >>> 16 & 255] ^ SUB_MIX_22[s3 >>> 8 & 255] ^ SUB_MIX_32[s0 & 255] ^ keySchedule[ksRow++];
var t2 = SUB_MIX_02[s2 >>> 24] ^ SUB_MIX_12[s3 >>> 16 & 255] ^ SUB_MIX_22[s0 >>> 8 & 255] ^ SUB_MIX_32[s1 & 255] ^ keySchedule[ksRow++];
var t3 = SUB_MIX_02[s3 >>> 24] ^ SUB_MIX_12[s0 >>> 16 & 255] ^ SUB_MIX_22[s1 >>> 8 & 255] ^ SUB_MIX_32[s2 & 255] ^ keySchedule[ksRow++];
s0 = t0;
s1 = t1;
s2 = t2;
s3 = t3;
}
var t0 = (SBOX2[s0 >>> 24] << 24 | SBOX2[s1 >>> 16 & 255] << 16 | SBOX2[s2 >>> 8 & 255] << 8 | SBOX2[s3 & 255]) ^ keySchedule[ksRow++];
var t1 = (SBOX2[s1 >>> 24] << 24 | SBOX2[s2 >>> 16 & 255] << 16 | SBOX2[s3 >>> 8 & 255] << 8 | SBOX2[s0 & 255]) ^ keySchedule[ksRow++];
var t2 = (SBOX2[s2 >>> 24] << 24 | SBOX2[s3 >>> 16 & 255] << 16 | SBOX2[s0 >>> 8 & 255] << 8 | SBOX2[s1 & 255]) ^ keySchedule[ksRow++];
var t3 = (SBOX2[s3 >>> 24] << 24 | SBOX2[s0 >>> 16 & 255] << 16 | SBOX2[s1 >>> 8 & 255] << 8 | SBOX2[s2 & 255]) ^ keySchedule[ksRow++];
M[offset] = t0;
M[offset + 1] = t1;
M[offset + 2] = t2;
M[offset + 3] = t3;
},
keySize: 256 / 32
});
C.AES = BlockCipher._createHelper(AES);
})();
return CryptoJS2.AES;
});
})(aes);
return aes.exports;
}
var tripledes = { exports: {} };
var hasRequiredTripledes;
function requireTripledes() {
if (hasRequiredTripledes)
return tripledes.exports;
hasRequiredTripledes = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var BlockCipher = C_lib.BlockCipher;
var C_algo = C.algo;
var PC1 = [
57,
49,
41,
33,
25,
17,
9,
1,
58,
50,
42,
34,
26,
18,
10,
2,
59,
51,
43,
35,
27,
19,
11,
3,
60,
52,
44,
36,
63,
55,
47,
39,
31,
23,
15,
7,
62,
54,
46,
38,
30,
22,
14,
6,
61,
53,
45,
37,
29,
21,
13,
5,
28,
20,
12,
4
];
var PC2 = [
14,
17,
11,
24,
1,
5,
3,
28,
15,
6,
21,
10,
23,
19,
12,
4,
26,
8,
16,
7,
27,
20,
13,
2,
41,
52,
31,
37,
47,
55,
30,
40,
51,
45,
33,
48,
44,
49,
39,
56,
34,
53,
46,
42,
50,
36,
29,
32
];
var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
var SBOX_P = [
{
0: 8421888,
268435456: 32768,
536870912: 8421378,
805306368: 2,
1073741824: 512,
1342177280: 8421890,
1610612736: 8389122,
1879048192: 8388608,
2147483648: 514,
2415919104: 8389120,
2684354560: 33280,
2952790016: 8421376,
3221225472: 32770,
3489660928: 8388610,
3758096384: 0,
4026531840: 33282,
134217728: 0,
402653184: 8421890,
671088640: 33282,
939524096: 32768,
1207959552: 8421888,
1476395008: 512,
1744830464: 8421378,
2013265920: 2,
2281701376: 8389120,
2550136832: 33280,
2818572288: 8421376,
3087007744: 8389122,
3355443200: 8388610,
3623878656: 32770,
3892314112: 514,
4160749568: 8388608,
1: 32768,
268435457: 2,
536870913: 8421888,
805306369: 8388608,
1073741825: 8421378,
1342177281: 33280,
1610612737: 512,
1879048193: 8389122,
2147483649: 8421890,
2415919105: 8421376,
2684354561: 8388610,
2952790017: 33282,
3221225473: 514,
3489660929: 8389120,
3758096385: 32770,
4026531841: 0,
134217729: 8421890,
402653185: 8421376,
671088641: 8388608,
939524097: 512,
1207959553: 32768,
1476395009: 8388610,
1744830465: 2,
2013265921: 33282,
2281701377: 32770,
2550136833: 8389122,
2818572289: 514,
3087007745: 8421888,
3355443201: 8389120,
3623878657: 0,
3892314113: 33280,
4160749569: 8421378
},
{
0: 1074282512,
16777216: 16384,
33554432: 524288,
50331648: 1074266128,
67108864: 1073741840,
83886080: 1074282496,
100663296: 1073758208,
117440512: 16,
134217728: 540672,
150994944: 1073758224,
167772160: 1073741824,
184549376: 540688,
201326592: 524304,
218103808: 0,
234881024: 16400,
251658240: 1074266112,
8388608: 1073758208,
25165824: 540688,
41943040: 16,
58720256: 1073758224,
75497472: 1074282512,
92274688: 1073741824,
109051904: 524288,
125829120: 1074266128,
142606336: 524304,
159383552: 0,
176160768: 16384,
192937984: 1074266112,
209715200: 1073741840,
226492416: 540672,
243269632: 1074282496,
260046848: 16400,
268435456: 0,
285212672: 1074266128,
301989888: 1073758224,
318767104: 1074282496,
335544320: 1074266112,
352321536: 16,
369098752: 540688,
385875968: 16384,
402653184: 16400,
419430400: 524288,
436207616: 524304,
452984832: 1073741840,
469762048: 540672,
486539264: 1073758208,
503316480: 1073741824,
520093696: 1074282512,
276824064: 540688,
293601280: 524288,
310378496: 1074266112,
327155712: 16384,
343932928: 1073758208,
360710144: 1074282512,
377487360: 16,
394264576: 1073741824,
411041792: 1074282496,
427819008: 1073741840,
444596224: 1073758224,
461373440: 524304,
478150656: 0,
494927872: 16400,
511705088: 1074266128,
528482304: 540672
},
{
0: 260,
1048576: 0,
2097152: 67109120,
3145728: 65796,
4194304: 65540,
5242880: 67108868,
6291456: 67174660,
7340032: 67174400,
8388608: 67108864,
9437184: 67174656,
10485760: 65792,
11534336: 67174404,
12582912: 67109124,
13631488: 65536,
14680064: 4,
15728640: 256,
524288: 67174656,
1572864: 67174404,
2621440: 0,
3670016: 67109120,
4718592: 67108868,
5767168: 65536,
6815744: 65540,
7864320: 260,
8912896: 4,
9961472: 256,
11010048: 67174400,
12058624: 65796,
13107200: 65792,
14155776: 67109124,
15204352: 67174660,
16252928: 67108864,
16777216: 67174656,
17825792: 65540,
18874368: 65536,
19922944: 67109120,
20971520: 256,
22020096: 67174660,
23068672: 67108868,
24117248: 0,
25165824: 67109124,
26214400: 67108864,
27262976: 4,
28311552: 65792,
29360128: 67174400,
30408704: 260,
31457280: 65796,
32505856: 67174404,
17301504: 67108864,
18350080: 260,
19398656: 67174656,
20447232: 0,
21495808: 65540,
22544384: 67109120,
23592960: 256,
24641536: 67174404,
25690112: 65536,
26738688: 67174660,
27787264: 65796,
28835840: 67108868,
29884416: 67109124,
30932992: 67174400,
31981568: 4,
33030144: 65792
},
{
0: 2151682048,
65536: 2147487808,
131072: 4198464,
196608: 2151677952,
262144: 0,
327680: 4198400,
393216: 2147483712,
458752: 4194368,
524288: 2147483648,
589824: 4194304,
655360: 64,
720896: 2147487744,
786432: 2151678016,
851968: 4160,
917504: 4096,
983040: 2151682112,
32768: 2147487808,
98304: 64,
163840: 2151678016,
229376: 2147487744,
294912: 4198400,
360448: 2151682112,
425984: 0,
491520: 2151677952,
557056: 4096,
622592: 2151682048,
688128: 4194304,
753664: 4160,
819200: 2147483648,
884736: 4194368,
950272: 4198464,
1015808: 2147483712,
1048576: 4194368,
1114112: 4198400,
1179648: 2147483712,
1245184: 0,
1310720: 4160,
1376256: 2151678016,
1441792: 2151682048,
1507328: 2147487808,
1572864: 2151682112,
1638400: 2147483648,
1703936: 2151677952,
1769472: 4198464,
1835008: 2147487744,
1900544: 4194304,
1966080: 64,
2031616: 4096,
1081344: 2151677952,
1146880: 2151682112,
1212416: 0,
1277952: 4198400,
1343488: 4194368,
1409024: 2147483648,
1474560: 2147487808,
1540096: 64,
1605632: 2147483712,
1671168: 4096,
1736704: 2147487744,
1802240: 2151678016,
1867776: 4160,
1933312: 2151682048,
1998848: 4194304,
2064384: 4198464
},
{
0: 128,
4096: 17039360,
8192: 262144,
12288: 536870912,
16384: 537133184,
20480: 16777344,
24576: 553648256,
28672: 262272,
32768: 16777216,
36864: 537133056,
40960: 536871040,
45056: 553910400,
49152: 553910272,
53248: 0,
57344: 17039488,
61440: 553648128,
2048: 17039488,
6144: 553648256,
10240: 128,
14336: 17039360,
18432: 262144,
22528: 537133184,
26624: 553910272,
30720: 536870912,
34816: 537133056,
38912: 0,
43008: 553910400,
47104: 16777344,
51200: 536871040,
55296: 553648128,
59392: 16777216,
63488: 262272,
65536: 262144,
69632: 128,
73728: 536870912,
77824: 553648256,
81920: 16777344,
86016: 553910272,
90112: 537133184,
94208: 16777216,
98304: 553910400,
102400: 553648128,
106496: 17039360,
110592: 537133056,
114688: 262272,
118784: 536871040,
122880: 0,
126976: 17039488,
67584: 553648256,
71680: 16777216,
75776: 17039360,
79872: 537133184,
83968: 536870912,
88064: 17039488,
92160: 128,
96256: 553910272,
100352: 262272,
104448: 553910400,
108544: 0,
112640: 553648128,
116736: 16777344,
120832: 262144,
124928: 537133056,
129024: 536871040
},
{
0: 268435464,
256: 8192,
512: 270532608,
768: 270540808,
1024: 268443648,
1280: 2097152,
1536: 2097160,
1792: 268435456,
2048: 0,
2304: 268443656,
2560: 2105344,
2816: 8,
3072: 270532616,
3328: 2105352,
3584: 8200,
3840: 270540800,
128: 270532608,
384: 270540808,
640: 8,
896: 2097152,
1152: 2105352,
1408: 268435464,
1664: 268443648,
1920: 8200,
2176: 2097160,
2432: 8192,
2688: 268443656,
2944: 270532616,
3200: 0,
3456: 270540800,
3712: 2105344,
3968: 268435456,
4096: 268443648,
4352: 270532616,
4608: 270540808,
4864: 8200,
5120: 2097152,
5376: 268435456,
5632: 268435464,
5888: 2105344,
6144: 2105352,
6400: 0,
6656: 8,
6912: 270532608,
7168: 8192,
7424: 268443656,
7680: 270540800,
7936: 2097160,
4224: 8,
4480: 2105344,
4736: 2097152,
4992: 268435464,
5248: 268443648,
5504: 8200,
5760: 270540808,
6016: 270532608,
6272: 270540800,
6528: 270532616,
6784: 8192,
7040: 2105352,
7296: 2097160,
7552: 0,
7808: 268435456,
8064: 268443656
},
{
0: 1048576,
16: 33555457,
32: 1024,
48: 1049601,
64: 34604033,
80: 0,
96: 1,
112: 34603009,
128: 33555456,
144: 1048577,
160: 33554433,
176: 34604032,
192: 34603008,
208: 1025,
224: 1049600,
240: 33554432,
8: 34603009,
24: 0,
40: 33555457,
56: 34604032,
72: 1048576,
88: 33554433,
104: 33554432,
120: 1025,
136: 1049601,
152: 33555456,
168: 34603008,
184: 1048577,
200: 1024,
216: 34604033,
232: 1,
248: 1049600,
256: 33554432,
272: 1048576,
288: 33555457,
304: 34603009,
320: 1048577,
336: 33555456,
352: 34604032,
368: 1049601,
384: 1025,
400: 34604033,
416: 1049600,
432: 1,
448: 0,
464: 34603008,
480: 33554433,
496: 1024,
264: 1049600,
280: 33555457,
296: 34603009,
312: 1,
328: 33554432,
344: 1048576,
360: 1025,
376: 34604032,
392: 33554433,
408: 34603008,
424: 0,
440: 34604033,
456: 1049601,
472: 1024,
488: 33555456,
504: 1048577
},
{
0: 134219808,
1: 131072,
2: 134217728,
3: 32,
4: 131104,
5: 134350880,
6: 134350848,
7: 2048,
8: 134348800,
9: 134219776,
10: 133120,
11: 134348832,
12: 2080,
13: 0,
14: 134217760,
15: 133152,
2147483648: 2048,
2147483649: 134350880,
2147483650: 134219808,
2147483651: 134217728,
2147483652: 134348800,
2147483653: 133120,
2147483654: 133152,
2147483655: 32,
2147483656: 134217760,
2147483657: 2080,
2147483658: 131104,
2147483659: 134350848,
2147483660: 0,
2147483661: 134348832,
2147483662: 134219776,
2147483663: 131072,
16: 133152,
17: 134350848,
18: 32,
19: 2048,
20: 134219776,
21: 134217760,
22: 134348832,
23: 131072,
24: 0,
25: 131104,
26: 134348800,
27: 134219808,
28: 134350880,
29: 133120,
30: 2080,
31: 134217728,
2147483664: 131072,
2147483665: 2048,
2147483666: 134348832,
2147483667: 133152,
2147483668: 32,
2147483669: 134348800,
2147483670: 134217728,
2147483671: 134219808,
2147483672: 134350880,
2147483673: 134217760,
2147483674: 134219776,
2147483675: 0,
2147483676: 133120,
2147483677: 2080,
2147483678: 131104,
2147483679: 134350848
}
];
var SBOX_MASK = [
4160749569,
528482304,
33030144,
2064384,
129024,
8064,
504,
2147483679
];
var DES = C_algo.DES = BlockCipher.extend({
_doReset: function() {
var key = this._key;
var keyWords = key.words;
var keyBits = [];
for (var i = 0; i < 56; i++) {
var keyBitPos = PC1[i] - 1;
keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
}
var subKeys = this._subKeys = [];
for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
var subKey = subKeys[nSubKey] = [];
var bitShift = BIT_SHIFTS[nSubKey];
for (var i = 0; i < 24; i++) {
subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
}
subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
for (var i = 1; i < 7; i++) {
subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
}
subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
}
var invSubKeys = this._invSubKeys = [];
for (var i = 0; i < 16; i++) {
invSubKeys[i] = subKeys[15 - i];
}
},
encryptBlock: function(M, offset) {
this._doCryptBlock(M, offset, this._subKeys);
},
decryptBlock: function(M, offset) {
this._doCryptBlock(M, offset, this._invSubKeys);
},
_doCryptBlock: function(M, offset, subKeys) {
this._lBlock = M[offset];
this._rBlock = M[offset + 1];
exchangeLR.call(this, 4, 252645135);
exchangeLR.call(this, 16, 65535);
exchangeRL.call(this, 2, 858993459);
exchangeRL.call(this, 8, 16711935);
exchangeLR.call(this, 1, 1431655765);
for (var round2 = 0; round2 < 16; round2++) {
var subKey = subKeys[round2];
var lBlock = this._lBlock;
var rBlock = this._rBlock;
var f = 0;
for (var i = 0; i < 8; i++) {
f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
}
this._lBlock = rBlock;
this._rBlock = lBlock ^ f;
}
var t = this._lBlock;
this._lBlock = this._rBlock;
this._rBlock = t;
exchangeLR.call(this, 1, 1431655765);
exchangeRL.call(this, 8, 16711935);
exchangeRL.call(this, 2, 858993459);
exchangeLR.call(this, 16, 65535);
exchangeLR.call(this, 4, 252645135);
M[offset] = this._lBlock;
M[offset + 1] = this._rBlock;
},
keySize: 64 / 32,
ivSize: 64 / 32,
blockSize: 64 / 32
});
function exchangeLR(offset, mask) {
var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
this._rBlock ^= t;
this._lBlock ^= t << offset;
}
function exchangeRL(offset, mask) {
var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
this._lBlock ^= t;
this._rBlock ^= t << offset;
}
C.DES = BlockCipher._createHelper(DES);
var TripleDES = C_algo.TripleDES = BlockCipher.extend({
_doReset: function() {
var key = this._key;
var keyWords = key.words;
this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2)));
this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4)));
this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6)));
},
encryptBlock: function(M, offset) {
this._des1.encryptBlock(M, offset);
this._des2.decryptBlock(M, offset);
this._des3.encryptBlock(M, offset);
},
decryptBlock: function(M, offset) {
this._des3.decryptBlock(M, offset);
this._des2.encryptBlock(M, offset);
this._des1.decryptBlock(M, offset);
},
keySize: 192 / 32,
ivSize: 64 / 32,
blockSize: 64 / 32
});
C.TripleDES = BlockCipher._createHelper(TripleDES);
})();
return CryptoJS2.TripleDES;
});
})(tripledes);
return tripledes.exports;
}
var rc4 = { exports: {} };
var hasRequiredRc4;
function requireRc4() {
if (hasRequiredRc4)
return rc4.exports;
hasRequiredRc4 = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var StreamCipher = C_lib.StreamCipher;
var C_algo = C.algo;
var RC4 = C_algo.RC4 = StreamCipher.extend({
_doReset: function() {
var key = this._key;
var keyWords = key.words;
var keySigBytes = key.sigBytes;
var S = this._S = [];
for (var i = 0; i < 256; i++) {
S[i] = i;
}
for (var i = 0, j = 0; i < 256; i++) {
var keyByteIndex = i % keySigBytes;
var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
j = (j + S[i] + keyByte) % 256;
var t = S[i];
S[i] = S[j];
S[j] = t;
}
this._i = this._j = 0;
},
_doProcessBlock: function(M, offset) {
M[offset] ^= generateKeystreamWord.call(this);
},
keySize: 256 / 32,
ivSize: 0
});
function generateKeystreamWord() {
var S = this._S;
var i = this._i;
var j = this._j;
var keystreamWord = 0;
for (var n = 0; n < 4; n++) {
i = (i + 1) % 256;
j = (j + S[i]) % 256;
var t = S[i];
S[i] = S[j];
S[j] = t;
keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
}
this._i = i;
this._j = j;
return keystreamWord;
}
C.RC4 = StreamCipher._createHelper(RC4);
var RC4Drop = C_algo.RC4Drop = RC4.extend({
/**
* Configuration options.
*
* @property {number} drop The number of keystream words to drop. Default 192
*/
cfg: RC4.cfg.extend({
drop: 192
}),
_doReset: function() {
RC4._doReset.call(this);
for (var i = this.cfg.drop; i > 0; i--) {
generateKeystreamWord.call(this);
}
}
});
C.RC4Drop = StreamCipher._createHelper(RC4Drop);
})();
return CryptoJS2.RC4;
});
})(rc4);
return rc4.exports;
}
var rabbit = { exports: {} };
var hasRequiredRabbit;
function requireRabbit() {
if (hasRequiredRabbit)
return rabbit.exports;
hasRequiredRabbit = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var StreamCipher = C_lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
var G = [];
var Rabbit = C_algo.Rabbit = StreamCipher.extend({
_doReset: function() {
var K = this._key.words;
var iv = this.cfg.iv;
for (var i = 0; i < 4; i++) {
K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
}
var X = this._X = [
K[0],
K[3] << 16 | K[2] >>> 16,
K[1],
K[0] << 16 | K[3] >>> 16,
K[2],
K[1] << 16 | K[0] >>> 16,
K[3],
K[2] << 16 | K[1] >>> 16
];
var C2 = this._C = [
K[2] << 16 | K[2] >>> 16,
K[0] & 4294901760 | K[1] & 65535,
K[3] << 16 | K[3] >>> 16,
K[1] & 4294901760 | K[2] & 65535,
K[0] << 16 | K[0] >>> 16,
K[2] & 4294901760 | K[3] & 65535,
K[1] << 16 | K[1] >>> 16,
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
for (var i = 0; i < 4; i++) {
nextState.call(this);
}
for (var i = 0; i < 8; i++) {
C2[i] ^= X[i + 4 & 7];
}
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
var IV_1 = IV[1];
var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
var i1 = i0 >>> 16 | i2 & 4294901760;
var i3 = i2 << 16 | i0 & 65535;
C2[0] ^= i0;
C2[1] ^= i1;
C2[2] ^= i2;
C2[3] ^= i3;
C2[4] ^= i0;
C2[5] ^= i1;
C2[6] ^= i2;
C2[7] ^= i3;
for (var i = 0; i < 4; i++) {
nextState.call(this);
}
}
},
_doProcessBlock: function(M, offset) {
var X = this._X;
nextState.call(this);
S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
for (var i = 0; i < 4; i++) {
S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
M[offset + i] ^= S[i];
}
},
blockSize: 128 / 32,
ivSize: 64 / 32
});
function nextState() {
var X = this._X;
var C2 = this._C;
for (var i = 0; i < 8; i++) {
C_[i] = C2[i];
}
C2[0] = C2[0] + 1295307597 + this._b | 0;
C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
for (var i = 0; i < 8; i++) {
var gx = X[i] + C2[i];
var ga = gx & 65535;
var gb = gx >>> 16;
var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
G[i] = gh ^ gl;
}
X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
}
C.Rabbit = StreamCipher._createHelper(Rabbit);
})();
return CryptoJS2.Rabbit;
});
})(rabbit);
return rabbit.exports;
}
var rabbitLegacy = { exports: {} };
var hasRequiredRabbitLegacy;
function requireRabbitLegacy() {
if (hasRequiredRabbitLegacy)
return rabbitLegacy.exports;
hasRequiredRabbitLegacy = 1;
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
}
})(commonjsGlobal, function(CryptoJS2) {
(function() {
var C = CryptoJS2;
var C_lib = C.lib;
var StreamCipher = C_lib.StreamCipher;
var C_algo = C.algo;
var S = [];
var C_ = [];
var G = [];
var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
_doReset: function() {
var K = this._key.words;
var iv = this.cfg.iv;
var X = this._X = [
K[0],
K[3] << 16 | K[2] >>> 16,
K[1],
K[0] << 16 | K[3] >>> 16,
K[2],
K[1] << 16 | K[0] >>> 16,
K[3],
K[2] << 16 | K[1] >>> 16
];
var C2 = this._C = [
K[2] << 16 | K[2] >>> 16,
K[0] & 4294901760 | K[1] & 65535,
K[3] << 16 | K[3] >>> 16,
K[1] & 4294901760 | K[2] & 65535,
K[0] << 16 | K[0] >>> 16,
K[2] & 4294901760 | K[3] & 65535,
K[1] << 16 | K[1] >>> 16,
K[3] & 4294901760 | K[0] & 65535
];
this._b = 0;
for (var i = 0; i < 4; i++) {
nextState.call(this);
}
for (var i = 0; i < 8; i++) {
C2[i] ^= X[i + 4 & 7];
}
if (iv) {
var IV = iv.words;
var IV_0 = IV[0];
var IV_1 = IV[1];
var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
var i1 = i0 >>> 16 | i2 & 4294901760;
var i3 = i2 << 16 | i0 & 65535;
C2[0] ^= i0;
C2[1] ^= i1;
C2[2] ^= i2;
C2[3] ^= i3;
C2[4] ^= i0;
C2[5] ^= i1;
C2[6] ^= i2;
C2[7] ^= i3;
for (var i = 0; i < 4; i++) {
nextState.call(this);
}
}
},
_doProcessBlock: function(M, offset) {
var X = this._X;
nextState.call(this);
S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
for (var i = 0; i < 4; i++) {
S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
M[offset + i] ^= S[i];
}
},
blockSize: 128 / 32,
ivSize: 64 / 32
});
function nextState() {
var X = this._X;
var C2 = this._C;
for (var i = 0; i < 8; i++) {
C_[i] = C2[i];
}
C2[0] = C2[0] + 1295307597 + this._b | 0;
C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
for (var i = 0; i < 8; i++) {
var gx = X[i] + C2[i];
var ga = gx & 65535;
var gb = gx >>> 16;
var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
G[i] = gh ^ gl;
}
X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
}
C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
})();
return CryptoJS2.RabbitLegacy;
});
})(rabbitLegacy);
return rabbitLegacy.exports;
}
(function(module, exports) {
(function(root, factory, undef) {
{
module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(), requireEncBase64(), requireMd5(), requireSha1(), requireSha256(), requireSha224(), requireSha512(), requireSha384(), requireSha3(), requireRipemd160(), requireHmac(), requirePbkdf2(), requireEvpkdf(), requireCipherCore(), requireModeCfb(), requireModeCtr(), requireModeCtrGladman(), requireModeOfb(), requireModeEcb(), requirePadAnsix923(), requirePadIso10126(), requirePadIso97971(), requirePadZeropadding(), requirePadNopadding(), requireFormatHex(), requireAes(), requireTripledes(), requireRc4(), requireRabbit(), requireRabbitLegacy());
}
})(commonjsGlobal, function(CryptoJS2) {
return CryptoJS2;
});
})(cryptoJs);
var cryptoJsExports = cryptoJs.exports;
const CryptoJS = /* @__PURE__ */ getDefaultExportFromCjs(cryptoJsExports);
CryptoJS.enc.Utf8.parse("1234567812345678");
function encryptByAES(plainText, keyInBase64Str) {
let key = CryptoJS.enc.Base64.parse(keyInBase64Str);
let encrypted = CryptoJS.AES.encrypt(plainText, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return encrypted.ciphertext.toString(CryptoJS.enc.Base64);
}
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
__name: "login",
setup(__props, { expose: __expose }) {
__expose();
const show_password = vue.ref(false);
const account = vue.ref("admin");
const password = vue.ref("123456");
const read_text_state = vue.ref([]);
const login_button_status = vue.computed(() => !read_text_state.value.length);
const login_fun = () => {
if (login_button_status.value)
return common.msg("请阅读并同意《隐私政策》");
if (account.value === "")
return common.msg("账号不能为空");
if (password.value === "")
return common.msg("密码不能为空");
try {
common.loading("登录中");
const secretKey = "EtBzqj+ln5tSTof1SDhpTg==";
const cipherText = encryptByAES(password.value, secretKey);
useAccountLoginApp({ loginName: account.value, password: cipherText }).then(async (res) => {
common.hideLoading();
common.msg("登录成功");
const pages2 = getCurrentPages();
if (pages2.length === 1) {
common.switchTab("/pages/index/index");
} else {
common.navigateBack();
}
}).catch((res) => {
common.hideLoading();
if (res.rtnCode === "0002") {
common.msg("账号或密码错误,如忘记密码,请去统一身份认证平台修改。");
} else if (res.rtnCode !== "0005") {
common.msg("其他错误");
}
});
} catch (e) {
common.hideLoading();
}
};
const aaa = () => {
formatAppLog("log", "at pages/login/login.vue:117", "111");
};
const __returned__ = { show_password, account, password, read_text_state, login_button_status, login_fun, aaa, get common() {
return common;
} };
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
return __returned__;
}
});
const _imports_0 = "/static/images/login/bg.png";
const _imports_1 = "/static/images/login/profile.png";
const _imports_2 = "/static/images/login/logo_text.png";
const _imports_3 = "/static/images/login/clap.png";
const _imports_4 = "/static/images/login/show.png";
const _imports_5 = "/static/images/login/no_show.png";
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uv_input = resolveEasycom(vue.resolveDynamicComponent("uv-input"), __easycom_0$3);
const _component_uv_button = resolveEasycom(vue.resolveDynamicComponent("uv-button"), __easycom_1);
const _component_uv_checkbox = resolveEasycom(vue.resolveDynamicComponent("uv-checkbox"), __easycom_2);
const _component_uv_checkbox_group = resolveEasycom(vue.resolveDynamicComponent("uv-checkbox-group"), __easycom_3);
return vue.openBlock(), vue.createElementBlock("view", { class: "main_div max_page" }, [
vue.createElementVNode("view", { class: "bg_div" }, [
vue.createElementVNode("image", {
src: _imports_0,
class: "bg_img"
}),
vue.createElementVNode("view", { class: "profile_div" }, [
vue.createElementVNode("image", {
src: _imports_1,
class: "profile"
})
]),
vue.createElementVNode("view", { class: "title_logo" }, [
vue.createElementVNode("image", {
src: _imports_2,
class: "log_img"
}),
vue.createElementVNode("view", { class: "fl1" })
]),
vue.createElementVNode("view", { class: "title_text_div" }, [
vue.createElementVNode("view", { class: "title_text font_pf" }, " 欢迎登录 "),
vue.createElementVNode("image", {
src: _imports_3,
class: "title_text_img"
})
]),
vue.createElementVNode("view", { class: "title_text_tip font_pf" }, " 登录账号即可查看更多精彩咨询 ")
]),
vue.createElementVNode("view", { class: "account_password_div" }, [
vue.createElementVNode("view", { class: "title1 font_pf" }, " 账号 "),
vue.createVNode(_component_uv_input, {
class: "account_input",
modelValue: $setup.account,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.account = $event),
maxlength: 30,
placeholder: "请输入账号"
}, null, 8, ["modelValue"]),
vue.createElementVNode("view", { class: "title2 font_pf" }, " 密码 "),
vue.createVNode(_component_uv_input, {
class: "account_input",
modelValue: $setup.password,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.password = $event),
maxlength: 20,
placeholder: "请输入密码",
type: $setup.show_password ? "text" : "password",
"password-icon": true
}, {
suffix: vue.withCtx(() => [
vue.createElementVNode("view", {
class: "show_password",
onClick: _cache[1] || (_cache[1] = ($event) => $setup.show_password = !$setup.show_password)
}, [
$setup.show_password ? (vue.openBlock(), vue.createElementBlock("image", {
key: 0,
class: "img_100",
src: _imports_4
})) : (vue.openBlock(), vue.createElementBlock("image", {
key: 1,
class: "img_100",
src: _imports_5
}))
])
]),
_: 1
/* STABLE */
}, 8, ["modelValue", "type"])
]),
vue.createElementVNode("view", { class: "fl1" }),
vue.createElementVNode("view", { class: "bottom_login_div" }, [
vue.createElementVNode("view", {
class: "",
onClick: $setup.login_fun
}, [
vue.createVNode(_component_uv_button, {
class: "bottom_login_button",
type: "primary",
throttleTime: 500,
disabled: $setup.login_button_status
}, {
default: vue.withCtx(() => [
vue.createTextVNode("登录")
]),
_: 1
/* STABLE */
}, 8, ["disabled"])
]),
vue.createElementVNode("view", { class: "ysxy_div" }, [
vue.createVNode(_component_uv_checkbox_group, {
modelValue: $setup.read_text_state,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $setup.read_text_state = $event)
}, {
default: vue.withCtx(() => [
vue.createVNode(_component_uv_checkbox)
]),
_: 1
/* STABLE */
}, 8, ["modelValue"]),
vue.createElementVNode("view", { class: "ysxy_tip font_pf" }, [
vue.createTextVNode(" 已阅读并同意 "),
vue.createElementVNode("span", {
class: "ysxy_term",
onClick: _cache[4] || (_cache[4] = ($event) => $setup.common.navigateTo("/pages/web_view/web_view?url=http://www.baidu.com"))
}, "《服务条款》"),
vue.createTextVNode(" 与 "),
vue.createElementVNode("span", { class: "ysxy_term" }, "《隐私权政策》")
])
])
])
]);
}
const PagesLoginLogin = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-e4e4508d"], ["__file", "E:/jlyh/tra-app/pages/login/login.vue"]]);
const _sfc_main$1 = {
data() {
return {
this_url: ""
};
},
onLoad(e) {
var currentWebview = this.$scope.$getAppWebview();
setTimeout(function() {
currentWebview.children()[0];
}, 1e3);
this.this_url = e.url;
if (e.uid) {
this.this_url = this.this_url + "&uid=" + e.uid;
}
},
methods: {}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg" }, [
vue.createElementVNode("web-view", {
src: $data.this_url,
class: "webbg"
}, null, 8, ["src"])
]);
}
const PagesOtherWebView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/jlyh/tra-app/pages/other/web_view.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
__definePage("pages/study/index", PagesStudyIndex);
__definePage("pages/intelligent_answering/index", PagesIntelligentAnsweringIndex);
__definePage("pages/scene/index", PagesSceneIndex);
__definePage("pages/me/index", PagesMeIndex);
__definePage("pages/login/login", PagesLoginLogin);
__definePage("pages/other/web_view", PagesOtherWebView);
const _sfc_main = {
onLaunch: function() {
},
onShow: function() {
},
onHide: function() {
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/jlyh/tra-app/App.vue"]]);
function createApp() {
const app = vue.createVueApp(App);
return {
app
};
}
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
uni.Vuex = __Vuex__;
uni.Pinia = __Pinia__;
__app__.provide("__globalStyles", __uniConfig.styles);
__app__._component.mpType = "app";
__app__._component.render = () => {
};
__app__.mount("#app");
})(Vue);