13966 lines
509 KiB
JavaScript
13966 lines
509 KiB
JavaScript
"use weex:vue";
|
||
|
||
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 global = uni.requireGlobal()
|
||
ArrayBuffer = global.ArrayBuffer
|
||
Int8Array = global.Int8Array
|
||
Uint8Array = global.Uint8Array
|
||
Uint8ClampedArray = global.Uint8ClampedArray
|
||
Int16Array = global.Int16Array
|
||
Uint16Array = global.Uint16Array
|
||
Int32Array = global.Int32Array
|
||
Uint32Array = global.Uint32Array
|
||
Float32Array = global.Float32Array
|
||
Float64Array = global.Float64Array
|
||
BigInt64Array = global.BigInt64Array
|
||
BigUint64Array = global.BigUint64Array
|
||
};
|
||
|
||
|
||
(() => {
|
||
var __create = Object.create;
|
||
var __defProp = Object.defineProperty;
|
||
var __defProps = Object.defineProperties;
|
||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
||
var __getProtoOf = Object.getPrototypeOf;
|
||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||
var __spreadValues = (a, b) => {
|
||
for (var prop in b || (b = {}))
|
||
if (__hasOwnProp.call(b, prop))
|
||
__defNormalProp(a, prop, b[prop]);
|
||
if (__getOwnPropSymbols)
|
||
for (var prop of __getOwnPropSymbols(b)) {
|
||
if (__propIsEnum.call(b, prop))
|
||
__defNormalProp(a, prop, b[prop]);
|
||
}
|
||
return a;
|
||
};
|
||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
||
var __commonJS = (cb, mod) => function __require() {
|
||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||
};
|
||
var __copyProps = (to, from, except, desc) => {
|
||
if (from && typeof from === "object" || typeof from === "function") {
|
||
for (let key of __getOwnPropNames(from))
|
||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||
}
|
||
return to;
|
||
};
|
||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||
// If the importer is in node compatibility mode or this is not an ESM
|
||
// file that has been converted to a CommonJS file using a Babel-
|
||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||
mod
|
||
));
|
||
|
||
// vue-ns:vue
|
||
var require_vue = __commonJS({
|
||
"vue-ns:vue"(exports, module) {
|
||
module.exports = Vue;
|
||
}
|
||
});
|
||
|
||
// vuex-ns:vuex
|
||
var require_vuex = __commonJS({
|
||
"vuex-ns:vuex"(exports, module) {
|
||
module.exports = uni.Vuex;
|
||
}
|
||
});
|
||
|
||
// ../../../../document/九亿商城/jy/jiuyi2/unpackage/dist/dev/.nvue/uni-app.es.js
|
||
var import_vue = __toESM(require_vue());
|
||
var ON_SHOW = "onShow";
|
||
var ON_HIDE = "onHide";
|
||
var ON_LOAD = "onLoad";
|
||
var ON_READY = "onReady";
|
||
var ON_UNLOAD = "onUnload";
|
||
function requireNativePlugin(name) {
|
||
return weex.requireModule(name);
|
||
}
|
||
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;
|
||
}
|
||
var createHook = (lifecycle) => (hook, target = (0, import_vue.getCurrentInstance)()) => {
|
||
!import_vue.isInSSRComponentSetup && (0, import_vue.injectHook)(lifecycle, hook, target);
|
||
};
|
||
var onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
||
var onHide = /* @__PURE__ */ createHook(ON_HIDE);
|
||
var onLoad = /* @__PURE__ */ createHook(ON_LOAD);
|
||
var onReady = /* @__PURE__ */ createHook(ON_READY);
|
||
var onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
|
||
|
||
// ../../../../document/九亿商城/jy/jiuyi2/unpackage/dist/dev/.nvue/pages/index/index.js
|
||
var import_vue3 = __toESM(require_vue());
|
||
|
||
// ../../../../document/九亿商城/jy/jiuyi2/unpackage/dist/dev/.nvue/_plugin-vue_export-helper.js
|
||
var _export_sfc = (sfc, props) => {
|
||
const target = sfc.__vccOpts || sfc;
|
||
for (const [key, val] of props) {
|
||
target[key] = val;
|
||
}
|
||
return target;
|
||
};
|
||
|
||
// ../../../../document/九亿商城/jy/jiuyi2/unpackage/dist/dev/.nvue/shareFirend.js
|
||
var import_vue2 = __toESM(require_vue());
|
||
var import_vuex = __toESM(require_vuex());
|
||
var __defProp2 = Object.defineProperty;
|
||
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||
var __publicField = (obj, key, value) => {
|
||
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||
return value;
|
||
};
|
||
var fontData = [
|
||
{
|
||
"font_class": "arrow-down",
|
||
"unicode": "\uE6BE"
|
||
},
|
||
{
|
||
"font_class": "arrow-left",
|
||
"unicode": "\uE6BC"
|
||
},
|
||
{
|
||
"font_class": "arrow-right",
|
||
"unicode": "\uE6BB"
|
||
},
|
||
{
|
||
"font_class": "arrow-up",
|
||
"unicode": "\uE6BD"
|
||
},
|
||
{
|
||
"font_class": "auth",
|
||
"unicode": "\uE6AB"
|
||
},
|
||
{
|
||
"font_class": "auth-filled",
|
||
"unicode": "\uE6CC"
|
||
},
|
||
{
|
||
"font_class": "back",
|
||
"unicode": "\uE6B9"
|
||
},
|
||
{
|
||
"font_class": "bars",
|
||
"unicode": "\uE627"
|
||
},
|
||
{
|
||
"font_class": "calendar",
|
||
"unicode": "\uE6A0"
|
||
},
|
||
{
|
||
"font_class": "calendar-filled",
|
||
"unicode": "\uE6C0"
|
||
},
|
||
{
|
||
"font_class": "camera",
|
||
"unicode": "\uE65A"
|
||
},
|
||
{
|
||
"font_class": "camera-filled",
|
||
"unicode": "\uE658"
|
||
},
|
||
{
|
||
"font_class": "cart",
|
||
"unicode": "\uE631"
|
||
},
|
||
{
|
||
"font_class": "cart-filled",
|
||
"unicode": "\uE6D0"
|
||
},
|
||
{
|
||
"font_class": "chat",
|
||
"unicode": "\uE65D"
|
||
},
|
||
{
|
||
"font_class": "chat-filled",
|
||
"unicode": "\uE659"
|
||
},
|
||
{
|
||
"font_class": "chatboxes",
|
||
"unicode": "\uE696"
|
||
},
|
||
{
|
||
"font_class": "chatboxes-filled",
|
||
"unicode": "\uE692"
|
||
},
|
||
{
|
||
"font_class": "chatbubble",
|
||
"unicode": "\uE697"
|
||
},
|
||
{
|
||
"font_class": "chatbubble-filled",
|
||
"unicode": "\uE694"
|
||
},
|
||
{
|
||
"font_class": "checkbox",
|
||
"unicode": "\uE62B"
|
||
},
|
||
{
|
||
"font_class": "checkbox-filled",
|
||
"unicode": "\uE62C"
|
||
},
|
||
{
|
||
"font_class": "checkmarkempty",
|
||
"unicode": "\uE65C"
|
||
},
|
||
{
|
||
"font_class": "circle",
|
||
"unicode": "\uE65B"
|
||
},
|
||
{
|
||
"font_class": "circle-filled",
|
||
"unicode": "\uE65E"
|
||
},
|
||
{
|
||
"font_class": "clear",
|
||
"unicode": "\uE66D"
|
||
},
|
||
{
|
||
"font_class": "close",
|
||
"unicode": "\uE673"
|
||
},
|
||
{
|
||
"font_class": "closeempty",
|
||
"unicode": "\uE66C"
|
||
},
|
||
{
|
||
"font_class": "cloud-download",
|
||
"unicode": "\uE647"
|
||
},
|
||
{
|
||
"font_class": "cloud-download-filled",
|
||
"unicode": "\uE646"
|
||
},
|
||
{
|
||
"font_class": "cloud-upload",
|
||
"unicode": "\uE645"
|
||
},
|
||
{
|
||
"font_class": "cloud-upload-filled",
|
||
"unicode": "\uE648"
|
||
},
|
||
{
|
||
"font_class": "color",
|
||
"unicode": "\uE6CF"
|
||
},
|
||
{
|
||
"font_class": "color-filled",
|
||
"unicode": "\uE6C9"
|
||
},
|
||
{
|
||
"font_class": "compose",
|
||
"unicode": "\uE67F"
|
||
},
|
||
{
|
||
"font_class": "contact",
|
||
"unicode": "\uE693"
|
||
},
|
||
{
|
||
"font_class": "contact-filled",
|
||
"unicode": "\uE695"
|
||
},
|
||
{
|
||
"font_class": "down",
|
||
"unicode": "\uE6B8"
|
||
},
|
||
{
|
||
"font_class": "bottom",
|
||
"unicode": "\uE6B8"
|
||
},
|
||
{
|
||
"font_class": "download",
|
||
"unicode": "\uE68D"
|
||
},
|
||
{
|
||
"font_class": "download-filled",
|
||
"unicode": "\uE681"
|
||
},
|
||
{
|
||
"font_class": "email",
|
||
"unicode": "\uE69E"
|
||
},
|
||
{
|
||
"font_class": "email-filled",
|
||
"unicode": "\uE69A"
|
||
},
|
||
{
|
||
"font_class": "eye",
|
||
"unicode": "\uE651"
|
||
},
|
||
{
|
||
"font_class": "eye-filled",
|
||
"unicode": "\uE66A"
|
||
},
|
||
{
|
||
"font_class": "eye-slash",
|
||
"unicode": "\uE6B3"
|
||
},
|
||
{
|
||
"font_class": "eye-slash-filled",
|
||
"unicode": "\uE6B4"
|
||
},
|
||
{
|
||
"font_class": "fire",
|
||
"unicode": "\uE6A1"
|
||
},
|
||
{
|
||
"font_class": "fire-filled",
|
||
"unicode": "\uE6C5"
|
||
},
|
||
{
|
||
"font_class": "flag",
|
||
"unicode": "\uE65F"
|
||
},
|
||
{
|
||
"font_class": "flag-filled",
|
||
"unicode": "\uE660"
|
||
},
|
||
{
|
||
"font_class": "folder-add",
|
||
"unicode": "\uE6A9"
|
||
},
|
||
{
|
||
"font_class": "folder-add-filled",
|
||
"unicode": "\uE6C8"
|
||
},
|
||
{
|
||
"font_class": "font",
|
||
"unicode": "\uE6A3"
|
||
},
|
||
{
|
||
"font_class": "forward",
|
||
"unicode": "\uE6BA"
|
||
},
|
||
{
|
||
"font_class": "gear",
|
||
"unicode": "\uE664"
|
||
},
|
||
{
|
||
"font_class": "gear-filled",
|
||
"unicode": "\uE661"
|
||
},
|
||
{
|
||
"font_class": "gift",
|
||
"unicode": "\uE6A4"
|
||
},
|
||
{
|
||
"font_class": "gift-filled",
|
||
"unicode": "\uE6C4"
|
||
},
|
||
{
|
||
"font_class": "hand-down",
|
||
"unicode": "\uE63D"
|
||
},
|
||
{
|
||
"font_class": "hand-down-filled",
|
||
"unicode": "\uE63C"
|
||
},
|
||
{
|
||
"font_class": "hand-up",
|
||
"unicode": "\uE63F"
|
||
},
|
||
{
|
||
"font_class": "hand-up-filled",
|
||
"unicode": "\uE63E"
|
||
},
|
||
{
|
||
"font_class": "headphones",
|
||
"unicode": "\uE630"
|
||
},
|
||
{
|
||
"font_class": "heart",
|
||
"unicode": "\uE639"
|
||
},
|
||
{
|
||
"font_class": "heart-filled",
|
||
"unicode": "\uE641"
|
||
},
|
||
{
|
||
"font_class": "help",
|
||
"unicode": "\uE679"
|
||
},
|
||
{
|
||
"font_class": "help-filled",
|
||
"unicode": "\uE674"
|
||
},
|
||
{
|
||
"font_class": "home",
|
||
"unicode": "\uE662"
|
||
},
|
||
{
|
||
"font_class": "home-filled",
|
||
"unicode": "\uE663"
|
||
},
|
||
{
|
||
"font_class": "image",
|
||
"unicode": "\uE670"
|
||
},
|
||
{
|
||
"font_class": "image-filled",
|
||
"unicode": "\uE678"
|
||
},
|
||
{
|
||
"font_class": "images",
|
||
"unicode": "\uE650"
|
||
},
|
||
{
|
||
"font_class": "images-filled",
|
||
"unicode": "\uE64B"
|
||
},
|
||
{
|
||
"font_class": "info",
|
||
"unicode": "\uE669"
|
||
},
|
||
{
|
||
"font_class": "info-filled",
|
||
"unicode": "\uE649"
|
||
},
|
||
{
|
||
"font_class": "left",
|
||
"unicode": "\uE6B7"
|
||
},
|
||
{
|
||
"font_class": "link",
|
||
"unicode": "\uE6A5"
|
||
},
|
||
{
|
||
"font_class": "list",
|
||
"unicode": "\uE644"
|
||
},
|
||
{
|
||
"font_class": "location",
|
||
"unicode": "\uE6AE"
|
||
},
|
||
{
|
||
"font_class": "location-filled",
|
||
"unicode": "\uE6AF"
|
||
},
|
||
{
|
||
"font_class": "locked",
|
||
"unicode": "\uE66B"
|
||
},
|
||
{
|
||
"font_class": "locked-filled",
|
||
"unicode": "\uE668"
|
||
},
|
||
{
|
||
"font_class": "loop",
|
||
"unicode": "\uE633"
|
||
},
|
||
{
|
||
"font_class": "mail-open",
|
||
"unicode": "\uE643"
|
||
},
|
||
{
|
||
"font_class": "mail-open-filled",
|
||
"unicode": "\uE63A"
|
||
},
|
||
{
|
||
"font_class": "map",
|
||
"unicode": "\uE667"
|
||
},
|
||
{
|
||
"font_class": "map-filled",
|
||
"unicode": "\uE666"
|
||
},
|
||
{
|
||
"font_class": "map-pin",
|
||
"unicode": "\uE6AD"
|
||
},
|
||
{
|
||
"font_class": "map-pin-ellipse",
|
||
"unicode": "\uE6AC"
|
||
},
|
||
{
|
||
"font_class": "medal",
|
||
"unicode": "\uE6A2"
|
||
},
|
||
{
|
||
"font_class": "medal-filled",
|
||
"unicode": "\uE6C3"
|
||
},
|
||
{
|
||
"font_class": "mic",
|
||
"unicode": "\uE671"
|
||
},
|
||
{
|
||
"font_class": "mic-filled",
|
||
"unicode": "\uE677"
|
||
},
|
||
{
|
||
"font_class": "micoff",
|
||
"unicode": "\uE67E"
|
||
},
|
||
{
|
||
"font_class": "micoff-filled",
|
||
"unicode": "\uE6B0"
|
||
},
|
||
{
|
||
"font_class": "minus",
|
||
"unicode": "\uE66F"
|
||
},
|
||
{
|
||
"font_class": "minus-filled",
|
||
"unicode": "\uE67D"
|
||
},
|
||
{
|
||
"font_class": "more",
|
||
"unicode": "\uE64D"
|
||
},
|
||
{
|
||
"font_class": "more-filled",
|
||
"unicode": "\uE64E"
|
||
},
|
||
{
|
||
"font_class": "navigate",
|
||
"unicode": "\uE66E"
|
||
},
|
||
{
|
||
"font_class": "navigate-filled",
|
||
"unicode": "\uE67A"
|
||
},
|
||
{
|
||
"font_class": "notification",
|
||
"unicode": "\uE6A6"
|
||
},
|
||
{
|
||
"font_class": "notification-filled",
|
||
"unicode": "\uE6C1"
|
||
},
|
||
{
|
||
"font_class": "paperclip",
|
||
"unicode": "\uE652"
|
||
},
|
||
{
|
||
"font_class": "paperplane",
|
||
"unicode": "\uE672"
|
||
},
|
||
{
|
||
"font_class": "paperplane-filled",
|
||
"unicode": "\uE675"
|
||
},
|
||
{
|
||
"font_class": "person",
|
||
"unicode": "\uE699"
|
||
},
|
||
{
|
||
"font_class": "person-filled",
|
||
"unicode": "\uE69D"
|
||
},
|
||
{
|
||
"font_class": "personadd",
|
||
"unicode": "\uE69F"
|
||
},
|
||
{
|
||
"font_class": "personadd-filled",
|
||
"unicode": "\uE698"
|
||
},
|
||
{
|
||
"font_class": "personadd-filled-copy",
|
||
"unicode": "\uE6D1"
|
||
},
|
||
{
|
||
"font_class": "phone",
|
||
"unicode": "\uE69C"
|
||
},
|
||
{
|
||
"font_class": "phone-filled",
|
||
"unicode": "\uE69B"
|
||
},
|
||
{
|
||
"font_class": "plus",
|
||
"unicode": "\uE676"
|
||
},
|
||
{
|
||
"font_class": "plus-filled",
|
||
"unicode": "\uE6C7"
|
||
},
|
||
{
|
||
"font_class": "plusempty",
|
||
"unicode": "\uE67B"
|
||
},
|
||
{
|
||
"font_class": "pulldown",
|
||
"unicode": "\uE632"
|
||
},
|
||
{
|
||
"font_class": "pyq",
|
||
"unicode": "\uE682"
|
||
},
|
||
{
|
||
"font_class": "qq",
|
||
"unicode": "\uE680"
|
||
},
|
||
{
|
||
"font_class": "redo",
|
||
"unicode": "\uE64A"
|
||
},
|
||
{
|
||
"font_class": "redo-filled",
|
||
"unicode": "\uE655"
|
||
},
|
||
{
|
||
"font_class": "refresh",
|
||
"unicode": "\uE657"
|
||
},
|
||
{
|
||
"font_class": "refresh-filled",
|
||
"unicode": "\uE656"
|
||
},
|
||
{
|
||
"font_class": "refreshempty",
|
||
"unicode": "\uE6BF"
|
||
},
|
||
{
|
||
"font_class": "reload",
|
||
"unicode": "\uE6B2"
|
||
},
|
||
{
|
||
"font_class": "right",
|
||
"unicode": "\uE6B5"
|
||
},
|
||
{
|
||
"font_class": "scan",
|
||
"unicode": "\uE62A"
|
||
},
|
||
{
|
||
"font_class": "search",
|
||
"unicode": "\uE654"
|
||
},
|
||
{
|
||
"font_class": "settings",
|
||
"unicode": "\uE653"
|
||
},
|
||
{
|
||
"font_class": "settings-filled",
|
||
"unicode": "\uE6CE"
|
||
},
|
||
{
|
||
"font_class": "shop",
|
||
"unicode": "\uE62F"
|
||
},
|
||
{
|
||
"font_class": "shop-filled",
|
||
"unicode": "\uE6CD"
|
||
},
|
||
{
|
||
"font_class": "smallcircle",
|
||
"unicode": "\uE67C"
|
||
},
|
||
{
|
||
"font_class": "smallcircle-filled",
|
||
"unicode": "\uE665"
|
||
},
|
||
{
|
||
"font_class": "sound",
|
||
"unicode": "\uE684"
|
||
},
|
||
{
|
||
"font_class": "sound-filled",
|
||
"unicode": "\uE686"
|
||
},
|
||
{
|
||
"font_class": "spinner-cycle",
|
||
"unicode": "\uE68A"
|
||
},
|
||
{
|
||
"font_class": "staff",
|
||
"unicode": "\uE6A7"
|
||
},
|
||
{
|
||
"font_class": "staff-filled",
|
||
"unicode": "\uE6CB"
|
||
},
|
||
{
|
||
"font_class": "star",
|
||
"unicode": "\uE688"
|
||
},
|
||
{
|
||
"font_class": "star-filled",
|
||
"unicode": "\uE68F"
|
||
},
|
||
{
|
||
"font_class": "starhalf",
|
||
"unicode": "\uE683"
|
||
},
|
||
{
|
||
"font_class": "trash",
|
||
"unicode": "\uE687"
|
||
},
|
||
{
|
||
"font_class": "trash-filled",
|
||
"unicode": "\uE685"
|
||
},
|
||
{
|
||
"font_class": "tune",
|
||
"unicode": "\uE6AA"
|
||
},
|
||
{
|
||
"font_class": "tune-filled",
|
||
"unicode": "\uE6CA"
|
||
},
|
||
{
|
||
"font_class": "undo",
|
||
"unicode": "\uE64F"
|
||
},
|
||
{
|
||
"font_class": "undo-filled",
|
||
"unicode": "\uE64C"
|
||
},
|
||
{
|
||
"font_class": "up",
|
||
"unicode": "\uE6B6"
|
||
},
|
||
{
|
||
"font_class": "top",
|
||
"unicode": "\uE6B6"
|
||
},
|
||
{
|
||
"font_class": "upload",
|
||
"unicode": "\uE690"
|
||
},
|
||
{
|
||
"font_class": "upload-filled",
|
||
"unicode": "\uE68E"
|
||
},
|
||
{
|
||
"font_class": "videocam",
|
||
"unicode": "\uE68C"
|
||
},
|
||
{
|
||
"font_class": "videocam-filled",
|
||
"unicode": "\uE689"
|
||
},
|
||
{
|
||
"font_class": "vip",
|
||
"unicode": "\uE6A8"
|
||
},
|
||
{
|
||
"font_class": "vip-filled",
|
||
"unicode": "\uE6C6"
|
||
},
|
||
{
|
||
"font_class": "wallet",
|
||
"unicode": "\uE6B1"
|
||
},
|
||
{
|
||
"font_class": "wallet-filled",
|
||
"unicode": "\uE6C2"
|
||
},
|
||
{
|
||
"font_class": "weibo",
|
||
"unicode": "\uE68B"
|
||
},
|
||
{
|
||
"font_class": "weixin",
|
||
"unicode": "\uE691"
|
||
}
|
||
];
|
||
var iconUrl = "/assets/uniicons.32e978a5.ttf";
|
||
var _style_0$9 = { "uni-icons": { "": { "fontFamily": "uniicons", "textDecoration": "none", "textAlign": "center" } } };
|
||
var getVal = (val) => {
|
||
const reg = /^[0-9]*$/g;
|
||
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||
};
|
||
var domModule = weex.requireModule("dom");
|
||
domModule.addRule("fontFace", {
|
||
"fontFamily": "uniicons",
|
||
"src": "url('" + iconUrl + "')"
|
||
});
|
||
var _sfc_main$b = {
|
||
name: "UniIcons",
|
||
emits: ["click"],
|
||
props: {
|
||
type: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
color: {
|
||
type: String,
|
||
default: "#333333"
|
||
},
|
||
size: {
|
||
type: [Number, String],
|
||
default: 16
|
||
},
|
||
customPrefix: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
fontFamily: {
|
||
type: String,
|
||
default: ""
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
icons: fontData
|
||
};
|
||
},
|
||
computed: {
|
||
unicode() {
|
||
let code = this.icons.find((v) => v.font_class === this.type);
|
||
if (code) {
|
||
return code.unicode;
|
||
}
|
||
return "";
|
||
},
|
||
iconSize() {
|
||
return getVal(this.size);
|
||
},
|
||
styleObj() {
|
||
if (this.fontFamily !== "") {
|
||
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
|
||
}
|
||
return `color: ${this.color}; font-size: ${this.iconSize};`;
|
||
}
|
||
},
|
||
methods: {
|
||
_onClick() {
|
||
this.$emit("click");
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
"u-text",
|
||
{
|
||
style: (0, import_vue2.normalizeStyle)($options.styleObj),
|
||
class: "uni-icons",
|
||
onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
|
||
},
|
||
(0, import_vue2.toDisplayString)($options.unicode),
|
||
5
|
||
/* TEXT, STYLE */
|
||
);
|
||
}
|
||
var __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["styles", [_style_0$9]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]);
|
||
var nvueAnimation = requireNativePlugin("animation");
|
||
var MPAnimation = class {
|
||
constructor(options, _this) {
|
||
this.options = options;
|
||
this.animation = uni.createAnimation(__spreadValues({}, options));
|
||
this.currentStepAnimates = {};
|
||
this.next = 0;
|
||
this.$ = _this;
|
||
}
|
||
_nvuePushAnimates(type, args) {
|
||
let aniObj = this.currentStepAnimates[this.next];
|
||
let styles = {};
|
||
if (!aniObj) {
|
||
styles = {
|
||
styles: {},
|
||
config: {}
|
||
};
|
||
} else {
|
||
styles = aniObj;
|
||
}
|
||
if (animateTypes1.includes(type)) {
|
||
if (!styles.styles.transform) {
|
||
styles.styles.transform = "";
|
||
}
|
||
let unit = "";
|
||
if (type === "rotate") {
|
||
unit = "deg";
|
||
}
|
||
styles.styles.transform += `${type}(${args + unit}) `;
|
||
} else {
|
||
styles.styles[type] = `${args}`;
|
||
}
|
||
this.currentStepAnimates[this.next] = styles;
|
||
}
|
||
_animateRun(styles = {}, config2 = {}) {
|
||
let ref22 = this.$.$refs["ani"].ref;
|
||
if (!ref22)
|
||
return;
|
||
return new Promise((resolve, reject) => {
|
||
nvueAnimation.transition(ref22, __spreadValues({
|
||
styles
|
||
}, config2), (res) => {
|
||
resolve();
|
||
});
|
||
});
|
||
}
|
||
_nvueNextAnimate(animates, step = 0, fn) {
|
||
let obj = animates[step];
|
||
if (obj) {
|
||
let {
|
||
styles,
|
||
config: config2
|
||
} = obj;
|
||
this._animateRun(styles, config2).then(() => {
|
||
step += 1;
|
||
this._nvueNextAnimate(animates, step, fn);
|
||
});
|
||
} else {
|
||
this.currentStepAnimates = {};
|
||
typeof fn === "function" && fn();
|
||
this.isEnd = true;
|
||
}
|
||
}
|
||
step(config2 = {}) {
|
||
this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config2);
|
||
this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin;
|
||
this.next++;
|
||
return this;
|
||
}
|
||
run(fn) {
|
||
this.isEnd = false;
|
||
let ref22 = this.$.$refs["ani"] && this.$.$refs["ani"].ref;
|
||
if (!ref22)
|
||
return;
|
||
this._nvueNextAnimate(this.currentStepAnimates, 0, fn);
|
||
this.next = 0;
|
||
}
|
||
};
|
||
var animateTypes1 = [
|
||
"matrix",
|
||
"matrix3d",
|
||
"rotate",
|
||
"rotate3d",
|
||
"rotateX",
|
||
"rotateY",
|
||
"rotateZ",
|
||
"scale",
|
||
"scale3d",
|
||
"scaleX",
|
||
"scaleY",
|
||
"scaleZ",
|
||
"skew",
|
||
"skewX",
|
||
"skewY",
|
||
"translate",
|
||
"translate3d",
|
||
"translateX",
|
||
"translateY",
|
||
"translateZ"
|
||
];
|
||
var animateTypes2 = ["opacity", "backgroundColor"];
|
||
var animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
|
||
animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
|
||
MPAnimation.prototype[type] = function(...args) {
|
||
this._nvuePushAnimates(type, args);
|
||
return this;
|
||
};
|
||
});
|
||
function createAnimation(option, _this) {
|
||
if (!_this)
|
||
return;
|
||
clearTimeout(_this.timer);
|
||
return new MPAnimation(option, _this);
|
||
}
|
||
var _sfc_main$a = {
|
||
name: "uniTransition",
|
||
emits: ["click", "change"],
|
||
props: {
|
||
show: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
modeClass: {
|
||
type: [Array, String],
|
||
default() {
|
||
return "fade";
|
||
}
|
||
},
|
||
duration: {
|
||
type: Number,
|
||
default: 300
|
||
},
|
||
styles: {
|
||
type: Object,
|
||
default() {
|
||
return {};
|
||
}
|
||
},
|
||
customClass: {
|
||
type: String,
|
||
default: ""
|
||
},
|
||
onceRender: {
|
||
type: Boolean,
|
||
default: false
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
isShow: false,
|
||
transform: "",
|
||
opacity: 1,
|
||
animationData: {},
|
||
durationTime: 300,
|
||
config: {}
|
||
};
|
||
},
|
||
watch: {
|
||
show: {
|
||
handler(newVal) {
|
||
if (newVal) {
|
||
this.open();
|
||
} else {
|
||
if (this.isShow) {
|
||
this.close();
|
||
}
|
||
}
|
||
},
|
||
immediate: true
|
||
}
|
||
},
|
||
computed: {
|
||
// 生成样式数据
|
||
stylesObject() {
|
||
let styles = __spreadProps(__spreadValues({}, this.styles), {
|
||
"transition-duration": this.duration / 1e3 + "s"
|
||
});
|
||
let transform = "";
|
||
for (let i2 in styles) {
|
||
let line = this.toLine(i2);
|
||
transform += line + ":" + styles[i2] + ";";
|
||
}
|
||
return transform;
|
||
},
|
||
// 初始化动画条件
|
||
transformStyles() {
|
||
return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
|
||
}
|
||
},
|
||
created() {
|
||
this.config = {
|
||
duration: this.duration,
|
||
timingFunction: "ease",
|
||
transformOrigin: "50% 50%",
|
||
delay: 0
|
||
};
|
||
this.durationTime = this.duration;
|
||
},
|
||
methods: {
|
||
/**
|
||
* ref 触发 初始化动画
|
||
*/
|
||
init(obj = {}) {
|
||
if (obj.duration) {
|
||
this.durationTime = obj.duration;
|
||
}
|
||
this.animation = createAnimation(Object.assign(this.config, obj), this);
|
||
},
|
||
/**
|
||
* 点击组件触发回调
|
||
*/
|
||
onClick() {
|
||
this.$emit("click", {
|
||
detail: this.isShow
|
||
});
|
||
},
|
||
/**
|
||
* ref 触发 动画分组
|
||
* @param {Object} obj
|
||
*/
|
||
step(obj, config2 = {}) {
|
||
if (!this.animation)
|
||
return;
|
||
for (let i2 in obj) {
|
||
try {
|
||
if (typeof obj[i2] === "object") {
|
||
this.animation[i2](...obj[i2]);
|
||
} else {
|
||
this.animation[i2](obj[i2]);
|
||
}
|
||
} catch (e) {
|
||
formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:148", `\u65B9\u6CD5 ${i2} \u4E0D\u5B58\u5728`);
|
||
}
|
||
}
|
||
this.animation.step(config2);
|
||
return this;
|
||
},
|
||
/**
|
||
* ref 触发 执行动画
|
||
*/
|
||
run(fn) {
|
||
if (!this.animation)
|
||
return;
|
||
this.animation.run(fn);
|
||
},
|
||
// 开始过度动画
|
||
open() {
|
||
clearTimeout(this.timer);
|
||
this.transform = "";
|
||
this.isShow = true;
|
||
let { opacity, transform } = this.styleInit(false);
|
||
if (typeof opacity !== "undefined") {
|
||
this.opacity = opacity;
|
||
}
|
||
this.transform = transform;
|
||
this.$nextTick(() => {
|
||
this.timer = setTimeout(() => {
|
||
this.animation = createAnimation(this.config, this);
|
||
this.tranfromInit(false).step();
|
||
this.animation.run();
|
||
this.$emit("change", {
|
||
detail: this.isShow
|
||
});
|
||
}, 20);
|
||
});
|
||
},
|
||
// 关闭过度动画
|
||
close(type) {
|
||
if (!this.animation)
|
||
return;
|
||
this.tranfromInit(true).step().run(() => {
|
||
this.isShow = false;
|
||
this.animationData = null;
|
||
this.animation = null;
|
||
let { opacity, transform } = this.styleInit(false);
|
||
this.opacity = opacity || 1;
|
||
this.transform = transform;
|
||
this.$emit("change", {
|
||
detail: this.isShow
|
||
});
|
||
});
|
||
},
|
||
// 处理动画开始前的默认样式
|
||
styleInit(type) {
|
||
let styles = {
|
||
transform: ""
|
||
};
|
||
let buildStyle = (type2, mode) => {
|
||
if (mode === "fade") {
|
||
styles.opacity = this.animationType(type2)[mode];
|
||
} else {
|
||
styles.transform += this.animationType(type2)[mode] + " ";
|
||
}
|
||
};
|
||
if (typeof this.modeClass === "string") {
|
||
buildStyle(type, this.modeClass);
|
||
} else {
|
||
this.modeClass.forEach((mode) => {
|
||
buildStyle(type, mode);
|
||
});
|
||
}
|
||
return styles;
|
||
},
|
||
// 处理内置组合动画
|
||
tranfromInit(type) {
|
||
let buildTranfrom = (type2, mode) => {
|
||
let aniNum = null;
|
||
if (mode === "fade") {
|
||
aniNum = type2 ? 0 : 1;
|
||
} else {
|
||
aniNum = type2 ? "-100%" : "0";
|
||
if (mode === "zoom-in") {
|
||
aniNum = type2 ? 0.8 : 1;
|
||
}
|
||
if (mode === "zoom-out") {
|
||
aniNum = type2 ? 1.2 : 1;
|
||
}
|
||
if (mode === "slide-right") {
|
||
aniNum = type2 ? "100%" : "0";
|
||
}
|
||
if (mode === "slide-bottom") {
|
||
aniNum = type2 ? "100%" : "0";
|
||
}
|
||
}
|
||
this.animation[this.animationMode()[mode]](aniNum);
|
||
};
|
||
if (typeof this.modeClass === "string") {
|
||
buildTranfrom(type, this.modeClass);
|
||
} else {
|
||
this.modeClass.forEach((mode) => {
|
||
buildTranfrom(type, mode);
|
||
});
|
||
}
|
||
return this.animation;
|
||
},
|
||
animationType(type) {
|
||
return {
|
||
fade: type ? 0 : 1,
|
||
"slide-top": `translateY(${type ? "0" : "-100%"})`,
|
||
"slide-right": `translateX(${type ? "0" : "100%"})`,
|
||
"slide-bottom": `translateY(${type ? "0" : "100%"})`,
|
||
"slide-left": `translateX(${type ? "0" : "-100%"})`,
|
||
"zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
|
||
"zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
|
||
};
|
||
},
|
||
// 内置动画类型与实际动画对应字典
|
||
animationMode() {
|
||
return {
|
||
fade: "opacity",
|
||
"slide-top": "translateY",
|
||
"slide-right": "translateX",
|
||
"slide-bottom": "translateY",
|
||
"slide-left": "translateX",
|
||
"zoom-in": "scale",
|
||
"zoom-out": "scale"
|
||
};
|
||
},
|
||
// 驼峰转中横线
|
||
toLine(name) {
|
||
return name.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return $data.isShow ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
ref: "ani",
|
||
animation: $data.animationData,
|
||
class: (0, import_vue2.normalizeClass)($props.customClass),
|
||
style: (0, import_vue2.normalizeStyle)($options.transformStyles),
|
||
onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)),
|
||
renderWhole: true
|
||
}, [
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "default")
|
||
], 14, ["animation"])) : (0, import_vue2.createCommentVNode)("v-if", true);
|
||
}
|
||
var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
|
||
var _style_0$8 = { "uni-popup": { "": { "position": "fixed" }, ".top": { "top": 0 }, ".left": { "top": 0 }, ".right": { "top": 0 } }, "uni-popup__wrapper": { ".uni-popup ": { "position": "relative" }, ".uni-popup .left": { "paddingTop": 0, "flex": 1 }, ".uni-popup .right": { "paddingTop": 0, "flex": 1 } }, "fixforpc-top": { "": { "top": 0 } } };
|
||
var _sfc_main$9 = {
|
||
name: "uniPopup",
|
||
components: {},
|
||
emits: ["change", "maskClick"],
|
||
props: {
|
||
// 开启动画
|
||
animation: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
|
||
// message: 消息提示 ; dialog : 对话框
|
||
type: {
|
||
type: String,
|
||
default: "center"
|
||
},
|
||
// maskClick
|
||
isMaskClick: {
|
||
type: Boolean,
|
||
default: null
|
||
},
|
||
// TODO 2 个版本后废弃属性 ,使用 isMaskClick
|
||
maskClick: {
|
||
type: Boolean,
|
||
default: null
|
||
},
|
||
backgroundColor: {
|
||
type: String,
|
||
default: "none"
|
||
},
|
||
safeArea: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
maskBackgroundColor: {
|
||
type: String,
|
||
default: "rgba(0, 0, 0, 0.4)"
|
||
},
|
||
borderRadius: {
|
||
type: String
|
||
}
|
||
},
|
||
watch: {
|
||
/**
|
||
* 监听type类型
|
||
*/
|
||
type: {
|
||
handler: function(type) {
|
||
if (!this.config[type])
|
||
return;
|
||
this[this.config[type]](true);
|
||
},
|
||
immediate: true
|
||
},
|
||
isDesktop: {
|
||
handler: function(newVal) {
|
||
if (!this.config[newVal])
|
||
return;
|
||
this[this.config[this.type]](true);
|
||
},
|
||
immediate: true
|
||
},
|
||
/**
|
||
* 监听遮罩是否可点击
|
||
* @param {Object} val
|
||
*/
|
||
maskClick: {
|
||
handler: function(val) {
|
||
this.mkclick = val;
|
||
},
|
||
immediate: true
|
||
},
|
||
isMaskClick: {
|
||
handler: function(val) {
|
||
this.mkclick = val;
|
||
},
|
||
immediate: true
|
||
},
|
||
// H5 下禁止底部滚动
|
||
showPopup(show) {
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
duration: 300,
|
||
ani: [],
|
||
showPopup: false,
|
||
showTrans: false,
|
||
popupWidth: 0,
|
||
popupHeight: 0,
|
||
config: {
|
||
top: "top",
|
||
bottom: "bottom",
|
||
center: "center",
|
||
left: "left",
|
||
right: "right",
|
||
message: "top",
|
||
dialog: "center",
|
||
share: "bottom"
|
||
},
|
||
maskClass: {
|
||
position: "fixed",
|
||
bottom: 0,
|
||
top: 0,
|
||
left: 0,
|
||
right: 0,
|
||
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
||
},
|
||
transClass: {
|
||
backgroundColor: "transparent",
|
||
borderRadius: this.borderRadius || "0",
|
||
position: "fixed",
|
||
left: 0,
|
||
right: 0
|
||
},
|
||
maskShow: true,
|
||
mkclick: true,
|
||
popupstyle: "top"
|
||
};
|
||
},
|
||
computed: {
|
||
getStyles() {
|
||
let res = { backgroundColor: this.bg };
|
||
if (this.borderRadius || "0") {
|
||
res = Object.assign(res, { borderRadius: this.borderRadius });
|
||
}
|
||
return res;
|
||
},
|
||
isDesktop() {
|
||
return this.popupWidth >= 500 && this.popupHeight >= 500;
|
||
},
|
||
bg() {
|
||
if (this.backgroundColor === "" || this.backgroundColor === "none") {
|
||
return "transparent";
|
||
}
|
||
return this.backgroundColor;
|
||
}
|
||
},
|
||
mounted() {
|
||
const fixSize = () => {
|
||
const {
|
||
windowWidth,
|
||
windowHeight,
|
||
windowTop,
|
||
safeArea,
|
||
screenHeight,
|
||
safeAreaInsets
|
||
} = uni.getSystemInfoSync();
|
||
this.popupWidth = windowWidth;
|
||
this.popupHeight = windowHeight + (windowTop || 0);
|
||
if (safeArea && this.safeArea) {
|
||
this.safeAreaInsets = safeAreaInsets.bottom;
|
||
} else {
|
||
this.safeAreaInsets = 0;
|
||
}
|
||
};
|
||
fixSize();
|
||
},
|
||
// TODO vue3
|
||
unmounted() {
|
||
this.setH5Visible();
|
||
},
|
||
activated() {
|
||
this.setH5Visible(!this.showPopup);
|
||
},
|
||
deactivated() {
|
||
this.setH5Visible(true);
|
||
},
|
||
created() {
|
||
if (this.isMaskClick === null && this.maskClick === null) {
|
||
this.mkclick = true;
|
||
} else {
|
||
this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
|
||
}
|
||
if (this.animation) {
|
||
this.duration = 300;
|
||
} else {
|
||
this.duration = 0;
|
||
}
|
||
this.messageChild = null;
|
||
this.clearPropagation = false;
|
||
this.maskClass.backgroundColor = this.maskBackgroundColor;
|
||
},
|
||
methods: {
|
||
setH5Visible(visible = true) {
|
||
},
|
||
/**
|
||
* 公用方法,不显示遮罩层
|
||
*/
|
||
closeMask() {
|
||
this.maskShow = false;
|
||
},
|
||
/**
|
||
* 公用方法,遮罩层禁止点击
|
||
*/
|
||
disableMask() {
|
||
this.mkclick = false;
|
||
},
|
||
// TODO nvue 取消冒泡
|
||
clear(e) {
|
||
this.clearPropagation = true;
|
||
},
|
||
open(direction) {
|
||
if (this.showPopup) {
|
||
return;
|
||
}
|
||
let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
|
||
if (!(direction && innerType.indexOf(direction) !== -1)) {
|
||
direction = this.type;
|
||
}
|
||
if (!this.config[direction]) {
|
||
formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:298", "\u7F3A\u5C11\u7C7B\u578B\uFF1A", direction);
|
||
return;
|
||
}
|
||
this[this.config[direction]]();
|
||
this.$emit("change", {
|
||
show: true,
|
||
type: direction
|
||
});
|
||
},
|
||
close(type) {
|
||
this.showTrans = false;
|
||
this.$emit("change", {
|
||
show: false,
|
||
type: this.type
|
||
});
|
||
clearTimeout(this.timer);
|
||
this.timer = setTimeout(() => {
|
||
this.showPopup = false;
|
||
}, 300);
|
||
},
|
||
// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
|
||
touchstart() {
|
||
this.clearPropagation = false;
|
||
},
|
||
onTap() {
|
||
if (this.clearPropagation) {
|
||
this.clearPropagation = false;
|
||
return;
|
||
}
|
||
this.$emit("maskClick");
|
||
if (!this.mkclick)
|
||
return;
|
||
this.close();
|
||
},
|
||
/**
|
||
* 顶部弹出样式处理
|
||
*/
|
||
top(type) {
|
||
this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
|
||
this.ani = ["slide-top"];
|
||
this.transClass = {
|
||
position: "fixed",
|
||
left: 0,
|
||
right: 0,
|
||
backgroundColor: this.bg,
|
||
borderRadius: this.borderRadius || "0"
|
||
};
|
||
if (type)
|
||
return;
|
||
this.showPopup = true;
|
||
this.showTrans = true;
|
||
this.$nextTick(() => {
|
||
if (this.messageChild && this.type === "message") {
|
||
this.messageChild.timerClose();
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 底部弹出样式处理
|
||
*/
|
||
bottom(type) {
|
||
this.popupstyle = "bottom";
|
||
this.ani = ["slide-bottom"];
|
||
this.transClass = {
|
||
position: "fixed",
|
||
left: 0,
|
||
right: 0,
|
||
bottom: 0,
|
||
paddingBottom: this.safeAreaInsets + "px",
|
||
backgroundColor: this.bg,
|
||
borderRadius: this.borderRadius || "0"
|
||
};
|
||
if (type)
|
||
return;
|
||
this.showPopup = true;
|
||
this.showTrans = true;
|
||
},
|
||
/**
|
||
* 中间弹出样式处理
|
||
*/
|
||
center(type) {
|
||
this.popupstyle = "center";
|
||
this.ani = ["zoom-out", "fade"];
|
||
this.transClass = {
|
||
position: "fixed",
|
||
bottom: 0,
|
||
left: 0,
|
||
right: 0,
|
||
top: 0,
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
borderRadius: this.borderRadius || "0"
|
||
};
|
||
if (type)
|
||
return;
|
||
this.showPopup = true;
|
||
this.showTrans = true;
|
||
},
|
||
left(type) {
|
||
this.popupstyle = "left";
|
||
this.ani = ["slide-left"];
|
||
this.transClass = {
|
||
position: "fixed",
|
||
left: 0,
|
||
bottom: 0,
|
||
top: 0,
|
||
backgroundColor: this.bg,
|
||
borderRadius: this.borderRadius || "0"
|
||
};
|
||
if (type)
|
||
return;
|
||
this.showPopup = true;
|
||
this.showTrans = true;
|
||
},
|
||
right(type) {
|
||
this.popupstyle = "right";
|
||
this.ani = ["slide-right"];
|
||
this.transClass = {
|
||
position: "fixed",
|
||
bottom: 0,
|
||
right: 0,
|
||
top: 0,
|
||
backgroundColor: this.bg,
|
||
borderRadius: this.borderRadius || "0"
|
||
};
|
||
if (type)
|
||
return;
|
||
this.showPopup = true;
|
||
this.showTrans = true;
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_transition = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-transition"), __easycom_0);
|
||
return $data.showPopup ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: (0, import_vue2.normalizeClass)(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]]),
|
||
renderWhole: true
|
||
},
|
||
[
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
|
||
},
|
||
[
|
||
$data.maskShow ? ((0, import_vue2.openBlock)(), (0, import_vue2.createBlock)(_component_uni_transition, {
|
||
key: "1",
|
||
name: "mask",
|
||
"mode-class": "fade",
|
||
styles: $data.maskClass,
|
||
duration: $data.duration,
|
||
show: $data.showTrans,
|
||
onClick: $options.onTap
|
||
}, null, 8, ["styles", "duration", "show", "onClick"])) : (0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createVNode)(_component_uni_transition, {
|
||
key: "2",
|
||
"mode-class": $data.ani,
|
||
name: "content",
|
||
styles: $data.transClass,
|
||
duration: $data.duration,
|
||
show: $data.showTrans,
|
||
onClick: $options.onTap
|
||
}, {
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: (0, import_vue2.normalizeClass)(["uni-popup__wrapper", [$data.popupstyle]]),
|
||
style: (0, import_vue2.normalizeStyle)($options.getStyles),
|
||
onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
|
||
},
|
||
[
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "default")
|
||
],
|
||
6
|
||
/* CLASS, STYLE */
|
||
)
|
||
]),
|
||
_: 3
|
||
/* FORWARDED */
|
||
}, 8, ["mode-class", "styles", "duration", "show", "onClick"])
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
)
|
||
],
|
||
2
|
||
/* CLASS */
|
||
)) : (0, import_vue2.createCommentVNode)("v-if", true);
|
||
}
|
||
var __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["styles", [_style_0$8]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
|
||
var store = (0, import_vuex.createStore)({
|
||
state: {
|
||
// 用户信息
|
||
userinfo: {},
|
||
// tabbar当前的模式 default视频端 shop商城端
|
||
tabbarMode: "default",
|
||
// 闹钟时间
|
||
alarmTime: ""
|
||
},
|
||
mutations: {
|
||
// 获取内容
|
||
setState(state, option) {
|
||
const key = option.key;
|
||
const value = option.value;
|
||
state[key] = value;
|
||
},
|
||
// 设置用户信息
|
||
setUserInfo(state, payload) {
|
||
state.userinfo = payload;
|
||
},
|
||
// 设置 tabbar 模式
|
||
setTabbarMode(state, mode) {
|
||
state.tabbarMode = mode;
|
||
}
|
||
},
|
||
getters: {
|
||
getUserInfo(state) {
|
||
return state.userinfo;
|
||
},
|
||
getTabbarMode(state) {
|
||
return state.tabbarMode;
|
||
}
|
||
},
|
||
actions: {
|
||
updateUserInfo({ commit }, payload) {
|
||
commit("setUserInfo", payload);
|
||
},
|
||
changeTabbarMode({ commit }, mode) {
|
||
commit("setTabbarMode", mode);
|
||
}
|
||
}
|
||
});
|
||
var config = {
|
||
// 接口域名
|
||
host: "http://1.94.221.165:8101",
|
||
// host: 'https://3w823u8516.vicp.fun',
|
||
// 上传文件二级路径
|
||
uploadFilePath: "/homecommon/file/preview?fileName=",
|
||
// 上传视频二级路径
|
||
uploadVideoPath: "/homecommon/file/play?fileName=",
|
||
// 图片大小 单位m
|
||
img_size: 5,
|
||
// 视频限制大小 单位m
|
||
video_size: 300,
|
||
// h5路径
|
||
h5: "",
|
||
// 腾讯im聊天
|
||
TChat: {
|
||
// appid
|
||
SDKAppID: "1600057470",
|
||
// 验签
|
||
secretKey: "7d016821bf27a846739e209534abe4c4bba131559b3318e19f8ccf9294e08b29",
|
||
//
|
||
userSig: ""
|
||
}
|
||
};
|
||
var login = {
|
||
/**
|
||
* 用户注册
|
||
* @param {Object} param
|
||
*/
|
||
userRegister(param) {
|
||
return util$1.request({
|
||
url: `/user/register`,
|
||
data: param.data,
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 获取验证码
|
||
* @param {Object} param
|
||
*/
|
||
getCaptcha(param) {
|
||
return util$1.request({
|
||
url: "/user/sendVerifyCode",
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 用户密码登录接口
|
||
* @param {Object} param
|
||
*/
|
||
userLoginByPassword(param) {
|
||
return util$1.request({
|
||
url: "/user/login",
|
||
data: param.data,
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 修改用户密码
|
||
* @param {Object} param
|
||
*/
|
||
resetPassword(param) {
|
||
return util$1.request({
|
||
url: "/user/login/resetPassword",
|
||
data: param.data,
|
||
path: param.path,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 获取IMtoken
|
||
* @param {Object} param
|
||
*/
|
||
getIMToken(param) {
|
||
return util$1.request({
|
||
url: "/user/chat/getUserSig",
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
}
|
||
};
|
||
var mine = {
|
||
/**
|
||
* 获取用户信息
|
||
* @param {Object} param
|
||
*/
|
||
getUserinfo(param) {
|
||
return util$1.request({
|
||
url: `/user/getUserData`,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 修改用户信息
|
||
* @param {Object} param
|
||
*/
|
||
updateUserInfo(param) {
|
||
return util$1.request({
|
||
url: `/user/updateUserData`,
|
||
data: param.data,
|
||
method: "PUT",
|
||
load: 1
|
||
});
|
||
},
|
||
/**
|
||
* 获取我的评论
|
||
* @param {Object} param
|
||
*/
|
||
myComment(param) {
|
||
return util$1.request({
|
||
url: `/user/home/myComment`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
// 实名认证
|
||
certification(param) {
|
||
return util$1.request({
|
||
url: `/user/info/certification`,
|
||
data: param.data,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 支付
|
||
* @param {Object} param
|
||
*/
|
||
pay(param) {
|
||
return util$1.request({
|
||
url: "/home/pay",
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 获取余额记录
|
||
* @param {Object} param
|
||
*/
|
||
getBalanceLog(param) {
|
||
return util$1.request({
|
||
url: "/home/getBalanceLog",
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 查询我的钱包接口
|
||
* @param {Object} param
|
||
*/
|
||
selectPurse(param) {
|
||
return util$1.request({
|
||
url: "/user/selectPurse",
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 获取待释放列表
|
||
* @param {Object} param
|
||
*/
|
||
releasedList(param) {
|
||
return util$1.request({
|
||
url: "/user/released/list",
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
}
|
||
};
|
||
var video = {
|
||
/**
|
||
* 申请完播量
|
||
* @param {Object} param
|
||
*/
|
||
applyVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/applyVideo`,
|
||
query: param.query,
|
||
data: param.data,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 展播量推送
|
||
* @param {Object} param
|
||
*/
|
||
pushVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/pushVideo`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 他人用户主页
|
||
* @param {Object} param
|
||
*/
|
||
getUserInfo(param) {
|
||
return util$1.request({
|
||
url: `/home/getUserInfo`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 用户视频列表
|
||
* @param {Object} param
|
||
*/
|
||
myVideoList(param) {
|
||
return util$1.request({
|
||
url: `/home/myVideoList`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 我的收藏列表
|
||
* @param {Object} param
|
||
*/
|
||
getCollectList(param) {
|
||
return util$1.request({
|
||
url: `/collect/getCollectList`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 新建收藏夹
|
||
* @param {Object} param
|
||
*/
|
||
saveCollectList(param) {
|
||
return util$1.request({
|
||
url: `/collect/saveCollectList`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 编辑收藏夹
|
||
* @param {Object} param
|
||
*/
|
||
updateCollectList(param) {
|
||
return util$1.request({
|
||
url: `/collect/updateCollectList`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 删除收藏夹
|
||
* @param {Object} param
|
||
*/
|
||
deleteCollect(param) {
|
||
return util$1.request({
|
||
url: `/collect/deleteCollect`,
|
||
query: param.query,
|
||
load: true,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 我的收藏视频列表
|
||
* @param {Object} param
|
||
*/
|
||
getCollectVideoList(param) {
|
||
return util$1.request({
|
||
url: `/collect/getCollectVideoList`,
|
||
query: param.query,
|
||
load: true,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 收藏视频
|
||
* @param {Object} param
|
||
*/
|
||
collectVideo(param) {
|
||
return util$1.request({
|
||
url: `/collect/collectVideo`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 取消收藏
|
||
* @param {Object} param
|
||
*/
|
||
cancelCollect(param) {
|
||
return util$1.request({
|
||
url: `/collect/cancelCollect`,
|
||
query: param.query,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 首页视频分页接口
|
||
* @param {Object} param
|
||
*/
|
||
homeVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/homeVideo`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 商家视频分页
|
||
* @param {Object} param
|
||
*/
|
||
businessHomeVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/businessHomeVideo`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 其它类型视频接口
|
||
* @param {Object} param
|
||
*/
|
||
otherHomeVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/otherHomeVideo`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 我的关注视频列表
|
||
* @param {Object} param
|
||
*/
|
||
followVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/followVideo`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 查看标签分类
|
||
* @param {Object} param
|
||
*/
|
||
getLabel(param) {
|
||
return util$1.request({
|
||
url: `/home/getLabel`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 新增或编辑标签
|
||
* @param {Object} param
|
||
*/
|
||
setLabel(param) {
|
||
return util$1.request({
|
||
url: `/home/setLabel`,
|
||
data: param.data,
|
||
method: "POST",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 发布作品
|
||
* @param {Object} param
|
||
*/
|
||
publishVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/publishVideo`,
|
||
data: param.data,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 修改视频信息接口
|
||
* @param {Object} param
|
||
*/
|
||
updateVideo(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/updateVideo`,
|
||
data: param.data,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频评论列表
|
||
* @param {Object} param
|
||
*/
|
||
commentList(param) {
|
||
return util$1.request({
|
||
url: `/home/commentList`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 下级评论列表
|
||
* @param {Object} param
|
||
*/
|
||
levelCommentList(param) {
|
||
return util$1.request({
|
||
url: `/home/levelCommentList`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 点赞/取消点赞接口 0取消 1点赞
|
||
* @param {Object} param
|
||
*/
|
||
thumbsUp(param) {
|
||
return util$1.request({
|
||
url: `/home/thumbsUp`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 发表评论
|
||
* @param {Object} param
|
||
*/
|
||
comment(param) {
|
||
return util$1.request({
|
||
url: `/home/comment`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频 点赞取消赞
|
||
* @param {Object} param
|
||
*/
|
||
videoLike(param) {
|
||
return util$1.request({
|
||
url: `/home/videoLike`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 观看视频记录接口
|
||
* @param {Object} param
|
||
*/
|
||
browseLog(param) {
|
||
return util$1.request({
|
||
url: `/home/browseLog`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 热点视频
|
||
* @param {Object} param
|
||
*/
|
||
hotVideos(param) {
|
||
return util$1.request({
|
||
url: `/home/hotVideos`,
|
||
// query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频搜索记录
|
||
* @param {Object} param
|
||
*/
|
||
videoSearchLog(param) {
|
||
return util$1.request({
|
||
url: `/home/videoSearchLog`,
|
||
// query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频模糊搜索
|
||
* @param {Object} param
|
||
*/
|
||
videoSearch(param) {
|
||
return util$1.request({
|
||
url: `/home/videoSearch`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 同意好友申请
|
||
* @param {Object} param
|
||
*/
|
||
agreeFriend(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/agreeFriend`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 拒绝好友申请
|
||
* @param {Object} param
|
||
*/
|
||
refuseFriend(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/refuseFriend`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 好友列表
|
||
* @param {Object} param
|
||
*/
|
||
getFriendList(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/getFriendList`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 关注列表
|
||
* @param {Object} param
|
||
*/
|
||
getFansList(param) {
|
||
return util$1.request({
|
||
url: `/user/attention/getFansList`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 关注列表
|
||
* @param {Object} param
|
||
*/
|
||
getAttentionList(param) {
|
||
return util$1.request({
|
||
url: `/user/attention/getAttentionList`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 关注用户 关注状态 0:取关 1:关注
|
||
* @param {Object} param
|
||
*/
|
||
attention(param) {
|
||
return util$1.request({
|
||
url: `/user/attention`,
|
||
path: param.path,
|
||
data: param.data,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频观看权限 (不看他) 0拉黑 1放出
|
||
* @param {Object} param
|
||
*/
|
||
videoBlock(param) {
|
||
return util$1.request({
|
||
url: `/home/videoBlock`,
|
||
query: param.query,
|
||
load: true,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 举报视频
|
||
* @param {Object} param
|
||
*/
|
||
reportVideo(param) {
|
||
return util$1.request({
|
||
url: `/report/reportVideo`,
|
||
data: param.data,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 我的喜欢视频列表 分页
|
||
* @param {Object} param
|
||
*/
|
||
myLikeVideoList(param) {
|
||
return util$1.request({
|
||
url: `/home/myLikeVideoList`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频详情
|
||
* @param {Object} param
|
||
*/
|
||
getVideoById(param) {
|
||
return util$1.request({
|
||
url: `/homecommon/getVideoById`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 视频分享
|
||
* @param {Object} param
|
||
*/
|
||
videoShare(param) {
|
||
return util$1.request({
|
||
url: `/home/videoShare`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 设置闹铃
|
||
* @param {Object} param
|
||
*/
|
||
setAlarm(param) {
|
||
return util$1.request({
|
||
url: `/home/setAlarm`,
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 查看自己的闹铃
|
||
*/
|
||
getAlarm() {
|
||
return util$1.request({
|
||
url: `/home/getAlarm`,
|
||
method: "POST"
|
||
});
|
||
},
|
||
/**
|
||
* 查看我的今日观看任务
|
||
*/
|
||
viewingTasks() {
|
||
return util$1.request({
|
||
url: `/home/viewingTasks`,
|
||
method: "POST"
|
||
});
|
||
}
|
||
};
|
||
var news = {
|
||
/**
|
||
* 获取腾讯云用户签名
|
||
* @param {Object} param
|
||
*/
|
||
getUserSig(param) {
|
||
return util$1.request({
|
||
url: `/user/chat/getUserSig`,
|
||
method: "GET",
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 设置好友备注
|
||
* @param {Object} param
|
||
*/
|
||
setNotes(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/setNotes`,
|
||
method: "POST",
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 删除好友
|
||
* @param {Object} param
|
||
*/
|
||
deleteFriend(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/deleteFriend`,
|
||
method: "POST",
|
||
path: param.path
|
||
});
|
||
},
|
||
/**
|
||
* 添加好友
|
||
* @param {Object} param
|
||
*/
|
||
addFriend(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/addFriend`,
|
||
method: "POST",
|
||
path: param.path
|
||
});
|
||
},
|
||
/**
|
||
* 好友申请列表-分页
|
||
* @param {Object} param
|
||
*/
|
||
getFriendListPage(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/getFriendListPage`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 根据用户名模糊搜索好友-分页
|
||
* @param {Object} param
|
||
*/
|
||
searchFriendByName(param) {
|
||
return util$1.request({
|
||
url: `/user/friend/searchFriendByName`,
|
||
path: param.path,
|
||
query: param.query,
|
||
method: "GET"
|
||
});
|
||
},
|
||
/**
|
||
* 商品列表
|
||
* @param {Object} param
|
||
*/
|
||
getImToken(param) {
|
||
return util$1.request({
|
||
url: `/im/token/getUserAppToken`,
|
||
method: "get",
|
||
query: param
|
||
});
|
||
},
|
||
/**
|
||
* 商品列表
|
||
* @param {Object} param
|
||
*/
|
||
sendRedBag(param) {
|
||
return util$1.request({
|
||
url: `/home/sendRedBag`,
|
||
method: "POST",
|
||
data: param.data
|
||
});
|
||
},
|
||
// 抢红包
|
||
grabred(param) {
|
||
return util$1.request({
|
||
url: `/home/grabred`,
|
||
method: "POST",
|
||
data: param.data
|
||
});
|
||
},
|
||
// 红包详情
|
||
getRedbag(param) {
|
||
return util$1.request({
|
||
url: `/home/getRedbag`,
|
||
method: "POST",
|
||
query: param.data
|
||
});
|
||
},
|
||
grabredLog(param) {
|
||
return util$1.request({
|
||
url: `/home/grabredLog`,
|
||
method: "POST",
|
||
query: param
|
||
});
|
||
}
|
||
};
|
||
var team = {
|
||
/**
|
||
* 我的团队
|
||
* @param {Object} param
|
||
*/
|
||
myTeam(param = {}) {
|
||
return util$1.request({
|
||
url: `/user/team/get`,
|
||
method: "GET"
|
||
});
|
||
},
|
||
lowTeam(param) {
|
||
return util$1.request({
|
||
url: `/home/lowTeam`,
|
||
method: "post",
|
||
query: param.query
|
||
});
|
||
}
|
||
};
|
||
var intergral = {
|
||
/**
|
||
* 卷轴列表
|
||
* @param {Object} param
|
||
*/
|
||
scrollList(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/scroll-list`,
|
||
method: "GET",
|
||
query: param.query,
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 我购买的卷轴列表
|
||
* @param {Object} param
|
||
*/
|
||
buyScrollList(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/boughtListByUser`,
|
||
method: "GET",
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 查看卷轴(按id)
|
||
* @param {Object} param
|
||
*/
|
||
scrollinfo(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo`,
|
||
method: "GET",
|
||
path: param.path,
|
||
load: true
|
||
});
|
||
},
|
||
/**
|
||
* 按用户id按日期查卷轴积分明细
|
||
* @param {Object} param
|
||
*/
|
||
getDetailInfoByDate(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/getDetailInfoByDate`,
|
||
method: "GET",
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 按卷轴id查卷轴积分明细
|
||
* @param {Object} param
|
||
*/
|
||
getDetailInfoByScrollId(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/getDetailInfoByScrollId`,
|
||
method: "GET",
|
||
path: param.path,
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 按用户id查卷轴积分明细
|
||
* @param {Object} param
|
||
*/
|
||
getDetailInfoByUserId(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/getDetailInfoByUserId`,
|
||
method: "GET",
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 今日任务读秒记录
|
||
* @param {Object} param
|
||
*/
|
||
viewingTasks(param) {
|
||
return util$1.request({
|
||
url: `/home/viewingTasks`,
|
||
method: "post",
|
||
query: param.query
|
||
});
|
||
},
|
||
/**
|
||
* 购买卷轴
|
||
* @param {Object} param
|
||
*/
|
||
buyScroll(param) {
|
||
return util$1.request({
|
||
url: `/coreplay/app/scrollinfo/buyScroll`,
|
||
method: "post",
|
||
data: param.data
|
||
});
|
||
},
|
||
/**
|
||
* 验证码生成
|
||
* @param {Object} param
|
||
*/
|
||
myQrcode(param) {
|
||
return util$1.request({
|
||
url: `/user/team/getH5Link`,
|
||
method: "GET",
|
||
query: param.query,
|
||
responseType: "arraybuffer"
|
||
});
|
||
},
|
||
/**
|
||
* 隐藏/公开 个人昵称
|
||
* @param {Object} param
|
||
*/
|
||
nickname(param) {
|
||
return util$1.request({
|
||
url: `/home/nickname`,
|
||
method: "post",
|
||
query: param.query
|
||
});
|
||
}
|
||
};
|
||
var shop = {
|
||
/**
|
||
* 商品列表
|
||
* @param {Object} param
|
||
*/
|
||
getProduct(param) {
|
||
return util$1.request({
|
||
url: `/appProductionApi/getProductionList`,
|
||
method: "get",
|
||
query: param
|
||
});
|
||
},
|
||
/**
|
||
* 商品列表
|
||
* @param {Object} param
|
||
*/
|
||
getCategory(param) {
|
||
return util$1.request({
|
||
url: `/appProductionApi/getProductCategory`,
|
||
method: "GET",
|
||
query: param.query
|
||
});
|
||
}
|
||
};
|
||
var api = {
|
||
// 登录
|
||
login,
|
||
// 我的
|
||
mine,
|
||
// 视频模块
|
||
video,
|
||
// 消息
|
||
news,
|
||
// 我的团队
|
||
team,
|
||
// 积分
|
||
intergral,
|
||
// 商城模块
|
||
shop,
|
||
// 上传图片地址
|
||
uploadImg: "/homecommon/upload",
|
||
// 上传视频地址
|
||
uploadVideo: "/homecommon/uploadVideo",
|
||
// 公共模块可以放在这里 比如获取各种文章
|
||
/**
|
||
* 获取文章
|
||
* @param {Object} param
|
||
*/
|
||
getArticle(param) {
|
||
return util$1.request({
|
||
url: "/home/getArticle",
|
||
query: param.query,
|
||
method: "POST"
|
||
});
|
||
}
|
||
};
|
||
var util = {
|
||
// 配置参数
|
||
config,
|
||
// 正则
|
||
reg: {
|
||
// 手机号
|
||
tel: /^1[3-9]\d{9}$/,
|
||
// 身份证
|
||
idCard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
||
},
|
||
/**
|
||
* 弹窗
|
||
* @param {Object|String} obj String类型只是弹出文字 object如下
|
||
* @param {String} obj.title 弹窗的标题
|
||
* @param {String} obj.content 弹窗的内容
|
||
* @param {String} obj.confirmText 确定的文本
|
||
* @param {String} obj.showCancel 是否显示取消
|
||
* @param {String} obj.cancelText 取消的文本
|
||
* @param {Function} params.success 请求成功回调 可通过promise.then捕获
|
||
* @param {Function} params.fail 请求失败回调 可通过promise.catch捕获
|
||
* @param {Function} params.complete 请求结束回调 无论是否成功失败都会执行
|
||
* @return {Object} string返回null object返回返回promis对象 执行成功返回resolve 执行失败返回reject
|
||
*/
|
||
alert(obj) {
|
||
if (obj == null || obj == void 0)
|
||
return;
|
||
if (typeof obj == "string" || typeof obj == "number") {
|
||
uni.showToast({
|
||
"title": "" + obj,
|
||
"icon": "none",
|
||
duration: 3e3
|
||
});
|
||
return null;
|
||
}
|
||
obj.title = obj.title ? obj.title : "";
|
||
obj.content = obj.content ? obj.content : "";
|
||
obj.confirmText = obj.confirmText ? obj.confirmText : "\u786E\u5B9A";
|
||
obj.showCancel = obj.showCancel === false ? false : true;
|
||
obj.cancelText = obj.cancelText ? obj.cancelText : "\u53D6\u6D88";
|
||
return new Promise((resolve, reject) => {
|
||
uni.showModal({
|
||
title: obj.title,
|
||
content: obj.content,
|
||
confirmText: obj.confirmText,
|
||
showCancel: obj.showCancel,
|
||
cancelText: obj.cancelText,
|
||
success: (res) => {
|
||
obj.success ? obj.success(res) : () => {
|
||
};
|
||
resolve(res);
|
||
},
|
||
fail: (err) => {
|
||
obj.fail ? obj.fail(err) : () => {
|
||
};
|
||
reject(err);
|
||
},
|
||
complete: (res) => {
|
||
}
|
||
});
|
||
});
|
||
},
|
||
/**
|
||
* 上传文件
|
||
* @param {Object} obj
|
||
* @param {String} obj.mode img图片 video视频
|
||
*/
|
||
upload(obj) {
|
||
return new Promise((resolve, reject) => {
|
||
let token = uni.getStorageSync("token") || "";
|
||
obj.url = obj.url ? obj.url : api[{
|
||
img: "uploadImg",
|
||
video: "uploadVideo"
|
||
}[obj.mode]];
|
||
formatAppLog("log", "at common/js/util.js:98", "obj.url", obj.url);
|
||
obj.file = obj.file ? obj.file : "";
|
||
obj.data = obj.data ? obj.data : {};
|
||
obj.header = __spreadValues({
|
||
// 'Content-Type': 'multipart/form-data; ',
|
||
"Content-Type": "application/json;charset=UTF-8",
|
||
"Access-Control-Allow-Origin": "*"
|
||
}, obj.header);
|
||
if (token)
|
||
obj.header["Authorization"] = `Bearer ${token}`;
|
||
uni.showLoading({
|
||
title: "\u6B63\u5728\u4E0A\u4F20"
|
||
});
|
||
uni.uploadFile({
|
||
url: util.config.host + obj.url,
|
||
filePath: obj.file,
|
||
header: obj.header,
|
||
formData: obj.data,
|
||
dataType: "json",
|
||
name: "file",
|
||
success: (res) => {
|
||
uni.hideLoading();
|
||
obj.success ? obj.success(JSON.parse(res.data)) : "";
|
||
resolve(JSON.parse(res.data));
|
||
},
|
||
fail: (res) => {
|
||
uni.hideLoading();
|
||
obj.fail ? obj.fail(res.data) : "";
|
||
reject(res);
|
||
}
|
||
});
|
||
});
|
||
},
|
||
/**
|
||
* 发送网络请求
|
||
* @param {Object} params 传参
|
||
* @param {String} params.url 请求地址 一般用于后台请求接口
|
||
* @param {Array} params.query 请求地址拼接参数 用于后台请求地址拼接补全
|
||
* @param {String} params.fullurl 全请求地址 一般用于第三方请求地址
|
||
* @param {Boolean} params.load 是否显示加载动画 默认不显示
|
||
* @param {Object} params.data 请求入参 没有则不传
|
||
* @param {Object} params.header 请求头 默认不传
|
||
* @param {String} params.method 请求方式 默认值POST
|
||
* @param {Function} params.success 请求成功回调 可通过promise.then捕获
|
||
* @param {Function} params.fail 请求失败回调 可通过promise.catch捕获
|
||
* @param {Function} params.complete 请求结束回调 无论是否成功失败都会执行
|
||
* @return {Object} 返回promis对象 执行成功返回resolve 执行失败返回reject
|
||
*/
|
||
request(params2) {
|
||
let token = uni.getStorageSync("token") || "";
|
||
return new Promise((resolve, reject) => {
|
||
let url = util.config.host + (params2.url ? params2.url : "/api/index/index");
|
||
if (params2.path && params2.path instanceof Array)
|
||
params2.path.forEach((item) => {
|
||
url += `/${item}`;
|
||
});
|
||
if (params2.query) {
|
||
url = util.setUrl(url, params2.query);
|
||
}
|
||
if (params2.load) {
|
||
uni.showLoading({
|
||
title: "\u52A0\u8F7D\u4E2D",
|
||
mask: true
|
||
});
|
||
}
|
||
params2.header = __spreadValues({
|
||
"ngrok-skip-browser-warning": true,
|
||
"Content-Type": "application/json;charset=UTF-8",
|
||
"Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept",
|
||
// token: uni.getStorageSync('token'),
|
||
"Access-Control-Allow-Origin": "*",
|
||
"IS_APP_REQ": "APP_REQ"
|
||
}, params2.header);
|
||
if (token)
|
||
params2.header["Authorization"] = `Bearer ${token}`;
|
||
formatAppLog("log", "at common/js/util.js:199", "request url", url);
|
||
formatAppLog("log", "at common/js/util.js:200", "request data", params2.data);
|
||
formatAppLog("log", "at common/js/util.js:201", "request header", params2.header);
|
||
uni.request({
|
||
// 请求地址
|
||
url,
|
||
// 请求方式 get/post
|
||
method: params2.method ? params2.method : "POST",
|
||
// 是否开启SSL验证
|
||
sslVerify: false,
|
||
// 请求参数
|
||
data: params2.data,
|
||
// header请求头
|
||
header: params2.header,
|
||
// 数据类型
|
||
dataType: "json",
|
||
responseType: params2.responseType || "text",
|
||
// 请求成功返回
|
||
success: (res) => {
|
||
if (params2.load) {
|
||
uni.hideLoading();
|
||
}
|
||
if (res.data.code == 401) {
|
||
util.logout(() => {
|
||
util.alert("\u8BF7\u5148\u767B\u5F55");
|
||
reject(res.data);
|
||
});
|
||
}
|
||
params2.success ? params2.success(res.data) : "";
|
||
resolve(res.data);
|
||
},
|
||
// 请求失败返回
|
||
fail: (res) => {
|
||
formatAppLog("log", "at common/js/util.js:246", "fail", res);
|
||
if (params2.load) {
|
||
uni.hideLoading();
|
||
}
|
||
params2.fail ? params2.fail(res) : "";
|
||
reject(res);
|
||
},
|
||
complete(res) {
|
||
params2.complete ? params2.complete(res) : "";
|
||
}
|
||
});
|
||
});
|
||
},
|
||
// 替换图片的宽度为最大宽度100% (移动端解析html富文本专用)
|
||
imgReplace(value, th) {
|
||
if (!th) {
|
||
value = value.replace(/<img src="/ig, '<img src="' + util.config.host);
|
||
}
|
||
return value.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, "<p").replace(/<p>/ig, '<p style="font-size: 15px; line-height: 25px;">').replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, "<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/ig, "<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/ig, "<img$1").replace(/<img([\s\w"-=\/\.:;]+)((?:(alt="[^"]+")))/ig, "<img$1").replace(/<img([\s\w"-=\/\.:;]+)/ig, '<img style="width: 100%;" $1');
|
||
},
|
||
/**
|
||
* 路由跳转方法
|
||
* @param {string} url 跳转的目标页面路径
|
||
* @param {Object} params 要传递的参数对象
|
||
* @param {string} method 跳转方法,默认为 navigateTo
|
||
*/
|
||
routeWithParams(url, params2 = {}, method = "navigateTo") {
|
||
const fullUrl = util.setUrl("url", params2);
|
||
switch (method) {
|
||
case "navigateTo":
|
||
uni.navigateTo({
|
||
url: fullUrl
|
||
});
|
||
break;
|
||
case "redirectTo":
|
||
uni.redirectTo({
|
||
url: fullUrl
|
||
});
|
||
break;
|
||
case "reLaunch":
|
||
uni.reLaunch({
|
||
url: fullUrl
|
||
});
|
||
break;
|
||
case "switchTab":
|
||
uni.switchTab({
|
||
url: fullUrl
|
||
});
|
||
break;
|
||
default:
|
||
throw new Error(`Unsupported method: ${method}`);
|
||
}
|
||
},
|
||
/**
|
||
* get参数拼接
|
||
* @param {Object} data 需要转化的对象
|
||
*/
|
||
set_param(data) {
|
||
let url = "";
|
||
if (!data)
|
||
data = [];
|
||
for (let [key, value] of Object.entries(data)) {
|
||
url += `${key}=${value}&`;
|
||
}
|
||
url = url.substring(url.length - 1) == "&" ? url.substring(0, url.length - 1) : url;
|
||
return url ? url : url.substring(1);
|
||
},
|
||
/**
|
||
* get参数拼接url
|
||
* @param {String} url 需要处理的url
|
||
* @param {Object} data 需要转化的Object对象
|
||
*/
|
||
setUrl(url, data) {
|
||
let result = url += (url.indexOf("?") < 0 ? "?" : "&") + util.set_param(data);
|
||
return result;
|
||
},
|
||
/**
|
||
* query字符串转对象
|
||
* @param {Object} str query字符串
|
||
*/
|
||
query_to_param(str) {
|
||
let obj = {};
|
||
decodeURIComponent(str).split("&").forEach((item) => {
|
||
let [key, val] = item.split("=");
|
||
obj[key] = val;
|
||
});
|
||
return obj;
|
||
},
|
||
/**
|
||
* 倒计时
|
||
* @param {String} endtime 结束时间
|
||
*/
|
||
countDownd(endtime) {
|
||
if (!endtime) {
|
||
return;
|
||
}
|
||
endtime = Number(endtime);
|
||
let day = util.timeFormin(parseInt(time / (60 * 60 * 24)));
|
||
let hou = util.timeFormin(parseInt(time % (60 * 60 * 24) / 3600));
|
||
let min = util.timeFormin(parseInt(time % (60 * 60 * 24) % 3600 / 60));
|
||
let sec = util.timeFormin(parseInt(time % (60 * 60 * 24) % 3600 % 60));
|
||
let str = "";
|
||
if (day) {
|
||
str += day + "\u5929";
|
||
}
|
||
if (hou || hou == 0) {
|
||
if (hou > 9) {
|
||
str += hou + ":";
|
||
} else {
|
||
str += "0" + hou + ":";
|
||
}
|
||
} else {
|
||
str += "00:";
|
||
}
|
||
if (min || min == 0) {
|
||
if (min > 9) {
|
||
str += min + ":";
|
||
} else {
|
||
str += "0" + min + ":";
|
||
}
|
||
} else {
|
||
str += "00:";
|
||
}
|
||
if (sec) {
|
||
if (sec > 9) {
|
||
str += sec;
|
||
} else {
|
||
str += "0" + sec;
|
||
}
|
||
} else {
|
||
str += "00";
|
||
}
|
||
return str;
|
||
},
|
||
// 格式化时间
|
||
timeFormin(param) {
|
||
return param < 0 ? 0 : param;
|
||
},
|
||
/**
|
||
* 对二补齐
|
||
* @param {String} str 数字或数字字符串
|
||
*/
|
||
toTwo(str) {
|
||
let num = String(Number(str));
|
||
if (num.length < 2) {
|
||
num = "0" + num;
|
||
}
|
||
return num;
|
||
},
|
||
/**
|
||
* 时间戳处理成时间
|
||
* @param {Object} str
|
||
* 时间格式 月、日、时、分、秒 单个字母不补0
|
||
* yyyy 年
|
||
* MM 月
|
||
* dd 日
|
||
* WW 周
|
||
* HH 小时 24小时制
|
||
* hh 小时 12小时制
|
||
* mm 分钟
|
||
* ss 秒
|
||
* a am/pm
|
||
* 比如 'yyyy-MM-dd HH:mm:ss 周w a' 返回2023-02-06 11:19:19 周一 pm
|
||
* @param {Number} timestamp 需要处理时间戳
|
||
*/
|
||
formatTime(str, timestamp) {
|
||
const nowDate = /* @__PURE__ */ new Date();
|
||
let weekList = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
||
if (!str || typeof str != "string") {
|
||
str = "yyyy-MM-dd HH:mm:ss";
|
||
}
|
||
if (!timestamp) {
|
||
timestamp = nowDate.valueOf();
|
||
} else if (String(timestamp).length <= 10) {
|
||
timestamp = timestamp * 1e3;
|
||
}
|
||
const date = new Date(timestamp);
|
||
let year = date.getFullYear(), moth = date.getMonth() + 1, day = date.getDate(), week = date.getDay(), hour = date.getHours(), minute = date.getMinutes(), second = date.getSeconds();
|
||
str = str.replace("yyyy", year);
|
||
str = str.replace("MM", this.toTwo(moth));
|
||
str = str.replace("M", moth);
|
||
str = str.replace("dd", this.toTwo(day));
|
||
str = str.replace("d", day);
|
||
str = str.replace("w", weekList[week]);
|
||
if (str.match("h")) {
|
||
hour = hour > 12 ? hour - 12 : hour;
|
||
str = str.replace("hh", this.toTwo(hour));
|
||
str = str.replace("h", hour);
|
||
} else if (str.match("H")) {
|
||
str = str.replace("HH", this.toTwo(hour));
|
||
str = str.replace("H", hour);
|
||
}
|
||
str = str.replace("mm", this.toTwo(minute));
|
||
str = str.replace("m", minute);
|
||
str = str.replace("ss", this.toTwo(second));
|
||
str = str.replace("s", second);
|
||
let a = hour > 12 ? "am" : "pm";
|
||
str = str.replace("a", a);
|
||
return str;
|
||
},
|
||
/**
|
||
* 时间计算
|
||
* @param {String} format 格式化 规则
|
||
* format '+1 month' 往后一个月
|
||
* @param {Number} value 需要处理的时间戳 单位秒
|
||
*/
|
||
strtotime(format, value) {
|
||
if (value && format.indexOf(" ") > -1) {
|
||
let unit = format.split(" ");
|
||
let pre = unit[0];
|
||
let next = unit[1];
|
||
if (!value)
|
||
value = nowDate2.valueOf();
|
||
else if (String(value).length <= 10)
|
||
value = value * 1e3;
|
||
let nowDate2 = new Date(value);
|
||
switch (next) {
|
||
case "year":
|
||
nowDate2.setYear(nowDate2.getFullYear() + parseInt(pre));
|
||
break;
|
||
case "month":
|
||
nowDate2.setMonth(nowDate2.getMonth() + parseInt(pre));
|
||
break;
|
||
case "day":
|
||
nowDate2.setDate(nowDate2.getDate() + parseInt(pre));
|
||
break;
|
||
case "week":
|
||
nowDate2.setDate(nowDate2.getDate() + parseInt(pre) * 7);
|
||
break;
|
||
case "hour":
|
||
nowDate2.setHours(nowDate2.getHours() + parseInt(pre));
|
||
break;
|
||
case "minute":
|
||
nowDate2.setMinutes(nowDate2.getMinutes() + parseInt(pre));
|
||
break;
|
||
}
|
||
return nowDate2.getTime();
|
||
} else {
|
||
var nowDate = new Date(value);
|
||
return nowDate.getTime();
|
||
}
|
||
},
|
||
/**
|
||
* 上传图片
|
||
* @param {Object} obj 对象类型
|
||
* @param {Array} obj.value 操作的对象
|
||
* @param {Boolean} obj.unlimited 不限制
|
||
* @param {Number} obj.count 图片计数
|
||
* @param {Number} obj.type 1单张 2多张
|
||
* @param {Array} obj.sourceType ['album', 'camera']
|
||
* @param {Function} obj.success 执行成功返回的方法return修改的对象
|
||
*/
|
||
upload_image(obj) {
|
||
const count = obj.count ? obj.count : 8;
|
||
if (!obj.type)
|
||
obj.type = 2;
|
||
if (obj.value != "" && obj.value == void 0 && obj.value == null)
|
||
obj.value = obj.type == 1 ? "" : [];
|
||
if (obj.value.length >= count && obj.type == 2) {
|
||
util.alert("\u4E0A\u4F20\u56FE\u7247\u5DF2\u8FBE\u4E0A\u9650");
|
||
return;
|
||
}
|
||
let sourceType = ["album", "camera"];
|
||
uni.chooseImage({
|
||
// 限制图片
|
||
count: obj.type == 1 ? 1 : count - obj.value.length,
|
||
sourceType: obj.sourceType || sourceType,
|
||
success: (rs) => {
|
||
rs.tempFiles.forEach((item) => {
|
||
let size = 1024 * 1024 * util.config.img_size;
|
||
if (item.size > size && !obj.unlimited) {
|
||
util.alert(`\u5927\u5C0F\u8D85\u8FC7${util.config.img_size}m`);
|
||
return;
|
||
}
|
||
util.upload({
|
||
file: item.path,
|
||
mode: "img",
|
||
success(res) {
|
||
if (res.code === 200) {
|
||
if (obj.type == 2) {
|
||
obj.value.push(util.format_url(res.msg, "img"));
|
||
} else if (obj.type == 1) {
|
||
obj.value = util.format_url(res.msg, "img");
|
||
}
|
||
formatAppLog("log", "at common/js/util.js:632", "obj", obj, obj.value);
|
||
obj.success && obj.success({
|
||
result: res.msg,
|
||
value: obj.value
|
||
});
|
||
return;
|
||
}
|
||
util.alert(rs.msg);
|
||
}
|
||
});
|
||
});
|
||
},
|
||
fail(rs) {
|
||
if (rs.errMsg == "chooseImage:fail cancel")
|
||
;
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 上传视频
|
||
* @param {Object} obj 对象类型
|
||
* @param {Array} obj.value 操作的对象
|
||
* @param {Object} obj.unlimited 不限制
|
||
* @param {Object} obj.count 计数
|
||
* @param {Object} obj.success 执行成功返回的方法return修改的对象
|
||
*/
|
||
upload_video(obj) {
|
||
obj.count ? obj.count : 1;
|
||
uni.chooseVideo({
|
||
compressed: false,
|
||
success(rs) {
|
||
util.upload({
|
||
file: rs.tempFilePath,
|
||
mode: "video",
|
||
success(res) {
|
||
if (res.code == 200) {
|
||
const fullUrl = util.format_url(res.msg, "video");
|
||
obj.success && obj.success({
|
||
result: res.msg,
|
||
value: fullUrl
|
||
});
|
||
return;
|
||
} else {
|
||
util.alert(res.msg);
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail(rs) {
|
||
if (rs.errMsg == "chooseImage:fail cancel")
|
||
;
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 上传文件
|
||
* @param {Object} obj 对象类型
|
||
* @param {Array} obj.value 操作的对象
|
||
* @param {Object} obj.count 计数
|
||
* @param {Object} obj.success 执行成功返回的方法return修改的对象
|
||
*/
|
||
upload_files(obj) {
|
||
const value = obj.value;
|
||
const file_suffix = util.config.file_suffix;
|
||
const count = obj.count ? obj.count : 1;
|
||
if (value.length >= count) {
|
||
util.alert("\u4E0A\u4F20\u6570\u91CF\u5DF2\u8FBE\u4E0A\u9650");
|
||
return;
|
||
}
|
||
formatAppLog("log", "at common/js/util.js:721", "upload_files", obj);
|
||
function result_fn(path) {
|
||
let str = path.split(".").pop().toLowerCase();
|
||
let reult = file_suffix.find((node) => node.id == str);
|
||
if (!reult) {
|
||
util.alert(`\u4E0D\u80FD\u4E0A\u4F20${str}\u683C\u5F0F\u6587\u4EF6`);
|
||
return;
|
||
}
|
||
util.upload({
|
||
file: path,
|
||
success(res) {
|
||
if (res.code == 200) {
|
||
value.push(res.data);
|
||
obj.success && obj.success(__spreadProps(__spreadValues({}, res.data), {
|
||
value
|
||
}));
|
||
} else {
|
||
util.alert(res.msg);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
if (uni.getSystemInfoSync().platform == "android") {
|
||
formatAppLog("log", "at common/js/util.js:773", "chooseFile");
|
||
chooseFile((rs) => {
|
||
formatAppLog("log", "at common/js/util.js:775", "rs", rs);
|
||
result_fn(rs);
|
||
});
|
||
} else {
|
||
util.alert("\u56E0\u6743\u9650\u95EE\u9898\uFF0C\u6682\u4E0D\u652F\u6301\u975Eandroid\u5E73\u53F0");
|
||
}
|
||
return;
|
||
},
|
||
/**
|
||
* 上传音频
|
||
* @param {Object} obj 对象类型
|
||
* @param {Array} obj.value 操作的对象
|
||
* @param {Object} obj.count 计数
|
||
* @param {Object} obj.success 执行成功返回的方法return修改的对象
|
||
*/
|
||
upload_audio(obj) {
|
||
const value = obj.value;
|
||
const audio_suffix = util.config.audio_suffix;
|
||
const count = obj.count ? obj.count : 1;
|
||
if (value.length >= count) {
|
||
util.alert("\u4E0A\u4F20\u6570\u91CF\u5DF2\u8FBE\u4E0A\u9650");
|
||
return;
|
||
}
|
||
function result_fn(path) {
|
||
let str = path.split(".").pop().toLowerCase();
|
||
let reult = audio_suffix.find((node) => node.id == str);
|
||
if (!reult) {
|
||
util.alert(`\u4E0D\u80FD\u4E0A\u4F20${str}\u683C\u5F0F\u6587\u4EF6`);
|
||
return;
|
||
}
|
||
util.upload({
|
||
file: path,
|
||
success(res) {
|
||
if (res.code == 200) {
|
||
value.push(res.data);
|
||
obj.success && obj.success(__spreadProps(__spreadValues({}, res.data), {
|
||
value
|
||
}));
|
||
} else {
|
||
util.alert(res.msg);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
if (uni.getSystemInfoSync().platform == "android") {
|
||
chooseFile((rs) => {
|
||
formatAppLog("log", "at common/js/util.js:858", "chooseFile", rs);
|
||
result_fn(rs);
|
||
});
|
||
} else {
|
||
util.alert("\u56E0\u6743\u9650\u95EE\u9898\uFF0C\u6682\u4E0D\u652F\u6301\u975Eandroid\u5E73\u53F0");
|
||
}
|
||
return;
|
||
},
|
||
/**
|
||
* 视频转封面 oss特有
|
||
* @param {Object} url 视频路径
|
||
*/
|
||
video_coverImage(url) {
|
||
let result = `${url}?x-oss-process=video/snapshot,t_1,m_fast`;
|
||
return result;
|
||
},
|
||
/**
|
||
* 预览图片
|
||
* @param {Array} urls 图片列表
|
||
* @param {Number} current 当前预览的下标
|
||
*/
|
||
view_imgs(urls, current) {
|
||
if (!urls || urls.length == 0) {
|
||
util.alert("\u6682\u65E0");
|
||
return;
|
||
}
|
||
uni.previewImage({
|
||
urls,
|
||
current
|
||
});
|
||
},
|
||
/**
|
||
* 预览文件
|
||
* @param {String} url 文件路径
|
||
*/
|
||
view_file(url) {
|
||
let suffix = util.get_file_suffix(url).id;
|
||
if (!["doc", "xls", "ppt", "pdf", "docx", "xlsx", "pptx"].includes(suffix)) {
|
||
util.alert("\u64CD\u4F5C\u9700\u8981\u5728web\u7AEF");
|
||
formatAppLog("log", "at common/js/util.js:905", "Unsupported suffix", suffix);
|
||
return;
|
||
}
|
||
uni.downloadFile({
|
||
url,
|
||
success: (res) => {
|
||
uni.openDocument({
|
||
filePath: res.tempFilePath,
|
||
fail: (rs) => {
|
||
formatAppLog("log", "at common/js/util.js:914", "rs", rs);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 通过路径获取文件后缀
|
||
* @param {Object} url 需要获取的文件路径
|
||
* @param {Object} type file文件 audio音频
|
||
* @return {Object} 返回后缀列表对象 util.config.file_suffix
|
||
*/
|
||
get_file_suffix(url, type) {
|
||
if (!type)
|
||
type = "file";
|
||
const file_suffix = util.config[{
|
||
"file": "file_suffix",
|
||
"audio": "audio_suffix"
|
||
}[type]];
|
||
let result = "";
|
||
if (url)
|
||
result = file_suffix.find((item) => item.id === url.split(".").pop().toLowerCase());
|
||
return result;
|
||
},
|
||
/**
|
||
* 通过路径获取音频后缀
|
||
* @param {Object} url 需要获取的文件路径
|
||
* @return {Object} 返回后缀列表对象 util.config.file_suffix
|
||
*/
|
||
get_audio_suffix(url) {
|
||
const audio_suffix = util.config.audio_suffix;
|
||
let result = "";
|
||
if (url)
|
||
result = audio_suffix.find((item) => item.id === url.split(".").pop().toLowerCase());
|
||
return result;
|
||
},
|
||
/**
|
||
* 调起支付
|
||
* @param {Object} obj 操作对象
|
||
* @param {String} obj.payType 支付方式 WeChat微信 AliPay支付宝 4钱包
|
||
* @param {String} obj.method 支付环境 app手机应用 mp小程序
|
||
* @param {String} obj.debug 调试模式
|
||
* @param {Boolean|Object} obj.cb 支付结果跳转 false为不跳转 跳转需携带object定义对象
|
||
* @param {String} obj.cb.styles 风格 style1蓝色 style2绿色 style3橙色
|
||
* @param {String} obj.cb.result 结果 success成功 fail失败
|
||
* @param {String} obj.cb.price 价格
|
||
* @param {String} obj.cb.url 跳转的详情路径
|
||
* @param {Function} obj.fn 请求接口函数
|
||
* @param {Function} obj.success 成功方法
|
||
* @param {Function} obj.fail 失败方法
|
||
* @param {Function} obj.complete 结束方法
|
||
*/
|
||
payment(obj) {
|
||
obj = obj ? obj : {};
|
||
obj.data = obj.data ? obj.data : {};
|
||
obj.method = "app";
|
||
util.payment_request(obj);
|
||
},
|
||
// 支付请求
|
||
payment_request(obj) {
|
||
obj.debug ? formatAppLog("log", "at common/js/util.js:995", "params", obj) : "";
|
||
if (!obj.fn) {
|
||
throw "no function";
|
||
}
|
||
function result_goto(result) {
|
||
const cb = obj.cb;
|
||
if (!cb)
|
||
return;
|
||
uni.redirectTo({
|
||
url: util.setUrl("/index/pay_result", {
|
||
orderNumber: cb.orderNumbers || "",
|
||
result,
|
||
styles: cb.styles || "",
|
||
price: cb.price || "",
|
||
url: cb.url || ""
|
||
})
|
||
});
|
||
}
|
||
obj.fn(obj.data).then((rs) => {
|
||
obj.debug ? formatAppLog("log", "at common/js/util.js:1024", "request success result", rs) : "";
|
||
if (rs.code == 200) {
|
||
switch (obj.data.payType) {
|
||
case "1":
|
||
switch (obj.method) {
|
||
case "mp":
|
||
if (rs.data && rs.data.paySign) {
|
||
uni.requestPayment({
|
||
provider: "wxpay",
|
||
timeStamp: rs.data.timeStamp,
|
||
package: rs.data.package,
|
||
nonceStr: rs.data.nonceStr,
|
||
paySign: rs.data.paySign,
|
||
signType: rs.data.signType,
|
||
success(result) {
|
||
obj.success ? obj.success(rs) : "";
|
||
result_goto("success");
|
||
},
|
||
fail(result) {
|
||
obj.fail ? obj.fail(result) : "";
|
||
result_goto("fail");
|
||
},
|
||
complete(result) {
|
||
obj.debug ? formatAppLog(
|
||
"log",
|
||
"at common/js/util.js:1050",
|
||
"requestPayment complete",
|
||
result
|
||
) : "";
|
||
obj.complete ? obj.complete(result) : "";
|
||
}
|
||
});
|
||
} else {
|
||
obj.fail ? obj.fail("no data") : "";
|
||
}
|
||
break;
|
||
case "app":
|
||
uni.requestPayment({
|
||
provider: "wxpay",
|
||
orderInfo: rs.data,
|
||
success(result) {
|
||
obj.success ? obj.success(rs) : "";
|
||
result_goto("success");
|
||
},
|
||
fail(result) {
|
||
obj.fail ? obj.fail(result) : "";
|
||
result_goto("fail");
|
||
},
|
||
complete(result) {
|
||
obj.debug ? formatAppLog("log", "at common/js/util.js:1073", "requestPayment complete", result) : "";
|
||
obj.complete ? obj.complete(result) : "";
|
||
}
|
||
});
|
||
break;
|
||
}
|
||
break;
|
||
case "2":
|
||
switch (obj.method) {
|
||
case "app":
|
||
uni.requestPayment({
|
||
provider: "alipay",
|
||
orderInfo: rs.msg,
|
||
success(result) {
|
||
obj.success ? obj.success(rs) : "";
|
||
result_goto("success");
|
||
},
|
||
fail(result) {
|
||
obj.fail ? obj.fail(result) : "";
|
||
result_goto("fail");
|
||
},
|
||
complete(result) {
|
||
obj.debug ? formatAppLog("log", "at common/js/util.js:1098", "requestPayment complete", result) : "";
|
||
obj.complete ? obj.complete(result) : "";
|
||
}
|
||
});
|
||
break;
|
||
}
|
||
break;
|
||
case "4":
|
||
obj.success ? obj.success(rs) : "";
|
||
result_goto("success");
|
||
break;
|
||
}
|
||
} else {
|
||
util.alert(rs.msg);
|
||
obj.fail ? obj.fail(rs) : "";
|
||
}
|
||
}).catch((rs) => {
|
||
formatAppLog("log", "at common/js/util.js:1118", "request catch result", rs);
|
||
});
|
||
},
|
||
// 微信小程序登录
|
||
weChatLogin(obj) {
|
||
obj = obj ? obj : {};
|
||
const parent_id = uni.getStorageSync("parent_id");
|
||
const admin_id = uni.getStorageSync("admin_id");
|
||
uni.getUserProfile({
|
||
desc: "weixin",
|
||
success: (e) => {
|
||
const userInfo = e.userInfo;
|
||
let data = {
|
||
nickName: userInfo.nickName,
|
||
avatarUrl: userInfo.avatarUrl
|
||
};
|
||
uni.login({
|
||
provider: "weixin",
|
||
success: (rs) => {
|
||
data.code = rs.code;
|
||
data.platform = "wechatMini";
|
||
if (parent_id)
|
||
data.parent_id = parent_id;
|
||
if (admin_id)
|
||
data.admin_id = admin_id;
|
||
if (rs.errMsg == "login:ok") {
|
||
util.request({
|
||
url: "/api/user/third",
|
||
data,
|
||
load: 1
|
||
}).then((res) => {
|
||
if (res.code == 200) {
|
||
obj.success ? obj.success(res) : "";
|
||
}
|
||
});
|
||
}
|
||
}
|
||
});
|
||
},
|
||
fail(res) {
|
||
util.alert("\u60A8\u62D2\u7EDD\u4E86\u6388\u6743");
|
||
obj.fail ? obj.fail(res) : (res2) => {
|
||
};
|
||
},
|
||
complete() {
|
||
obj.complete ? obj.complete() : "";
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 拉起授权请求: 微信小程序、app
|
||
*/
|
||
authorize(obj) {
|
||
return new Promise((resolve, reject) => {
|
||
obj ? obj : obj = {};
|
||
let isAgreePrivacy = plus.runtime.isAgreePrivacy();
|
||
if (!isAgreePrivacy) {
|
||
resolve("\u672A\u540C\u610F\u7528\u6237\u534F\u8BAE\u9690\u79C1\u653F\u7B56");
|
||
return;
|
||
}
|
||
const menu = {
|
||
// 定位
|
||
location: {
|
||
name: "\u5B9A\u4F4D\u670D\u52A1",
|
||
scope: "scope.userLocation",
|
||
txt: "\u9700\u8981\u83B7\u53D6\u60A8\u7684\u5730\u7406\u4F4D\u7F6E"
|
||
},
|
||
// 相册
|
||
photosAlbum: {
|
||
name: "\u76F8\u518C",
|
||
scope: "scope.writePhotosAlbum",
|
||
txt: "\u9700\u8981\u8BBF\u95EE\u60A8\u7684\u76F8\u518C"
|
||
},
|
||
// 相机
|
||
camera: {
|
||
name: "\u6444\u50CF\u5934",
|
||
scope: "scope.camera",
|
||
txt: "\u9700\u8981\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934"
|
||
}
|
||
};
|
||
if (obj.key) {
|
||
obj = __spreadValues(__spreadValues({}, obj), menu[obj.key]);
|
||
}
|
||
let fnName = "";
|
||
fnName = "appAuthorize";
|
||
this[fnName](obj).then((rs) => {
|
||
obj.success ? obj.success(rs) : "";
|
||
resolve(rs);
|
||
}).catch((err) => {
|
||
obj.fail ? obj.fail(err) : "";
|
||
reject(err);
|
||
});
|
||
});
|
||
},
|
||
// app授权
|
||
appAuthorize(obj) {
|
||
return new Promise((resolve, reject) => {
|
||
const systemSetting = uni.getSystemSetting();
|
||
if (systemSetting.locationEnabled === false) {
|
||
this.alert(obj.txt);
|
||
reject({
|
||
msg: "\u672A\u6388\u6743\u5BF9\u5E94\u529F\u80FD"
|
||
});
|
||
return;
|
||
}
|
||
const authorized = uni.getAppAuthorizeSetting().locationAuthorized;
|
||
formatAppLog("log", "at common/js/util.js:1280", "locationAuthorized", authorized);
|
||
if (authorized === "config error") {
|
||
reject({
|
||
msg: "\u5F00\u53D1\u8005\u672A\u52FE\u9009\u5B9A\u4F4D\u670D\u52A1\u6A21\u5757"
|
||
});
|
||
return;
|
||
} else if (authorized === "denied")
|
||
;
|
||
else if (authorized === "authorized") {
|
||
resolve(obj);
|
||
return;
|
||
}
|
||
if (uni.getSystemInfoSync().platform == "android") {
|
||
plus.android.requestPermissions(
|
||
// 对应权限
|
||
["android.permission.ACCESS_FINE_LOCATION"],
|
||
// 成功
|
||
(resultObj) => {
|
||
let result = null;
|
||
for (let i2 = 0; i2 < resultObj.granted.length; i2++) {
|
||
let grantedPermission = resultObj.granted[i2];
|
||
formatAppLog("log", "at common/js/util.js:1312", "\u5DF2\u83B7\u53D6\u7684\u6743\u9650\uFF1A" + grantedPermission);
|
||
}
|
||
for (let i2 = 0; i2 < resultObj.deniedPresent.length; i2++) {
|
||
let deniedPresentPermission = resultObj.deniedPresent[i2];
|
||
formatAppLog("log", "at common/js/util.js:1319", "\u62D2\u7EDD\u672C\u6B21\u7533\u8BF7\u7684\u6743\u9650\uFF1A" + deniedPresentPermission);
|
||
}
|
||
for (let i2 = 0; i2 < resultObj.deniedAlways.length; i2++) {
|
||
let deniedAlwaysPermission = resultObj.deniedAlways[i2];
|
||
formatAppLog("log", "at common/js/util.js:1325", "\u6C38\u4E45\u62D2\u7EDD\u7533\u8BF7\u7684\u6743\u9650\uFF1A" + deniedAlwaysPermission);
|
||
}
|
||
if ([-1].includes(result)) {
|
||
uni.openAppAuthorizeSetting({
|
||
success: (rs) => {
|
||
reject({
|
||
msg: "\u5F15\u5BFC\u7528\u6237\u6253\u5F00\u8BBE\u7F6E\u9875\u9762",
|
||
info: rs
|
||
});
|
||
},
|
||
fail: (err) => {
|
||
reject({
|
||
msg: "\u7528\u6237\u8BBE\u7F6E\u9875\u9762\u6253\u5F00\u5931\u8D25",
|
||
info: err
|
||
});
|
||
}
|
||
});
|
||
}
|
||
},
|
||
// 失败
|
||
(error) => {
|
||
formatAppLog("log", "at common/js/util.js:1355", "\u7533\u8BF7\u6743\u9650\u9519\u8BEF\uFF1A" + error.code + " = " + error.message);
|
||
resolve({
|
||
code: error.code,
|
||
message: error.message
|
||
});
|
||
}
|
||
);
|
||
} else {
|
||
this.alert("\u8BF7\u5728\u8BBE\u7F6E\u91CC\u5141\u8BB8\u6253\u5F00\u5B9A\u4F4D\u4FE1\u606F");
|
||
resolve({
|
||
msg: "\u7528\u6237\u672A\u5F00\u542F\u5B9A\u4F4D\u6743\u9650"
|
||
});
|
||
return;
|
||
}
|
||
});
|
||
},
|
||
// 微信小程序授权
|
||
weChatAuthorize(obj) {
|
||
return new Promise((resolve, reject) => {
|
||
if (![
|
||
"scope.userInfo",
|
||
"scope.userLocation",
|
||
"scope.userLocationBackground",
|
||
"scope.address",
|
||
"scope.record",
|
||
"scope.writePhotosAlbum",
|
||
"scope.camera",
|
||
"scope.invoice",
|
||
"scope.invoiceTitle",
|
||
"scope.werun"
|
||
].includes(obj.scope)) {
|
||
resolve({
|
||
msg: "\u4E0D\u5728\u9650\u5236\u8303\u56F4\u5185"
|
||
});
|
||
return;
|
||
}
|
||
uni.authorize({
|
||
scope: obj.scope,
|
||
success: (rs) => {
|
||
resolve(rs);
|
||
},
|
||
fail: (err) => {
|
||
reject(err);
|
||
util.alert({
|
||
title: "\u7CFB\u7EDF\u63D0\u793A",
|
||
value: obj.txt,
|
||
success: (rs) => {
|
||
if (rs.confirm) {
|
||
uni.openSetting();
|
||
}
|
||
}
|
||
});
|
||
}
|
||
});
|
||
});
|
||
},
|
||
/**
|
||
* 最终登录 用于请求登录接口后统一调用的登录方法
|
||
* @param {Object} param 数据对象
|
||
* @param {Function} cb 回调函数
|
||
*/
|
||
finalLogin(param, cb) {
|
||
const token = param.msg;
|
||
uni.setStorageSync("token", token);
|
||
uni.showLoading({
|
||
mask: true
|
||
});
|
||
util.getUserinfo((userinfo) => {
|
||
uni.$emit("login");
|
||
util.loginTencent(userinfo);
|
||
setTimeout(() => {
|
||
uni.switchTab({
|
||
url: "/pages/index/index"
|
||
});
|
||
}, 500);
|
||
cb ? cb() : "";
|
||
});
|
||
},
|
||
// 登录账号管理
|
||
loginAccountManagement(userInfo) {
|
||
let userList = uni.getStorageSync("userInfoList") || [];
|
||
const index2 = userList.findIndex((item) => item.userId === userInfo.userId);
|
||
if (index2 !== -1) {
|
||
userList.splice(index2, 1);
|
||
}
|
||
userList.push(userInfo);
|
||
uni.setStorageSync("userInfoList", userList);
|
||
},
|
||
// 登录腾讯聊天
|
||
loginTencent(userinfo) {
|
||
api.login.getIMToken({}).then((rs) => {
|
||
const loginParams = {
|
||
SDKAppID: util.config.TChat.SDKAppID,
|
||
userID: userinfo.id + "",
|
||
userSig: rs.msg
|
||
};
|
||
uni.$TUICallKit.login(loginParams, (res) => {
|
||
if (res.code === 0) {
|
||
formatAppLog("log", "at common/js/util.js:1479", "[TUICallKit] login success.");
|
||
} else {
|
||
formatAppLog("error", "at common/js/util.js:1481", "[TUICallKit] login failed, failed message = ", res.msg, params);
|
||
}
|
||
});
|
||
uni.$chat.login({
|
||
userID: userinfo.id + "",
|
||
userSig: rs.msg
|
||
}).then((rs2) => {
|
||
formatAppLog("log", "at common/js/util.js:1490", "im login success", rs2);
|
||
});
|
||
});
|
||
return;
|
||
},
|
||
/**
|
||
* 获取用户信息
|
||
* @param {Function} cb 回调函数
|
||
*/
|
||
getUserinfo(cb) {
|
||
return new Promise((reslove) => {
|
||
api.mine.getUserinfo().then((rs) => {
|
||
if (rs.code === 200) {
|
||
const userinfo = rs.data;
|
||
reslove(userinfo);
|
||
store.commit("setState", {
|
||
key: "userinfo",
|
||
value: userinfo
|
||
});
|
||
uni.setStorageSync("userinfo", userinfo);
|
||
cb ? cb(userinfo) : "";
|
||
}
|
||
}).finally(() => {
|
||
uni.hideLoading();
|
||
});
|
||
});
|
||
},
|
||
/**
|
||
* 验证登录
|
||
* @param {Object} cb 回调函数
|
||
*/
|
||
isLogin(cb) {
|
||
let userinfo = uni.$store.state.userinfo;
|
||
return new Promise((resolve, reject) => {
|
||
if (!userinfo.id) {
|
||
reject();
|
||
return;
|
||
}
|
||
resolve();
|
||
cb ? cb() : "";
|
||
});
|
||
},
|
||
/**
|
||
* 清除登录状态
|
||
* @param {Function} cb 回调函数
|
||
*/
|
||
logout(cb) {
|
||
const userinfo = store.state.userinfo;
|
||
if (userinfo.userId) {
|
||
uni.$emit("logout");
|
||
uni.$chat.logout().then((rs) => {
|
||
formatAppLog("log", "at common/js/util.js:1565", "tim logout rs");
|
||
}).catch((rs) => {
|
||
formatAppLog("log", "at common/js/util.js:1567", "tim logout error:", rs);
|
||
});
|
||
}
|
||
store.commit("setState", {
|
||
key: "userinfo",
|
||
value: {}
|
||
});
|
||
uni.removeStorageSync("userinfo");
|
||
uni.removeStorageSync("token");
|
||
cb ? cb() : "";
|
||
},
|
||
// 是否实名
|
||
isAuth(param) {
|
||
util.isLogin(() => {
|
||
const userinfo = uni.$store.state.userinfo;
|
||
formatAppLog("log", "at common/js/util.js:1589", "userinfo.userIdCard", userinfo.userIdCard);
|
||
if (userinfo.userIdCard) {
|
||
param.success ? param.success(userinfo) : "";
|
||
return;
|
||
}
|
||
if (!param.noLink)
|
||
uni.navigateTo({
|
||
url: "/pages/mine/realname"
|
||
});
|
||
param.fail ? pararm.fail(userinfo) : "";
|
||
});
|
||
},
|
||
// 拨打电话
|
||
makePhone(phoneNumber) {
|
||
if (!phoneNumber) {
|
||
util.alert("\u6682\u65E0\u624B\u673A\u53F7");
|
||
}
|
||
uni.makePhoneCall({
|
||
phoneNumber,
|
||
fail(err) {
|
||
formatAppLog("log", "at common/js/util.js:1611", "err", err);
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 处理路径添加host或这默认图片地址
|
||
* @param {String} ev 需要处理的字符串
|
||
* @param {String} mode img图片 video视频
|
||
* @return {String} 返回的路径
|
||
*/
|
||
format_url(ev, mode) {
|
||
if (!ev)
|
||
return "";
|
||
if (ev.match(/^http/))
|
||
return ev;
|
||
return "https://9yvideo.oss-cn-beijing.aliyuncs.com/" + ev;
|
||
},
|
||
/**
|
||
* 去除路径里的host
|
||
* @param {Object} ev 需要处理的字符串
|
||
* @return {String} 处理之后的路径
|
||
*/
|
||
replace_url(ev) {
|
||
if (!ev || typeof ev != "string")
|
||
throw `${ev} is not String`;
|
||
let result = ev.slice(ev.indexOf("/images") + 1);
|
||
return result;
|
||
},
|
||
/**
|
||
* 格式化经纬度
|
||
* @param {String} num 数字或数字字符串
|
||
*/
|
||
formart_lnglat(num) {
|
||
if (!num)
|
||
return num;
|
||
num = parseFloat(Number(num).toFixed(6));
|
||
return num;
|
||
},
|
||
/**
|
||
* 检查跳转
|
||
* @param {String} route 路径
|
||
* @param {String} type 跳转
|
||
*/
|
||
checkLink(route, type = "navigateTo") {
|
||
const currentPages = getCurrentPages();
|
||
const find_route = route;
|
||
const find_index = currentPages.findIndex((node) => {
|
||
return node.route == find_route;
|
||
});
|
||
if (find_index < 0) {
|
||
uni[type]({
|
||
url: `/${find_route}`
|
||
});
|
||
} else {
|
||
uni.navigateBack({
|
||
delta: currentPages.length - find_index - 1
|
||
});
|
||
}
|
||
},
|
||
/**
|
||
* 数字转化
|
||
*/
|
||
rp(n) {
|
||
var cnum = ["\u96F6", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341"];
|
||
var s = "";
|
||
n = "" + n;
|
||
for (var i2 = 0; i2 < n.length; i2++) {
|
||
s += cnum[parseInt(n.charAt(i2))];
|
||
}
|
||
if (s.length == 2) {
|
||
if (s.charAt(1) == cnum[0]) {
|
||
s = s.charAt(0) + cnum[10];
|
||
if (s == cnum[1] + cnum[10]) {
|
||
s = cnum[10];
|
||
}
|
||
} else if (s.charAt(0) == cnum[1]) {
|
||
s = cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[2]) {
|
||
s = cnum[2] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[3]) {
|
||
s = cnum[3] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[4]) {
|
||
s = cnum[4] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[5]) {
|
||
s = cnum[5] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[6]) {
|
||
s = cnum[6] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[7]) {
|
||
s = cnum[7] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[8]) {
|
||
s = cnum[8] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[9]) {
|
||
s = cnum[9] + cnum[10] + s.charAt(1);
|
||
} else if (s.charAt(0) == cnum[10]) {
|
||
s = cnum[10] + cnum[10] + s.charAt(1);
|
||
}
|
||
}
|
||
return s;
|
||
},
|
||
/**
|
||
* 复制文本
|
||
* @param {String} text 需要复制的文本
|
||
*/
|
||
copyText(text) {
|
||
uni.setClipboardData({
|
||
data: text,
|
||
success: () => {
|
||
util.alert({
|
||
title: "\u6587\u672C\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"
|
||
});
|
||
}
|
||
});
|
||
},
|
||
showToastAndRedirect(title, icon = "none", fun = () => {
|
||
}) {
|
||
uni.showToast({
|
||
title,
|
||
icon,
|
||
duration: 2e3,
|
||
// 显示两秒
|
||
complete: () => {
|
||
fun();
|
||
uni.hideLoading();
|
||
}
|
||
});
|
||
},
|
||
/**
|
||
* 去聊天
|
||
* @param {Object} option
|
||
* @param {Object} option.name 标题昵称
|
||
* @param {Object} option.msgId 聊天对象id
|
||
* @param {Object} option.type 聊天类型
|
||
*/
|
||
toChat(option) {
|
||
uni.navigateTo({
|
||
url: util.setUrl("/pages/news/question-answer/index", {
|
||
name: option.name,
|
||
msgId: option.msgId,
|
||
type: option.type
|
||
})
|
||
});
|
||
},
|
||
// 扫码
|
||
scan() {
|
||
uni.scanCode({
|
||
success: (res) => {
|
||
if (res && res.result) {
|
||
let result = JSON.parse(res.result);
|
||
if (result.key == "user") {
|
||
uni.navigateTo({
|
||
url: util.setUrl("/pages/news/applyFriend", {
|
||
userId: result.userId,
|
||
nickname: result.userNickname
|
||
})
|
||
});
|
||
}
|
||
}
|
||
},
|
||
fail: (err) => {
|
||
util.alert("\u4E8C\u7EF4\u7801\u626B\u63CF\u5931\u8D25");
|
||
}
|
||
});
|
||
}
|
||
};
|
||
var util$1 = util;
|
||
var _style_0$7 = {};
|
||
var _sfc_main$8 = {
|
||
__name: "statusBar",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const height = (0, import_vue2.ref)(0);
|
||
onLoad(() => {
|
||
uni.getSystemInfo().then((rs) => {
|
||
height.value = rs.statusBarHeight + "px";
|
||
});
|
||
});
|
||
const __returned__ = { height, get onLoad() {
|
||
return onLoad;
|
||
}, ref: import_vue2.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
"view",
|
||
{
|
||
style: (0, import_vue2.normalizeStyle)({ height: $setup.height }),
|
||
renderWhole: true
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
);
|
||
}
|
||
var statusBar = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["styles", [_style_0$7]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/header/statusBar.vue"]]);
|
||
var _imports_0$2 = "/static/pause.png";
|
||
var _imports_1 = "/static/statistics.jpg";
|
||
var _imports_2 = "/static/indexAtt.png";
|
||
var _imports_3 = "/static/indexLike.png";
|
||
var _imports_4 = "/static/indexLike1.png";
|
||
var _imports_5 = "/static/privateLike.png";
|
||
var _imports_6 = "/static/indexMsg.png";
|
||
var _imports_7 = "/static/openPage.png";
|
||
var _imports_8 = "/static/indexCollect1.png";
|
||
var _imports_9 = "/static/indexCollect.png";
|
||
var _imports_10 = "/static/indexShare.png";
|
||
var _imports_11 = "/static/indexMoney1.png";
|
||
var _imports_12 = "/static/indexMoney.png";
|
||
var _style_0$6 = { "videoBox": { "": { "backgroundColor": "#000000" } }, "duration": { "": { "marginTop": "120rpx", "width": "750rpx", "backgroundColor": "rgba(255,255,255,0.3)" } }, "line": { ".duration ": { "width": 0, "height": "2rpx", "backgroundColor": "rgba(255,255,255,0.8)", "transitionDuration": 250 } }, "pausePanel": { "": { "backgroundColor": "rgba(0,0,0,0.5)" } }, "pauseImg": { ".pausePanel ": { "width": "140rpx", "height": "140rpx" } }, "panelRight": { "": { "alignItems": "flex-end" } }, "text": { ".panelRight ": { "textAlign": "center", "color": "#ffffff", "fontSize": "24rpx" } }, "operate": { ".panelRight ": { "flex": 1, "justifyContent": "flex-end", "alignItems": "flex-end", "textAlign": "center", "paddingBottom": "130rpx" } }, "item": { ".panelRight .operate ": { "marginTop": "5rpx", "marginRight": 0, "marginBottom": "5rpx", "marginLeft": 0, "paddingTop": "10rpx", "paddingRight": "5rpx", "paddingBottom": "10rpx", "paddingLeft": "5rpx" }, ".panelRight .operate .money": { "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0 } }, "col": { ".panelRight .operate .item ": { "alignItems": "center", "justifyContent": "center", "width": "80rpx" } }, "focus": { ".panelRight ": { "alignItems": "center", "left": 0, "right": 0, "bottom": 0 } }, "panelBottom": { "": { "paddingRight": "150rpx" } }, "goods": { ".panelBottom ": { "paddingTop": "10rpx", "paddingRight": "10rpx", "paddingBottom": "10rpx", "paddingLeft": "10rpx", "width": "480rpx", "marginBottom": "20rpx", "backgroundColor": "rgba(0,0,0,0.3)" } }, "collectListBox": { "": { "justifyContent": "center", "width": 0, "backgroundColor": "rgba(51,51,51,0.5)", "borderRadius": "25rpx", "transitionProperty": "width", "transitionDuration": 300 }, ".active": { "width": "300rpx" } }, "li": { ".collectListBox .li+": { "marginLeft": "15rpx" } }, "@TRANSITION": { "line": { "duration": 250 }, "collectListBox": { "property": "width", "duration": 300 } } };
|
||
var _sfc_main$7 = {
|
||
__name: "indexVideo",
|
||
props: {
|
||
// 当前视频对象
|
||
item: {
|
||
type: Object
|
||
},
|
||
// 列表中的视频下标
|
||
index: {
|
||
type: Number
|
||
},
|
||
// 当前列表的index
|
||
current: {
|
||
type: Number
|
||
},
|
||
// 当前tab的index
|
||
tabIndex: {
|
||
type: Number
|
||
},
|
||
// 模式 list列表 detail详情
|
||
mode: {
|
||
type: String,
|
||
default: "list"
|
||
},
|
||
// 是否我自己 0不是 1是
|
||
isMine: {
|
||
type: [String, Number],
|
||
default: 0
|
||
}
|
||
},
|
||
emits: ["showTime", "showComment", "showCollect", "showShareFirend", "onPlay", "onPause", "like", "detailMenu", "onEnd", "longtap", "update:item"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
const dom22 = requireNativePlugin("dom");
|
||
const props = __props;
|
||
const emit = __emit;
|
||
const videoCtx = (0, import_vue2.ref)(null);
|
||
const playState = (0, import_vue2.ref)(true);
|
||
const collectFirst = (0, import_vue2.ref)(false);
|
||
const videoTime = (0, import_vue2.reactive)({
|
||
// 总长
|
||
duration: 0,
|
||
// 当前时间
|
||
currentTime: 0
|
||
});
|
||
let videoCurrentTime = (0, import_vue2.ref)(0);
|
||
const alarmTime = (0, import_vue2.computed)(() => {
|
||
let result = uni.$store.state.alarmTime;
|
||
return result;
|
||
});
|
||
(0, import_vue2.onMounted)(() => {
|
||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||
});
|
||
function handleVideo() {
|
||
if (playState.value)
|
||
pause();
|
||
else
|
||
play();
|
||
}
|
||
function play() {
|
||
let pages = getCurrentPages();
|
||
let page = pages[pages.length - 1];
|
||
if (props.index != props.current || !["pages/index/index", "pages/index/videoDetail"].includes(page.route))
|
||
return;
|
||
videoCtx.value.play();
|
||
}
|
||
function pause() {
|
||
videoCtx.value.pause();
|
||
}
|
||
function onVideoPlay() {
|
||
playState.value = true;
|
||
emit("onPlay");
|
||
}
|
||
function onVideoPause() {
|
||
playState.value = false;
|
||
emit("onPause");
|
||
}
|
||
function handleComment() {
|
||
emit("showComment", props.item);
|
||
}
|
||
function handleTime() {
|
||
emit("showTime");
|
||
}
|
||
function showCollect() {
|
||
util$1.isLogin().then((rs) => {
|
||
emit("showCollect", props.item);
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function handleCollectFirst() {
|
||
return;
|
||
}
|
||
function handleShareFirend() {
|
||
util$1.isLogin().then((rs) => {
|
||
emit("showShareFirend", props.item);
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function handleLike(index2, isLike) {
|
||
formatAppLog("log", "at components/index/indexVideo.vue:175", "index", index2);
|
||
util$1.isLogin().then((rs) => {
|
||
emit("like", {
|
||
index: index2,
|
||
isLike
|
||
});
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function handlePrivateLike(index2) {
|
||
util$1.isLogin().then((rs) => {
|
||
util$1.alert({
|
||
title: "\u63D0\u793A",
|
||
content: "\u8BF7\u786E\u8BA4\uFF0C\u662F\u5426\u4E3A\u9690\u79C1\u8D5E(\u9690\u79C1\u8D5E\u4EC5\u81EA\u5DF1\u548C\u4F5C\u8005\u53EF\u89C1)?",
|
||
confirmText: "\u9690\u79C1\u8D5E",
|
||
cancelText: "\u516C\u5F00\u8D5E"
|
||
}).then((rs2) => {
|
||
if (rs2.confirm)
|
||
emit("like", {
|
||
index: index2,
|
||
isLike: 3
|
||
});
|
||
else
|
||
emit("like", {
|
||
index: index2,
|
||
isLike: 0
|
||
});
|
||
});
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function handleDetailMenu(item) {
|
||
emit("detailMenu");
|
||
}
|
||
function handleTimeupdate(ev) {
|
||
Object.assign(videoTime, ev.detail);
|
||
if (videoTime.duration != 0)
|
||
videoCurrentTime.value = videoTime.currentTime / videoTime.duration * 750;
|
||
emit("update:item", __spreadProps(__spreadValues({}, props.item), {
|
||
videoTime,
|
||
videoCurrentTime: videoCurrentTime.value
|
||
}));
|
||
}
|
||
function handleEnded() {
|
||
videoCurrentTime.value = 750;
|
||
videoCtx.value.stop();
|
||
setTimeout(() => {
|
||
if (props.index == props.current)
|
||
play();
|
||
else
|
||
pause();
|
||
}, 750);
|
||
emit("onEnd");
|
||
}
|
||
function handleUser(item) {
|
||
uni.navigateTo({
|
||
url: util$1.setUrl("/pages/index/videoHome", {
|
||
userId: item.userId
|
||
})
|
||
});
|
||
}
|
||
function handleWaiting(ev) {
|
||
if (props.index == props.current)
|
||
play();
|
||
else
|
||
pause();
|
||
}
|
||
function longtap(ev) {
|
||
emit("longtap");
|
||
}
|
||
__expose({
|
||
play,
|
||
pause,
|
||
videoTime,
|
||
item: props.item,
|
||
playState,
|
||
videoCtx: () => videoCtx.value
|
||
});
|
||
const __returned__ = { proxy, dom: dom22, props, emit, videoCtx, playState, collectFirst, videoTime, get videoCurrentTime() {
|
||
return videoCurrentTime;
|
||
}, set videoCurrentTime(v) {
|
||
videoCurrentTime = v;
|
||
}, alarmTime, handleVideo, play, pause, onVideoPlay, onVideoPause, handleComment, handleTime, showCollect, handleCollectFirst, handleShareFirend, handleLike, handlePrivateLike, handleDetailMenu, handleTimeupdate, handleEnded, handleUser, handleWaiting, longtap, onMounted: import_vue2.onMounted, ref: import_vue2.ref, reactive: import_vue2.reactive, getCurrentInstance: import_vue2.getCurrentInstance, watch: import_vue2.watch, computed: import_vue2.computed, nextTick: import_vue2.nextTick, statusBar, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_navigator = (0, import_vue2.resolveComponent)("navigator");
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
"view",
|
||
{
|
||
class: "f1 pr",
|
||
ref: "videoBoxRef",
|
||
renderWhole: true
|
||
},
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u89C6\u9891\u5C42 "),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "videoBox pfull",
|
||
onLongpress: $setup.longtap,
|
||
onTouchmove: _cache[0] || (_cache[0] = (0, import_vue2.withModifiers)(() => {
|
||
}, ["stop"]))
|
||
},
|
||
[
|
||
(0, import_vue2.createVNode)($setup["statusBar"]),
|
||
(0, import_vue2.createElementVNode)("u-video", {
|
||
class: "video f1",
|
||
id: "video" + $props.tabIndex + $props.index,
|
||
src: $props.item.format_videoUrl,
|
||
showFullscreenBtn: false,
|
||
enableProgressGesture: false,
|
||
controls: "false",
|
||
onClick: $setup.handleVideo,
|
||
onPlay: $setup.onVideoPlay,
|
||
onPause: $setup.onVideoPause,
|
||
showCenterPlayBtn: false,
|
||
onTimeupdate: $setup.handleTimeupdate,
|
||
onEnded: $setup.handleEnded,
|
||
onWaiting: $setup.handleWaiting,
|
||
playStrategy: 2
|
||
}, null, 40, ["id", "src"]),
|
||
(0, import_vue2.createCommentVNode)(" \u89C6\u9891\u8FDB\u5EA6\u6761 "),
|
||
(0, import_vue2.createCommentVNode)(' <videoProgress v-model:progress="videoCurrentTime" /> '),
|
||
(0, import_vue2.createCommentVNode)(" \u89C6\u9891\u65F6\u957F "),
|
||
(0, import_vue2.createCommentVNode)(` <view class="duration">\r
|
||
<view class="line" :style="{ width: videoCurrentTime + 'rpx' }"></view>\r
|
||
</view> `)
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
),
|
||
(0, import_vue2.createCommentVNode)(" \u6682\u505C\u8499\u7248 "),
|
||
!$setup.playState ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "pausePanel pfull fmid"
|
||
}, [
|
||
(0, import_vue2.createCommentVNode)(" \u6682\u505C\u6309\u94AE "),
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "pauseImg",
|
||
src: _imports_0$2,
|
||
mode: "aspectFit"
|
||
})
|
||
])) : (0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createCommentVNode)(" \u53F3\u4FA7\u64CD\u4F5C\u533A "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "panelRight pa t0 b0 r0" }, [
|
||
(0, import_vue2.createVNode)($setup["statusBar"]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "head" }),
|
||
(0, import_vue2.createElementVNode)("view", { class: "f1 jcr pl5 pt40 pr20" }, [
|
||
(0, import_vue2.createCommentVNode)(" \u64CD\u4F5C\u53F0 "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "operate f1" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "item" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh60",
|
||
src: _imports_1,
|
||
mode: "aspectFit"
|
||
})
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u7528\u6237\u5934\u50CF "),
|
||
(0, import_vue2.createVNode)(_component_navigator, {
|
||
url: $setup.util.setUrl("/pages/index/videoHome", { userId: $props.item.userId }),
|
||
class: "item pr mb10"
|
||
}, {
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh80 cir",
|
||
src: $props.item.format_header,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"]),
|
||
!$props.item.isAttention ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "focus pa"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh40",
|
||
src: _imports_2,
|
||
mode: "aspectFit"
|
||
})
|
||
])) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["url"]),
|
||
(0, import_vue2.createCommentVNode)(" \u70B9\u8D5E "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "item" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "pr" }, [
|
||
$props.item.isLike == 0 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
"u-image",
|
||
{
|
||
key: 0,
|
||
class: "wh50",
|
||
src: _imports_3,
|
||
mode: "aspectFit",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.handleLike($props.index, 0)),
|
||
onLongpress: _cache[2] || (_cache[2] = ($event) => $setup.handlePrivateLike($props.index))
|
||
},
|
||
null,
|
||
32
|
||
/* NEED_HYDRATION */
|
||
)) : $props.item.isLike == 1 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 1,
|
||
class: "wh50",
|
||
src: _imports_4,
|
||
mode: "aspectFit",
|
||
onClick: _cache[3] || (_cache[3] = ($event) => $setup.handleLike($props.index, 0))
|
||
})) : $props.item.isLike == 3 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 2 },
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u79C1\u5BC6\u8D5E\u7684\u56FE\u6807 "),
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh50",
|
||
src: _imports_5,
|
||
mode: "aspectFit",
|
||
onClick: _cache[4] || (_cache[4] = ($event) => $setup.handleLike($props.index, 0))
|
||
})
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
)) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "txt mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue2.toDisplayString)($props.item.likes),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u7559\u8A00 "),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "item",
|
||
onClick: $setup.handleComment
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh50",
|
||
src: _imports_6,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue2.createElementVNode)("view", { class: "txt mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue2.toDisplayString)($props.item.comment),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u6536\u85CF "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "item df fdr" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: (0, import_vue2.normalizeClass)(["collectListBox", { "active": $setup.collectFirst }])
|
||
},
|
||
[
|
||
(0, import_vue2.createElementVNode)("scroll-view", {
|
||
scrollX: "true",
|
||
showScrollbar: false,
|
||
class: "scroll df fdr"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "list fdr plr15" }, [
|
||
((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)(5, (item, index2) => {
|
||
return (0, import_vue2.createElementVNode)("u-image", {
|
||
key: index2,
|
||
class: "li wh70 br20",
|
||
src: _imports_7,
|
||
mode: "aspectFill"
|
||
});
|
||
}),
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
])
|
||
])
|
||
],
|
||
2
|
||
/* CLASS */
|
||
),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "col",
|
||
onClick: $setup.showCollect,
|
||
onLongpress: $setup.handleCollectFirst
|
||
},
|
||
[
|
||
$props.item.isCollect ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 0,
|
||
class: "wh50",
|
||
src: _imports_8,
|
||
mode: "aspectFit"
|
||
})) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 1,
|
||
class: "wh50",
|
||
src: _imports_9,
|
||
mode: "aspectFit"
|
||
})),
|
||
(0, import_vue2.createElementVNode)("view", { class: "txt mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue2.toDisplayString)($props.item.collect),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
)
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u5206\u4EAB "),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "item",
|
||
onClick: $setup.handleShareFirend
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh50",
|
||
src: _imports_10,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue2.createElementVNode)("view", { class: "txt mt10" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "text" }, "\u5206\u4EAB")
|
||
])
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u95F9\u949F "),
|
||
$props.mode == "list" ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "item money",
|
||
onClick: $setup.handleTime
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "col" }, [
|
||
$setup.alarmTime ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 0,
|
||
class: "wh80",
|
||
src: _imports_11,
|
||
mode: "aspectFit"
|
||
})) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 1,
|
||
class: "wh80",
|
||
src: _imports_12,
|
||
mode: "aspectFit"
|
||
}))
|
||
])
|
||
])) : (0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createCommentVNode)(" \u8BE6\u60C5\u83DC\u5355 "),
|
||
$props.mode == "detail" && $props.isMine == 1 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 1,
|
||
class: "item money",
|
||
onClick: $setup.handleTime
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "col wh90 fmid tac",
|
||
onClick: $setup.handleDetailMenu
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "more-filled",
|
||
color: "#d8d8d8",
|
||
size: "70rpx"
|
||
})
|
||
])
|
||
])) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||
])
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u5E95\u90E8\u7528\u6237\u4FE1\u606F "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "panelBottom pa l0 r0 b0 pl40 pb30" }, [
|
||
(0, import_vue2.createCommentVNode)(" \u5546\u54C1\u4FE1\u606F "),
|
||
(0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createCommentVNode)(" \u7528\u6237 "),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "user",
|
||
onClick: _cache[5] || (_cache[5] = ($event) => $setup.handleUser($props.item))
|
||
}, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "cfff f36" },
|
||
"@" + (0, import_vue2.toDisplayString)($props.item.userName),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u7B80\u4ECB "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "desc mt5" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "t2hd cfff f28" },
|
||
(0, import_vue2.toDisplayString)($props.item.title),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
])
|
||
],
|
||
512
|
||
/* NEED_PATCH */
|
||
);
|
||
}
|
||
var indexVideo = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["styles", [_style_0$6]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/indexVideo.vue"]]);
|
||
var _style_0$5 = { "scroll": { ".commentAreaAlt .listBox ": { "height": "1000rpx" } }, "line": { ".commentAreaAlt ": { "width": 40, "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#D8D8D8" } }, "inputArea": { ".commentAreaAlt ": { "boxShadow": "0px 8px 20px 0px rgba(0, 0, 0, 0.3)" } } };
|
||
var _sfc_main$6 = {
|
||
__name: "commentArea",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
let detail = (0, import_vue2.reactive)({});
|
||
let content = (0, import_vue2.ref)("");
|
||
const showLoad = (0, import_vue2.ref)(true);
|
||
let listProperty = (0, import_vue2.reactive)({
|
||
data: [],
|
||
pageSize: 10,
|
||
pageNum: 1,
|
||
total: 0
|
||
});
|
||
const reply = (0, import_vue2.reactive)({});
|
||
const placeholder = (0, import_vue2.computed)(() => {
|
||
let result = "\u8BC4\u8BBA\u4E00\u4E0B\u5427~";
|
||
if (reply.id)
|
||
result = `\u56DE\u590D @${reply.userNickname}`;
|
||
return result;
|
||
});
|
||
const paddingHeight = (0, import_vue2.ref)(0);
|
||
(0, import_vue2.onMounted)(() => {
|
||
uni.onKeyboardHeightChange((rs) => {
|
||
paddingHeight.value = rs.height;
|
||
});
|
||
});
|
||
(0, import_vue2.onBeforeUnmount)(() => {
|
||
uni.offKeyboardHeightChange((rs) => {
|
||
formatAppLog("log", "at components/index/commentArea.vue:56", "rs", rs);
|
||
});
|
||
});
|
||
function refreshList() {
|
||
listProperty.total = 0;
|
||
listProperty.pageNum = 1;
|
||
getList();
|
||
}
|
||
function getList() {
|
||
api.video.commentList({
|
||
query: {
|
||
videoId: detail.videoId,
|
||
pageSize: listProperty.pageSize,
|
||
pageNume: listProperty.pageNum
|
||
}
|
||
}).then((rs) => {
|
||
formatAppLog("log", "at components/index/commentArea.vue:77", "commentList", rs);
|
||
if (rs.code == 200) {
|
||
if (listProperty.pageNum == 1)
|
||
listProperty.data.length = 0;
|
||
listProperty.data.push(...rs.rows.map((item) => {
|
||
item.pageSize = 10;
|
||
item.pageNum = 0;
|
||
item.child = [];
|
||
item.formatUserPortrait = util$1.format_url(item.userPortrait, "img");
|
||
item.childShow = true;
|
||
return item;
|
||
}));
|
||
listProperty.total = rs.total;
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
}).finally(() => {
|
||
showLoad.value = false;
|
||
});
|
||
}
|
||
function handleSubmit() {
|
||
if (!content.value) {
|
||
util$1.alert("\u8BF7\u8F93\u5165\u8BC4\u8BBA\u7684\u5185\u5BB9");
|
||
return;
|
||
}
|
||
api.video.comment({
|
||
query: {
|
||
partentId: reply.id ? reply.id : 0,
|
||
videoId: detail.videoId,
|
||
context: content.value
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
proxy.$refs.comment.close();
|
||
detail.comment++;
|
||
refreshList();
|
||
setTimeout(() => {
|
||
content.value = "";
|
||
}, 500);
|
||
uni.$emit("updateVideo", detail);
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function open(item) {
|
||
if (detail.videoId != item.videoId) {
|
||
Object.assign(detail, {}, item);
|
||
refreshList();
|
||
}
|
||
proxy.$refs.commentArea.open();
|
||
}
|
||
function close() {
|
||
proxy.$refs.commentArea.close();
|
||
}
|
||
function handleReply(item) {
|
||
Object.assign(reply, item);
|
||
proxy.$refs.comment.open();
|
||
}
|
||
function showComment() {
|
||
reply.id = "";
|
||
proxy.$refs.comment.open();
|
||
}
|
||
function handleExpansion(item, index2) {
|
||
if (item.childShow == false) {
|
||
item.childShow = true;
|
||
return;
|
||
}
|
||
if (item.child.length >= item.num && item.childShow) {
|
||
item.childShow = false;
|
||
return;
|
||
}
|
||
item.pageNum++;
|
||
getLevelCommentList(item, index2);
|
||
}
|
||
function getLevelCommentList(item, index2) {
|
||
api.video.levelCommentList({
|
||
query: {
|
||
commentId: item.id,
|
||
pageSize: item.pageSize,
|
||
pageNum: item.pageNum
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
listProperty.data[index2].child.push(...rs.rows.map((node) => {
|
||
node.formatUserPortrait = util$1.format_url(node.userPortrait, "img");
|
||
return node;
|
||
}));
|
||
item.childShow = true;
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function handleLike(item) {
|
||
util$1.isLogin().then((rs) => {
|
||
api.video.thumbsUp({
|
||
query: {
|
||
// 0取消 1点赞
|
||
type: item.isLike ? 0 : 1,
|
||
// 评论id
|
||
commentId: item.id
|
||
}
|
||
}).then((rs2) => {
|
||
if (rs2.code == 200) {
|
||
if (item.isLike)
|
||
item.likes--;
|
||
else
|
||
item.likes++;
|
||
item.isLike = !item.isLike;
|
||
listProperty.data = JSON.parse(JSON.stringify(listProperty.data));
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs2.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function toUser(user) {
|
||
uni.navigateTo({
|
||
url: util$1.setUrl("/pages/index/videoHome", {
|
||
userId: user.userId
|
||
})
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, get detail() {
|
||
return detail;
|
||
}, set detail(v) {
|
||
detail = v;
|
||
}, get content() {
|
||
return content;
|
||
}, set content(v) {
|
||
content = v;
|
||
}, showLoad, get listProperty() {
|
||
return listProperty;
|
||
}, set listProperty(v) {
|
||
listProperty = v;
|
||
}, reply, placeholder, paddingHeight, refreshList, getList, handleSubmit, open, close, handleReply, showComment, handleExpansion, getLevelCommentList, handleLike, toUser, onMounted: import_vue2.onMounted, ref: import_vue2.ref, reactive: import_vue2.reactive, getCurrentInstance: import_vue2.getCurrentInstance, watch: import_vue2.watch, computed: import_vue2.computed, onBeforeUnmount: import_vue2.onBeforeUnmount, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_rich_text = (0, import_vue2.resolveComponent)("rich-text");
|
||
const _component_uni_popup = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u8BC4\u8BBA\u533A "),
|
||
(0, import_vue2.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "commentArea",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "commentAreaAlt popBot bfff" }, [
|
||
$setup.showLoad ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "showLoad fmid ptb30"
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, { type: "spinner-cycle" }),
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "c666 f28" }, "\u52A0\u8F7D\u4E2D...")
|
||
])) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 1,
|
||
class: "listBox"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("scroll-view", {
|
||
scrollY: "",
|
||
class: "scroll plr20",
|
||
showScrollbar: false
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "list ptb40" }, [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)($setup.listProperty.data, (item, index2) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
class: "item mtb20",
|
||
key: index2
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr" }, [
|
||
(0, import_vue2.createCommentVNode)(" \u5934\u50CF "),
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh70 cir",
|
||
src: item.formatUserPortrait,
|
||
mode: "aspectFill",
|
||
onClick: ($event) => $setup.toUser(item)
|
||
}, null, 8, ["src", "onClick"]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "col ml20 f1" }, [
|
||
(0, import_vue2.createCommentVNode)(" \u7528\u6237\u4FE1\u606F\u548C\u70B9\u8D5E "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "f1" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", {
|
||
class: "c666 f24",
|
||
onClick: ($event) => $setup.toUser(item)
|
||
}, (0, import_vue2.toDisplayString)(item.userNickname), 9, ["onClick"]),
|
||
(0, import_vue2.createVNode)(_component_rich_text, {
|
||
class: "mt5 c333 f28",
|
||
nodes: item.context
|
||
}, null, 8, ["nodes"])
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "like oh aic pl20",
|
||
onClick: ($event) => $setup.handleLike(item)
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "heart-filled",
|
||
color: item.isLike ? "#F84259" : "#b3b3b3",
|
||
size: "32rpx"
|
||
}, null, 8, ["color"]),
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c333 f24" },
|
||
(0, import_vue2.toDisplayString)(item.likes),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u53D1\u5E03\u65F6\u95F4\u548C\u56DE\u590D "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c999 f24" },
|
||
(0, import_vue2.toDisplayString)(item.createTime),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "ml100",
|
||
onClick: ($event) => $setup.handleReply(item)
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "c666 f24" }, "\u56DE\u590D")
|
||
], 8, ["onClick"])
|
||
]),
|
||
item.num != 0 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 0 },
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u5B50\u8BC4\u8BBA "),
|
||
item.childShow ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "child"
|
||
}, [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)(item.child, (secItem, secIndex) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
class: "df fdr mt15",
|
||
key: secItem.id
|
||
}, [
|
||
(0, import_vue2.createCommentVNode)(" \u5934\u50CF "),
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh40 cir",
|
||
src: secItem.formatUserPortrait,
|
||
mode: "aspectFill",
|
||
onClick: ($event) => $setup.toUser(secItem)
|
||
}, null, 8, ["src", "onClick"]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "col pl20 f1" }, [
|
||
(0, import_vue2.createCommentVNode)(" \u7528\u6237\u4FE1\u606F\u548C\u70B9\u8D5E "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "f1" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", {
|
||
class: "c333 f24",
|
||
onClick: ($event) => $setup.toUser(secItem)
|
||
}, (0, import_vue2.toDisplayString)(secItem.userNickname), 9, ["onClick"]),
|
||
(0, import_vue2.createVNode)(_component_rich_text, {
|
||
class: "mt5 c333 f28",
|
||
nodes: secItem.context
|
||
}, null, 8, ["nodes"])
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "like oh aic pl20",
|
||
onClick: ($event) => $setup.handleLike(secItem)
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "heart-filled",
|
||
color: secItem.isLike ? "#F84259" : "#b3b3b3",
|
||
size: "32rpx"
|
||
}, null, 8, ["color"]),
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c333 f24" },
|
||
(0, import_vue2.toDisplayString)(secItem.likes),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 8, ["onClick"])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u53D1\u5E03\u65F6\u95F4\u548C\u56DE\u590D "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c999 f24" },
|
||
(0, import_vue2.toDisplayString)(secItem.createTime),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
(0, import_vue2.createCommentVNode)("v-if", true)
|
||
])
|
||
])
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])) : (0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "df fdr aic mt20",
|
||
onClick: ($event) => $setup.handleExpansion(item, index2)
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "line mr10" }),
|
||
item.childShow ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 0 },
|
||
[
|
||
item.num == item.child.length ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 0 },
|
||
[
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "c666 f24" }, "\u6536\u8D77"),
|
||
(0, import_vue2.createVNode)(_component_uni_icons, { type: "top" })
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
)) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 1 },
|
||
[
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c666 f24" },
|
||
"\u5C55\u5F00" + (0, import_vue2.toDisplayString)(item.num - item.child.length) + "\u6761\u56DE\u590D",
|
||
1
|
||
/* TEXT */
|
||
),
|
||
(0, import_vue2.createVNode)(_component_uni_icons, { type: "bottom" })
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
)) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 1 },
|
||
[
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c666 f24" },
|
||
"\u5C55\u5F00" + (0, import_vue2.toDisplayString)(item.num) + "\u6761\u56DE\u590D",
|
||
1
|
||
/* TEXT */
|
||
),
|
||
(0, import_vue2.createVNode)(_component_uni_icons, { type: "bottom" })
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
))
|
||
], 8, ["onClick"])
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
)) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||
])
|
||
])
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
!$setup.listProperty.data[0] ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "fmid fdr"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "nomore f32" }, "\u6682\u65E0\u8BC4\u8BBA\uFF0C\u5FEB\u6765\u62A2\u6C99\u53D1\u5427~")
|
||
])) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 1,
|
||
class: "fmid fdr"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "nomore" }, "\u6682\u65E0\u66F4\u591A")
|
||
]))
|
||
])
|
||
])),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "inputArea ptb20 plr20",
|
||
onClick: $setup.showComment
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "inputBox ptb10 plr10" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "placeholderStyle f28" }, "\u8BC4\u8BBA\u4E00\u4E0B\u5427~")
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createCommentVNode)(" \u56DE\u590D\u5F39\u7A97 "),
|
||
(0, import_vue2.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "comment",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "popBot ptb30 plr30 bfff" }, [
|
||
(0, import_vue2.createElementVNode)("u-textarea", {
|
||
modelValue: $setup.content,
|
||
onInput: _cache[0] || (_cache[0] = ($event) => $setup.content = $event.detail.value),
|
||
adjustPosition: false,
|
||
class: "textarea",
|
||
placeholder: $setup.placeholder
|
||
}, null, 40, ["modelValue", "placeholder"]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr jcr" }, [
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "btn sm black plr20",
|
||
onClick: $setup.handleSubmit
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "cfff f28" }, "\u53D1\u9001")
|
||
])
|
||
]),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
style: (0, import_vue2.normalizeStyle)({ height: $setup.paddingHeight + "px" })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
);
|
||
}
|
||
var commentAlt = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["styles", [_style_0$5]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/commentArea.vue"]]);
|
||
var mpMixins = {};
|
||
var bindIngXMixins = {};
|
||
var BindingX = requireNativePlugin("bindingx");
|
||
var dom = requireNativePlugin("dom");
|
||
var animation = requireNativePlugin("animation");
|
||
bindIngXMixins = {
|
||
data() {
|
||
return {};
|
||
},
|
||
watch: {
|
||
show(newVal) {
|
||
if (this.autoClose)
|
||
return;
|
||
if (this.stop)
|
||
return;
|
||
this.stop = true;
|
||
if (newVal) {
|
||
this.open(newVal);
|
||
} else {
|
||
this.close();
|
||
}
|
||
},
|
||
leftOptions() {
|
||
this.getSelectorQuery();
|
||
this.init();
|
||
},
|
||
rightOptions(newVal) {
|
||
this.init();
|
||
}
|
||
},
|
||
created() {
|
||
this.swipeaction = this.getSwipeAction();
|
||
if (this.swipeaction && Array.isArray(this.swipeaction.children)) {
|
||
this.swipeaction.children.push(this);
|
||
}
|
||
},
|
||
mounted() {
|
||
this.box = this.getEl(this.$refs["selector-box--hock"]);
|
||
this.selector = this.getEl(this.$refs["selector-content--hock"]);
|
||
this.leftButton = this.getEl(this.$refs["selector-left-button--hock"]);
|
||
this.rightButton = this.getEl(this.$refs["selector-right-button--hock"]);
|
||
this.init();
|
||
},
|
||
// beforeDestroy() {
|
||
// this.swipeaction.children.forEach((item, index) => {
|
||
// if (item === this) {
|
||
// this.swipeaction.children.splice(index, 1)
|
||
// }
|
||
// })
|
||
// },
|
||
methods: {
|
||
init() {
|
||
this.$nextTick(() => {
|
||
this.x = 0;
|
||
this.button = {
|
||
show: false
|
||
};
|
||
setTimeout(() => {
|
||
this.getSelectorQuery();
|
||
}, 200);
|
||
});
|
||
},
|
||
onClick(index2, item, position) {
|
||
this.$emit("click", {
|
||
content: item,
|
||
index: index2,
|
||
position
|
||
});
|
||
},
|
||
touchstart(e) {
|
||
if (this.disabled)
|
||
return;
|
||
if (this.stop)
|
||
return;
|
||
this.stop = true;
|
||
if (this.autoClose && this.swipeaction) {
|
||
this.swipeaction.closeOther(this);
|
||
}
|
||
const leftWidth = this.button.left.width;
|
||
const rightWidth = this.button.right.width;
|
||
let expression = this.range(this.x, -rightWidth, leftWidth);
|
||
let leftExpression = this.range(this.x - leftWidth, -leftWidth, 0);
|
||
let rightExpression = this.range(this.x + rightWidth, 0, rightWidth);
|
||
this.eventpan = BindingX.bind({
|
||
anchor: this.box,
|
||
eventType: "pan",
|
||
props: [{
|
||
element: this.selector,
|
||
property: "transform.translateX",
|
||
expression
|
||
}, {
|
||
element: this.leftButton,
|
||
property: "transform.translateX",
|
||
expression: leftExpression
|
||
}, {
|
||
element: this.rightButton,
|
||
property: "transform.translateX",
|
||
expression: rightExpression
|
||
}]
|
||
}, (e2) => {
|
||
if (e2.state === "end") {
|
||
this.x = e2.deltaX + this.x;
|
||
this.isclick = true;
|
||
this.bindTiming(e2.deltaX);
|
||
}
|
||
});
|
||
},
|
||
touchend(e) {
|
||
if (this.isopen !== "none" && !this.isclick) {
|
||
this.open("none");
|
||
}
|
||
},
|
||
bindTiming(x) {
|
||
const left = this.x;
|
||
const leftWidth = this.button.left.width;
|
||
const rightWidth = this.button.right.width;
|
||
const threshold = this.threshold;
|
||
if (!this.isopen || this.isopen === "none") {
|
||
if (left > threshold) {
|
||
this.open("left");
|
||
} else if (left < -threshold) {
|
||
this.open("right");
|
||
} else {
|
||
this.open("none");
|
||
}
|
||
} else {
|
||
if (x > -leftWidth && x < 0 || x > rightWidth) {
|
||
if (x > -threshold && x < 0 || x - rightWidth > threshold) {
|
||
this.open("left");
|
||
} else {
|
||
this.open("none");
|
||
}
|
||
} else {
|
||
if (x < threshold && x > 0 || x + leftWidth < -threshold) {
|
||
this.open("right");
|
||
} else {
|
||
this.open("none");
|
||
}
|
||
}
|
||
}
|
||
},
|
||
/**
|
||
* 移动范围
|
||
* @param {Object} num
|
||
* @param {Object} mix
|
||
* @param {Object} max
|
||
*/
|
||
range(num, mix, max) {
|
||
return `min(max(x+${num}, ${mix}), ${max})`;
|
||
},
|
||
/**
|
||
* 开启swipe
|
||
*/
|
||
open(type) {
|
||
this.animation(type);
|
||
},
|
||
/**
|
||
* 关闭swipe
|
||
*/
|
||
close() {
|
||
this.animation("none");
|
||
},
|
||
/**
|
||
* 开启关闭动画
|
||
* @param {Object} type
|
||
*/
|
||
animation(type) {
|
||
const leftWidth = this.button.left.width;
|
||
const rightWidth = this.button.right.width;
|
||
if (this.eventpan && this.eventpan.token) {
|
||
BindingX.unbind({
|
||
token: this.eventpan.token,
|
||
eventType: "pan"
|
||
});
|
||
}
|
||
switch (type) {
|
||
case "left":
|
||
Promise.all([
|
||
this.move(this.selector, leftWidth),
|
||
this.move(this.leftButton, 0),
|
||
this.move(this.rightButton, rightWidth * 2)
|
||
]).then(() => {
|
||
this.setEmit(leftWidth, type);
|
||
});
|
||
break;
|
||
case "right":
|
||
Promise.all([
|
||
this.move(this.selector, -rightWidth),
|
||
this.move(this.leftButton, -leftWidth * 2),
|
||
this.move(this.rightButton, 0)
|
||
]).then(() => {
|
||
this.setEmit(-rightWidth, type);
|
||
});
|
||
break;
|
||
default:
|
||
Promise.all([
|
||
this.move(this.selector, 0),
|
||
this.move(this.leftButton, -leftWidth),
|
||
this.move(this.rightButton, rightWidth)
|
||
]).then(() => {
|
||
this.setEmit(0, type);
|
||
});
|
||
}
|
||
},
|
||
setEmit(x, type) {
|
||
const leftWidth = this.button.left.width;
|
||
const rightWidth = this.button.right.width;
|
||
this.isopen = this.isopen || "none";
|
||
this.stop = false;
|
||
this.isclick = false;
|
||
if (this.isopen !== type && this.x !== x) {
|
||
if (type === "left" && leftWidth > 0) {
|
||
this.$emit("change", "left");
|
||
}
|
||
if (type === "right" && rightWidth > 0) {
|
||
this.$emit("change", "right");
|
||
}
|
||
if (type === "none") {
|
||
this.$emit("change", "none");
|
||
}
|
||
}
|
||
this.x = x;
|
||
this.isopen = type;
|
||
},
|
||
move(ref22, value) {
|
||
return new Promise((resolve, reject) => {
|
||
animation.transition(ref22, {
|
||
styles: {
|
||
transform: `translateX(${value})`
|
||
},
|
||
duration: 150,
|
||
//ms
|
||
timingFunction: "linear",
|
||
needLayout: false,
|
||
delay: 0
|
||
//ms
|
||
}, function(res) {
|
||
resolve(res);
|
||
});
|
||
});
|
||
},
|
||
/**
|
||
* 获取ref
|
||
* @param {Object} el
|
||
*/
|
||
getEl(el) {
|
||
return el.ref;
|
||
},
|
||
/**
|
||
* 获取节点信息
|
||
*/
|
||
getSelectorQuery() {
|
||
Promise.all([
|
||
this.getDom("left"),
|
||
this.getDom("right")
|
||
]).then((data) => {
|
||
let show = "none";
|
||
if (this.autoClose) {
|
||
show = "none";
|
||
} else {
|
||
show = this.show;
|
||
}
|
||
if (show === "none")
|
||
;
|
||
else {
|
||
this.open(show);
|
||
}
|
||
});
|
||
},
|
||
getDom(str) {
|
||
return new Promise((resolve, reject) => {
|
||
dom.getComponentRect(this.$refs[`selector-${str}-button--hock`], (data) => {
|
||
if (data) {
|
||
this.button[str] = data.size;
|
||
resolve(data);
|
||
} else {
|
||
reject();
|
||
}
|
||
});
|
||
});
|
||
}
|
||
}
|
||
};
|
||
var bindingx = bindIngXMixins;
|
||
var otherMixins = {};
|
||
var _style_0$4 = { "uni-swipe": { "": { "position": "relative" } }, "uni-swipe_box": { "": { "position": "relative" } }, "uni-swipe_text--center": { "": { "width": 100 } }, "uni-swipe_button-group": { "": { "flexDirection": "row", "position": "absolute", "top": 0, "bottom": 0 } }, "button-group--left": { "": { "left": 0, "transform": "translateX(-100%)" } }, "button-group--right": { "": { "right": 0, "transform": "translateX(100%)" } }, "uni-swipe_button": { "": { "flex": 1, "flexDirection": "row", "justifyContent": "center", "alignItems": "center", "paddingTop": 0, "paddingRight": 20, "paddingBottom": 0, "paddingLeft": 20 } }, "uni-swipe_button-text": { "": { "fontSize": 14 } }, "ani": { "": { "transitionProperty": "transform", "transitionDuration": 300, "transitionTimingFunction": "cubic-bezier(0.165,0.84,0.44,1)" } }, "@TRANSITION": { "ani": { "property": "transform", "duration": 300, "timingFunction": "cubic-bezier(0.165,0.84,0.44,1)" } } };
|
||
var block0 = {};
|
||
var block1 = {};
|
||
var _sfc_main$5 = {
|
||
mixins: [mpMixins, bindingx, otherMixins],
|
||
emits: ["click", "change"],
|
||
props: {
|
||
// 控制开关
|
||
show: {
|
||
type: String,
|
||
default: "none"
|
||
},
|
||
// 禁用
|
||
disabled: {
|
||
type: Boolean,
|
||
default: false
|
||
},
|
||
// 是否自动关闭
|
||
autoClose: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 滑动缺省距离
|
||
threshold: {
|
||
type: Number,
|
||
default: 20
|
||
},
|
||
// 左侧按钮内容
|
||
leftOptions: {
|
||
type: Array,
|
||
default() {
|
||
return [];
|
||
}
|
||
},
|
||
// 右侧按钮内容
|
||
rightOptions: {
|
||
type: Array,
|
||
default() {
|
||
return [];
|
||
}
|
||
}
|
||
},
|
||
// TODO vue3
|
||
unmounted() {
|
||
this.__isUnmounted = true;
|
||
this.uninstall();
|
||
},
|
||
methods: {
|
||
uninstall() {
|
||
if (this.swipeaction) {
|
||
this.swipeaction.children.forEach((item, index2) => {
|
||
if (item === this) {
|
||
this.swipeaction.children.splice(index2, 1);
|
||
}
|
||
});
|
||
}
|
||
},
|
||
/**
|
||
* 获取父元素实例
|
||
*/
|
||
getSwipeAction(name = "uniSwipeAction") {
|
||
let parent = this.$parent;
|
||
let parentName = parent.$options.name;
|
||
while (parentName !== name) {
|
||
parent = parent.$parent;
|
||
if (!parent)
|
||
return false;
|
||
parentName = parent.$options.name;
|
||
}
|
||
return parent;
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u5728\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F app vue\u7AEF h5 \u4F7F\u7528wxs \u5B9E\u73B0"),
|
||
(0, import_vue2.createCommentVNode)(" app nvue\u7AEF \u4F7F\u7528 bindingx "),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
ref: "selector-box--hock",
|
||
class: "uni-swipe",
|
||
onHorizontalpan: _cache[0] || (_cache[0] = (...args) => _ctx.touchstart && _ctx.touchstart(...args)),
|
||
onTouchend: _cache[1] || (_cache[1] = (...args) => _ctx.touchend && _ctx.touchend(...args))
|
||
},
|
||
[
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
ref: "selector-left-button--hock",
|
||
class: "uni-swipe_button-group button-group--left"
|
||
},
|
||
[
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "left", {}, () => [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)($props.leftOptions, (item, index2) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: index2,
|
||
style: (0, import_vue2.normalizeStyle)({
|
||
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD"
|
||
}),
|
||
class: "uni-swipe_button button-hock",
|
||
onClick: (0, import_vue2.withModifiers)(($event) => _ctx.onClick(index2, item, "left"), ["stop"])
|
||
}, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{
|
||
class: "uni-swipe_button-text",
|
||
style: (0, import_vue2.normalizeStyle)({ color: item.style && item.style.color ? item.style.color : "#FFFFFF", fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px" })
|
||
},
|
||
(0, import_vue2.toDisplayString)(item.text),
|
||
5
|
||
/* TEXT, STYLE */
|
||
)
|
||
], 12, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
],
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
ref: "selector-right-button--hock",
|
||
class: "uni-swipe_button-group button-group--right"
|
||
},
|
||
[
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "right", {}, () => [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)($props.rightOptions, (item, index2) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: index2,
|
||
style: (0, import_vue2.normalizeStyle)({
|
||
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD"
|
||
}),
|
||
class: "uni-swipe_button button-hock",
|
||
onClick: (0, import_vue2.withModifiers)(($event) => _ctx.onClick(index2, item, "right"), ["stop"])
|
||
}, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{
|
||
class: "uni-swipe_button-text",
|
||
style: (0, import_vue2.normalizeStyle)({ color: item.style && item.style.color ? item.style.color : "#FFFFFF", fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px" })
|
||
},
|
||
(0, import_vue2.toDisplayString)(item.text),
|
||
5
|
||
/* TEXT, STYLE */
|
||
)
|
||
], 12, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
],
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
ref: "selector-content--hock",
|
||
class: "uni-swipe_box"
|
||
},
|
||
[
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "default")
|
||
],
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
544
|
||
/* NEED_HYDRATION, NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createCommentVNode)(" \u5176\u4ED6\u5E73\u53F0\u4F7F\u7528 js \uFF0C\u957F\u5217\u8868\u6027\u80FD\u53EF\u80FD\u4F1A\u6709\u5F71\u54CD")
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
if (typeof block0 === "function")
|
||
block0(_sfc_main$5);
|
||
if (typeof block1 === "function")
|
||
block1(_sfc_main$5);
|
||
var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["styles", [_style_0$4]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue"]]);
|
||
var _sfc_main$4 = {
|
||
name: "uniSwipeAction",
|
||
data() {
|
||
return {};
|
||
},
|
||
created() {
|
||
this.children = [];
|
||
},
|
||
methods: {
|
||
// 公开给用户使用,重制组件样式
|
||
resize() {
|
||
this.children.forEach((vm) => {
|
||
vm.init();
|
||
});
|
||
},
|
||
// 公开给用户使用,关闭全部 已经打开的组件
|
||
closeAll() {
|
||
this.children.forEach((vm) => {
|
||
vm.close();
|
||
});
|
||
},
|
||
closeOther(vm) {
|
||
if (this.openItem && this.openItem !== vm) {
|
||
this.openItem.close();
|
||
}
|
||
this.openItem = vm;
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", { renderWhole: true }, [
|
||
(0, import_vue2.renderSlot)(_ctx.$slots, "default")
|
||
]);
|
||
}
|
||
var __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue"]]);
|
||
var _imports_0$1 = "/static/lock.png";
|
||
var _style_0$3 = { "switch": { "": { "transform": "scale(0.7)" } } };
|
||
var _sfc_main$3 = {
|
||
__name: "collectAdd",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
class Form {
|
||
constructor() {
|
||
__publicField(this, "collectName", "");
|
||
__publicField(this, "isPrivate", 0);
|
||
__publicField(this, "pic", "");
|
||
__publicField(this, "collectId", "");
|
||
}
|
||
}
|
||
const form = (0, import_vue2.reactive)(new Form());
|
||
const paddingHeight = (0, import_vue2.ref)(0);
|
||
(0, import_vue2.onMounted)(() => {
|
||
uni.onKeyboardHeightChange((rs) => {
|
||
paddingHeight.value = rs.height;
|
||
});
|
||
});
|
||
(0, import_vue2.onBeforeUnmount)(() => {
|
||
uni.offKeyboardHeightChange((rs) => {
|
||
formatAppLog("log", "at components/index/collectAdd.vue:46", "rs", rs);
|
||
});
|
||
});
|
||
function open(value) {
|
||
if (value) {
|
||
form.collectName = value.collectName;
|
||
form.isPrivate = value.isPrivate;
|
||
form.collectId = value.id;
|
||
form.pic = value.formatPic;
|
||
}
|
||
proxy.$refs.addCollectRef.open();
|
||
}
|
||
function close() {
|
||
proxy.$refs.addCollectRef.close();
|
||
}
|
||
function upImage() {
|
||
util$1.upload_image({
|
||
value: form.pic,
|
||
type: 1,
|
||
success: (rs) => {
|
||
form.pic = rs.value;
|
||
}
|
||
});
|
||
}
|
||
function handlePrivate() {
|
||
form.isPrivate = form.isPrivate == 0 ? 1 : 0;
|
||
}
|
||
function handleSubmit() {
|
||
const data = __spreadValues({}, form);
|
||
if (!form.collectName) {
|
||
util$1.alert("\u8BF7\u8F93\u5165\u6536\u85CF\u5939\u540D\u79F0");
|
||
return;
|
||
}
|
||
if (!form.pic) {
|
||
util$1.alert("\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE");
|
||
return;
|
||
}
|
||
data.pic = util$1.replace_url(data.pic);
|
||
let requestApi = "saveCollectList";
|
||
if (form.collectId)
|
||
requestApi = "updateCollectList";
|
||
api.video[requestApi]({
|
||
query: data
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
uni.$emit("collectsVideo");
|
||
close();
|
||
Object.assign(form, new Form());
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, Form, form, paddingHeight, open, close, upImage, handlePrivate, handleSubmit, ref: import_vue2.ref, getCurrentInstance: import_vue2.getCurrentInstance, reactive: import_vue2.reactive, onMounted: import_vue2.onMounted, onBeforeUnmount: import_vue2.onBeforeUnmount, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_switch = (0, import_vue2.resolveComponent)("switch");
|
||
const _component_uni_popup = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createBlock)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "addCollectRef",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "addCollect popBot ptb20 plr20 bfff" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "header fdr rows" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "w120" }, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "closeempty",
|
||
onClick: $setup.close
|
||
})
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "title" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "c333 f28" }, "\u7F16\u8F91\u6536\u85CF\u5939")
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "w120 tar" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", {
|
||
class: "cFF9B27 f24",
|
||
onClick: $setup.handleSubmit
|
||
}, "\u786E\u8BA4")
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u6536\u85CF\u5939\u4FE1\u606F "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "rows fdr mtb30" }, [
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "pic fmid wh80 beee br10",
|
||
onClick: $setup.upImage
|
||
}, [
|
||
$setup.form.pic ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 0,
|
||
class: "wh80 br10",
|
||
src: $setup.form.pic,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"])) : ((0, import_vue2.openBlock)(), (0, import_vue2.createBlock)(_component_uni_icons, {
|
||
key: 1,
|
||
type: "plusempty",
|
||
size: "40rpx"
|
||
}))
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "edit f1 ml20" }, [
|
||
(0, import_vue2.createElementVNode)("u-input", {
|
||
type: "text",
|
||
adjustPosition: false,
|
||
modelValue: $setup.form.collectName,
|
||
onInput: _cache[0] || (_cache[0] = ($event) => $setup.form.collectName = $event.detail.value),
|
||
placeholder: "\u8F93\u5165\u6536\u85CF\u5939\u540D\u79F0"
|
||
}, null, 40, ["modelValue"])
|
||
])
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u516C\u5F00\u6536\u85CF\u5939 "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "rows fdr mtb30" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "df fdr aic" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", null, "\u662F\u5426\u516C\u5F00\u6536\u85CF\u5939"),
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
src: _imports_0$1,
|
||
mode: "aspectFit",
|
||
class: "wh24 ml10"
|
||
})
|
||
]),
|
||
(0, import_vue2.createVNode)(_component_switch, {
|
||
class: "switch",
|
||
checked: $setup.form.isPrivate == 0,
|
||
color: "#F85050",
|
||
onChange: $setup.handlePrivate
|
||
}, null, 8, ["checked"])
|
||
]),
|
||
(0, import_vue2.createElementVNode)(
|
||
"view",
|
||
{
|
||
style: (0, import_vue2.normalizeStyle)({ height: $setup.paddingHeight + "px" })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
);
|
||
}
|
||
var collectAdd = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["styles", [_style_0$3]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/collectAdd.vue"]]);
|
||
var _style_0$2 = { "item": { ".collect ": { "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#D8D8D8" } } };
|
||
var _sfc_main$2 = {
|
||
__name: "collectList",
|
||
emits: ["handleItem"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
const showLoad = (0, import_vue2.ref)(true);
|
||
const listProperty = (0, import_vue2.reactive)({
|
||
// 数据
|
||
data: [],
|
||
// 条数
|
||
pageSize: 10,
|
||
// 页码
|
||
pageNum: 1,
|
||
// 总数
|
||
total: 0
|
||
});
|
||
const options = [{
|
||
text: "\u5220\u9664",
|
||
style: {
|
||
backgroundColor: "#F85050"
|
||
}
|
||
}, {
|
||
text: "\u7F16\u8F91",
|
||
style: {
|
||
backgroundColor: "#00ADEE"
|
||
}
|
||
}];
|
||
const emit = __emit;
|
||
(0, import_vue2.onMounted)(() => {
|
||
addListener();
|
||
util$1.isLogin().then(() => {
|
||
setTimeout(() => {
|
||
getList();
|
||
}, 1e3);
|
||
});
|
||
});
|
||
function addListener() {
|
||
uni.$on("collectsVideo", () => {
|
||
refrshList();
|
||
});
|
||
uni.$on("login", () => {
|
||
refrshList();
|
||
});
|
||
}
|
||
function refrshList() {
|
||
listProperty.pageNum = 1;
|
||
getList();
|
||
}
|
||
function getMoreList() {
|
||
if (listProperty.total <= listProperty.data.length)
|
||
return;
|
||
listProperty.pageNum++;
|
||
getList();
|
||
}
|
||
function getList() {
|
||
api.video.getCollectList({
|
||
query: {
|
||
pageNum: listProperty.pageNum,
|
||
pageSize: listProperty.pageSize
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code === 200) {
|
||
const result = rs.rows;
|
||
if (listProperty.pageNum == 1)
|
||
listProperty.data.length = 0;
|
||
listProperty.data.push(...result.map((item) => {
|
||
item.formatPic = util$1.format_url(item.pic, "img");
|
||
return item;
|
||
}));
|
||
listProperty.total = rs.total;
|
||
return;
|
||
}
|
||
util$1.alert(rs.msg);
|
||
}).finally(() => {
|
||
showLoad.value = false;
|
||
});
|
||
}
|
||
function delectList(item, index2) {
|
||
api.video.deleteCollect({
|
||
query: {
|
||
jyCollectId: item.id
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code === 200) {
|
||
listProperty.total--;
|
||
listProperty.data.splice(index2, 1);
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function handleActionItem(ev, target) {
|
||
const index2 = ev.index;
|
||
const item = listProperty.data[target];
|
||
switch (index2) {
|
||
case 0:
|
||
util$1.alert({
|
||
content: "\u786E\u8BA4\u5220\u9664\u6536\u85CF\u5939\uFF1F"
|
||
}).then((rs) => {
|
||
if (rs.confirm)
|
||
delectList(item, target);
|
||
});
|
||
break;
|
||
case 1:
|
||
proxy.$refs.collectAddRef.open(item);
|
||
break;
|
||
}
|
||
proxy.$refs.swipeActionRef.closeAll();
|
||
}
|
||
function handleItem(item) {
|
||
emit("handleItem", item);
|
||
}
|
||
__expose({
|
||
getList,
|
||
getMoreList,
|
||
refrshList
|
||
});
|
||
const __returned__ = { proxy, showLoad, listProperty, options, emit, addListener, refrshList, getMoreList, getList, delectList, handleActionItem, handleItem, onMounted: import_vue2.onMounted, reactive: import_vue2.reactive, ref: import_vue2.ref, getCurrentInstance: import_vue2.getCurrentInstance, get api() {
|
||
return api;
|
||
}, get util() {
|
||
return util$1;
|
||
}, collectAdd };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_uni_swipe_action_item = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-swipe-action-item"), __easycom_1);
|
||
const _component_uni_swipe_action = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-swipe-action"), __easycom_2);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
[
|
||
$setup.showLoad ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "showLoad fmid ptb30"
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, { type: "spinner-cycle" }),
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "c666 f28" }, "\u52A0\u8F7D\u4E2D...")
|
||
])) : ((0, import_vue2.openBlock)(), (0, import_vue2.createBlock)(
|
||
_component_uni_swipe_action,
|
||
{
|
||
key: 1,
|
||
ref: "swipeActionRef"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "collect" }, [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)($setup.listProperty.data, (item, index2) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createBlock)(_component_uni_swipe_action_item, {
|
||
"right-options": $setup.options,
|
||
key: index2,
|
||
onClick: ($event) => $setup.handleActionItem($event, index2)
|
||
}, {
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "item rows fdr mlr20 ptb20",
|
||
onClick: (0, import_vue2.withModifiers)(($event) => $setup.handleItem(item), ["stop"])
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "poster" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh80 br20",
|
||
src: item.formatPic,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"])
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "oh pl20" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c333 f28" },
|
||
(0, import_vue2.toDisplayString)(item.collectName),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
item.isPrivate == 1 ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-image", {
|
||
key: 0,
|
||
class: "wh24 ml10",
|
||
src: _imports_0$1,
|
||
mode: "aspectFit"
|
||
})) : (0, import_vue2.createCommentVNode)("v-if", true),
|
||
(0, import_vue2.createElementVNode)("view", { class: "f1" })
|
||
], 8, ["onClick"])
|
||
]),
|
||
_: 2
|
||
/* DYNAMIC */
|
||
}, 1032, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)),
|
||
(0, import_vue2.createElementVNode)("view", { class: "nomore mtb20" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "nomore" }, "\u6682\u65E0\u66F4\u591A")
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
)),
|
||
(0, import_vue2.createCommentVNode)(" \u6536\u85CF\u6DFB\u52A0 "),
|
||
(0, import_vue2.createVNode)(
|
||
$setup["collectAdd"],
|
||
{ ref: "collectAddRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
);
|
||
}
|
||
var collectList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$2]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/collectList.vue"]]);
|
||
var _imports_0 = "/static/circle.png";
|
||
var _style_0$1 = { "close": { "": { "position": "absolute", "right": "20rpx", "top": "5rpx" } }, "scroll": { "": { "height": "550rpx" } }, "add": { "": { "boxShadow": "0 8rpx 20rpx rgba(0, 0, 0, 0.3)" } }, "icon": { ".add ": { "borderWidth": "5rpx", "borderStyle": "solid", "borderColor": "#333333", "borderRadius": "5rpx" } }, "resultAlt": { "": { "marginBottom": "150rpx" } }, "circle": { ".resultAlt ": { "backgroundColor": "#FF008C" } } };
|
||
var _sfc_main$1 = {
|
||
__name: "collect",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
const collectResult = (0, import_vue2.ref)(false);
|
||
const detail = (0, import_vue2.ref)({});
|
||
function handleCollect(item) {
|
||
close();
|
||
open("result");
|
||
}
|
||
function open(item) {
|
||
detail.value = item;
|
||
if (!item.isCollect) {
|
||
proxy.$refs.collect.open();
|
||
return;
|
||
}
|
||
cancelCollect();
|
||
}
|
||
function handleItem(item) {
|
||
collectVideo(item);
|
||
}
|
||
function close(key) {
|
||
if (!key)
|
||
key = "collect";
|
||
proxy.$refs[key].close();
|
||
}
|
||
function collectVideo(collects) {
|
||
api.video.collectVideo({
|
||
query: {
|
||
// 视频id
|
||
videoId: detail.value.videoId,
|
||
// 收藏夹id
|
||
collectId: collects.id,
|
||
isPrivate: collects.isPrivate
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
proxy.$refs.collect.close();
|
||
detail.value.isCollect = true;
|
||
detail.value.collect++;
|
||
uni.$emit("updateVideo", detail.value);
|
||
collectResult.value = true;
|
||
proxy.$refs.result.open();
|
||
setTimeout(() => {
|
||
proxy.$refs.result.close();
|
||
}, 3e3);
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function cancelCollect() {
|
||
api.video.cancelCollect({
|
||
query: {
|
||
// 视频id
|
||
videoId: detail.value.videoId
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
detail.value.isCollect = false;
|
||
detail.value.collect--;
|
||
uni.$emit("updateVideo", detail.value);
|
||
collectResult.value = false;
|
||
proxy.$refs.result.open();
|
||
setTimeout(() => {
|
||
proxy.$refs.result.close();
|
||
}, 3e3);
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close,
|
||
collectResult
|
||
});
|
||
const __returned__ = { proxy, collectResult, detail, handleCollect, open, handleItem, close, collectVideo, cancelCollect, onMounted: import_vue2.onMounted, ref: import_vue2.ref, reactive: import_vue2.reactive, getCurrentInstance: import_vue2.getCurrentInstance, watch: import_vue2.watch, collectList, get api() {
|
||
return api;
|
||
}, get util() {
|
||
return util$1;
|
||
}, collectAdd };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_uni_popup = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u6536\u85CF\u5217\u8868 "),
|
||
(0, import_vue2.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "collect",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "popBot bfff" }, [
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "close",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.collect.close())
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "close",
|
||
size: "36rpx",
|
||
color: "#333"
|
||
})
|
||
]),
|
||
(0, import_vue2.createCommentVNode)(" \u6807\u9898 "),
|
||
(0, import_vue2.createElementVNode)("view", { class: "title mt40" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "tac f40" }, "\u9009\u62E9\u6536\u85CF\u5939")
|
||
]),
|
||
(0, import_vue2.createElementVNode)("scroll-view", {
|
||
scrollY: "",
|
||
class: "scroll"
|
||
}, [
|
||
(0, import_vue2.createVNode)($setup["collectList"], { onHandleItem: $setup.handleItem })
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "add df fdr aic ptb30 plr30",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.collectAddRef.open())
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "icon fmid wh70" }, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "plusempty",
|
||
color: "#333"
|
||
})
|
||
]),
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "ml20 c333 f28" }, "\u65B0\u5EFA\u6536\u85CF\u5939")
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createCommentVNode)(" \u6536\u85CF\u7ED3\u679C "),
|
||
(0, import_vue2.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "result",
|
||
type: "bottom",
|
||
"mask-background-color": "rgba(0,0,0,0)"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "resultAlt mlr30 df fdr aic ptb30 plr30 bfff br20" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "circle cir" }, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh30",
|
||
src: _imports_0,
|
||
mode: "aspectFill"
|
||
})
|
||
]),
|
||
$setup.collectResult ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
{ key: 0 },
|
||
[
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "f1 ml30 c333 f28" }, "\u6536\u85CF\u6210\u529F"),
|
||
(0, import_vue2.createCommentVNode)("v-if", true)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
)) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-text", {
|
||
key: 1,
|
||
class: "f1 ml30 c333 f28"
|
||
}, "\u5DF2\u53D6\u6D88\u6536\u85CF"))
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue2.createCommentVNode)(" \u65B0\u589E\u6536\u85CF "),
|
||
(0, import_vue2.createVNode)(
|
||
$setup["collectAdd"],
|
||
{ ref: "collectAddRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
);
|
||
}
|
||
var collectAlt = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/collect.vue"]]);
|
||
var _style_0 = { "shareBox": { "": { "height": "600rpx" } }, "firendBox": { ".shareBox ": { "height": 100 } }, "scroll": { ".shareBox .firendBox ": { "height": "500rpx" } }, "list": { ".shareBox .firendBox .scroll ": { "flexWrap": "wrap" } }, "item": { ".shareBox .firendBox .scroll .list ": { "width": "140rpx", "marginTop": "40rpx", "marginRight": 0, "marginBottom": "40rpx", "marginLeft": 0 } } };
|
||
var _sfc_main = {
|
||
__name: "shareFirend",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue2.getCurrentInstance)();
|
||
const userList = (0, import_vue2.reactive)([]);
|
||
const videoItem = (0, import_vue2.reactive)({});
|
||
const userinfo = (0, import_vue2.computed)(() => {
|
||
let result = uni.$store.state.userinfo;
|
||
return result;
|
||
});
|
||
(0, import_vue2.onMounted)(() => {
|
||
util$1.isLogin(() => {
|
||
getFriendList();
|
||
});
|
||
uni.$on("login", () => {
|
||
getFriendList();
|
||
});
|
||
uni.$on("logout", () => {
|
||
userList.length = 0;
|
||
});
|
||
});
|
||
(0, import_vue2.onBeforeUnmount)(() => {
|
||
uni.$off("login");
|
||
uni.$off("logout");
|
||
});
|
||
function getFriendList() {
|
||
let isReady = uni.$chat.isReady();
|
||
if (!isReady) {
|
||
setTimeout(function() {
|
||
getFriendList();
|
||
}, 200);
|
||
return;
|
||
}
|
||
uni.$chat.getFriendList().then((rs) => {
|
||
if (rs.code == 0) {
|
||
const result = rs.data;
|
||
userList.push(...result);
|
||
}
|
||
});
|
||
}
|
||
function open(item) {
|
||
Object.assign(videoItem, item);
|
||
proxy.$refs.firend.open();
|
||
}
|
||
function close() {
|
||
proxy.$refs.firend.close();
|
||
}
|
||
function handleShare(item) {
|
||
api.video.videoShare({
|
||
query: {
|
||
// 视频id
|
||
videoId: videoItem.videoId,
|
||
// 分享人id
|
||
sharedUserIds: item.userID
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
util$1.alert("\u5206\u4EAB\u6210\u529F");
|
||
close();
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, userList, videoItem, userinfo, getFriendList, open, close, handleShare, onMounted: import_vue2.onMounted, ref: import_vue2.ref, reactive: import_vue2.reactive, getCurrentInstance: import_vue2.getCurrentInstance, watch: import_vue2.watch, computed: import_vue2.computed, onBeforeUnmount: import_vue2.onBeforeUnmount, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_uni_popup = resolveEasycom((0, import_vue2.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue2.createCommentVNode)(" \u5206\u4EAB\u7ED9\u670B\u53CB "),
|
||
(0, import_vue2.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "firend",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue2.withCtx)(() => [
|
||
(0, import_vue2.createElementVNode)("view", { class: "shareBox popBot df fdc plr20 bfff" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "header rows fdr" }, [
|
||
(0, import_vue2.createElementVNode)("view", { class: "title mt40" }, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "f40" }, "\u5206\u4EAB\u7ED9\u670B\u53CB")
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", {
|
||
class: "close",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.firend.close())
|
||
}, [
|
||
(0, import_vue2.createVNode)(_component_uni_icons, {
|
||
type: "close",
|
||
size: "36rpx",
|
||
color: "#333"
|
||
})
|
||
])
|
||
]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "firendBox f1 df fdc mb30" }, [
|
||
(0, import_vue2.createElementVNode)("scroll-view", {
|
||
scrollY: "true",
|
||
class: "scroll f1",
|
||
showScrollbar: false
|
||
}, [
|
||
$setup.userList[0] ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "list df fdr"
|
||
}, [
|
||
((0, import_vue2.openBlock)(true), (0, import_vue2.createElementBlock)(
|
||
import_vue2.Fragment,
|
||
null,
|
||
(0, import_vue2.renderList)($setup.userList, (item, index2) => {
|
||
return (0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
class: "item aic",
|
||
key: index2,
|
||
onClick: ($event) => $setup.handleShare(item)
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-image", {
|
||
class: "wh100 cir",
|
||
src: item.profile.avatar,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"]),
|
||
(0, import_vue2.createElementVNode)("view", { class: "txt mt10" }, [
|
||
(0, import_vue2.createElementVNode)(
|
||
"u-text",
|
||
{ class: "c111 f24" },
|
||
(0, import_vue2.toDisplayString)(item.profile.nick),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
], 8, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])) : ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("view", {
|
||
key: 1,
|
||
class: "nomore"
|
||
}, [
|
||
(0, import_vue2.createElementVNode)("u-text", { class: "nomore" }, "\u6682\u65E0\u597D\u53CB~")
|
||
]))
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
var shareFirendAlt = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/shareFirend.vue"]]);
|
||
|
||
// ../../../../document/九亿商城/jy/jiuyi2/unpackage/dist/dev/.nvue/pages/index/index.js
|
||
var _style_0$82 = { "uni-grid-item__box": { "": { "position": "relative", "flex": 1, "flexDirection": "column" } }, "uni-grid-item--border": { "": { "position": "relative", "borderBottomColor": "#D2D2D2", "borderBottomStyle": "solid", "borderBottomWidth": 0.5, "borderRightColor": "#D2D2D2", "borderRightStyle": "solid", "borderRightWidth": 0.5 } }, "uni-grid-item--border-top": { "": { "position": "relative", "borderTopColor": "#D2D2D2", "borderTopStyle": "solid", "borderTopWidth": 0.5 } }, "uni-highlight": { "": { "backgroundColor:active": "#f1f1f1" } } };
|
||
var _sfc_main$82 = {
|
||
name: "UniGridItem",
|
||
inject: ["grid"],
|
||
props: {
|
||
index: {
|
||
type: Number,
|
||
default: 0
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
column: 0,
|
||
showBorder: true,
|
||
square: true,
|
||
highlight: true,
|
||
left: 0,
|
||
top: 0,
|
||
openNum: 2,
|
||
width: 0,
|
||
borderColor: "#e5e5e5"
|
||
};
|
||
},
|
||
created() {
|
||
this.column = this.grid.column;
|
||
this.showBorder = this.grid.showBorder;
|
||
this.square = this.grid.square;
|
||
this.highlight = this.grid.highlight;
|
||
this.top = this.hor === 0 ? this.grid.hor : this.hor;
|
||
this.left = this.ver === 0 ? this.grid.ver : this.ver;
|
||
this.borderColor = this.grid.borderColor;
|
||
this.grid.children.push(this);
|
||
this.width = this.grid.width;
|
||
},
|
||
beforeDestroy() {
|
||
this.grid.children.forEach((item, index2) => {
|
||
if (item === this) {
|
||
this.grid.children.splice(index2, 1);
|
||
}
|
||
});
|
||
},
|
||
methods: {
|
||
_onClick() {
|
||
this.grid.change({
|
||
detail: {
|
||
index: this.index
|
||
}
|
||
});
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$82(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return $data.width ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
style: (0, import_vue3.normalizeStyle)("width:" + $data.width + ";" + ($data.square ? "height:" + $data.width : "")),
|
||
class: "uni-grid-item",
|
||
renderWhole: true
|
||
},
|
||
[
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: (0, import_vue3.normalizeClass)([{ "uni-grid-item--border": $data.showBorder, "uni-grid-item--border-top": $data.showBorder && $props.index < $data.column, "uni-highlight": $data.highlight }, "uni-grid-item__box"]),
|
||
style: (0, import_vue3.normalizeStyle)({ "border-right-color": $data.borderColor, "border-bottom-color": $data.borderColor, "border-top-color": $data.borderColor }),
|
||
onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args))
|
||
},
|
||
[
|
||
(0, import_vue3.renderSlot)(_ctx.$slots, "default")
|
||
],
|
||
6
|
||
/* CLASS, STYLE */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)) : (0, import_vue3.createCommentVNode)("v-if", true);
|
||
}
|
||
var __easycom_0$12 = /* @__PURE__ */ _export_sfc(_sfc_main$82, [["render", _sfc_render$82], ["styles", [_style_0$82]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue"]]);
|
||
var _style_0$72 = { "uni-grid-wrap": { "": { "flex": 1, "flexDirection": "column" } }, "uni-grid": { "": { "flexDirection": "row", "flexWrap": "wrap" } }, "uni-grid--border": { "": { "position": "relative", "borderLeftColor": "#D2D2D2", "borderLeftStyle": "solid", "borderLeftWidth": 0.5 } } };
|
||
var dom2 = requireNativePlugin("dom");
|
||
var _sfc_main$72 = {
|
||
name: "UniGrid",
|
||
emits: ["change"],
|
||
props: {
|
||
// 每列显示个数
|
||
column: {
|
||
type: Number,
|
||
default: 3
|
||
},
|
||
// 是否显示边框
|
||
showBorder: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
// 边框颜色
|
||
borderColor: {
|
||
type: String,
|
||
default: "#D2D2D2"
|
||
},
|
||
// 是否正方形显示,默认为 true
|
||
square: {
|
||
type: Boolean,
|
||
default: true
|
||
},
|
||
highlight: {
|
||
type: Boolean,
|
||
default: true
|
||
}
|
||
},
|
||
provide() {
|
||
return {
|
||
grid: this
|
||
};
|
||
},
|
||
data() {
|
||
const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`;
|
||
return {
|
||
elId,
|
||
width: 0
|
||
};
|
||
},
|
||
created() {
|
||
this.children = [];
|
||
},
|
||
mounted() {
|
||
this.$nextTick(() => {
|
||
this.init();
|
||
});
|
||
},
|
||
methods: {
|
||
init() {
|
||
setTimeout(() => {
|
||
this._getSize((width) => {
|
||
this.children.forEach((item, index2) => {
|
||
item.width = width;
|
||
});
|
||
});
|
||
}, 50);
|
||
},
|
||
change(e) {
|
||
this.$emit("change", e);
|
||
},
|
||
_getSize(fn) {
|
||
dom2.getComponentRect(this.$refs["uni-grid"], (ret) => {
|
||
this.width = parseInt((ret.size.width - 1) / this.column) + "px";
|
||
fn(this.width);
|
||
});
|
||
}
|
||
}
|
||
};
|
||
function _sfc_render$72(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
class: "uni-grid-wrap",
|
||
renderWhole: true
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
id: $data.elId,
|
||
ref: "uni-grid",
|
||
class: (0, import_vue3.normalizeClass)(["uni-grid", { "uni-grid--border": $props.showBorder }]),
|
||
style: (0, import_vue3.normalizeStyle)({ "border-left-color": $props.borderColor })
|
||
}, [
|
||
(0, import_vue3.renderSlot)(_ctx.$slots, "default")
|
||
], 14, ["id"])
|
||
]);
|
||
}
|
||
var __easycom_12 = /* @__PURE__ */ _export_sfc(_sfc_main$72, [["render", _sfc_render$72], ["styles", [_style_0$72]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/uni_modules/uni-grid/components/uni-grid/uni-grid.vue"]]);
|
||
var _imports_0$22 = "/static/footerMenuPlus.png";
|
||
var _imports_1$2 = "/static/footerMenuPlus1.png";
|
||
var _style_0$62 = { "ghost": { "": { "height": "120rpx" } }, "menuBox": { "": { "position": "fixed", "left": 0, "right": 0, "bottom": 0 }, ".dark": { "borderTopWidth": "1rpx", "borderTopStyle": "solid", "borderTopColor": "#999999", "backgroundColor": "#161616" }, ".light": { "boxShadow": "0px 8px 20px rgba(0, 0, 0, 0.3)", "backgroundColor": "#ffffff" } }, "menu": { ".menuBox ": { "justifyContent": "space-between", "flexDirection": "row", "paddingTop": "20rpx", "paddingRight": 0, "paddingBottom": "20rpx", "paddingLeft": 0 } }, "item": { ".menuBox ": { "justifyContent": "space-between", "flex": 1, "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#000000" }, ".menuBox .active": { "borderBottomWidth": 0, "borderBottomStyle": "solid", "borderBottomColor": "#000000" }, ".menuBox.light ": { "borderColor": "#999999" } }, "text": { ".menuBox .item ": { "fontSize": "30rpx" }, ".menuBox.dark .active ": { "color": "#ffffff" }, ".menuBox.dark ": { "color": "#999999" }, ".menuBox.light .active ": { "color": "#333333" }, ".menuBox.light ": { "color": "#999999" } }, "option": { ".menuBox .item ": { "flex": 1, "marginTop": 0, "marginRight": "10rpx", "marginBottom": 0, "marginLeft": "10rpx", "alignItems": "center", "justifyContent": "center" }, ".menuBox .item.active ": { "borderTopWidth": "2rpx", "borderTopStyle": "solid", "borderTopColor": "#000000" }, ".menuBox.light .item ": { "borderColor": "#999999" } }, "side": { ".menuBox .item ": { "width": "10rpx", "opacity": 0 }, ".menuBox .item .right": { "transform": "scaleX(-1)" }, ".menuBox .item.active ": { "opacity": 1 } }, "top": { ".menuBox .item .side ": { "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": "20rpx", "width": "10rpx", "borderTopWidth": "2rpx", "borderTopStyle": "solid", "borderTopColor": "#000000", "borderLeftWidth": "2rpx", "borderLeftStyle": "solid", "borderLeftColor": "#000000", "borderTopLeftRadius": "20rpx", "borderTopRightRadius": 0, "borderBottomRightRadius": 0, "borderBottomLeftRadius": 0, "transform": "translate(10rpx, 1rpx)" }, ".menuBox.light .side ": { "borderColor": "#999999" } }, "bottom": { ".menuBox .item .side ": { "position": "absolute", "top": "20rpx", "bottom": 0, "width": "10rpx", "borderRightWidth": "2rpx", "borderRightStyle": "solid", "borderRightColor": "#000000", "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#000000", "borderTopLeftRadius": 0, "borderTopRightRadius": 0, "borderBottomRightRadius": "20rpx", "borderBottomLeftRadius": 0 }, ".menuBox.light .side ": { "borderColor": "#999999" } }, "img": { ".menuBox .middle ": { "width": "80rpx", "height": "80rpx" } }, "alert": { "": { "marginBottom": "120rpx", "backgroundColor": "#f8f8f8", "borderRadius": "30rpx" } }, "scroll": { ".alert ": { "height": "350rpx" } } };
|
||
var _sfc_main$62 = {
|
||
__name: "footerMenu",
|
||
props: {
|
||
page: {
|
||
type: String
|
||
},
|
||
// 主题 dark黑色 light白色的
|
||
subject: {
|
||
type: String,
|
||
default: "light"
|
||
}
|
||
},
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const {
|
||
proxy
|
||
} = (0, import_vue3.getCurrentInstance)();
|
||
const props = __props;
|
||
const userinfo = (0, import_vue3.computed)(() => {
|
||
let resuilt = uni.$store.state.userinfo;
|
||
return resuilt;
|
||
});
|
||
const mode = (0, import_vue3.computed)(() => uni.$store.state.tabbarMode);
|
||
const menu = (0, import_vue3.computed)(() => {
|
||
let arr = [
|
||
{
|
||
page: "index",
|
||
type: "option",
|
||
name: "\u89C6\u9891",
|
||
labelType: "default",
|
||
pagePath: "pages/index/index"
|
||
},
|
||
// {
|
||
// page: '',
|
||
// type: 'option',
|
||
// name: '榴莲果',
|
||
// pagePath: 'pages/index/durian',
|
||
// },
|
||
{
|
||
page: "shop",
|
||
type: "option",
|
||
name: "\u5546\u57CE",
|
||
labelType: "shop",
|
||
pagePath: "pages/shop/shop"
|
||
},
|
||
{
|
||
type: "middle",
|
||
name: ""
|
||
},
|
||
{
|
||
page: "news",
|
||
type: "option",
|
||
name: "\u6D88\u606F",
|
||
pagePath: "pages/news/news"
|
||
}
|
||
];
|
||
switch (mode.value) {
|
||
case "default":
|
||
arr.push({
|
||
page: "homepage",
|
||
type: "option",
|
||
name: "\u6211\u7684",
|
||
labelType: "default",
|
||
pagePath: "pages/mine/homepage"
|
||
});
|
||
break;
|
||
case "shop":
|
||
arr.push({
|
||
page: "mine",
|
||
type: "option",
|
||
name: "\u4E2A\u4EBA\u4E2D\u5FC3",
|
||
labelType: "shop",
|
||
pagePath: "pages/mine/mine"
|
||
});
|
||
break;
|
||
}
|
||
return arr;
|
||
});
|
||
let safeHeight = (0, import_vue3.ref)(0);
|
||
const showMenu = (0, import_vue3.computed)(() => {
|
||
let result = [];
|
||
if (userinfo.value.userId) {
|
||
result.push({
|
||
name: "\u53D1\u5E03\u89C6\u9891",
|
||
img: "/static/footerMenu1.png",
|
||
url: "/pages/release/video"
|
||
});
|
||
}
|
||
return result;
|
||
});
|
||
(0, import_vue3.onMounted)(() => {
|
||
addListener();
|
||
uni.hideTabBar();
|
||
uni.getSystemInfo().then((rs) => {
|
||
safeHeight.value = rs.safeArea + "px";
|
||
});
|
||
});
|
||
(0, import_vue3.onUnmounted)(() => {
|
||
uni.$off("changeMine");
|
||
});
|
||
function addListener() {
|
||
uni.$on("changeMine", (value) => {
|
||
uni.$store.commit("setState", {
|
||
key: "tabbarMode",
|
||
value
|
||
});
|
||
});
|
||
}
|
||
function handleMenu(item) {
|
||
if (item.type != "middle") {
|
||
if (item.page)
|
||
uni.switchTab({
|
||
url: `/${item.pagePath}`
|
||
});
|
||
else
|
||
uni.navigateTo({
|
||
url: `/${item.pagePath}`
|
||
});
|
||
return;
|
||
}
|
||
proxy.$refs.alert.open();
|
||
}
|
||
function handleAlert(ev) {
|
||
const index2 = ev.detail.index;
|
||
const item = showMenu.value[index2];
|
||
util$1.isAuth({
|
||
success: (rs) => {
|
||
if (item.url) {
|
||
uni.navigateTo({
|
||
url: item.url
|
||
});
|
||
} else
|
||
util$1.alert("\u656C\u8BF7\u671F\u5F85");
|
||
}
|
||
});
|
||
proxy.$refs.alert.close();
|
||
}
|
||
const __returned__ = { proxy, props, userinfo, mode, menu, get safeHeight() {
|
||
return safeHeight;
|
||
}, set safeHeight(v) {
|
||
safeHeight = v;
|
||
}, showMenu, addListener, handleMenu, handleAlert, ref: import_vue3.ref, computed: import_vue3.computed, onMounted: import_vue3.onMounted, onUnmounted: import_vue3.onUnmounted, getCurrentInstance: import_vue3.getCurrentInstance, reactive: import_vue3.reactive, get util() {
|
||
return util$1;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$62(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_grid_item = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-grid-item"), __easycom_0$12);
|
||
const _component_uni_grid = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-grid"), __easycom_12);
|
||
const _component_uni_icons = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_uni_popup = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue3.createCommentVNode)(" \u5E7D\u7075\u76D2\u5B50 "),
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "ghost",
|
||
style: (0, import_vue3.normalizeStyle)({ paddingBottom: $setup.safeHeight })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u5E95\u90E8\u5BFC\u822A "),
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: (0, import_vue3.normalizeClass)(["menuBox", [$props.subject]])
|
||
},
|
||
[
|
||
(0, import_vue3.createElementVNode)("view", { class: "menu" }, [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.menu, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
class: (0, import_vue3.normalizeClass)(["item", { "active": item.page === $props.page }]),
|
||
key: index2,
|
||
onClick: ($event) => $setup.handleMenu(item)
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "side left" }, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "top" }),
|
||
(0, import_vue3.createElementVNode)("view", { class: "bottom" })
|
||
]),
|
||
item.type == "option" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
key: 0,
|
||
class: "option"
|
||
}, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text wsn" },
|
||
(0, import_vue3.toDisplayString)(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])) : item.type === "middle" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
key: 1,
|
||
class: "middle"
|
||
}, [
|
||
$props.subject == "dark" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("u-image", {
|
||
key: 0,
|
||
class: "img",
|
||
src: _imports_0$22,
|
||
mode: "aspectFit"
|
||
})) : $props.subject == "light" ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("u-image", {
|
||
key: 1,
|
||
class: "img",
|
||
src: _imports_1$2,
|
||
mode: "aspectFit"
|
||
})) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
])) : (0, import_vue3.createCommentVNode)("v-if", true),
|
||
(0, import_vue3.createElementVNode)("view", { class: "side right" }, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "top" }),
|
||
(0, import_vue3.createElementVNode)("view", { class: "bottom" })
|
||
])
|
||
], 10, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "safeArea",
|
||
style: (0, import_vue3.normalizeStyle)({ height: $setup.safeHeight })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
],
|
||
2
|
||
/* CLASS */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u5E95\u90E8\u83DC\u5355 "),
|
||
(0, import_vue3.createVNode)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "alert",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("view", { class: "alert mlr50 pt50 plr10 pb10" }, [
|
||
(0, import_vue3.createElementVNode)("scroll-view", {
|
||
scrollY: "true",
|
||
class: "scroll"
|
||
}, [
|
||
(0, import_vue3.createVNode)(_component_uni_grid, {
|
||
column: 4,
|
||
highlight: true,
|
||
showBorder: false,
|
||
onChange: $setup.handleAlert
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.showMenu, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(_component_uni_grid_item, {
|
||
index: index2,
|
||
key: index2
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("view", { class: "itemBox ptb30 df fdc jcc aic tac" }, [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80",
|
||
src: item.img,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "mt5" }, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text f28 c333" },
|
||
(0, import_vue3.toDisplayString)(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
])
|
||
])
|
||
]),
|
||
_: 2
|
||
/* DYNAMIC */
|
||
}, 1032, ["index"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
})
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "tac mt30" }, [
|
||
(0, import_vue3.createVNode)(_component_uni_icons, {
|
||
type: "bottom",
|
||
size: "50rpx",
|
||
color: "#999",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.alert.close())
|
||
})
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
);
|
||
}
|
||
var __easycom_02 = /* @__PURE__ */ _export_sfc(_sfc_main$62, [["render", _sfc_render$62], ["styles", [_style_0$62]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/footerMenu/footerMenu.vue"]]);
|
||
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
||
var lodash = { exports: {} };
|
||
lodash.exports;
|
||
(function(module, exports) {
|
||
(function() {
|
||
var undefined$1;
|
||
var VERSION = "4.17.21";
|
||
var LARGE_ARRAY_SIZE = 200;
|
||
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
||
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
||
var MAX_MEMOIZE_SIZE = 500;
|
||
var PLACEHOLDER = "__lodash_placeholder__";
|
||
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
|
||
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
||
var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
|
||
var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
|
||
var HOT_COUNT = 800, HOT_SPAN = 16;
|
||
var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
|
||
var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
|
||
var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
|
||
var wrapFlags = [
|
||
["ary", WRAP_ARY_FLAG],
|
||
["bind", WRAP_BIND_FLAG],
|
||
["bindKey", WRAP_BIND_KEY_FLAG],
|
||
["curry", WRAP_CURRY_FLAG],
|
||
["curryRight", WRAP_CURRY_RIGHT_FLAG],
|
||
["flip", WRAP_FLIP_FLAG],
|
||
["partial", WRAP_PARTIAL_FLAG],
|
||
["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
|
||
["rearg", WRAP_REARG_FLAG]
|
||
];
|
||
var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
|
||
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
||
var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
|
||
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
|
||
var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
|
||
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
||
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
|
||
var reTrimStart = /^\s+/;
|
||
var reWhitespace = /\s/;
|
||
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
|
||
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
||
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
|
||
var reEscapeChar = /\\(\\)?/g;
|
||
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
|
||
var reFlags = /\w*$/;
|
||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||
var reIsBinary = /^0b[01]+$/i;
|
||
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
||
var reIsOctal = /^0o[0-7]+$/i;
|
||
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
||
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
||
var reNoMatch = /($^)/;
|
||
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
|
||
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
||
var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
|
||
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
||
var reApos = RegExp(rsApos, "g");
|
||
var reComboMark = RegExp(rsCombo, "g");
|
||
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
||
var reUnicodeWord = RegExp([
|
||
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
||
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
|
||
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
||
rsUpper + "+" + rsOptContrUpper,
|
||
rsOrdUpper,
|
||
rsOrdLower,
|
||
rsDigits,
|
||
rsEmoji
|
||
].join("|"), "g");
|
||
var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
|
||
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
||
var contextProps = [
|
||
"Array",
|
||
"Buffer",
|
||
"DataView",
|
||
"Date",
|
||
"Error",
|
||
"Float32Array",
|
||
"Float64Array",
|
||
"Function",
|
||
"Int8Array",
|
||
"Int16Array",
|
||
"Int32Array",
|
||
"Map",
|
||
"Math",
|
||
"Object",
|
||
"Promise",
|
||
"RegExp",
|
||
"Set",
|
||
"String",
|
||
"Symbol",
|
||
"TypeError",
|
||
"Uint8Array",
|
||
"Uint8ClampedArray",
|
||
"Uint16Array",
|
||
"Uint32Array",
|
||
"WeakMap",
|
||
"_",
|
||
"clearTimeout",
|
||
"isFinite",
|
||
"parseInt",
|
||
"setTimeout"
|
||
];
|
||
var templateCounter = -1;
|
||
var typedArrayTags = {};
|
||
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
||
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
||
var cloneableTags = {};
|
||
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
||
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
||
var deburredLetters = {
|
||
// Latin-1 Supplement block.
|
||
"\xC0": "A",
|
||
"\xC1": "A",
|
||
"\xC2": "A",
|
||
"\xC3": "A",
|
||
"\xC4": "A",
|
||
"\xC5": "A",
|
||
"\xE0": "a",
|
||
"\xE1": "a",
|
||
"\xE2": "a",
|
||
"\xE3": "a",
|
||
"\xE4": "a",
|
||
"\xE5": "a",
|
||
"\xC7": "C",
|
||
"\xE7": "c",
|
||
"\xD0": "D",
|
||
"\xF0": "d",
|
||
"\xC8": "E",
|
||
"\xC9": "E",
|
||
"\xCA": "E",
|
||
"\xCB": "E",
|
||
"\xE8": "e",
|
||
"\xE9": "e",
|
||
"\xEA": "e",
|
||
"\xEB": "e",
|
||
"\xCC": "I",
|
||
"\xCD": "I",
|
||
"\xCE": "I",
|
||
"\xCF": "I",
|
||
"\xEC": "i",
|
||
"\xED": "i",
|
||
"\xEE": "i",
|
||
"\xEF": "i",
|
||
"\xD1": "N",
|
||
"\xF1": "n",
|
||
"\xD2": "O",
|
||
"\xD3": "O",
|
||
"\xD4": "O",
|
||
"\xD5": "O",
|
||
"\xD6": "O",
|
||
"\xD8": "O",
|
||
"\xF2": "o",
|
||
"\xF3": "o",
|
||
"\xF4": "o",
|
||
"\xF5": "o",
|
||
"\xF6": "o",
|
||
"\xF8": "o",
|
||
"\xD9": "U",
|
||
"\xDA": "U",
|
||
"\xDB": "U",
|
||
"\xDC": "U",
|
||
"\xF9": "u",
|
||
"\xFA": "u",
|
||
"\xFB": "u",
|
||
"\xFC": "u",
|
||
"\xDD": "Y",
|
||
"\xFD": "y",
|
||
"\xFF": "y",
|
||
"\xC6": "Ae",
|
||
"\xE6": "ae",
|
||
"\xDE": "Th",
|
||
"\xFE": "th",
|
||
"\xDF": "ss",
|
||
// Latin Extended-A block.
|
||
"\u0100": "A",
|
||
"\u0102": "A",
|
||
"\u0104": "A",
|
||
"\u0101": "a",
|
||
"\u0103": "a",
|
||
"\u0105": "a",
|
||
"\u0106": "C",
|
||
"\u0108": "C",
|
||
"\u010A": "C",
|
||
"\u010C": "C",
|
||
"\u0107": "c",
|
||
"\u0109": "c",
|
||
"\u010B": "c",
|
||
"\u010D": "c",
|
||
"\u010E": "D",
|
||
"\u0110": "D",
|
||
"\u010F": "d",
|
||
"\u0111": "d",
|
||
"\u0112": "E",
|
||
"\u0114": "E",
|
||
"\u0116": "E",
|
||
"\u0118": "E",
|
||
"\u011A": "E",
|
||
"\u0113": "e",
|
||
"\u0115": "e",
|
||
"\u0117": "e",
|
||
"\u0119": "e",
|
||
"\u011B": "e",
|
||
"\u011C": "G",
|
||
"\u011E": "G",
|
||
"\u0120": "G",
|
||
"\u0122": "G",
|
||
"\u011D": "g",
|
||
"\u011F": "g",
|
||
"\u0121": "g",
|
||
"\u0123": "g",
|
||
"\u0124": "H",
|
||
"\u0126": "H",
|
||
"\u0125": "h",
|
||
"\u0127": "h",
|
||
"\u0128": "I",
|
||
"\u012A": "I",
|
||
"\u012C": "I",
|
||
"\u012E": "I",
|
||
"\u0130": "I",
|
||
"\u0129": "i",
|
||
"\u012B": "i",
|
||
"\u012D": "i",
|
||
"\u012F": "i",
|
||
"\u0131": "i",
|
||
"\u0134": "J",
|
||
"\u0135": "j",
|
||
"\u0136": "K",
|
||
"\u0137": "k",
|
||
"\u0138": "k",
|
||
"\u0139": "L",
|
||
"\u013B": "L",
|
||
"\u013D": "L",
|
||
"\u013F": "L",
|
||
"\u0141": "L",
|
||
"\u013A": "l",
|
||
"\u013C": "l",
|
||
"\u013E": "l",
|
||
"\u0140": "l",
|
||
"\u0142": "l",
|
||
"\u0143": "N",
|
||
"\u0145": "N",
|
||
"\u0147": "N",
|
||
"\u014A": "N",
|
||
"\u0144": "n",
|
||
"\u0146": "n",
|
||
"\u0148": "n",
|
||
"\u014B": "n",
|
||
"\u014C": "O",
|
||
"\u014E": "O",
|
||
"\u0150": "O",
|
||
"\u014D": "o",
|
||
"\u014F": "o",
|
||
"\u0151": "o",
|
||
"\u0154": "R",
|
||
"\u0156": "R",
|
||
"\u0158": "R",
|
||
"\u0155": "r",
|
||
"\u0157": "r",
|
||
"\u0159": "r",
|
||
"\u015A": "S",
|
||
"\u015C": "S",
|
||
"\u015E": "S",
|
||
"\u0160": "S",
|
||
"\u015B": "s",
|
||
"\u015D": "s",
|
||
"\u015F": "s",
|
||
"\u0161": "s",
|
||
"\u0162": "T",
|
||
"\u0164": "T",
|
||
"\u0166": "T",
|
||
"\u0163": "t",
|
||
"\u0165": "t",
|
||
"\u0167": "t",
|
||
"\u0168": "U",
|
||
"\u016A": "U",
|
||
"\u016C": "U",
|
||
"\u016E": "U",
|
||
"\u0170": "U",
|
||
"\u0172": "U",
|
||
"\u0169": "u",
|
||
"\u016B": "u",
|
||
"\u016D": "u",
|
||
"\u016F": "u",
|
||
"\u0171": "u",
|
||
"\u0173": "u",
|
||
"\u0174": "W",
|
||
"\u0175": "w",
|
||
"\u0176": "Y",
|
||
"\u0177": "y",
|
||
"\u0178": "Y",
|
||
"\u0179": "Z",
|
||
"\u017B": "Z",
|
||
"\u017D": "Z",
|
||
"\u017A": "z",
|
||
"\u017C": "z",
|
||
"\u017E": "z",
|
||
"\u0132": "IJ",
|
||
"\u0133": "ij",
|
||
"\u0152": "Oe",
|
||
"\u0153": "oe",
|
||
"\u0149": "'n",
|
||
"\u017F": "s"
|
||
};
|
||
var htmlEscapes = {
|
||
"&": "&",
|
||
"<": "<",
|
||
">": ">",
|
||
'"': """,
|
||
"'": "'"
|
||
};
|
||
var htmlUnescapes = {
|
||
"&": "&",
|
||
"<": "<",
|
||
">": ">",
|
||
""": '"',
|
||
"'": "'"
|
||
};
|
||
var stringEscapes = {
|
||
"\\": "\\",
|
||
"'": "'",
|
||
"\n": "n",
|
||
"\r": "r",
|
||
"\u2028": "u2028",
|
||
"\u2029": "u2029"
|
||
};
|
||
var freeParseFloat = parseFloat, freeParseInt = parseInt;
|
||
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
||
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
||
var root = freeGlobal || freeSelf || Function("return this")();
|
||
var freeExports = exports && !exports.nodeType && exports;
|
||
var freeModule = freeExports && true && module && !module.nodeType && module;
|
||
var moduleExports = freeModule && freeModule.exports === freeExports;
|
||
var freeProcess = moduleExports && freeGlobal.process;
|
||
var nodeUtil = function() {
|
||
try {
|
||
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
||
if (types) {
|
||
return types;
|
||
}
|
||
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
||
} catch (e) {
|
||
}
|
||
}();
|
||
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||
function apply(func, thisArg, args) {
|
||
switch (args.length) {
|
||
case 0:
|
||
return func.call(thisArg);
|
||
case 1:
|
||
return func.call(thisArg, args[0]);
|
||
case 2:
|
||
return func.call(thisArg, args[0], args[1]);
|
||
case 3:
|
||
return func.call(thisArg, args[0], args[1], args[2]);
|
||
}
|
||
return func.apply(thisArg, args);
|
||
}
|
||
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
setter(accumulator, value, iteratee(value), array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arrayEach(array, iteratee) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (iteratee(array[index2], index2, array) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function arrayEachRight(array, iteratee) {
|
||
var length = array == null ? 0 : array.length;
|
||
while (length--) {
|
||
if (iteratee(array[length], length, array) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function arrayEvery(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (!predicate(array[index2], index2, array)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function arrayFilter(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (predicate(value, index2, array)) {
|
||
result[resIndex++] = value;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function arrayIncludes(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
return !!length && baseIndexOf(array, value, 0) > -1;
|
||
}
|
||
function arrayIncludesWith(array, value, comparator) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (comparator(value, array[index2])) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function arrayMap(array, iteratee) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
||
while (++index2 < length) {
|
||
result[index2] = iteratee(array[index2], index2, array);
|
||
}
|
||
return result;
|
||
}
|
||
function arrayPush(array, values) {
|
||
var index2 = -1, length = values.length, offset = array.length;
|
||
while (++index2 < length) {
|
||
array[offset + index2] = values[index2];
|
||
}
|
||
return array;
|
||
}
|
||
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
if (initAccum && length) {
|
||
accumulator = array[++index2];
|
||
}
|
||
while (++index2 < length) {
|
||
accumulator = iteratee(accumulator, array[index2], index2, array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (initAccum && length) {
|
||
accumulator = array[--length];
|
||
}
|
||
while (length--) {
|
||
accumulator = iteratee(accumulator, array[length], length, array);
|
||
}
|
||
return accumulator;
|
||
}
|
||
function arraySome(array, predicate) {
|
||
var index2 = -1, length = array == null ? 0 : array.length;
|
||
while (++index2 < length) {
|
||
if (predicate(array[index2], index2, array)) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
var asciiSize = baseProperty("length");
|
||
function asciiToArray(string) {
|
||
return string.split("");
|
||
}
|
||
function asciiWords(string) {
|
||
return string.match(reAsciiWord) || [];
|
||
}
|
||
function baseFindKey(collection, predicate, eachFunc) {
|
||
var result;
|
||
eachFunc(collection, function(value, key, collection2) {
|
||
if (predicate(value, key, collection2)) {
|
||
result = key;
|
||
return false;
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
||
var length = array.length, index2 = fromIndex + (fromRight ? 1 : -1);
|
||
while (fromRight ? index2-- : ++index2 < length) {
|
||
if (predicate(array[index2], index2, array)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseIndexOf(array, value, fromIndex) {
|
||
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
||
}
|
||
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
||
var index2 = fromIndex - 1, length = array.length;
|
||
while (++index2 < length) {
|
||
if (comparator(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseIsNaN(value) {
|
||
return value !== value;
|
||
}
|
||
function baseMean(array, iteratee) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSum(array, iteratee) / length : NAN;
|
||
}
|
||
function baseProperty(key) {
|
||
return function(object) {
|
||
return object == null ? undefined$1 : object[key];
|
||
};
|
||
}
|
||
function basePropertyOf(object) {
|
||
return function(key) {
|
||
return object == null ? undefined$1 : object[key];
|
||
};
|
||
}
|
||
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
||
eachFunc(collection, function(value, index2, collection2) {
|
||
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseSortBy(array, comparer) {
|
||
var length = array.length;
|
||
array.sort(comparer);
|
||
while (length--) {
|
||
array[length] = array[length].value;
|
||
}
|
||
return array;
|
||
}
|
||
function baseSum(array, iteratee) {
|
||
var result, index2 = -1, length = array.length;
|
||
while (++index2 < length) {
|
||
var current = iteratee(array[index2]);
|
||
if (current !== undefined$1) {
|
||
result = result === undefined$1 ? current : result + current;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function baseTimes(n, iteratee) {
|
||
var index2 = -1, result = Array(n);
|
||
while (++index2 < n) {
|
||
result[index2] = iteratee(index2);
|
||
}
|
||
return result;
|
||
}
|
||
function baseToPairs(object, props) {
|
||
return arrayMap(props, function(key) {
|
||
return [key, object[key]];
|
||
});
|
||
}
|
||
function baseTrim(string) {
|
||
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
||
}
|
||
function baseUnary(func) {
|
||
return function(value) {
|
||
return func(value);
|
||
};
|
||
}
|
||
function baseValues(object, props) {
|
||
return arrayMap(props, function(key) {
|
||
return object[key];
|
||
});
|
||
}
|
||
function cacheHas(cache, key) {
|
||
return cache.has(key);
|
||
}
|
||
function charsStartIndex(strSymbols, chrSymbols) {
|
||
var index2 = -1, length = strSymbols.length;
|
||
while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
|
||
}
|
||
return index2;
|
||
}
|
||
function charsEndIndex(strSymbols, chrSymbols) {
|
||
var index2 = strSymbols.length;
|
||
while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) {
|
||
}
|
||
return index2;
|
||
}
|
||
function countHolders(array, placeholder) {
|
||
var length = array.length, result = 0;
|
||
while (length--) {
|
||
if (array[length] === placeholder) {
|
||
++result;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
var deburrLetter = basePropertyOf(deburredLetters);
|
||
var escapeHtmlChar = basePropertyOf(htmlEscapes);
|
||
function escapeStringChar(chr) {
|
||
return "\\" + stringEscapes[chr];
|
||
}
|
||
function getValue(object, key) {
|
||
return object == null ? undefined$1 : object[key];
|
||
}
|
||
function hasUnicode(string) {
|
||
return reHasUnicode.test(string);
|
||
}
|
||
function hasUnicodeWord(string) {
|
||
return reHasUnicodeWord.test(string);
|
||
}
|
||
function iteratorToArray(iterator) {
|
||
var data, result = [];
|
||
while (!(data = iterator.next()).done) {
|
||
result.push(data.value);
|
||
}
|
||
return result;
|
||
}
|
||
function mapToArray(map) {
|
||
var index2 = -1, result = Array(map.size);
|
||
map.forEach(function(value, key) {
|
||
result[++index2] = [key, value];
|
||
});
|
||
return result;
|
||
}
|
||
function overArg(func, transform) {
|
||
return function(arg) {
|
||
return func(transform(arg));
|
||
};
|
||
}
|
||
function replaceHolders(array, placeholder) {
|
||
var index2 = -1, length = array.length, resIndex = 0, result = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (value === placeholder || value === PLACEHOLDER) {
|
||
array[index2] = PLACEHOLDER;
|
||
result[resIndex++] = index2;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
function setToArray(set) {
|
||
var index2 = -1, result = Array(set.size);
|
||
set.forEach(function(value) {
|
||
result[++index2] = value;
|
||
});
|
||
return result;
|
||
}
|
||
function setToPairs(set) {
|
||
var index2 = -1, result = Array(set.size);
|
||
set.forEach(function(value) {
|
||
result[++index2] = [value, value];
|
||
});
|
||
return result;
|
||
}
|
||
function strictIndexOf(array, value, fromIndex) {
|
||
var index2 = fromIndex - 1, length = array.length;
|
||
while (++index2 < length) {
|
||
if (array[index2] === value) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function strictLastIndexOf(array, value, fromIndex) {
|
||
var index2 = fromIndex + 1;
|
||
while (index2--) {
|
||
if (array[index2] === value) {
|
||
return index2;
|
||
}
|
||
}
|
||
return index2;
|
||
}
|
||
function stringSize(string) {
|
||
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
|
||
}
|
||
function stringToArray(string) {
|
||
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
||
}
|
||
function trimmedEndIndex(string) {
|
||
var index2 = string.length;
|
||
while (index2-- && reWhitespace.test(string.charAt(index2))) {
|
||
}
|
||
return index2;
|
||
}
|
||
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
||
function unicodeSize(string) {
|
||
var result = reUnicode.lastIndex = 0;
|
||
while (reUnicode.test(string)) {
|
||
++result;
|
||
}
|
||
return result;
|
||
}
|
||
function unicodeToArray(string) {
|
||
return string.match(reUnicode) || [];
|
||
}
|
||
function unicodeWords(string) {
|
||
return string.match(reUnicodeWord) || [];
|
||
}
|
||
var runInContext = function runInContext2(context) {
|
||
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
||
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
|
||
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
||
var coreJsData = context["__core-js_shared__"];
|
||
var funcToString = funcProto.toString;
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
var idCounter = 0;
|
||
var maskSrcKey = function() {
|
||
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
||
return uid ? "Symbol(src)_1." + uid : "";
|
||
}();
|
||
var nativeObjectToString = objectProto.toString;
|
||
var objectCtorString = funcToString.call(Object2);
|
||
var oldDash = root._;
|
||
var reIsNative = RegExp2(
|
||
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
||
);
|
||
var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
||
var defineProperty = function() {
|
||
try {
|
||
var func = getNative(Object2, "defineProperty");
|
||
func({}, "", {});
|
||
return func;
|
||
} catch (e) {
|
||
}
|
||
}();
|
||
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
||
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
||
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
||
var metaMap = WeakMap && new WeakMap();
|
||
var realNames = {};
|
||
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
||
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
||
function lodash2(value) {
|
||
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
||
if (value instanceof LodashWrapper) {
|
||
return value;
|
||
}
|
||
if (hasOwnProperty.call(value, "__wrapped__")) {
|
||
return wrapperClone(value);
|
||
}
|
||
}
|
||
return new LodashWrapper(value);
|
||
}
|
||
var baseCreate = /* @__PURE__ */ function() {
|
||
function object() {
|
||
}
|
||
return function(proto) {
|
||
if (!isObject(proto)) {
|
||
return {};
|
||
}
|
||
if (objectCreate) {
|
||
return objectCreate(proto);
|
||
}
|
||
object.prototype = proto;
|
||
var result2 = new object();
|
||
object.prototype = undefined$1;
|
||
return result2;
|
||
};
|
||
}();
|
||
function baseLodash() {
|
||
}
|
||
function LodashWrapper(value, chainAll) {
|
||
this.__wrapped__ = value;
|
||
this.__actions__ = [];
|
||
this.__chain__ = !!chainAll;
|
||
this.__index__ = 0;
|
||
this.__values__ = undefined$1;
|
||
}
|
||
lodash2.templateSettings = {
|
||
/**
|
||
* Used to detect `data` property values to be HTML-escaped.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"escape": reEscape,
|
||
/**
|
||
* Used to detect code to be evaluated.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"evaluate": reEvaluate,
|
||
/**
|
||
* Used to detect `data` property values to inject.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {RegExp}
|
||
*/
|
||
"interpolate": reInterpolate,
|
||
/**
|
||
* Used to reference the data object in the template text.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {string}
|
||
*/
|
||
"variable": "",
|
||
/**
|
||
* Used to import variables into the compiled template.
|
||
*
|
||
* @memberOf _.templateSettings
|
||
* @type {Object}
|
||
*/
|
||
"imports": {
|
||
/**
|
||
* A reference to the `lodash` function.
|
||
*
|
||
* @memberOf _.templateSettings.imports
|
||
* @type {Function}
|
||
*/
|
||
"_": lodash2
|
||
}
|
||
};
|
||
lodash2.prototype = baseLodash.prototype;
|
||
lodash2.prototype.constructor = lodash2;
|
||
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||
LodashWrapper.prototype.constructor = LodashWrapper;
|
||
function LazyWrapper(value) {
|
||
this.__wrapped__ = value;
|
||
this.__actions__ = [];
|
||
this.__dir__ = 1;
|
||
this.__filtered__ = false;
|
||
this.__iteratees__ = [];
|
||
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
||
this.__views__ = [];
|
||
}
|
||
function lazyClone() {
|
||
var result2 = new LazyWrapper(this.__wrapped__);
|
||
result2.__actions__ = copyArray(this.__actions__);
|
||
result2.__dir__ = this.__dir__;
|
||
result2.__filtered__ = this.__filtered__;
|
||
result2.__iteratees__ = copyArray(this.__iteratees__);
|
||
result2.__takeCount__ = this.__takeCount__;
|
||
result2.__views__ = copyArray(this.__views__);
|
||
return result2;
|
||
}
|
||
function lazyReverse() {
|
||
if (this.__filtered__) {
|
||
var result2 = new LazyWrapper(this);
|
||
result2.__dir__ = -1;
|
||
result2.__filtered__ = true;
|
||
} else {
|
||
result2 = this.clone();
|
||
result2.__dir__ *= -1;
|
||
}
|
||
return result2;
|
||
}
|
||
function lazyValue() {
|
||
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index2 = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
||
if (!isArr || !isRight && arrLength == length && takeCount == length) {
|
||
return baseWrapperValue(array, this.__actions__);
|
||
}
|
||
var result2 = [];
|
||
outer:
|
||
while (length-- && resIndex < takeCount) {
|
||
index2 += dir;
|
||
var iterIndex = -1, value = array[index2];
|
||
while (++iterIndex < iterLength) {
|
||
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed22 = iteratee2(value);
|
||
if (type == LAZY_MAP_FLAG) {
|
||
value = computed22;
|
||
} else if (!computed22) {
|
||
if (type == LAZY_FILTER_FLAG) {
|
||
continue outer;
|
||
} else {
|
||
break outer;
|
||
}
|
||
}
|
||
}
|
||
result2[resIndex++] = value;
|
||
}
|
||
return result2;
|
||
}
|
||
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||
LazyWrapper.prototype.constructor = LazyWrapper;
|
||
function Hash(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function hashClear() {
|
||
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
||
this.size = 0;
|
||
}
|
||
function hashDelete(key) {
|
||
var result2 = this.has(key) && delete this.__data__[key];
|
||
this.size -= result2 ? 1 : 0;
|
||
return result2;
|
||
}
|
||
function hashGet(key) {
|
||
var data = this.__data__;
|
||
if (nativeCreate) {
|
||
var result2 = data[key];
|
||
return result2 === HASH_UNDEFINED ? undefined$1 : result2;
|
||
}
|
||
return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
|
||
}
|
||
function hashHas(key) {
|
||
var data = this.__data__;
|
||
return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key);
|
||
}
|
||
function hashSet(key, value) {
|
||
var data = this.__data__;
|
||
this.size += this.has(key) ? 0 : 1;
|
||
data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
|
||
return this;
|
||
}
|
||
Hash.prototype.clear = hashClear;
|
||
Hash.prototype["delete"] = hashDelete;
|
||
Hash.prototype.get = hashGet;
|
||
Hash.prototype.has = hashHas;
|
||
Hash.prototype.set = hashSet;
|
||
function ListCache(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function listCacheClear() {
|
||
this.__data__ = [];
|
||
this.size = 0;
|
||
}
|
||
function listCacheDelete(key) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||
if (index2 < 0) {
|
||
return false;
|
||
}
|
||
var lastIndex = data.length - 1;
|
||
if (index2 == lastIndex) {
|
||
data.pop();
|
||
} else {
|
||
splice.call(data, index2, 1);
|
||
}
|
||
--this.size;
|
||
return true;
|
||
}
|
||
function listCacheGet(key) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||
return index2 < 0 ? undefined$1 : data[index2][1];
|
||
}
|
||
function listCacheHas(key) {
|
||
return assocIndexOf(this.__data__, key) > -1;
|
||
}
|
||
function listCacheSet(key, value) {
|
||
var data = this.__data__, index2 = assocIndexOf(data, key);
|
||
if (index2 < 0) {
|
||
++this.size;
|
||
data.push([key, value]);
|
||
} else {
|
||
data[index2][1] = value;
|
||
}
|
||
return this;
|
||
}
|
||
ListCache.prototype.clear = listCacheClear;
|
||
ListCache.prototype["delete"] = listCacheDelete;
|
||
ListCache.prototype.get = listCacheGet;
|
||
ListCache.prototype.has = listCacheHas;
|
||
ListCache.prototype.set = listCacheSet;
|
||
function MapCache(entries) {
|
||
var index2 = -1, length = entries == null ? 0 : entries.length;
|
||
this.clear();
|
||
while (++index2 < length) {
|
||
var entry = entries[index2];
|
||
this.set(entry[0], entry[1]);
|
||
}
|
||
}
|
||
function mapCacheClear() {
|
||
this.size = 0;
|
||
this.__data__ = {
|
||
"hash": new Hash(),
|
||
"map": new (Map || ListCache)(),
|
||
"string": new Hash()
|
||
};
|
||
}
|
||
function mapCacheDelete(key) {
|
||
var result2 = getMapData(this, key)["delete"](key);
|
||
this.size -= result2 ? 1 : 0;
|
||
return result2;
|
||
}
|
||
function mapCacheGet(key) {
|
||
return getMapData(this, key).get(key);
|
||
}
|
||
function mapCacheHas(key) {
|
||
return getMapData(this, key).has(key);
|
||
}
|
||
function mapCacheSet(key, value) {
|
||
var data = getMapData(this, key), size2 = data.size;
|
||
data.set(key, value);
|
||
this.size += data.size == size2 ? 0 : 1;
|
||
return this;
|
||
}
|
||
MapCache.prototype.clear = mapCacheClear;
|
||
MapCache.prototype["delete"] = mapCacheDelete;
|
||
MapCache.prototype.get = mapCacheGet;
|
||
MapCache.prototype.has = mapCacheHas;
|
||
MapCache.prototype.set = mapCacheSet;
|
||
function SetCache(values2) {
|
||
var index2 = -1, length = values2 == null ? 0 : values2.length;
|
||
this.__data__ = new MapCache();
|
||
while (++index2 < length) {
|
||
this.add(values2[index2]);
|
||
}
|
||
}
|
||
function setCacheAdd(value) {
|
||
this.__data__.set(value, HASH_UNDEFINED);
|
||
return this;
|
||
}
|
||
function setCacheHas(value) {
|
||
return this.__data__.has(value);
|
||
}
|
||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||
SetCache.prototype.has = setCacheHas;
|
||
function Stack(entries) {
|
||
var data = this.__data__ = new ListCache(entries);
|
||
this.size = data.size;
|
||
}
|
||
function stackClear() {
|
||
this.__data__ = new ListCache();
|
||
this.size = 0;
|
||
}
|
||
function stackDelete(key) {
|
||
var data = this.__data__, result2 = data["delete"](key);
|
||
this.size = data.size;
|
||
return result2;
|
||
}
|
||
function stackGet(key) {
|
||
return this.__data__.get(key);
|
||
}
|
||
function stackHas(key) {
|
||
return this.__data__.has(key);
|
||
}
|
||
function stackSet(key, value) {
|
||
var data = this.__data__;
|
||
if (data instanceof ListCache) {
|
||
var pairs = data.__data__;
|
||
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
||
pairs.push([key, value]);
|
||
this.size = ++data.size;
|
||
return this;
|
||
}
|
||
data = this.__data__ = new MapCache(pairs);
|
||
}
|
||
data.set(key, value);
|
||
this.size = data.size;
|
||
return this;
|
||
}
|
||
Stack.prototype.clear = stackClear;
|
||
Stack.prototype["delete"] = stackDelete;
|
||
Stack.prototype.get = stackGet;
|
||
Stack.prototype.has = stackHas;
|
||
Stack.prototype.set = stackSet;
|
||
function arrayLikeKeys(value, inherited) {
|
||
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
||
for (var key in value) {
|
||
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
||
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
||
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
||
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
||
isIndex(key, length)))) {
|
||
result2.push(key);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function arraySample(array) {
|
||
var length = array.length;
|
||
return length ? array[baseRandom(0, length - 1)] : undefined$1;
|
||
}
|
||
function arraySampleSize(array, n) {
|
||
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
||
}
|
||
function arrayShuffle(array) {
|
||
return shuffleSelf(copyArray(array));
|
||
}
|
||
function assignMergeValue(object, key, value) {
|
||
if (value !== undefined$1 && !eq(object[key], value) || value === undefined$1 && !(key in object)) {
|
||
baseAssignValue(object, key, value);
|
||
}
|
||
}
|
||
function assignValue(object, key, value) {
|
||
var objValue = object[key];
|
||
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined$1 && !(key in object)) {
|
||
baseAssignValue(object, key, value);
|
||
}
|
||
}
|
||
function assocIndexOf(array, key) {
|
||
var length = array.length;
|
||
while (length--) {
|
||
if (eq(array[length][0], key)) {
|
||
return length;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function baseAggregator(collection, setter, iteratee2, accumulator) {
|
||
baseEach(collection, function(value, key, collection2) {
|
||
setter(accumulator, value, iteratee2(value), collection2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseAssign(object, source) {
|
||
return object && copyObject(source, keys(source), object);
|
||
}
|
||
function baseAssignIn(object, source) {
|
||
return object && copyObject(source, keysIn(source), object);
|
||
}
|
||
function baseAssignValue(object, key, value) {
|
||
if (key == "__proto__" && defineProperty) {
|
||
defineProperty(object, key, {
|
||
"configurable": true,
|
||
"enumerable": true,
|
||
"value": value,
|
||
"writable": true
|
||
});
|
||
} else {
|
||
object[key] = value;
|
||
}
|
||
}
|
||
function baseAt(object, paths) {
|
||
var index2 = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
||
while (++index2 < length) {
|
||
result2[index2] = skip ? undefined$1 : get(object, paths[index2]);
|
||
}
|
||
return result2;
|
||
}
|
||
function baseClamp(number, lower, upper) {
|
||
if (number === number) {
|
||
if (upper !== undefined$1) {
|
||
number = number <= upper ? number : upper;
|
||
}
|
||
if (lower !== undefined$1) {
|
||
number = number >= lower ? number : lower;
|
||
}
|
||
}
|
||
return number;
|
||
}
|
||
function baseClone(value, bitmask, customizer, key, object, stack) {
|
||
var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
||
if (customizer) {
|
||
result2 = object ? customizer(value, key, object, stack) : customizer(value);
|
||
}
|
||
if (result2 !== undefined$1) {
|
||
return result2;
|
||
}
|
||
if (!isObject(value)) {
|
||
return value;
|
||
}
|
||
var isArr = isArray(value);
|
||
if (isArr) {
|
||
result2 = initCloneArray(value);
|
||
if (!isDeep) {
|
||
return copyArray(value, result2);
|
||
}
|
||
} else {
|
||
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
||
if (isBuffer(value)) {
|
||
return cloneBuffer(value, isDeep);
|
||
}
|
||
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
||
result2 = isFlat || isFunc ? {} : initCloneObject(value);
|
||
if (!isDeep) {
|
||
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
||
}
|
||
} else {
|
||
if (!cloneableTags[tag]) {
|
||
return object ? value : {};
|
||
}
|
||
result2 = initCloneByTag(value, tag, isDeep);
|
||
}
|
||
}
|
||
stack || (stack = new Stack());
|
||
var stacked = stack.get(value);
|
||
if (stacked) {
|
||
return stacked;
|
||
}
|
||
stack.set(value, result2);
|
||
if (isSet(value)) {
|
||
value.forEach(function(subValue) {
|
||
result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
||
});
|
||
} else if (isMap(value)) {
|
||
value.forEach(function(subValue, key2) {
|
||
result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
||
});
|
||
}
|
||
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
||
var props = isArr ? undefined$1 : keysFunc(value);
|
||
arrayEach(props || value, function(subValue, key2) {
|
||
if (props) {
|
||
key2 = subValue;
|
||
subValue = value[key2];
|
||
}
|
||
assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
||
});
|
||
return result2;
|
||
}
|
||
function baseConforms(source) {
|
||
var props = keys(source);
|
||
return function(object) {
|
||
return baseConformsTo(object, source, props);
|
||
};
|
||
}
|
||
function baseConformsTo(object, source, props) {
|
||
var length = props.length;
|
||
if (object == null) {
|
||
return !length;
|
||
}
|
||
object = Object2(object);
|
||
while (length--) {
|
||
var key = props[length], predicate = source[key], value = object[key];
|
||
if (value === undefined$1 && !(key in object) || !predicate(value)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function baseDelay(func, wait, args) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return setTimeout2(function() {
|
||
func.apply(undefined$1, args);
|
||
}, wait);
|
||
}
|
||
function baseDifference(array, values2, iteratee2, comparator) {
|
||
var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
|
||
if (!length) {
|
||
return result2;
|
||
}
|
||
if (iteratee2) {
|
||
values2 = arrayMap(values2, baseUnary(iteratee2));
|
||
}
|
||
if (comparator) {
|
||
includes2 = arrayIncludesWith;
|
||
isCommon = false;
|
||
} else if (values2.length >= LARGE_ARRAY_SIZE) {
|
||
includes2 = cacheHas;
|
||
isCommon = false;
|
||
values2 = new SetCache(values2);
|
||
}
|
||
outer:
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed22 = iteratee2 == null ? value : iteratee2(value);
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (isCommon && computed22 === computed22) {
|
||
var valuesIndex = valuesLength;
|
||
while (valuesIndex--) {
|
||
if (values2[valuesIndex] === computed22) {
|
||
continue outer;
|
||
}
|
||
}
|
||
result2.push(value);
|
||
} else if (!includes2(values2, computed22, comparator)) {
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var baseEach = createBaseEach(baseForOwn);
|
||
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
||
function baseEvery(collection, predicate) {
|
||
var result2 = true;
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
result2 = !!predicate(value, index2, collection2);
|
||
return result2;
|
||
});
|
||
return result2;
|
||
}
|
||
function baseExtremum(array, iteratee2, comparator) {
|
||
var index2 = -1, length = array.length;
|
||
while (++index2 < length) {
|
||
var value = array[index2], current = iteratee2(value);
|
||
if (current != null && (computed22 === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed22))) {
|
||
var computed22 = current, result2 = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseFill(array, value, start, end) {
|
||
var length = array.length;
|
||
start = toInteger(start);
|
||
if (start < 0) {
|
||
start = -start > length ? 0 : length + start;
|
||
}
|
||
end = end === undefined$1 || end > length ? length : toInteger(end);
|
||
if (end < 0) {
|
||
end += length;
|
||
}
|
||
end = start > end ? 0 : toLength(end);
|
||
while (start < end) {
|
||
array[start++] = value;
|
||
}
|
||
return array;
|
||
}
|
||
function baseFilter(collection, predicate) {
|
||
var result2 = [];
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
if (predicate(value, index2, collection2)) {
|
||
result2.push(value);
|
||
}
|
||
});
|
||
return result2;
|
||
}
|
||
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
||
var index2 = -1, length = array.length;
|
||
predicate || (predicate = isFlattenable);
|
||
result2 || (result2 = []);
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (depth > 0 && predicate(value)) {
|
||
if (depth > 1) {
|
||
baseFlatten(value, depth - 1, predicate, isStrict, result2);
|
||
} else {
|
||
arrayPush(result2, value);
|
||
}
|
||
} else if (!isStrict) {
|
||
result2[result2.length] = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var baseFor = createBaseFor();
|
||
var baseForRight = createBaseFor(true);
|
||
function baseForOwn(object, iteratee2) {
|
||
return object && baseFor(object, iteratee2, keys);
|
||
}
|
||
function baseForOwnRight(object, iteratee2) {
|
||
return object && baseForRight(object, iteratee2, keys);
|
||
}
|
||
function baseFunctions(object, props) {
|
||
return arrayFilter(props, function(key) {
|
||
return isFunction(object[key]);
|
||
});
|
||
}
|
||
function baseGet(object, path) {
|
||
path = castPath(path, object);
|
||
var index2 = 0, length = path.length;
|
||
while (object != null && index2 < length) {
|
||
object = object[toKey(path[index2++])];
|
||
}
|
||
return index2 && index2 == length ? object : undefined$1;
|
||
}
|
||
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
||
var result2 = keysFunc(object);
|
||
return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
|
||
}
|
||
function baseGetTag(value) {
|
||
if (value == null) {
|
||
return value === undefined$1 ? undefinedTag : nullTag;
|
||
}
|
||
return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
|
||
}
|
||
function baseGt(value, other) {
|
||
return value > other;
|
||
}
|
||
function baseHas(object, key) {
|
||
return object != null && hasOwnProperty.call(object, key);
|
||
}
|
||
function baseHasIn(object, key) {
|
||
return object != null && key in Object2(object);
|
||
}
|
||
function baseInRange(number, start, end) {
|
||
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
||
}
|
||
function baseIntersection(arrays, iteratee2, comparator) {
|
||
var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
|
||
while (othIndex--) {
|
||
var array = arrays[othIndex];
|
||
if (othIndex && iteratee2) {
|
||
array = arrayMap(array, baseUnary(iteratee2));
|
||
}
|
||
maxLength = nativeMin(array.length, maxLength);
|
||
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
|
||
}
|
||
array = arrays[0];
|
||
var index2 = -1, seen = caches[0];
|
||
outer:
|
||
while (++index2 < length && result2.length < maxLength) {
|
||
var value = array[index2], computed22 = iteratee2 ? iteratee2(value) : value;
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (!(seen ? cacheHas(seen, computed22) : includes2(result2, computed22, comparator))) {
|
||
othIndex = othLength;
|
||
while (--othIndex) {
|
||
var cache = caches[othIndex];
|
||
if (!(cache ? cacheHas(cache, computed22) : includes2(arrays[othIndex], computed22, comparator))) {
|
||
continue outer;
|
||
}
|
||
}
|
||
if (seen) {
|
||
seen.push(computed22);
|
||
}
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseInverter(object, setter, iteratee2, accumulator) {
|
||
baseForOwn(object, function(value, key, object2) {
|
||
setter(accumulator, iteratee2(value), key, object2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function baseInvoke(object, path, args) {
|
||
path = castPath(path, object);
|
||
object = parent(object, path);
|
||
var func = object == null ? object : object[toKey(last(path))];
|
||
return func == null ? undefined$1 : apply(func, object, args);
|
||
}
|
||
function baseIsArguments(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
||
}
|
||
function baseIsArrayBuffer(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
||
}
|
||
function baseIsDate(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
||
}
|
||
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
||
if (value === other) {
|
||
return true;
|
||
}
|
||
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
||
return value !== value && other !== other;
|
||
}
|
||
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
||
}
|
||
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
||
objTag = objTag == argsTag ? objectTag : objTag;
|
||
othTag = othTag == argsTag ? objectTag : othTag;
|
||
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
||
if (isSameTag && isBuffer(object)) {
|
||
if (!isBuffer(other)) {
|
||
return false;
|
||
}
|
||
objIsArr = true;
|
||
objIsObj = false;
|
||
}
|
||
if (isSameTag && !objIsObj) {
|
||
stack || (stack = new Stack());
|
||
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
||
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
||
if (objIsWrapped || othIsWrapped) {
|
||
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
||
stack || (stack = new Stack());
|
||
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
||
}
|
||
}
|
||
if (!isSameTag) {
|
||
return false;
|
||
}
|
||
stack || (stack = new Stack());
|
||
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
||
}
|
||
function baseIsMap(value) {
|
||
return isObjectLike(value) && getTag(value) == mapTag;
|
||
}
|
||
function baseIsMatch(object, source, matchData, customizer) {
|
||
var index2 = matchData.length, length = index2, noCustomizer = !customizer;
|
||
if (object == null) {
|
||
return !length;
|
||
}
|
||
object = Object2(object);
|
||
while (index2--) {
|
||
var data = matchData[index2];
|
||
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
||
return false;
|
||
}
|
||
}
|
||
while (++index2 < length) {
|
||
data = matchData[index2];
|
||
var key = data[0], objValue = object[key], srcValue = data[1];
|
||
if (noCustomizer && data[2]) {
|
||
if (objValue === undefined$1 && !(key in object)) {
|
||
return false;
|
||
}
|
||
} else {
|
||
var stack = new Stack();
|
||
if (customizer) {
|
||
var result2 = customizer(objValue, srcValue, key, object, source, stack);
|
||
}
|
||
if (!(result2 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function baseIsNative(value) {
|
||
if (!isObject(value) || isMasked(value)) {
|
||
return false;
|
||
}
|
||
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
||
return pattern.test(toSource(value));
|
||
}
|
||
function baseIsRegExp(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
||
}
|
||
function baseIsSet(value) {
|
||
return isObjectLike(value) && getTag(value) == setTag;
|
||
}
|
||
function baseIsTypedArray(value) {
|
||
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
||
}
|
||
function baseIteratee(value) {
|
||
if (typeof value == "function") {
|
||
return value;
|
||
}
|
||
if (value == null) {
|
||
return identity;
|
||
}
|
||
if (typeof value == "object") {
|
||
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
||
}
|
||
return property(value);
|
||
}
|
||
function baseKeys(object) {
|
||
if (!isPrototype(object)) {
|
||
return nativeKeys(object);
|
||
}
|
||
var result2 = [];
|
||
for (var key in Object2(object)) {
|
||
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
||
result2.push(key);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseKeysIn(object) {
|
||
if (!isObject(object)) {
|
||
return nativeKeysIn(object);
|
||
}
|
||
var isProto = isPrototype(object), result2 = [];
|
||
for (var key in object) {
|
||
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
|
||
result2.push(key);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseLt(value, other) {
|
||
return value < other;
|
||
}
|
||
function baseMap(collection, iteratee2) {
|
||
var index2 = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
||
baseEach(collection, function(value, key, collection2) {
|
||
result2[++index2] = iteratee2(value, key, collection2);
|
||
});
|
||
return result2;
|
||
}
|
||
function baseMatches(source) {
|
||
var matchData = getMatchData(source);
|
||
if (matchData.length == 1 && matchData[0][2]) {
|
||
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
||
}
|
||
return function(object) {
|
||
return object === source || baseIsMatch(object, source, matchData);
|
||
};
|
||
}
|
||
function baseMatchesProperty(path, srcValue) {
|
||
if (isKey(path) && isStrictComparable(srcValue)) {
|
||
return matchesStrictComparable(toKey(path), srcValue);
|
||
}
|
||
return function(object) {
|
||
var objValue = get(object, path);
|
||
return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
||
};
|
||
}
|
||
function baseMerge(object, source, srcIndex, customizer, stack) {
|
||
if (object === source) {
|
||
return;
|
||
}
|
||
baseFor(source, function(srcValue, key) {
|
||
stack || (stack = new Stack());
|
||
if (isObject(srcValue)) {
|
||
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
||
} else {
|
||
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
||
if (newValue === undefined$1) {
|
||
newValue = srcValue;
|
||
}
|
||
assignMergeValue(object, key, newValue);
|
||
}
|
||
}, keysIn);
|
||
}
|
||
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
||
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
||
if (stacked) {
|
||
assignMergeValue(object, key, stacked);
|
||
return;
|
||
}
|
||
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined$1;
|
||
var isCommon = newValue === undefined$1;
|
||
if (isCommon) {
|
||
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
||
newValue = srcValue;
|
||
if (isArr || isBuff || isTyped) {
|
||
if (isArray(objValue)) {
|
||
newValue = objValue;
|
||
} else if (isArrayLikeObject(objValue)) {
|
||
newValue = copyArray(objValue);
|
||
} else if (isBuff) {
|
||
isCommon = false;
|
||
newValue = cloneBuffer(srcValue, true);
|
||
} else if (isTyped) {
|
||
isCommon = false;
|
||
newValue = cloneTypedArray(srcValue, true);
|
||
} else {
|
||
newValue = [];
|
||
}
|
||
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||
newValue = objValue;
|
||
if (isArguments(objValue)) {
|
||
newValue = toPlainObject(objValue);
|
||
} else if (!isObject(objValue) || isFunction(objValue)) {
|
||
newValue = initCloneObject(srcValue);
|
||
}
|
||
} else {
|
||
isCommon = false;
|
||
}
|
||
}
|
||
if (isCommon) {
|
||
stack.set(srcValue, newValue);
|
||
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
||
stack["delete"](srcValue);
|
||
}
|
||
assignMergeValue(object, key, newValue);
|
||
}
|
||
function baseNth(array, n) {
|
||
var length = array.length;
|
||
if (!length) {
|
||
return;
|
||
}
|
||
n += n < 0 ? length : 0;
|
||
return isIndex(n, length) ? array[n] : undefined$1;
|
||
}
|
||
function baseOrderBy(collection, iteratees, orders) {
|
||
if (iteratees.length) {
|
||
iteratees = arrayMap(iteratees, function(iteratee2) {
|
||
if (isArray(iteratee2)) {
|
||
return function(value) {
|
||
return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
|
||
};
|
||
}
|
||
return iteratee2;
|
||
});
|
||
} else {
|
||
iteratees = [identity];
|
||
}
|
||
var index2 = -1;
|
||
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||
var result2 = baseMap(collection, function(value, key, collection2) {
|
||
var criteria = arrayMap(iteratees, function(iteratee2) {
|
||
return iteratee2(value);
|
||
});
|
||
return { "criteria": criteria, "index": ++index2, "value": value };
|
||
});
|
||
return baseSortBy(result2, function(object, other) {
|
||
return compareMultiple(object, other, orders);
|
||
});
|
||
}
|
||
function basePick(object, paths) {
|
||
return basePickBy(object, paths, function(value, path) {
|
||
return hasIn(object, path);
|
||
});
|
||
}
|
||
function basePickBy(object, paths, predicate) {
|
||
var index2 = -1, length = paths.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var path = paths[index2], value = baseGet(object, path);
|
||
if (predicate(value, path)) {
|
||
baseSet(result2, castPath(path, object), value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function basePropertyDeep(path) {
|
||
return function(object) {
|
||
return baseGet(object, path);
|
||
};
|
||
}
|
||
function basePullAll(array, values2, iteratee2, comparator) {
|
||
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index2 = -1, length = values2.length, seen = array;
|
||
if (array === values2) {
|
||
values2 = copyArray(values2);
|
||
}
|
||
if (iteratee2) {
|
||
seen = arrayMap(array, baseUnary(iteratee2));
|
||
}
|
||
while (++index2 < length) {
|
||
var fromIndex = 0, value = values2[index2], computed22 = iteratee2 ? iteratee2(value) : value;
|
||
while ((fromIndex = indexOf2(seen, computed22, fromIndex, comparator)) > -1) {
|
||
if (seen !== array) {
|
||
splice.call(seen, fromIndex, 1);
|
||
}
|
||
splice.call(array, fromIndex, 1);
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function basePullAt(array, indexes) {
|
||
var length = array ? indexes.length : 0, lastIndex = length - 1;
|
||
while (length--) {
|
||
var index2 = indexes[length];
|
||
if (length == lastIndex || index2 !== previous) {
|
||
var previous = index2;
|
||
if (isIndex(index2)) {
|
||
splice.call(array, index2, 1);
|
||
} else {
|
||
baseUnset(array, index2);
|
||
}
|
||
}
|
||
}
|
||
return array;
|
||
}
|
||
function baseRandom(lower, upper) {
|
||
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
||
}
|
||
function baseRange(start, end, step, fromRight) {
|
||
var index2 = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
|
||
while (length--) {
|
||
result2[fromRight ? length : ++index2] = start;
|
||
start += step;
|
||
}
|
||
return result2;
|
||
}
|
||
function baseRepeat(string, n) {
|
||
var result2 = "";
|
||
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
||
return result2;
|
||
}
|
||
do {
|
||
if (n % 2) {
|
||
result2 += string;
|
||
}
|
||
n = nativeFloor(n / 2);
|
||
if (n) {
|
||
string += string;
|
||
}
|
||
} while (n);
|
||
return result2;
|
||
}
|
||
function baseRest(func, start) {
|
||
return setToString(overRest(func, start, identity), func + "");
|
||
}
|
||
function baseSample(collection) {
|
||
return arraySample(values(collection));
|
||
}
|
||
function baseSampleSize(collection, n) {
|
||
var array = values(collection);
|
||
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
||
}
|
||
function baseSet(object, path, value, customizer) {
|
||
if (!isObject(object)) {
|
||
return object;
|
||
}
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length, lastIndex = length - 1, nested = object;
|
||
while (nested != null && ++index2 < length) {
|
||
var key = toKey(path[index2]), newValue = value;
|
||
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
||
return object;
|
||
}
|
||
if (index2 != lastIndex) {
|
||
var objValue = nested[key];
|
||
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
||
if (newValue === undefined$1) {
|
||
newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
||
}
|
||
}
|
||
assignValue(nested, key, newValue);
|
||
nested = nested[key];
|
||
}
|
||
return object;
|
||
}
|
||
var baseSetData = !metaMap ? identity : function(func, data) {
|
||
metaMap.set(func, data);
|
||
return func;
|
||
};
|
||
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
||
return defineProperty(func, "toString", {
|
||
"configurable": true,
|
||
"enumerable": false,
|
||
"value": constant(string),
|
||
"writable": true
|
||
});
|
||
};
|
||
function baseShuffle(collection) {
|
||
return shuffleSelf(values(collection));
|
||
}
|
||
function baseSlice(array, start, end) {
|
||
var index2 = -1, length = array.length;
|
||
if (start < 0) {
|
||
start = -start > length ? 0 : length + start;
|
||
}
|
||
end = end > length ? length : end;
|
||
if (end < 0) {
|
||
end += length;
|
||
}
|
||
length = start > end ? 0 : end - start >>> 0;
|
||
start >>>= 0;
|
||
var result2 = Array2(length);
|
||
while (++index2 < length) {
|
||
result2[index2] = array[index2 + start];
|
||
}
|
||
return result2;
|
||
}
|
||
function baseSome(collection, predicate) {
|
||
var result2;
|
||
baseEach(collection, function(value, index2, collection2) {
|
||
result2 = predicate(value, index2, collection2);
|
||
return !result2;
|
||
});
|
||
return !!result2;
|
||
}
|
||
function baseSortedIndex(array, value, retHighest) {
|
||
var low = 0, high = array == null ? low : array.length;
|
||
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
||
while (low < high) {
|
||
var mid = low + high >>> 1, computed22 = array[mid];
|
||
if (computed22 !== null && !isSymbol(computed22) && (retHighest ? computed22 <= value : computed22 < value)) {
|
||
low = mid + 1;
|
||
} else {
|
||
high = mid;
|
||
}
|
||
}
|
||
return high;
|
||
}
|
||
return baseSortedIndexBy(array, value, identity, retHighest);
|
||
}
|
||
function baseSortedIndexBy(array, value, iteratee2, retHighest) {
|
||
var low = 0, high = array == null ? 0 : array.length;
|
||
if (high === 0) {
|
||
return 0;
|
||
}
|
||
value = iteratee2(value);
|
||
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1;
|
||
while (low < high) {
|
||
var mid = nativeFloor((low + high) / 2), computed22 = iteratee2(array[mid]), othIsDefined = computed22 !== undefined$1, othIsNull = computed22 === null, othIsReflexive = computed22 === computed22, othIsSymbol = isSymbol(computed22);
|
||
if (valIsNaN) {
|
||
var setLow = retHighest || othIsReflexive;
|
||
} else if (valIsUndefined) {
|
||
setLow = othIsReflexive && (retHighest || othIsDefined);
|
||
} else if (valIsNull) {
|
||
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
|
||
} else if (valIsSymbol) {
|
||
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
|
||
} else if (othIsNull || othIsSymbol) {
|
||
setLow = false;
|
||
} else {
|
||
setLow = retHighest ? computed22 <= value : computed22 < value;
|
||
}
|
||
if (setLow) {
|
||
low = mid + 1;
|
||
} else {
|
||
high = mid;
|
||
}
|
||
}
|
||
return nativeMin(high, MAX_ARRAY_INDEX);
|
||
}
|
||
function baseSortedUniq(array, iteratee2) {
|
||
var index2 = -1, length = array.length, resIndex = 0, result2 = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed22 = iteratee2 ? iteratee2(value) : value;
|
||
if (!index2 || !eq(computed22, seen)) {
|
||
var seen = computed22;
|
||
result2[resIndex++] = value === 0 ? 0 : value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseToNumber(value) {
|
||
if (typeof value == "number") {
|
||
return value;
|
||
}
|
||
if (isSymbol(value)) {
|
||
return NAN;
|
||
}
|
||
return +value;
|
||
}
|
||
function baseToString(value) {
|
||
if (typeof value == "string") {
|
||
return value;
|
||
}
|
||
if (isArray(value)) {
|
||
return arrayMap(value, baseToString) + "";
|
||
}
|
||
if (isSymbol(value)) {
|
||
return symbolToString ? symbolToString.call(value) : "";
|
||
}
|
||
var result2 = value + "";
|
||
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
||
}
|
||
function baseUniq(array, iteratee2, comparator) {
|
||
var index2 = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
||
if (comparator) {
|
||
isCommon = false;
|
||
includes2 = arrayIncludesWith;
|
||
} else if (length >= LARGE_ARRAY_SIZE) {
|
||
var set2 = iteratee2 ? null : createSet(array);
|
||
if (set2) {
|
||
return setToArray(set2);
|
||
}
|
||
isCommon = false;
|
||
includes2 = cacheHas;
|
||
seen = new SetCache();
|
||
} else {
|
||
seen = iteratee2 ? [] : result2;
|
||
}
|
||
outer:
|
||
while (++index2 < length) {
|
||
var value = array[index2], computed22 = iteratee2 ? iteratee2(value) : value;
|
||
value = comparator || value !== 0 ? value : 0;
|
||
if (isCommon && computed22 === computed22) {
|
||
var seenIndex = seen.length;
|
||
while (seenIndex--) {
|
||
if (seen[seenIndex] === computed22) {
|
||
continue outer;
|
||
}
|
||
}
|
||
if (iteratee2) {
|
||
seen.push(computed22);
|
||
}
|
||
result2.push(value);
|
||
} else if (!includes2(seen, computed22, comparator)) {
|
||
if (seen !== result2) {
|
||
seen.push(computed22);
|
||
}
|
||
result2.push(value);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function baseUnset(object, path) {
|
||
path = castPath(path, object);
|
||
object = parent(object, path);
|
||
return object == null || delete object[toKey(last(path))];
|
||
}
|
||
function baseUpdate(object, path, updater, customizer) {
|
||
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
||
}
|
||
function baseWhile(array, predicate, isDrop, fromRight) {
|
||
var length = array.length, index2 = fromRight ? length : -1;
|
||
while ((fromRight ? index2-- : ++index2 < length) && predicate(array[index2], index2, array)) {
|
||
}
|
||
return isDrop ? baseSlice(array, fromRight ? 0 : index2, fromRight ? index2 + 1 : length) : baseSlice(array, fromRight ? index2 + 1 : 0, fromRight ? length : index2);
|
||
}
|
||
function baseWrapperValue(value, actions) {
|
||
var result2 = value;
|
||
if (result2 instanceof LazyWrapper) {
|
||
result2 = result2.value();
|
||
}
|
||
return arrayReduce(actions, function(result3, action) {
|
||
return action.func.apply(action.thisArg, arrayPush([result3], action.args));
|
||
}, result2);
|
||
}
|
||
function baseXor(arrays, iteratee2, comparator) {
|
||
var length = arrays.length;
|
||
if (length < 2) {
|
||
return length ? baseUniq(arrays[0]) : [];
|
||
}
|
||
var index2 = -1, result2 = Array2(length);
|
||
while (++index2 < length) {
|
||
var array = arrays[index2], othIndex = -1;
|
||
while (++othIndex < length) {
|
||
if (othIndex != index2) {
|
||
result2[index2] = baseDifference(result2[index2] || array, arrays[othIndex], iteratee2, comparator);
|
||
}
|
||
}
|
||
}
|
||
return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
|
||
}
|
||
function baseZipObject(props, values2, assignFunc) {
|
||
var index2 = -1, length = props.length, valsLength = values2.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var value = index2 < valsLength ? values2[index2] : undefined$1;
|
||
assignFunc(result2, props[index2], value);
|
||
}
|
||
return result2;
|
||
}
|
||
function castArrayLikeObject(value) {
|
||
return isArrayLikeObject(value) ? value : [];
|
||
}
|
||
function castFunction(value) {
|
||
return typeof value == "function" ? value : identity;
|
||
}
|
||
function castPath(value, object) {
|
||
if (isArray(value)) {
|
||
return value;
|
||
}
|
||
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
||
}
|
||
var castRest = baseRest;
|
||
function castSlice(array, start, end) {
|
||
var length = array.length;
|
||
end = end === undefined$1 ? length : end;
|
||
return !start && end >= length ? array : baseSlice(array, start, end);
|
||
}
|
||
var clearTimeout2 = ctxClearTimeout || function(id) {
|
||
return root.clearTimeout(id);
|
||
};
|
||
function cloneBuffer(buffer, isDeep) {
|
||
if (isDeep) {
|
||
return buffer.slice();
|
||
}
|
||
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
||
buffer.copy(result2);
|
||
return result2;
|
||
}
|
||
function cloneArrayBuffer(arrayBuffer) {
|
||
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
||
new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
|
||
return result2;
|
||
}
|
||
function cloneDataView(dataView, isDeep) {
|
||
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
||
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
||
}
|
||
function cloneRegExp(regexp) {
|
||
var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
||
result2.lastIndex = regexp.lastIndex;
|
||
return result2;
|
||
}
|
||
function cloneSymbol(symbol) {
|
||
return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
|
||
}
|
||
function cloneTypedArray(typedArray, isDeep) {
|
||
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
||
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
||
}
|
||
function compareAscending(value, other) {
|
||
if (value !== other) {
|
||
var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
||
var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
||
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
||
return 1;
|
||
}
|
||
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
||
return -1;
|
||
}
|
||
}
|
||
return 0;
|
||
}
|
||
function compareMultiple(object, other, orders) {
|
||
var index2 = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
||
while (++index2 < length) {
|
||
var result2 = compareAscending(objCriteria[index2], othCriteria[index2]);
|
||
if (result2) {
|
||
if (index2 >= ordersLength) {
|
||
return result2;
|
||
}
|
||
var order = orders[index2];
|
||
return result2 * (order == "desc" ? -1 : 1);
|
||
}
|
||
}
|
||
return object.index - other.index;
|
||
}
|
||
function composeArgs(args, partials, holders, isCurried) {
|
||
var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
|
||
while (++leftIndex < leftLength) {
|
||
result2[leftIndex] = partials[leftIndex];
|
||
}
|
||
while (++argsIndex < holdersLength) {
|
||
if (isUncurried || argsIndex < argsLength) {
|
||
result2[holders[argsIndex]] = args[argsIndex];
|
||
}
|
||
}
|
||
while (rangeLength--) {
|
||
result2[leftIndex++] = args[argsIndex++];
|
||
}
|
||
return result2;
|
||
}
|
||
function composeArgsRight(args, partials, holders, isCurried) {
|
||
var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried;
|
||
while (++argsIndex < rangeLength) {
|
||
result2[argsIndex] = args[argsIndex];
|
||
}
|
||
var offset = argsIndex;
|
||
while (++rightIndex < rightLength) {
|
||
result2[offset + rightIndex] = partials[rightIndex];
|
||
}
|
||
while (++holdersIndex < holdersLength) {
|
||
if (isUncurried || argsIndex < argsLength) {
|
||
result2[offset + holders[holdersIndex]] = args[argsIndex++];
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function copyArray(source, array) {
|
||
var index2 = -1, length = source.length;
|
||
array || (array = Array2(length));
|
||
while (++index2 < length) {
|
||
array[index2] = source[index2];
|
||
}
|
||
return array;
|
||
}
|
||
function copyObject(source, props, object, customizer) {
|
||
var isNew = !object;
|
||
object || (object = {});
|
||
var index2 = -1, length = props.length;
|
||
while (++index2 < length) {
|
||
var key = props[index2];
|
||
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined$1;
|
||
if (newValue === undefined$1) {
|
||
newValue = source[key];
|
||
}
|
||
if (isNew) {
|
||
baseAssignValue(object, key, newValue);
|
||
} else {
|
||
assignValue(object, key, newValue);
|
||
}
|
||
}
|
||
return object;
|
||
}
|
||
function copySymbols(source, object) {
|
||
return copyObject(source, getSymbols(source), object);
|
||
}
|
||
function copySymbolsIn(source, object) {
|
||
return copyObject(source, getSymbolsIn(source), object);
|
||
}
|
||
function createAggregator(setter, initializer) {
|
||
return function(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
|
||
return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
|
||
};
|
||
}
|
||
function createAssigner(assigner) {
|
||
return baseRest(function(object, sources) {
|
||
var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
|
||
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
|
||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||
customizer = length < 3 ? undefined$1 : customizer;
|
||
length = 1;
|
||
}
|
||
object = Object2(object);
|
||
while (++index2 < length) {
|
||
var source = sources[index2];
|
||
if (source) {
|
||
assigner(object, source, index2, customizer);
|
||
}
|
||
}
|
||
return object;
|
||
});
|
||
}
|
||
function createBaseEach(eachFunc, fromRight) {
|
||
return function(collection, iteratee2) {
|
||
if (collection == null) {
|
||
return collection;
|
||
}
|
||
if (!isArrayLike(collection)) {
|
||
return eachFunc(collection, iteratee2);
|
||
}
|
||
var length = collection.length, index2 = fromRight ? length : -1, iterable = Object2(collection);
|
||
while (fromRight ? index2-- : ++index2 < length) {
|
||
if (iteratee2(iterable[index2], index2, iterable) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return collection;
|
||
};
|
||
}
|
||
function createBaseFor(fromRight) {
|
||
return function(object, iteratee2, keysFunc) {
|
||
var index2 = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
|
||
while (length--) {
|
||
var key = props[fromRight ? length : ++index2];
|
||
if (iteratee2(iterable[key], key, iterable) === false) {
|
||
break;
|
||
}
|
||
}
|
||
return object;
|
||
};
|
||
}
|
||
function createBind(func, bitmask, thisArg) {
|
||
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
||
return fn.apply(isBind ? thisArg : this, arguments);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createCaseFirst(methodName) {
|
||
return function(string) {
|
||
string = toString(string);
|
||
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1;
|
||
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
||
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
||
return chr[methodName]() + trailing;
|
||
};
|
||
}
|
||
function createCompounder(callback) {
|
||
return function(string) {
|
||
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
|
||
};
|
||
}
|
||
function createCtor(Ctor) {
|
||
return function() {
|
||
var args = arguments;
|
||
switch (args.length) {
|
||
case 0:
|
||
return new Ctor();
|
||
case 1:
|
||
return new Ctor(args[0]);
|
||
case 2:
|
||
return new Ctor(args[0], args[1]);
|
||
case 3:
|
||
return new Ctor(args[0], args[1], args[2]);
|
||
case 4:
|
||
return new Ctor(args[0], args[1], args[2], args[3]);
|
||
case 5:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
||
case 6:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
||
case 7:
|
||
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
||
}
|
||
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
||
return isObject(result2) ? result2 : thisBinding;
|
||
};
|
||
}
|
||
function createCurry(func, bitmask, arity) {
|
||
var Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var length = arguments.length, args = Array2(length), index2 = length, placeholder = getHolder(wrapper);
|
||
while (index2--) {
|
||
args[index2] = arguments[index2];
|
||
}
|
||
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
||
length -= holders.length;
|
||
if (length < arity) {
|
||
return createRecurry(
|
||
func,
|
||
bitmask,
|
||
createHybrid,
|
||
wrapper.placeholder,
|
||
undefined$1,
|
||
args,
|
||
holders,
|
||
undefined$1,
|
||
undefined$1,
|
||
arity - length
|
||
);
|
||
}
|
||
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
||
return apply(fn, this, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createFind(findIndexFunc) {
|
||
return function(collection, predicate, fromIndex) {
|
||
var iterable = Object2(collection);
|
||
if (!isArrayLike(collection)) {
|
||
var iteratee2 = getIteratee(predicate, 3);
|
||
collection = keys(collection);
|
||
predicate = function(key) {
|
||
return iteratee2(iterable[key], key, iterable);
|
||
};
|
||
}
|
||
var index2 = findIndexFunc(collection, predicate, fromIndex);
|
||
return index2 > -1 ? iterable[iteratee2 ? collection[index2] : index2] : undefined$1;
|
||
};
|
||
}
|
||
function createFlow(fromRight) {
|
||
return flatRest(function(funcs) {
|
||
var length = funcs.length, index2 = length, prereq = LodashWrapper.prototype.thru;
|
||
if (fromRight) {
|
||
funcs.reverse();
|
||
}
|
||
while (index2--) {
|
||
var func = funcs[index2];
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
if (prereq && !wrapper && getFuncName(func) == "wrapper") {
|
||
var wrapper = new LodashWrapper([], true);
|
||
}
|
||
}
|
||
index2 = wrapper ? index2 : length;
|
||
while (++index2 < length) {
|
||
func = funcs[index2];
|
||
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
|
||
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
||
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
||
} else {
|
||
wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
|
||
}
|
||
}
|
||
return function() {
|
||
var args = arguments, value = args[0];
|
||
if (wrapper && args.length == 1 && isArray(value)) {
|
||
return wrapper.plant(value).value();
|
||
}
|
||
var index3 = 0, result2 = length ? funcs[index3].apply(this, args) : value;
|
||
while (++index3 < length) {
|
||
result2 = funcs[index3].call(this, result2);
|
||
}
|
||
return result2;
|
||
};
|
||
});
|
||
}
|
||
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
||
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func);
|
||
function wrapper() {
|
||
var length = arguments.length, args = Array2(length), index2 = length;
|
||
while (index2--) {
|
||
args[index2] = arguments[index2];
|
||
}
|
||
if (isCurried) {
|
||
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
||
}
|
||
if (partials) {
|
||
args = composeArgs(args, partials, holders, isCurried);
|
||
}
|
||
if (partialsRight) {
|
||
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
|
||
}
|
||
length -= holdersCount;
|
||
if (isCurried && length < arity) {
|
||
var newHolders = replaceHolders(args, placeholder);
|
||
return createRecurry(
|
||
func,
|
||
bitmask,
|
||
createHybrid,
|
||
wrapper.placeholder,
|
||
thisArg,
|
||
args,
|
||
newHolders,
|
||
argPos,
|
||
ary2,
|
||
arity - length
|
||
);
|
||
}
|
||
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
|
||
length = args.length;
|
||
if (argPos) {
|
||
args = reorder(args, argPos);
|
||
} else if (isFlip && length > 1) {
|
||
args.reverse();
|
||
}
|
||
if (isAry && ary2 < length) {
|
||
args.length = ary2;
|
||
}
|
||
if (this && this !== root && this instanceof wrapper) {
|
||
fn = Ctor || createCtor(fn);
|
||
}
|
||
return fn.apply(thisBinding, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createInverter(setter, toIteratee) {
|
||
return function(object, iteratee2) {
|
||
return baseInverter(object, setter, toIteratee(iteratee2), {});
|
||
};
|
||
}
|
||
function createMathOperation(operator, defaultValue) {
|
||
return function(value, other) {
|
||
var result2;
|
||
if (value === undefined$1 && other === undefined$1) {
|
||
return defaultValue;
|
||
}
|
||
if (value !== undefined$1) {
|
||
result2 = value;
|
||
}
|
||
if (other !== undefined$1) {
|
||
if (result2 === undefined$1) {
|
||
return other;
|
||
}
|
||
if (typeof value == "string" || typeof other == "string") {
|
||
value = baseToString(value);
|
||
other = baseToString(other);
|
||
} else {
|
||
value = baseToNumber(value);
|
||
other = baseToNumber(other);
|
||
}
|
||
result2 = operator(value, other);
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
function createOver(arrayFunc) {
|
||
return flatRest(function(iteratees) {
|
||
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
||
return baseRest(function(args) {
|
||
var thisArg = this;
|
||
return arrayFunc(iteratees, function(iteratee2) {
|
||
return apply(iteratee2, thisArg, args);
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function createPadding(length, chars) {
|
||
chars = chars === undefined$1 ? " " : baseToString(chars);
|
||
var charsLength = chars.length;
|
||
if (charsLength < 2) {
|
||
return charsLength ? baseRepeat(chars, length) : chars;
|
||
}
|
||
var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
||
return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
|
||
}
|
||
function createPartial(func, bitmask, thisArg, partials) {
|
||
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
||
function wrapper() {
|
||
var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
||
while (++leftIndex < leftLength) {
|
||
args[leftIndex] = partials[leftIndex];
|
||
}
|
||
while (argsLength--) {
|
||
args[leftIndex++] = arguments[++argsIndex];
|
||
}
|
||
return apply(fn, isBind ? thisArg : this, args);
|
||
}
|
||
return wrapper;
|
||
}
|
||
function createRange(fromRight) {
|
||
return function(start, end, step) {
|
||
if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
|
||
end = step = undefined$1;
|
||
}
|
||
start = toFinite(start);
|
||
if (end === undefined$1) {
|
||
end = start;
|
||
start = 0;
|
||
} else {
|
||
end = toFinite(end);
|
||
}
|
||
step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step);
|
||
return baseRange(start, end, step, fromRight);
|
||
};
|
||
}
|
||
function createRelationalOperation(operator) {
|
||
return function(value, other) {
|
||
if (!(typeof value == "string" && typeof other == "string")) {
|
||
value = toNumber(value);
|
||
other = toNumber(other);
|
||
}
|
||
return operator(value, other);
|
||
};
|
||
}
|
||
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
|
||
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials;
|
||
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
|
||
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
|
||
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
|
||
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
|
||
}
|
||
var newData = [
|
||
func,
|
||
bitmask,
|
||
thisArg,
|
||
newPartials,
|
||
newHolders,
|
||
newPartialsRight,
|
||
newHoldersRight,
|
||
argPos,
|
||
ary2,
|
||
arity
|
||
];
|
||
var result2 = wrapFunc.apply(undefined$1, newData);
|
||
if (isLaziable(func)) {
|
||
setData(result2, newData);
|
||
}
|
||
result2.placeholder = placeholder;
|
||
return setWrapToString(result2, func, bitmask);
|
||
}
|
||
function createRound(methodName) {
|
||
var func = Math2[methodName];
|
||
return function(number, precision) {
|
||
number = toNumber(number);
|
||
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
|
||
if (precision && nativeIsFinite(number)) {
|
||
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
||
pair = (toString(value) + "e").split("e");
|
||
return +(pair[0] + "e" + (+pair[1] - precision));
|
||
}
|
||
return func(number);
|
||
};
|
||
}
|
||
var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
|
||
return new Set(values2);
|
||
};
|
||
function createToPairs(keysFunc) {
|
||
return function(object) {
|
||
var tag = getTag(object);
|
||
if (tag == mapTag) {
|
||
return mapToArray(object);
|
||
}
|
||
if (tag == setTag) {
|
||
return setToPairs(object);
|
||
}
|
||
return baseToPairs(object, keysFunc(object));
|
||
};
|
||
}
|
||
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
|
||
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
||
if (!isBindKey && typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
var length = partials ? partials.length : 0;
|
||
if (!length) {
|
||
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
|
||
partials = holders = undefined$1;
|
||
}
|
||
ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0);
|
||
arity = arity === undefined$1 ? arity : toInteger(arity);
|
||
length -= holders ? holders.length : 0;
|
||
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
||
var partialsRight = partials, holdersRight = holders;
|
||
partials = holders = undefined$1;
|
||
}
|
||
var data = isBindKey ? undefined$1 : getData(func);
|
||
var newData = [
|
||
func,
|
||
bitmask,
|
||
thisArg,
|
||
partials,
|
||
holders,
|
||
partialsRight,
|
||
holdersRight,
|
||
argPos,
|
||
ary2,
|
||
arity
|
||
];
|
||
if (data) {
|
||
mergeData(newData, data);
|
||
}
|
||
func = newData[0];
|
||
bitmask = newData[1];
|
||
thisArg = newData[2];
|
||
partials = newData[3];
|
||
holders = newData[4];
|
||
arity = newData[9] = newData[9] === undefined$1 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
|
||
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
|
||
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
|
||
}
|
||
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
|
||
var result2 = createBind(func, bitmask, thisArg);
|
||
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
|
||
result2 = createCurry(func, bitmask, arity);
|
||
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
|
||
result2 = createPartial(func, bitmask, thisArg, partials);
|
||
} else {
|
||
result2 = createHybrid.apply(undefined$1, newData);
|
||
}
|
||
var setter = data ? baseSetData : setData;
|
||
return setWrapToString(setter(result2, newData), func, bitmask);
|
||
}
|
||
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
||
if (objValue === undefined$1 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
|
||
return srcValue;
|
||
}
|
||
return objValue;
|
||
}
|
||
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
||
if (isObject(objValue) && isObject(srcValue)) {
|
||
stack.set(srcValue, objValue);
|
||
baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
|
||
stack["delete"](srcValue);
|
||
}
|
||
return objValue;
|
||
}
|
||
function customOmitClone(value) {
|
||
return isPlainObject(value) ? undefined$1 : value;
|
||
}
|
||
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
||
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
||
return false;
|
||
}
|
||
var arrStacked = stack.get(array);
|
||
var othStacked = stack.get(other);
|
||
if (arrStacked && othStacked) {
|
||
return arrStacked == other && othStacked == array;
|
||
}
|
||
var index2 = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
|
||
stack.set(array, other);
|
||
stack.set(other, array);
|
||
while (++index2 < arrLength) {
|
||
var arrValue = array[index2], othValue = other[index2];
|
||
if (customizer) {
|
||
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
||
}
|
||
if (compared !== undefined$1) {
|
||
if (compared) {
|
||
continue;
|
||
}
|
||
result2 = false;
|
||
break;
|
||
}
|
||
if (seen) {
|
||
if (!arraySome(other, function(othValue2, othIndex) {
|
||
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
||
return seen.push(othIndex);
|
||
}
|
||
})) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
}
|
||
stack["delete"](array);
|
||
stack["delete"](other);
|
||
return result2;
|
||
}
|
||
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
||
switch (tag) {
|
||
case dataViewTag:
|
||
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
||
return false;
|
||
}
|
||
object = object.buffer;
|
||
other = other.buffer;
|
||
case arrayBufferTag:
|
||
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
||
return false;
|
||
}
|
||
return true;
|
||
case boolTag:
|
||
case dateTag:
|
||
case numberTag:
|
||
return eq(+object, +other);
|
||
case errorTag:
|
||
return object.name == other.name && object.message == other.message;
|
||
case regexpTag:
|
||
case stringTag:
|
||
return object == other + "";
|
||
case mapTag:
|
||
var convert = mapToArray;
|
||
case setTag:
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
||
convert || (convert = setToArray);
|
||
if (object.size != other.size && !isPartial) {
|
||
return false;
|
||
}
|
||
var stacked = stack.get(object);
|
||
if (stacked) {
|
||
return stacked == other;
|
||
}
|
||
bitmask |= COMPARE_UNORDERED_FLAG;
|
||
stack.set(object, other);
|
||
var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
||
stack["delete"](object);
|
||
return result2;
|
||
case symbolTag:
|
||
if (symbolValueOf) {
|
||
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
||
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
||
if (objLength != othLength && !isPartial) {
|
||
return false;
|
||
}
|
||
var index2 = objLength;
|
||
while (index2--) {
|
||
var key = objProps[index2];
|
||
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
||
return false;
|
||
}
|
||
}
|
||
var objStacked = stack.get(object);
|
||
var othStacked = stack.get(other);
|
||
if (objStacked && othStacked) {
|
||
return objStacked == other && othStacked == object;
|
||
}
|
||
var result2 = true;
|
||
stack.set(object, other);
|
||
stack.set(other, object);
|
||
var skipCtor = isPartial;
|
||
while (++index2 < objLength) {
|
||
key = objProps[index2];
|
||
var objValue = object[key], othValue = other[key];
|
||
if (customizer) {
|
||
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
||
}
|
||
if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
||
result2 = false;
|
||
break;
|
||
}
|
||
skipCtor || (skipCtor = key == "constructor");
|
||
}
|
||
if (result2 && !skipCtor) {
|
||
var objCtor = object.constructor, othCtor = other.constructor;
|
||
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
||
result2 = false;
|
||
}
|
||
}
|
||
stack["delete"](object);
|
||
stack["delete"](other);
|
||
return result2;
|
||
}
|
||
function flatRest(func) {
|
||
return setToString(overRest(func, undefined$1, flatten), func + "");
|
||
}
|
||
function getAllKeys(object) {
|
||
return baseGetAllKeys(object, keys, getSymbols);
|
||
}
|
||
function getAllKeysIn(object) {
|
||
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
||
}
|
||
var getData = !metaMap ? noop : function(func) {
|
||
return metaMap.get(func);
|
||
};
|
||
function getFuncName(func) {
|
||
var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
|
||
while (length--) {
|
||
var data = array[length], otherFunc = data.func;
|
||
if (otherFunc == null || otherFunc == func) {
|
||
return data.name;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function getHolder(func) {
|
||
var object = hasOwnProperty.call(lodash2, "placeholder") ? lodash2 : func;
|
||
return object.placeholder;
|
||
}
|
||
function getIteratee() {
|
||
var result2 = lodash2.iteratee || iteratee;
|
||
result2 = result2 === iteratee ? baseIteratee : result2;
|
||
return arguments.length ? result2(arguments[0], arguments[1]) : result2;
|
||
}
|
||
function getMapData(map2, key) {
|
||
var data = map2.__data__;
|
||
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
||
}
|
||
function getMatchData(object) {
|
||
var result2 = keys(object), length = result2.length;
|
||
while (length--) {
|
||
var key = result2[length], value = object[key];
|
||
result2[length] = [key, value, isStrictComparable(value)];
|
||
}
|
||
return result2;
|
||
}
|
||
function getNative(object, key) {
|
||
var value = getValue(object, key);
|
||
return baseIsNative(value) ? value : undefined$1;
|
||
}
|
||
function getRawTag(value) {
|
||
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
||
try {
|
||
value[symToStringTag] = undefined$1;
|
||
var unmasked = true;
|
||
} catch (e) {
|
||
}
|
||
var result2 = nativeObjectToString.call(value);
|
||
if (unmasked) {
|
||
if (isOwn) {
|
||
value[symToStringTag] = tag;
|
||
} else {
|
||
delete value[symToStringTag];
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
||
if (object == null) {
|
||
return [];
|
||
}
|
||
object = Object2(object);
|
||
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
||
return propertyIsEnumerable.call(object, symbol);
|
||
});
|
||
};
|
||
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
||
var result2 = [];
|
||
while (object) {
|
||
arrayPush(result2, getSymbols(object));
|
||
object = getPrototype(object);
|
||
}
|
||
return result2;
|
||
};
|
||
var getTag = baseGetTag;
|
||
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
||
getTag = function(value) {
|
||
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
||
if (ctorString) {
|
||
switch (ctorString) {
|
||
case dataViewCtorString:
|
||
return dataViewTag;
|
||
case mapCtorString:
|
||
return mapTag;
|
||
case promiseCtorString:
|
||
return promiseTag;
|
||
case setCtorString:
|
||
return setTag;
|
||
case weakMapCtorString:
|
||
return weakMapTag;
|
||
}
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
function getView(start, end, transforms) {
|
||
var index2 = -1, length = transforms.length;
|
||
while (++index2 < length) {
|
||
var data = transforms[index2], size2 = data.size;
|
||
switch (data.type) {
|
||
case "drop":
|
||
start += size2;
|
||
break;
|
||
case "dropRight":
|
||
end -= size2;
|
||
break;
|
||
case "take":
|
||
end = nativeMin(end, start + size2);
|
||
break;
|
||
case "takeRight":
|
||
start = nativeMax(start, end - size2);
|
||
break;
|
||
}
|
||
}
|
||
return { "start": start, "end": end };
|
||
}
|
||
function getWrapDetails(source) {
|
||
var match = source.match(reWrapDetails);
|
||
return match ? match[1].split(reSplitDetails) : [];
|
||
}
|
||
function hasPath(object, path, hasFunc) {
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length, result2 = false;
|
||
while (++index2 < length) {
|
||
var key = toKey(path[index2]);
|
||
if (!(result2 = object != null && hasFunc(object, key))) {
|
||
break;
|
||
}
|
||
object = object[key];
|
||
}
|
||
if (result2 || ++index2 != length) {
|
||
return result2;
|
||
}
|
||
length = object == null ? 0 : object.length;
|
||
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
||
}
|
||
function initCloneArray(array) {
|
||
var length = array.length, result2 = new array.constructor(length);
|
||
if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
|
||
result2.index = array.index;
|
||
result2.input = array.input;
|
||
}
|
||
return result2;
|
||
}
|
||
function initCloneObject(object) {
|
||
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
||
}
|
||
function initCloneByTag(object, tag, isDeep) {
|
||
var Ctor = object.constructor;
|
||
switch (tag) {
|
||
case arrayBufferTag:
|
||
return cloneArrayBuffer(object);
|
||
case boolTag:
|
||
case dateTag:
|
||
return new Ctor(+object);
|
||
case dataViewTag:
|
||
return cloneDataView(object, isDeep);
|
||
case float32Tag:
|
||
case float64Tag:
|
||
case int8Tag:
|
||
case int16Tag:
|
||
case int32Tag:
|
||
case uint8Tag:
|
||
case uint8ClampedTag:
|
||
case uint16Tag:
|
||
case uint32Tag:
|
||
return cloneTypedArray(object, isDeep);
|
||
case mapTag:
|
||
return new Ctor();
|
||
case numberTag:
|
||
case stringTag:
|
||
return new Ctor(object);
|
||
case regexpTag:
|
||
return cloneRegExp(object);
|
||
case setTag:
|
||
return new Ctor();
|
||
case symbolTag:
|
||
return cloneSymbol(object);
|
||
}
|
||
}
|
||
function insertWrapDetails(source, details) {
|
||
var length = details.length;
|
||
if (!length) {
|
||
return source;
|
||
}
|
||
var lastIndex = length - 1;
|
||
details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
|
||
details = details.join(length > 2 ? ", " : " ");
|
||
return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
|
||
}
|
||
function isFlattenable(value) {
|
||
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
||
}
|
||
function isIndex(value, length) {
|
||
var type = typeof value;
|
||
length = length == null ? MAX_SAFE_INTEGER : length;
|
||
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
||
}
|
||
function isIterateeCall(value, index2, object) {
|
||
if (!isObject(object)) {
|
||
return false;
|
||
}
|
||
var type = typeof index2;
|
||
if (type == "number" ? isArrayLike(object) && isIndex(index2, object.length) : type == "string" && index2 in object) {
|
||
return eq(object[index2], value);
|
||
}
|
||
return false;
|
||
}
|
||
function isKey(value, object) {
|
||
if (isArray(value)) {
|
||
return false;
|
||
}
|
||
var type = typeof value;
|
||
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
||
return true;
|
||
}
|
||
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
|
||
}
|
||
function isKeyable(value) {
|
||
var type = typeof value;
|
||
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
||
}
|
||
function isLaziable(func) {
|
||
var funcName = getFuncName(func), other = lodash2[funcName];
|
||
if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
|
||
return false;
|
||
}
|
||
if (func === other) {
|
||
return true;
|
||
}
|
||
var data = getData(other);
|
||
return !!data && func === data[0];
|
||
}
|
||
function isMasked(func) {
|
||
return !!maskSrcKey && maskSrcKey in func;
|
||
}
|
||
var isMaskable = coreJsData ? isFunction : stubFalse;
|
||
function isPrototype(value) {
|
||
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
||
return value === proto;
|
||
}
|
||
function isStrictComparable(value) {
|
||
return value === value && !isObject(value);
|
||
}
|
||
function matchesStrictComparable(key, srcValue) {
|
||
return function(object) {
|
||
if (object == null) {
|
||
return false;
|
||
}
|
||
return object[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object));
|
||
};
|
||
}
|
||
function memoizeCapped(func) {
|
||
var result2 = memoize(func, function(key) {
|
||
if (cache.size === MAX_MEMOIZE_SIZE) {
|
||
cache.clear();
|
||
}
|
||
return key;
|
||
});
|
||
var cache = result2.cache;
|
||
return result2;
|
||
}
|
||
function mergeData(data, source) {
|
||
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
|
||
var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
|
||
if (!(isCommon || isCombo)) {
|
||
return data;
|
||
}
|
||
if (srcBitmask & WRAP_BIND_FLAG) {
|
||
data[2] = source[2];
|
||
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
|
||
}
|
||
var value = source[3];
|
||
if (value) {
|
||
var partials = data[3];
|
||
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
|
||
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
||
}
|
||
value = source[5];
|
||
if (value) {
|
||
partials = data[5];
|
||
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
|
||
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
|
||
}
|
||
value = source[7];
|
||
if (value) {
|
||
data[7] = value;
|
||
}
|
||
if (srcBitmask & WRAP_ARY_FLAG) {
|
||
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
|
||
}
|
||
if (data[9] == null) {
|
||
data[9] = source[9];
|
||
}
|
||
data[0] = source[0];
|
||
data[1] = newBitmask;
|
||
return data;
|
||
}
|
||
function nativeKeysIn(object) {
|
||
var result2 = [];
|
||
if (object != null) {
|
||
for (var key in Object2(object)) {
|
||
result2.push(key);
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function objectToString(value) {
|
||
return nativeObjectToString.call(value);
|
||
}
|
||
function overRest(func, start, transform2) {
|
||
start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
|
||
return function() {
|
||
var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
||
while (++index2 < length) {
|
||
array[index2] = args[start + index2];
|
||
}
|
||
index2 = -1;
|
||
var otherArgs = Array2(start + 1);
|
||
while (++index2 < start) {
|
||
otherArgs[index2] = args[index2];
|
||
}
|
||
otherArgs[start] = transform2(array);
|
||
return apply(func, this, otherArgs);
|
||
};
|
||
}
|
||
function parent(object, path) {
|
||
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
||
}
|
||
function reorder(array, indexes) {
|
||
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
||
while (length--) {
|
||
var index2 = indexes[length];
|
||
array[length] = isIndex(index2, arrLength) ? oldArray[index2] : undefined$1;
|
||
}
|
||
return array;
|
||
}
|
||
function safeGet(object, key) {
|
||
if (key === "constructor" && typeof object[key] === "function") {
|
||
return;
|
||
}
|
||
if (key == "__proto__") {
|
||
return;
|
||
}
|
||
return object[key];
|
||
}
|
||
var setData = shortOut(baseSetData);
|
||
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
||
return root.setTimeout(func, wait);
|
||
};
|
||
var setToString = shortOut(baseSetToString);
|
||
function setWrapToString(wrapper, reference, bitmask) {
|
||
var source = reference + "";
|
||
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
||
}
|
||
function shortOut(func) {
|
||
var count = 0, lastCalled = 0;
|
||
return function() {
|
||
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
||
lastCalled = stamp;
|
||
if (remaining > 0) {
|
||
if (++count >= HOT_COUNT) {
|
||
return arguments[0];
|
||
}
|
||
} else {
|
||
count = 0;
|
||
}
|
||
return func.apply(undefined$1, arguments);
|
||
};
|
||
}
|
||
function shuffleSelf(array, size2) {
|
||
var index2 = -1, length = array.length, lastIndex = length - 1;
|
||
size2 = size2 === undefined$1 ? length : size2;
|
||
while (++index2 < size2) {
|
||
var rand = baseRandom(index2, lastIndex), value = array[rand];
|
||
array[rand] = array[index2];
|
||
array[index2] = value;
|
||
}
|
||
array.length = size2;
|
||
return array;
|
||
}
|
||
var stringToPath = memoizeCapped(function(string) {
|
||
var result2 = [];
|
||
if (string.charCodeAt(0) === 46) {
|
||
result2.push("");
|
||
}
|
||
string.replace(rePropName, function(match, number, quote, subString) {
|
||
result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
||
});
|
||
return result2;
|
||
});
|
||
function toKey(value) {
|
||
if (typeof value == "string" || isSymbol(value)) {
|
||
return value;
|
||
}
|
||
var result2 = value + "";
|
||
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
||
}
|
||
function toSource(func) {
|
||
if (func != null) {
|
||
try {
|
||
return funcToString.call(func);
|
||
} catch (e) {
|
||
}
|
||
try {
|
||
return func + "";
|
||
} catch (e) {
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
function updateWrapDetails(details, bitmask) {
|
||
arrayEach(wrapFlags, function(pair) {
|
||
var value = "_." + pair[0];
|
||
if (bitmask & pair[1] && !arrayIncludes(details, value)) {
|
||
details.push(value);
|
||
}
|
||
});
|
||
return details.sort();
|
||
}
|
||
function wrapperClone(wrapper) {
|
||
if (wrapper instanceof LazyWrapper) {
|
||
return wrapper.clone();
|
||
}
|
||
var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
||
result2.__actions__ = copyArray(wrapper.__actions__);
|
||
result2.__index__ = wrapper.__index__;
|
||
result2.__values__ = wrapper.__values__;
|
||
return result2;
|
||
}
|
||
function chunk(array, size2, guard) {
|
||
if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined$1) {
|
||
size2 = 1;
|
||
} else {
|
||
size2 = nativeMax(toInteger(size2), 0);
|
||
}
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length || size2 < 1) {
|
||
return [];
|
||
}
|
||
var index2 = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
|
||
while (index2 < length) {
|
||
result2[resIndex++] = baseSlice(array, index2, index2 += size2);
|
||
}
|
||
return result2;
|
||
}
|
||
function compact(array) {
|
||
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (value) {
|
||
result2[resIndex++] = value;
|
||
}
|
||
}
|
||
return result2;
|
||
}
|
||
function concat() {
|
||
var length = arguments.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
var args = Array2(length - 1), array = arguments[0], index2 = length;
|
||
while (index2--) {
|
||
args[index2 - 1] = arguments[index2];
|
||
}
|
||
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
||
}
|
||
var difference = baseRest(function(array, values2) {
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
|
||
});
|
||
var differenceBy = baseRest(function(array, values2) {
|
||
var iteratee2 = last(values2);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined$1;
|
||
}
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
|
||
});
|
||
var differenceWith = baseRest(function(array, values2) {
|
||
var comparator = last(values2);
|
||
if (isArrayLikeObject(comparator)) {
|
||
comparator = undefined$1;
|
||
}
|
||
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined$1, comparator) : [];
|
||
});
|
||
function drop(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined$1 ? 1 : toInteger(n);
|
||
return baseSlice(array, n < 0 ? 0 : n, length);
|
||
}
|
||
function dropRight(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined$1 ? 1 : toInteger(n);
|
||
n = length - n;
|
||
return baseSlice(array, 0, n < 0 ? 0 : n);
|
||
}
|
||
function dropRightWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
|
||
}
|
||
function dropWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
|
||
}
|
||
function fill(array, value, start, end) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
|
||
start = 0;
|
||
end = length;
|
||
}
|
||
return baseFill(array, value, start, end);
|
||
}
|
||
function findIndex(array, predicate, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
|
||
if (index2 < 0) {
|
||
index2 = nativeMax(length + index2, 0);
|
||
}
|
||
return baseFindIndex(array, getIteratee(predicate, 3), index2);
|
||
}
|
||
function findLastIndex(array, predicate, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = length - 1;
|
||
if (fromIndex !== undefined$1) {
|
||
index2 = toInteger(fromIndex);
|
||
index2 = fromIndex < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
|
||
}
|
||
return baseFindIndex(array, getIteratee(predicate, 3), index2, true);
|
||
}
|
||
function flatten(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseFlatten(array, 1) : [];
|
||
}
|
||
function flattenDeep(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseFlatten(array, INFINITY) : [];
|
||
}
|
||
function flattenDepth(array, depth) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
depth = depth === undefined$1 ? 1 : toInteger(depth);
|
||
return baseFlatten(array, depth);
|
||
}
|
||
function fromPairs(pairs) {
|
||
var index2 = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
||
while (++index2 < length) {
|
||
var pair = pairs[index2];
|
||
result2[pair[0]] = pair[1];
|
||
}
|
||
return result2;
|
||
}
|
||
function head(array) {
|
||
return array && array.length ? array[0] : undefined$1;
|
||
}
|
||
function indexOf(array, value, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = fromIndex == null ? 0 : toInteger(fromIndex);
|
||
if (index2 < 0) {
|
||
index2 = nativeMax(length + index2, 0);
|
||
}
|
||
return baseIndexOf(array, value, index2);
|
||
}
|
||
function initial(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSlice(array, 0, -1) : [];
|
||
}
|
||
var intersection = baseRest(function(arrays) {
|
||
var mapped = arrayMap(arrays, castArrayLikeObject);
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
||
});
|
||
var intersectionBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
||
if (iteratee2 === last(mapped)) {
|
||
iteratee2 = undefined$1;
|
||
} else {
|
||
mapped.pop();
|
||
}
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
|
||
});
|
||
var intersectionWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
||
comparator = typeof comparator == "function" ? comparator : undefined$1;
|
||
if (comparator) {
|
||
mapped.pop();
|
||
}
|
||
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : [];
|
||
});
|
||
function join(array, separator) {
|
||
return array == null ? "" : nativeJoin.call(array, separator);
|
||
}
|
||
function last(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? array[length - 1] : undefined$1;
|
||
}
|
||
function lastIndexOf(array, value, fromIndex) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return -1;
|
||
}
|
||
var index2 = length;
|
||
if (fromIndex !== undefined$1) {
|
||
index2 = toInteger(fromIndex);
|
||
index2 = index2 < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1);
|
||
}
|
||
return value === value ? strictLastIndexOf(array, value, index2) : baseFindIndex(array, baseIsNaN, index2, true);
|
||
}
|
||
function nth(array, n) {
|
||
return array && array.length ? baseNth(array, toInteger(n)) : undefined$1;
|
||
}
|
||
var pull = baseRest(pullAll);
|
||
function pullAll(array, values2) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
|
||
}
|
||
function pullAllBy(array, values2, iteratee2) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
|
||
}
|
||
function pullAllWith(array, values2, comparator) {
|
||
return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined$1, comparator) : array;
|
||
}
|
||
var pullAt = flatRest(function(array, indexes) {
|
||
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
||
basePullAt(array, arrayMap(indexes, function(index2) {
|
||
return isIndex(index2, length) ? +index2 : index2;
|
||
}).sort(compareAscending));
|
||
return result2;
|
||
});
|
||
function remove(array, predicate) {
|
||
var result2 = [];
|
||
if (!(array && array.length)) {
|
||
return result2;
|
||
}
|
||
var index2 = -1, indexes = [], length = array.length;
|
||
predicate = getIteratee(predicate, 3);
|
||
while (++index2 < length) {
|
||
var value = array[index2];
|
||
if (predicate(value, index2, array)) {
|
||
result2.push(value);
|
||
indexes.push(index2);
|
||
}
|
||
}
|
||
basePullAt(array, indexes);
|
||
return result2;
|
||
}
|
||
function reverse(array) {
|
||
return array == null ? array : nativeReverse.call(array);
|
||
}
|
||
function slice(array, start, end) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
|
||
start = 0;
|
||
end = length;
|
||
} else {
|
||
start = start == null ? 0 : toInteger(start);
|
||
end = end === undefined$1 ? length : toInteger(end);
|
||
}
|
||
return baseSlice(array, start, end);
|
||
}
|
||
function sortedIndex(array, value) {
|
||
return baseSortedIndex(array, value);
|
||
}
|
||
function sortedIndexBy(array, value, iteratee2) {
|
||
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
|
||
}
|
||
function sortedIndexOf(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (length) {
|
||
var index2 = baseSortedIndex(array, value);
|
||
if (index2 < length && eq(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function sortedLastIndex(array, value) {
|
||
return baseSortedIndex(array, value, true);
|
||
}
|
||
function sortedLastIndexBy(array, value, iteratee2) {
|
||
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
|
||
}
|
||
function sortedLastIndexOf(array, value) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (length) {
|
||
var index2 = baseSortedIndex(array, value, true) - 1;
|
||
if (eq(array[index2], value)) {
|
||
return index2;
|
||
}
|
||
}
|
||
return -1;
|
||
}
|
||
function sortedUniq(array) {
|
||
return array && array.length ? baseSortedUniq(array) : [];
|
||
}
|
||
function sortedUniqBy(array, iteratee2) {
|
||
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
|
||
}
|
||
function tail(array) {
|
||
var length = array == null ? 0 : array.length;
|
||
return length ? baseSlice(array, 1, length) : [];
|
||
}
|
||
function take(array, n, guard) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined$1 ? 1 : toInteger(n);
|
||
return baseSlice(array, 0, n < 0 ? 0 : n);
|
||
}
|
||
function takeRight(array, n, guard) {
|
||
var length = array == null ? 0 : array.length;
|
||
if (!length) {
|
||
return [];
|
||
}
|
||
n = guard || n === undefined$1 ? 1 : toInteger(n);
|
||
n = length - n;
|
||
return baseSlice(array, n < 0 ? 0 : n, length);
|
||
}
|
||
function takeRightWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
|
||
}
|
||
function takeWhile(array, predicate) {
|
||
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
|
||
}
|
||
var union = baseRest(function(arrays) {
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
||
});
|
||
var unionBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined$1;
|
||
}
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
|
||
});
|
||
var unionWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays);
|
||
comparator = typeof comparator == "function" ? comparator : undefined$1;
|
||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator);
|
||
});
|
||
function uniq(array) {
|
||
return array && array.length ? baseUniq(array) : [];
|
||
}
|
||
function uniqBy(array, iteratee2) {
|
||
return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
|
||
}
|
||
function uniqWith(array, comparator) {
|
||
comparator = typeof comparator == "function" ? comparator : undefined$1;
|
||
return array && array.length ? baseUniq(array, undefined$1, comparator) : [];
|
||
}
|
||
function unzip(array) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
var length = 0;
|
||
array = arrayFilter(array, function(group) {
|
||
if (isArrayLikeObject(group)) {
|
||
length = nativeMax(group.length, length);
|
||
return true;
|
||
}
|
||
});
|
||
return baseTimes(length, function(index2) {
|
||
return arrayMap(array, baseProperty(index2));
|
||
});
|
||
}
|
||
function unzipWith(array, iteratee2) {
|
||
if (!(array && array.length)) {
|
||
return [];
|
||
}
|
||
var result2 = unzip(array);
|
||
if (iteratee2 == null) {
|
||
return result2;
|
||
}
|
||
return arrayMap(result2, function(group) {
|
||
return apply(iteratee2, undefined$1, group);
|
||
});
|
||
}
|
||
var without = baseRest(function(array, values2) {
|
||
return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
|
||
});
|
||
var xor = baseRest(function(arrays) {
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
||
});
|
||
var xorBy = baseRest(function(arrays) {
|
||
var iteratee2 = last(arrays);
|
||
if (isArrayLikeObject(iteratee2)) {
|
||
iteratee2 = undefined$1;
|
||
}
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
|
||
});
|
||
var xorWith = baseRest(function(arrays) {
|
||
var comparator = last(arrays);
|
||
comparator = typeof comparator == "function" ? comparator : undefined$1;
|
||
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
|
||
});
|
||
var zip = baseRest(unzip);
|
||
function zipObject(props, values2) {
|
||
return baseZipObject(props || [], values2 || [], assignValue);
|
||
}
|
||
function zipObjectDeep(props, values2) {
|
||
return baseZipObject(props || [], values2 || [], baseSet);
|
||
}
|
||
var zipWith = baseRest(function(arrays) {
|
||
var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined$1;
|
||
iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1;
|
||
return unzipWith(arrays, iteratee2);
|
||
});
|
||
function chain(value) {
|
||
var result2 = lodash2(value);
|
||
result2.__chain__ = true;
|
||
return result2;
|
||
}
|
||
function tap(value, interceptor) {
|
||
interceptor(value);
|
||
return value;
|
||
}
|
||
function thru(value, interceptor) {
|
||
return interceptor(value);
|
||
}
|
||
var wrapperAt = flatRest(function(paths) {
|
||
var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
|
||
return baseAt(object, paths);
|
||
};
|
||
if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
|
||
return this.thru(interceptor);
|
||
}
|
||
value = value.slice(start, +start + (length ? 1 : 0));
|
||
value.__actions__.push({
|
||
"func": thru,
|
||
"args": [interceptor],
|
||
"thisArg": undefined$1
|
||
});
|
||
return new LodashWrapper(value, this.__chain__).thru(function(array) {
|
||
if (length && !array.length) {
|
||
array.push(undefined$1);
|
||
}
|
||
return array;
|
||
});
|
||
});
|
||
function wrapperChain() {
|
||
return chain(this);
|
||
}
|
||
function wrapperCommit() {
|
||
return new LodashWrapper(this.value(), this.__chain__);
|
||
}
|
||
function wrapperNext() {
|
||
if (this.__values__ === undefined$1) {
|
||
this.__values__ = toArray(this.value());
|
||
}
|
||
var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++];
|
||
return { "done": done, "value": value };
|
||
}
|
||
function wrapperToIterator() {
|
||
return this;
|
||
}
|
||
function wrapperPlant(value) {
|
||
var result2, parent2 = this;
|
||
while (parent2 instanceof baseLodash) {
|
||
var clone2 = wrapperClone(parent2);
|
||
clone2.__index__ = 0;
|
||
clone2.__values__ = undefined$1;
|
||
if (result2) {
|
||
previous.__wrapped__ = clone2;
|
||
} else {
|
||
result2 = clone2;
|
||
}
|
||
var previous = clone2;
|
||
parent2 = parent2.__wrapped__;
|
||
}
|
||
previous.__wrapped__ = value;
|
||
return result2;
|
||
}
|
||
function wrapperReverse() {
|
||
var value = this.__wrapped__;
|
||
if (value instanceof LazyWrapper) {
|
||
var wrapped = value;
|
||
if (this.__actions__.length) {
|
||
wrapped = new LazyWrapper(this);
|
||
}
|
||
wrapped = wrapped.reverse();
|
||
wrapped.__actions__.push({
|
||
"func": thru,
|
||
"args": [reverse],
|
||
"thisArg": undefined$1
|
||
});
|
||
return new LodashWrapper(wrapped, this.__chain__);
|
||
}
|
||
return this.thru(reverse);
|
||
}
|
||
function wrapperValue() {
|
||
return baseWrapperValue(this.__wrapped__, this.__actions__);
|
||
}
|
||
var countBy = createAggregator(function(result2, value, key) {
|
||
if (hasOwnProperty.call(result2, key)) {
|
||
++result2[key];
|
||
} else {
|
||
baseAssignValue(result2, key, 1);
|
||
}
|
||
});
|
||
function every(collection, predicate, guard) {
|
||
var func = isArray(collection) ? arrayEvery : baseEvery;
|
||
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||
predicate = undefined$1;
|
||
}
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
function filter(collection, predicate) {
|
||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
var find = createFind(findIndex);
|
||
var findLast = createFind(findLastIndex);
|
||
function flatMap(collection, iteratee2) {
|
||
return baseFlatten(map(collection, iteratee2), 1);
|
||
}
|
||
function flatMapDeep(collection, iteratee2) {
|
||
return baseFlatten(map(collection, iteratee2), INFINITY);
|
||
}
|
||
function flatMapDepth(collection, iteratee2, depth) {
|
||
depth = depth === undefined$1 ? 1 : toInteger(depth);
|
||
return baseFlatten(map(collection, iteratee2), depth);
|
||
}
|
||
function forEach(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayEach : baseEach;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
function forEachRight(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
var groupBy = createAggregator(function(result2, value, key) {
|
||
if (hasOwnProperty.call(result2, key)) {
|
||
result2[key].push(value);
|
||
} else {
|
||
baseAssignValue(result2, key, [value]);
|
||
}
|
||
});
|
||
function includes(collection, value, fromIndex, guard) {
|
||
collection = isArrayLike(collection) ? collection : values(collection);
|
||
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
||
var length = collection.length;
|
||
if (fromIndex < 0) {
|
||
fromIndex = nativeMax(length + fromIndex, 0);
|
||
}
|
||
return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
||
}
|
||
var invokeMap = baseRest(function(collection, path, args) {
|
||
var index2 = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
||
baseEach(collection, function(value) {
|
||
result2[++index2] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
||
});
|
||
return result2;
|
||
});
|
||
var keyBy = createAggregator(function(result2, value, key) {
|
||
baseAssignValue(result2, key, value);
|
||
});
|
||
function map(collection, iteratee2) {
|
||
var func = isArray(collection) ? arrayMap : baseMap;
|
||
return func(collection, getIteratee(iteratee2, 3));
|
||
}
|
||
function orderBy(collection, iteratees, orders, guard) {
|
||
if (collection == null) {
|
||
return [];
|
||
}
|
||
if (!isArray(iteratees)) {
|
||
iteratees = iteratees == null ? [] : [iteratees];
|
||
}
|
||
orders = guard ? undefined$1 : orders;
|
||
if (!isArray(orders)) {
|
||
orders = orders == null ? [] : [orders];
|
||
}
|
||
return baseOrderBy(collection, iteratees, orders);
|
||
}
|
||
var partition = createAggregator(function(result2, value, key) {
|
||
result2[key ? 0 : 1].push(value);
|
||
}, function() {
|
||
return [[], []];
|
||
});
|
||
function reduce(collection, iteratee2, accumulator) {
|
||
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
||
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
|
||
}
|
||
function reduceRight(collection, iteratee2, accumulator) {
|
||
var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
|
||
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
|
||
}
|
||
function reject(collection, predicate) {
|
||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||
return func(collection, negate(getIteratee(predicate, 3)));
|
||
}
|
||
function sample(collection) {
|
||
var func = isArray(collection) ? arraySample : baseSample;
|
||
return func(collection);
|
||
}
|
||
function sampleSize(collection, n, guard) {
|
||
if (guard ? isIterateeCall(collection, n, guard) : n === undefined$1) {
|
||
n = 1;
|
||
} else {
|
||
n = toInteger(n);
|
||
}
|
||
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
||
return func(collection, n);
|
||
}
|
||
function shuffle(collection) {
|
||
var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
||
return func(collection);
|
||
}
|
||
function size(collection) {
|
||
if (collection == null) {
|
||
return 0;
|
||
}
|
||
if (isArrayLike(collection)) {
|
||
return isString(collection) ? stringSize(collection) : collection.length;
|
||
}
|
||
var tag = getTag(collection);
|
||
if (tag == mapTag || tag == setTag) {
|
||
return collection.size;
|
||
}
|
||
return baseKeys(collection).length;
|
||
}
|
||
function some(collection, predicate, guard) {
|
||
var func = isArray(collection) ? arraySome : baseSome;
|
||
if (guard && isIterateeCall(collection, predicate, guard)) {
|
||
predicate = undefined$1;
|
||
}
|
||
return func(collection, getIteratee(predicate, 3));
|
||
}
|
||
var sortBy = baseRest(function(collection, iteratees) {
|
||
if (collection == null) {
|
||
return [];
|
||
}
|
||
var length = iteratees.length;
|
||
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
||
iteratees = [];
|
||
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
||
iteratees = [iteratees[0]];
|
||
}
|
||
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
||
});
|
||
var now = ctxNow || function() {
|
||
return root.Date.now();
|
||
};
|
||
function after(n, func) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
n = toInteger(n);
|
||
return function() {
|
||
if (--n < 1) {
|
||
return func.apply(this, arguments);
|
||
}
|
||
};
|
||
}
|
||
function ary(func, n, guard) {
|
||
n = guard ? undefined$1 : n;
|
||
n = func && n == null ? func.length : n;
|
||
return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n);
|
||
}
|
||
function before(n, func) {
|
||
var result2;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
n = toInteger(n);
|
||
return function() {
|
||
if (--n > 0) {
|
||
result2 = func.apply(this, arguments);
|
||
}
|
||
if (n <= 1) {
|
||
func = undefined$1;
|
||
}
|
||
return result2;
|
||
};
|
||
}
|
||
var bind = baseRest(function(func, thisArg, partials) {
|
||
var bitmask = WRAP_BIND_FLAG;
|
||
if (partials.length) {
|
||
var holders = replaceHolders(partials, getHolder(bind));
|
||
bitmask |= WRAP_PARTIAL_FLAG;
|
||
}
|
||
return createWrap(func, bitmask, thisArg, partials, holders);
|
||
});
|
||
var bindKey = baseRest(function(object, key, partials) {
|
||
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
||
if (partials.length) {
|
||
var holders = replaceHolders(partials, getHolder(bindKey));
|
||
bitmask |= WRAP_PARTIAL_FLAG;
|
||
}
|
||
return createWrap(key, bitmask, object, partials, holders);
|
||
});
|
||
function curry(func, arity, guard) {
|
||
arity = guard ? undefined$1 : arity;
|
||
var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
|
||
result2.placeholder = curry.placeholder;
|
||
return result2;
|
||
}
|
||
function curryRight(func, arity, guard) {
|
||
arity = guard ? undefined$1 : arity;
|
||
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
|
||
result2.placeholder = curryRight.placeholder;
|
||
return result2;
|
||
}
|
||
function debounce(func, wait, options) {
|
||
var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
wait = toNumber(wait) || 0;
|
||
if (isObject(options)) {
|
||
leading = !!options.leading;
|
||
maxing = "maxWait" in options;
|
||
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||
}
|
||
function invokeFunc(time2) {
|
||
var args = lastArgs, thisArg = lastThis;
|
||
lastArgs = lastThis = undefined$1;
|
||
lastInvokeTime = time2;
|
||
result2 = func.apply(thisArg, args);
|
||
return result2;
|
||
}
|
||
function leadingEdge(time2) {
|
||
lastInvokeTime = time2;
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
return leading ? invokeFunc(time2) : result2;
|
||
}
|
||
function remainingWait(time2) {
|
||
var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
||
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
||
}
|
||
function shouldInvoke(time2) {
|
||
var timeSinceLastCall = time2 - lastCallTime, timeSinceLastInvoke = time2 - lastInvokeTime;
|
||
return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
||
}
|
||
function timerExpired() {
|
||
var time2 = now();
|
||
if (shouldInvoke(time2)) {
|
||
return trailingEdge(time2);
|
||
}
|
||
timerId = setTimeout2(timerExpired, remainingWait(time2));
|
||
}
|
||
function trailingEdge(time2) {
|
||
timerId = undefined$1;
|
||
if (trailing && lastArgs) {
|
||
return invokeFunc(time2);
|
||
}
|
||
lastArgs = lastThis = undefined$1;
|
||
return result2;
|
||
}
|
||
function cancel() {
|
||
if (timerId !== undefined$1) {
|
||
clearTimeout2(timerId);
|
||
}
|
||
lastInvokeTime = 0;
|
||
lastArgs = lastCallTime = lastThis = timerId = undefined$1;
|
||
}
|
||
function flush() {
|
||
return timerId === undefined$1 ? result2 : trailingEdge(now());
|
||
}
|
||
function debounced() {
|
||
var time2 = now(), isInvoking = shouldInvoke(time2);
|
||
lastArgs = arguments;
|
||
lastThis = this;
|
||
lastCallTime = time2;
|
||
if (isInvoking) {
|
||
if (timerId === undefined$1) {
|
||
return leadingEdge(lastCallTime);
|
||
}
|
||
if (maxing) {
|
||
clearTimeout2(timerId);
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
return invokeFunc(lastCallTime);
|
||
}
|
||
}
|
||
if (timerId === undefined$1) {
|
||
timerId = setTimeout2(timerExpired, wait);
|
||
}
|
||
return result2;
|
||
}
|
||
debounced.cancel = cancel;
|
||
debounced.flush = flush;
|
||
return debounced;
|
||
}
|
||
var defer = baseRest(function(func, args) {
|
||
return baseDelay(func, 1, args);
|
||
});
|
||
var delay = baseRest(function(func, wait, args) {
|
||
return baseDelay(func, toNumber(wait) || 0, args);
|
||
});
|
||
function flip(func) {
|
||
return createWrap(func, WRAP_FLIP_FLAG);
|
||
}
|
||
function memoize(func, resolver) {
|
||
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
var memoized = function() {
|
||
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
||
if (cache.has(key)) {
|
||
return cache.get(key);
|
||
}
|
||
var result2 = func.apply(this, args);
|
||
memoized.cache = cache.set(key, result2) || cache;
|
||
return result2;
|
||
};
|
||
memoized.cache = new (memoize.Cache || MapCache)();
|
||
return memoized;
|
||
}
|
||
memoize.Cache = MapCache;
|
||
function negate(predicate) {
|
||
if (typeof predicate != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return function() {
|
||
var args = arguments;
|
||
switch (args.length) {
|
||
case 0:
|
||
return !predicate.call(this);
|
||
case 1:
|
||
return !predicate.call(this, args[0]);
|
||
case 2:
|
||
return !predicate.call(this, args[0], args[1]);
|
||
case 3:
|
||
return !predicate.call(this, args[0], args[1], args[2]);
|
||
}
|
||
return !predicate.apply(this, args);
|
||
};
|
||
}
|
||
function once(func) {
|
||
return before(2, func);
|
||
}
|
||
var overArgs = castRest(function(func, transforms) {
|
||
transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
||
var funcsLength = transforms.length;
|
||
return baseRest(function(args) {
|
||
var index2 = -1, length = nativeMin(args.length, funcsLength);
|
||
while (++index2 < length) {
|
||
args[index2] = transforms[index2].call(this, args[index2]);
|
||
}
|
||
return apply(func, this, args);
|
||
});
|
||
});
|
||
var partial = baseRest(function(func, partials) {
|
||
var holders = replaceHolders(partials, getHolder(partial));
|
||
return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
|
||
});
|
||
var partialRight = baseRest(function(func, partials) {
|
||
var holders = replaceHolders(partials, getHolder(partialRight));
|
||
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
|
||
});
|
||
var rearg = flatRest(function(func, indexes) {
|
||
return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
|
||
});
|
||
function rest(func, start) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
start = start === undefined$1 ? start : toInteger(start);
|
||
return baseRest(func, start);
|
||
}
|
||
function spread(func, start) {
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
start = start == null ? 0 : nativeMax(toInteger(start), 0);
|
||
return baseRest(function(args) {
|
||
var array = args[start], otherArgs = castSlice(args, 0, start);
|
||
if (array) {
|
||
arrayPush(otherArgs, array);
|
||
}
|
||
return apply(func, this, otherArgs);
|
||
});
|
||
}
|
||
function throttle(func, wait, options) {
|
||
var leading = true, trailing = true;
|
||
if (typeof func != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
if (isObject(options)) {
|
||
leading = "leading" in options ? !!options.leading : leading;
|
||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||
}
|
||
return debounce(func, wait, {
|
||
"leading": leading,
|
||
"maxWait": wait,
|
||
"trailing": trailing
|
||
});
|
||
}
|
||
function unary(func) {
|
||
return ary(func, 1);
|
||
}
|
||
function wrap(value, wrapper) {
|
||
return partial(castFunction(wrapper), value);
|
||
}
|
||
function castArray() {
|
||
if (!arguments.length) {
|
||
return [];
|
||
}
|
||
var value = arguments[0];
|
||
return isArray(value) ? value : [value];
|
||
}
|
||
function clone(value) {
|
||
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
||
}
|
||
function cloneWith(value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
||
}
|
||
function cloneDeep(value) {
|
||
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
||
}
|
||
function cloneDeepWith(value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
||
}
|
||
function conformsTo(object, source) {
|
||
return source == null || baseConformsTo(object, source, keys(source));
|
||
}
|
||
function eq(value, other) {
|
||
return value === other || value !== value && other !== other;
|
||
}
|
||
var gt = createRelationalOperation(baseGt);
|
||
var gte = createRelationalOperation(function(value, other) {
|
||
return value >= other;
|
||
});
|
||
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
||
return arguments;
|
||
}()) ? baseIsArguments : function(value) {
|
||
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
||
};
|
||
var isArray = Array2.isArray;
|
||
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
||
function isArrayLike(value) {
|
||
return value != null && isLength(value.length) && !isFunction(value);
|
||
}
|
||
function isArrayLikeObject(value) {
|
||
return isObjectLike(value) && isArrayLike(value);
|
||
}
|
||
function isBoolean(value) {
|
||
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
||
}
|
||
var isBuffer = nativeIsBuffer || stubFalse;
|
||
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
||
function isElement(value) {
|
||
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
||
}
|
||
function isEmpty(value) {
|
||
if (value == null) {
|
||
return true;
|
||
}
|
||
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
||
return !value.length;
|
||
}
|
||
var tag = getTag(value);
|
||
if (tag == mapTag || tag == setTag) {
|
||
return !value.size;
|
||
}
|
||
if (isPrototype(value)) {
|
||
return !baseKeys(value).length;
|
||
}
|
||
for (var key in value) {
|
||
if (hasOwnProperty.call(value, key)) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
function isEqual(value, other) {
|
||
return baseIsEqual(value, other);
|
||
}
|
||
function isEqualWith(value, other, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
var result2 = customizer ? customizer(value, other) : undefined$1;
|
||
return result2 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result2;
|
||
}
|
||
function isError(value) {
|
||
if (!isObjectLike(value)) {
|
||
return false;
|
||
}
|
||
var tag = baseGetTag(value);
|
||
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
|
||
}
|
||
function isFinite(value) {
|
||
return typeof value == "number" && nativeIsFinite(value);
|
||
}
|
||
function isFunction(value) {
|
||
if (!isObject(value)) {
|
||
return false;
|
||
}
|
||
var tag = baseGetTag(value);
|
||
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
||
}
|
||
function isInteger(value) {
|
||
return typeof value == "number" && value == toInteger(value);
|
||
}
|
||
function isLength(value) {
|
||
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
||
}
|
||
function isObject(value) {
|
||
var type = typeof value;
|
||
return value != null && (type == "object" || type == "function");
|
||
}
|
||
function isObjectLike(value) {
|
||
return value != null && typeof value == "object";
|
||
}
|
||
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
||
function isMatch(object, source) {
|
||
return object === source || baseIsMatch(object, source, getMatchData(source));
|
||
}
|
||
function isMatchWith(object, source, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
return baseIsMatch(object, source, getMatchData(source), customizer);
|
||
}
|
||
function isNaN(value) {
|
||
return isNumber(value) && value != +value;
|
||
}
|
||
function isNative(value) {
|
||
if (isMaskable(value)) {
|
||
throw new Error2(CORE_ERROR_TEXT);
|
||
}
|
||
return baseIsNative(value);
|
||
}
|
||
function isNull(value) {
|
||
return value === null;
|
||
}
|
||
function isNil(value) {
|
||
return value == null;
|
||
}
|
||
function isNumber(value) {
|
||
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
||
}
|
||
function isPlainObject(value) {
|
||
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
||
return false;
|
||
}
|
||
var proto = getPrototype(value);
|
||
if (proto === null) {
|
||
return true;
|
||
}
|
||
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
||
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
||
}
|
||
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
||
function isSafeInteger(value) {
|
||
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
||
}
|
||
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
||
function isString(value) {
|
||
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
||
}
|
||
function isSymbol(value) {
|
||
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
||
}
|
||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||
function isUndefined(value) {
|
||
return value === undefined$1;
|
||
}
|
||
function isWeakMap(value) {
|
||
return isObjectLike(value) && getTag(value) == weakMapTag;
|
||
}
|
||
function isWeakSet(value) {
|
||
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
||
}
|
||
var lt = createRelationalOperation(baseLt);
|
||
var lte = createRelationalOperation(function(value, other) {
|
||
return value <= other;
|
||
});
|
||
function toArray(value) {
|
||
if (!value) {
|
||
return [];
|
||
}
|
||
if (isArrayLike(value)) {
|
||
return isString(value) ? stringToArray(value) : copyArray(value);
|
||
}
|
||
if (symIterator && value[symIterator]) {
|
||
return iteratorToArray(value[symIterator]());
|
||
}
|
||
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
|
||
return func(value);
|
||
}
|
||
function toFinite(value) {
|
||
if (!value) {
|
||
return value === 0 ? value : 0;
|
||
}
|
||
value = toNumber(value);
|
||
if (value === INFINITY || value === -INFINITY) {
|
||
var sign = value < 0 ? -1 : 1;
|
||
return sign * MAX_INTEGER;
|
||
}
|
||
return value === value ? value : 0;
|
||
}
|
||
function toInteger(value) {
|
||
var result2 = toFinite(value), remainder = result2 % 1;
|
||
return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
|
||
}
|
||
function toLength(value) {
|
||
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
||
}
|
||
function toNumber(value) {
|
||
if (typeof value == "number") {
|
||
return value;
|
||
}
|
||
if (isSymbol(value)) {
|
||
return NAN;
|
||
}
|
||
if (isObject(value)) {
|
||
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
||
value = isObject(other) ? other + "" : other;
|
||
}
|
||
if (typeof value != "string") {
|
||
return value === 0 ? value : +value;
|
||
}
|
||
value = baseTrim(value);
|
||
var isBinary = reIsBinary.test(value);
|
||
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
||
}
|
||
function toPlainObject(value) {
|
||
return copyObject(value, keysIn(value));
|
||
}
|
||
function toSafeInteger(value) {
|
||
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
|
||
}
|
||
function toString(value) {
|
||
return value == null ? "" : baseToString(value);
|
||
}
|
||
var assign = createAssigner(function(object, source) {
|
||
if (isPrototype(source) || isArrayLike(source)) {
|
||
copyObject(source, keys(source), object);
|
||
return;
|
||
}
|
||
for (var key in source) {
|
||
if (hasOwnProperty.call(source, key)) {
|
||
assignValue(object, key, source[key]);
|
||
}
|
||
}
|
||
});
|
||
var assignIn = createAssigner(function(object, source) {
|
||
copyObject(source, keysIn(source), object);
|
||
});
|
||
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
copyObject(source, keysIn(source), object, customizer);
|
||
});
|
||
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
copyObject(source, keys(source), object, customizer);
|
||
});
|
||
var at = flatRest(baseAt);
|
||
function create(prototype, properties) {
|
||
var result2 = baseCreate(prototype);
|
||
return properties == null ? result2 : baseAssign(result2, properties);
|
||
}
|
||
var defaults = baseRest(function(object, sources) {
|
||
object = Object2(object);
|
||
var index2 = -1;
|
||
var length = sources.length;
|
||
var guard = length > 2 ? sources[2] : undefined$1;
|
||
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
||
length = 1;
|
||
}
|
||
while (++index2 < length) {
|
||
var source = sources[index2];
|
||
var props = keysIn(source);
|
||
var propsIndex = -1;
|
||
var propsLength = props.length;
|
||
while (++propsIndex < propsLength) {
|
||
var key = props[propsIndex];
|
||
var value = object[key];
|
||
if (value === undefined$1 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
|
||
object[key] = source[key];
|
||
}
|
||
}
|
||
}
|
||
return object;
|
||
});
|
||
var defaultsDeep = baseRest(function(args) {
|
||
args.push(undefined$1, customDefaultsMerge);
|
||
return apply(mergeWith, undefined$1, args);
|
||
});
|
||
function findKey(object, predicate) {
|
||
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
||
}
|
||
function findLastKey(object, predicate) {
|
||
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
||
}
|
||
function forIn(object, iteratee2) {
|
||
return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
|
||
}
|
||
function forInRight(object, iteratee2) {
|
||
return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
|
||
}
|
||
function forOwn(object, iteratee2) {
|
||
return object && baseForOwn(object, getIteratee(iteratee2, 3));
|
||
}
|
||
function forOwnRight(object, iteratee2) {
|
||
return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
|
||
}
|
||
function functions(object) {
|
||
return object == null ? [] : baseFunctions(object, keys(object));
|
||
}
|
||
function functionsIn(object) {
|
||
return object == null ? [] : baseFunctions(object, keysIn(object));
|
||
}
|
||
function get(object, path, defaultValue) {
|
||
var result2 = object == null ? undefined$1 : baseGet(object, path);
|
||
return result2 === undefined$1 ? defaultValue : result2;
|
||
}
|
||
function has(object, path) {
|
||
return object != null && hasPath(object, path, baseHas);
|
||
}
|
||
function hasIn(object, path) {
|
||
return object != null && hasPath(object, path, baseHasIn);
|
||
}
|
||
var invert = createInverter(function(result2, value, key) {
|
||
if (value != null && typeof value.toString != "function") {
|
||
value = nativeObjectToString.call(value);
|
||
}
|
||
result2[value] = key;
|
||
}, constant(identity));
|
||
var invertBy = createInverter(function(result2, value, key) {
|
||
if (value != null && typeof value.toString != "function") {
|
||
value = nativeObjectToString.call(value);
|
||
}
|
||
if (hasOwnProperty.call(result2, value)) {
|
||
result2[value].push(key);
|
||
} else {
|
||
result2[value] = [key];
|
||
}
|
||
}, getIteratee);
|
||
var invoke = baseRest(baseInvoke);
|
||
function keys(object) {
|
||
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
||
}
|
||
function keysIn(object) {
|
||
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
||
}
|
||
function mapKeys(object, iteratee2) {
|
||
var result2 = {};
|
||
iteratee2 = getIteratee(iteratee2, 3);
|
||
baseForOwn(object, function(value, key, object2) {
|
||
baseAssignValue(result2, iteratee2(value, key, object2), value);
|
||
});
|
||
return result2;
|
||
}
|
||
function mapValues(object, iteratee2) {
|
||
var result2 = {};
|
||
iteratee2 = getIteratee(iteratee2, 3);
|
||
baseForOwn(object, function(value, key, object2) {
|
||
baseAssignValue(result2, key, iteratee2(value, key, object2));
|
||
});
|
||
return result2;
|
||
}
|
||
var merge = createAssigner(function(object, source, srcIndex) {
|
||
baseMerge(object, source, srcIndex);
|
||
});
|
||
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
||
baseMerge(object, source, srcIndex, customizer);
|
||
});
|
||
var omit = flatRest(function(object, paths) {
|
||
var result2 = {};
|
||
if (object == null) {
|
||
return result2;
|
||
}
|
||
var isDeep = false;
|
||
paths = arrayMap(paths, function(path) {
|
||
path = castPath(path, object);
|
||
isDeep || (isDeep = path.length > 1);
|
||
return path;
|
||
});
|
||
copyObject(object, getAllKeysIn(object), result2);
|
||
if (isDeep) {
|
||
result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
||
}
|
||
var length = paths.length;
|
||
while (length--) {
|
||
baseUnset(result2, paths[length]);
|
||
}
|
||
return result2;
|
||
});
|
||
function omitBy(object, predicate) {
|
||
return pickBy(object, negate(getIteratee(predicate)));
|
||
}
|
||
var pick = flatRest(function(object, paths) {
|
||
return object == null ? {} : basePick(object, paths);
|
||
});
|
||
function pickBy(object, predicate) {
|
||
if (object == null) {
|
||
return {};
|
||
}
|
||
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
||
return [prop];
|
||
});
|
||
predicate = getIteratee(predicate);
|
||
return basePickBy(object, props, function(value, path) {
|
||
return predicate(value, path[0]);
|
||
});
|
||
}
|
||
function result(object, path, defaultValue) {
|
||
path = castPath(path, object);
|
||
var index2 = -1, length = path.length;
|
||
if (!length) {
|
||
length = 1;
|
||
object = undefined$1;
|
||
}
|
||
while (++index2 < length) {
|
||
var value = object == null ? undefined$1 : object[toKey(path[index2])];
|
||
if (value === undefined$1) {
|
||
index2 = length;
|
||
value = defaultValue;
|
||
}
|
||
object = isFunction(value) ? value.call(object) : value;
|
||
}
|
||
return object;
|
||
}
|
||
function set(object, path, value) {
|
||
return object == null ? object : baseSet(object, path, value);
|
||
}
|
||
function setWith(object, path, value, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
return object == null ? object : baseSet(object, path, value, customizer);
|
||
}
|
||
var toPairs = createToPairs(keys);
|
||
var toPairsIn = createToPairs(keysIn);
|
||
function transform(object, iteratee2, accumulator) {
|
||
var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
||
iteratee2 = getIteratee(iteratee2, 4);
|
||
if (accumulator == null) {
|
||
var Ctor = object && object.constructor;
|
||
if (isArrLike) {
|
||
accumulator = isArr ? new Ctor() : [];
|
||
} else if (isObject(object)) {
|
||
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
||
} else {
|
||
accumulator = {};
|
||
}
|
||
}
|
||
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index2, object2) {
|
||
return iteratee2(accumulator, value, index2, object2);
|
||
});
|
||
return accumulator;
|
||
}
|
||
function unset(object, path) {
|
||
return object == null ? true : baseUnset(object, path);
|
||
}
|
||
function update(object, path, updater) {
|
||
return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
||
}
|
||
function updateWith(object, path, updater, customizer) {
|
||
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
||
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
||
}
|
||
function values(object) {
|
||
return object == null ? [] : baseValues(object, keys(object));
|
||
}
|
||
function valuesIn(object) {
|
||
return object == null ? [] : baseValues(object, keysIn(object));
|
||
}
|
||
function clamp(number, lower, upper) {
|
||
if (upper === undefined$1) {
|
||
upper = lower;
|
||
lower = undefined$1;
|
||
}
|
||
if (upper !== undefined$1) {
|
||
upper = toNumber(upper);
|
||
upper = upper === upper ? upper : 0;
|
||
}
|
||
if (lower !== undefined$1) {
|
||
lower = toNumber(lower);
|
||
lower = lower === lower ? lower : 0;
|
||
}
|
||
return baseClamp(toNumber(number), lower, upper);
|
||
}
|
||
function inRange(number, start, end) {
|
||
start = toFinite(start);
|
||
if (end === undefined$1) {
|
||
end = start;
|
||
start = 0;
|
||
} else {
|
||
end = toFinite(end);
|
||
}
|
||
number = toNumber(number);
|
||
return baseInRange(number, start, end);
|
||
}
|
||
function random(lower, upper, floating) {
|
||
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
||
upper = floating = undefined$1;
|
||
}
|
||
if (floating === undefined$1) {
|
||
if (typeof upper == "boolean") {
|
||
floating = upper;
|
||
upper = undefined$1;
|
||
} else if (typeof lower == "boolean") {
|
||
floating = lower;
|
||
lower = undefined$1;
|
||
}
|
||
}
|
||
if (lower === undefined$1 && upper === undefined$1) {
|
||
lower = 0;
|
||
upper = 1;
|
||
} else {
|
||
lower = toFinite(lower);
|
||
if (upper === undefined$1) {
|
||
upper = lower;
|
||
lower = 0;
|
||
} else {
|
||
upper = toFinite(upper);
|
||
}
|
||
}
|
||
if (lower > upper) {
|
||
var temp = lower;
|
||
lower = upper;
|
||
upper = temp;
|
||
}
|
||
if (floating || lower % 1 || upper % 1) {
|
||
var rand = nativeRandom();
|
||
return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
|
||
}
|
||
return baseRandom(lower, upper);
|
||
}
|
||
var camelCase = createCompounder(function(result2, word, index2) {
|
||
word = word.toLowerCase();
|
||
return result2 + (index2 ? capitalize(word) : word);
|
||
});
|
||
function capitalize(string) {
|
||
return upperFirst(toString(string).toLowerCase());
|
||
}
|
||
function deburr(string) {
|
||
string = toString(string);
|
||
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
||
}
|
||
function endsWith(string, target, position) {
|
||
string = toString(string);
|
||
target = baseToString(target);
|
||
var length = string.length;
|
||
position = position === undefined$1 ? length : baseClamp(toInteger(position), 0, length);
|
||
var end = position;
|
||
position -= target.length;
|
||
return position >= 0 && string.slice(position, end) == target;
|
||
}
|
||
function escape(string) {
|
||
string = toString(string);
|
||
return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
|
||
}
|
||
function escapeRegExp(string) {
|
||
string = toString(string);
|
||
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
||
}
|
||
var kebabCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? "-" : "") + word.toLowerCase();
|
||
});
|
||
var lowerCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + word.toLowerCase();
|
||
});
|
||
var lowerFirst = createCaseFirst("toLowerCase");
|
||
function pad(string, length, chars) {
|
||
string = toString(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
if (!length || strLength >= length) {
|
||
return string;
|
||
}
|
||
var mid = (length - strLength) / 2;
|
||
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
|
||
}
|
||
function padEnd(string, length, chars) {
|
||
string = toString(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
|
||
}
|
||
function padStart(string, length, chars) {
|
||
string = toString(string);
|
||
length = toInteger(length);
|
||
var strLength = length ? stringSize(string) : 0;
|
||
return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
|
||
}
|
||
function parseInt2(string, radix, guard) {
|
||
if (guard || radix == null) {
|
||
radix = 0;
|
||
} else if (radix) {
|
||
radix = +radix;
|
||
}
|
||
return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
|
||
}
|
||
function repeat(string, n, guard) {
|
||
if (guard ? isIterateeCall(string, n, guard) : n === undefined$1) {
|
||
n = 1;
|
||
} else {
|
||
n = toInteger(n);
|
||
}
|
||
return baseRepeat(toString(string), n);
|
||
}
|
||
function replace() {
|
||
var args = arguments, string = toString(args[0]);
|
||
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
||
}
|
||
var snakeCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? "_" : "") + word.toLowerCase();
|
||
});
|
||
function split(string, separator, limit) {
|
||
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
||
separator = limit = undefined$1;
|
||
}
|
||
limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0;
|
||
if (!limit) {
|
||
return [];
|
||
}
|
||
string = toString(string);
|
||
if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
|
||
separator = baseToString(separator);
|
||
if (!separator && hasUnicode(string)) {
|
||
return castSlice(stringToArray(string), 0, limit);
|
||
}
|
||
}
|
||
return string.split(separator, limit);
|
||
}
|
||
var startCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + upperFirst(word);
|
||
});
|
||
function startsWith(string, target, position) {
|
||
string = toString(string);
|
||
position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
|
||
target = baseToString(target);
|
||
return string.slice(position, position + target.length) == target;
|
||
}
|
||
function template(string, options, guard) {
|
||
var settings = lodash2.templateSettings;
|
||
if (guard && isIterateeCall(string, options, guard)) {
|
||
options = undefined$1;
|
||
}
|
||
string = toString(string);
|
||
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
||
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
|
||
var isEscaping, isEvaluating, index2 = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
|
||
var reDelimiters = RegExp2(
|
||
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
||
"g"
|
||
);
|
||
var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
|
||
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
||
interpolateValue || (interpolateValue = esTemplateValue);
|
||
source += string.slice(index2, offset).replace(reUnescapedString, escapeStringChar);
|
||
if (escapeValue) {
|
||
isEscaping = true;
|
||
source += "' +\n__e(" + escapeValue + ") +\n'";
|
||
}
|
||
if (evaluateValue) {
|
||
isEvaluating = true;
|
||
source += "';\n" + evaluateValue + ";\n__p += '";
|
||
}
|
||
if (interpolateValue) {
|
||
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
||
}
|
||
index2 = offset + match.length;
|
||
return match;
|
||
});
|
||
source += "';\n";
|
||
var variable = hasOwnProperty.call(options, "variable") && options.variable;
|
||
if (!variable) {
|
||
source = "with (obj) {\n" + source + "\n}\n";
|
||
} else if (reForbiddenIdentifierChars.test(variable)) {
|
||
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
|
||
}
|
||
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
||
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
||
var result2 = attempt(function() {
|
||
return Function2(importsKeys, sourceURL + "return " + source).apply(undefined$1, importsValues);
|
||
});
|
||
result2.source = source;
|
||
if (isError(result2)) {
|
||
throw result2;
|
||
}
|
||
return result2;
|
||
}
|
||
function toLower(value) {
|
||
return toString(value).toLowerCase();
|
||
}
|
||
function toUpper(value) {
|
||
return toString(value).toUpperCase();
|
||
}
|
||
function trim(string, chars, guard) {
|
||
string = toString(string);
|
||
if (string && (guard || chars === undefined$1)) {
|
||
return baseTrim(string);
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
||
return castSlice(strSymbols, start, end).join("");
|
||
}
|
||
function trimEnd(string, chars, guard) {
|
||
string = toString(string);
|
||
if (string && (guard || chars === undefined$1)) {
|
||
return string.slice(0, trimmedEndIndex(string) + 1);
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
||
return castSlice(strSymbols, 0, end).join("");
|
||
}
|
||
function trimStart(string, chars, guard) {
|
||
string = toString(string);
|
||
if (string && (guard || chars === undefined$1)) {
|
||
return string.replace(reTrimStart, "");
|
||
}
|
||
if (!string || !(chars = baseToString(chars))) {
|
||
return string;
|
||
}
|
||
var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
|
||
return castSlice(strSymbols, start).join("");
|
||
}
|
||
function truncate(string, options) {
|
||
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
||
if (isObject(options)) {
|
||
var separator = "separator" in options ? options.separator : separator;
|
||
length = "length" in options ? toInteger(options.length) : length;
|
||
omission = "omission" in options ? baseToString(options.omission) : omission;
|
||
}
|
||
string = toString(string);
|
||
var strLength = string.length;
|
||
if (hasUnicode(string)) {
|
||
var strSymbols = stringToArray(string);
|
||
strLength = strSymbols.length;
|
||
}
|
||
if (length >= strLength) {
|
||
return string;
|
||
}
|
||
var end = length - stringSize(omission);
|
||
if (end < 1) {
|
||
return omission;
|
||
}
|
||
var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
|
||
if (separator === undefined$1) {
|
||
return result2 + omission;
|
||
}
|
||
if (strSymbols) {
|
||
end += result2.length - end;
|
||
}
|
||
if (isRegExp(separator)) {
|
||
if (string.slice(end).search(separator)) {
|
||
var match, substring = result2;
|
||
if (!separator.global) {
|
||
separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g");
|
||
}
|
||
separator.lastIndex = 0;
|
||
while (match = separator.exec(substring)) {
|
||
var newEnd = match.index;
|
||
}
|
||
result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
|
||
}
|
||
} else if (string.indexOf(baseToString(separator), end) != end) {
|
||
var index2 = result2.lastIndexOf(separator);
|
||
if (index2 > -1) {
|
||
result2 = result2.slice(0, index2);
|
||
}
|
||
}
|
||
return result2 + omission;
|
||
}
|
||
function unescape(string) {
|
||
string = toString(string);
|
||
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
||
}
|
||
var upperCase = createCompounder(function(result2, word, index2) {
|
||
return result2 + (index2 ? " " : "") + word.toUpperCase();
|
||
});
|
||
var upperFirst = createCaseFirst("toUpperCase");
|
||
function words(string, pattern, guard) {
|
||
string = toString(string);
|
||
pattern = guard ? undefined$1 : pattern;
|
||
if (pattern === undefined$1) {
|
||
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
||
}
|
||
return string.match(pattern) || [];
|
||
}
|
||
var attempt = baseRest(function(func, args) {
|
||
try {
|
||
return apply(func, undefined$1, args);
|
||
} catch (e) {
|
||
return isError(e) ? e : new Error2(e);
|
||
}
|
||
});
|
||
var bindAll = flatRest(function(object, methodNames) {
|
||
arrayEach(methodNames, function(key) {
|
||
key = toKey(key);
|
||
baseAssignValue(object, key, bind(object[key], object));
|
||
});
|
||
return object;
|
||
});
|
||
function cond(pairs) {
|
||
var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
|
||
pairs = !length ? [] : arrayMap(pairs, function(pair) {
|
||
if (typeof pair[1] != "function") {
|
||
throw new TypeError2(FUNC_ERROR_TEXT);
|
||
}
|
||
return [toIteratee(pair[0]), pair[1]];
|
||
});
|
||
return baseRest(function(args) {
|
||
var index2 = -1;
|
||
while (++index2 < length) {
|
||
var pair = pairs[index2];
|
||
if (apply(pair[0], this, args)) {
|
||
return apply(pair[1], this, args);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
function conforms(source) {
|
||
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
||
}
|
||
function constant(value) {
|
||
return function() {
|
||
return value;
|
||
};
|
||
}
|
||
function defaultTo(value, defaultValue) {
|
||
return value == null || value !== value ? defaultValue : value;
|
||
}
|
||
var flow = createFlow();
|
||
var flowRight = createFlow(true);
|
||
function identity(value) {
|
||
return value;
|
||
}
|
||
function iteratee(func) {
|
||
return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
|
||
}
|
||
function matches(source) {
|
||
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
||
}
|
||
function matchesProperty(path, srcValue) {
|
||
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
||
}
|
||
var method = baseRest(function(path, args) {
|
||
return function(object) {
|
||
return baseInvoke(object, path, args);
|
||
};
|
||
});
|
||
var methodOf = baseRest(function(object, args) {
|
||
return function(path) {
|
||
return baseInvoke(object, path, args);
|
||
};
|
||
});
|
||
function mixin(object, source, options) {
|
||
var props = keys(source), methodNames = baseFunctions(source, props);
|
||
if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
|
||
options = source;
|
||
source = object;
|
||
object = this;
|
||
methodNames = baseFunctions(source, keys(source));
|
||
}
|
||
var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
||
arrayEach(methodNames, function(methodName) {
|
||
var func = source[methodName];
|
||
object[methodName] = func;
|
||
if (isFunc) {
|
||
object.prototype[methodName] = function() {
|
||
var chainAll = this.__chain__;
|
||
if (chain2 || chainAll) {
|
||
var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
|
||
actions.push({ "func": func, "args": arguments, "thisArg": object });
|
||
result2.__chain__ = chainAll;
|
||
return result2;
|
||
}
|
||
return func.apply(object, arrayPush([this.value()], arguments));
|
||
};
|
||
}
|
||
});
|
||
return object;
|
||
}
|
||
function noConflict() {
|
||
if (root._ === this) {
|
||
root._ = oldDash;
|
||
}
|
||
return this;
|
||
}
|
||
function noop() {
|
||
}
|
||
function nthArg(n) {
|
||
n = toInteger(n);
|
||
return baseRest(function(args) {
|
||
return baseNth(args, n);
|
||
});
|
||
}
|
||
var over = createOver(arrayMap);
|
||
var overEvery = createOver(arrayEvery);
|
||
var overSome = createOver(arraySome);
|
||
function property(path) {
|
||
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
||
}
|
||
function propertyOf(object) {
|
||
return function(path) {
|
||
return object == null ? undefined$1 : baseGet(object, path);
|
||
};
|
||
}
|
||
var range = createRange();
|
||
var rangeRight = createRange(true);
|
||
function stubArray() {
|
||
return [];
|
||
}
|
||
function stubFalse() {
|
||
return false;
|
||
}
|
||
function stubObject() {
|
||
return {};
|
||
}
|
||
function stubString() {
|
||
return "";
|
||
}
|
||
function stubTrue() {
|
||
return true;
|
||
}
|
||
function times(n, iteratee2) {
|
||
n = toInteger(n);
|
||
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
||
return [];
|
||
}
|
||
var index2 = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
|
||
iteratee2 = getIteratee(iteratee2);
|
||
n -= MAX_ARRAY_LENGTH;
|
||
var result2 = baseTimes(length, iteratee2);
|
||
while (++index2 < n) {
|
||
iteratee2(index2);
|
||
}
|
||
return result2;
|
||
}
|
||
function toPath(value) {
|
||
if (isArray(value)) {
|
||
return arrayMap(value, toKey);
|
||
}
|
||
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
||
}
|
||
function uniqueId(prefix) {
|
||
var id = ++idCounter;
|
||
return toString(prefix) + id;
|
||
}
|
||
var add = createMathOperation(function(augend, addend) {
|
||
return augend + addend;
|
||
}, 0);
|
||
var ceil = createRound("ceil");
|
||
var divide = createMathOperation(function(dividend, divisor) {
|
||
return dividend / divisor;
|
||
}, 1);
|
||
var floor = createRound("floor");
|
||
function max(array) {
|
||
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined$1;
|
||
}
|
||
function maxBy(array, iteratee2) {
|
||
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined$1;
|
||
}
|
||
function mean(array) {
|
||
return baseMean(array, identity);
|
||
}
|
||
function meanBy(array, iteratee2) {
|
||
return baseMean(array, getIteratee(iteratee2, 2));
|
||
}
|
||
function min(array) {
|
||
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined$1;
|
||
}
|
||
function minBy(array, iteratee2) {
|
||
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined$1;
|
||
}
|
||
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
||
return multiplier * multiplicand;
|
||
}, 1);
|
||
var round = createRound("round");
|
||
var subtract = createMathOperation(function(minuend, subtrahend) {
|
||
return minuend - subtrahend;
|
||
}, 0);
|
||
function sum(array) {
|
||
return array && array.length ? baseSum(array, identity) : 0;
|
||
}
|
||
function sumBy(array, iteratee2) {
|
||
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
|
||
}
|
||
lodash2.after = after;
|
||
lodash2.ary = ary;
|
||
lodash2.assign = assign;
|
||
lodash2.assignIn = assignIn;
|
||
lodash2.assignInWith = assignInWith;
|
||
lodash2.assignWith = assignWith;
|
||
lodash2.at = at;
|
||
lodash2.before = before;
|
||
lodash2.bind = bind;
|
||
lodash2.bindAll = bindAll;
|
||
lodash2.bindKey = bindKey;
|
||
lodash2.castArray = castArray;
|
||
lodash2.chain = chain;
|
||
lodash2.chunk = chunk;
|
||
lodash2.compact = compact;
|
||
lodash2.concat = concat;
|
||
lodash2.cond = cond;
|
||
lodash2.conforms = conforms;
|
||
lodash2.constant = constant;
|
||
lodash2.countBy = countBy;
|
||
lodash2.create = create;
|
||
lodash2.curry = curry;
|
||
lodash2.curryRight = curryRight;
|
||
lodash2.debounce = debounce;
|
||
lodash2.defaults = defaults;
|
||
lodash2.defaultsDeep = defaultsDeep;
|
||
lodash2.defer = defer;
|
||
lodash2.delay = delay;
|
||
lodash2.difference = difference;
|
||
lodash2.differenceBy = differenceBy;
|
||
lodash2.differenceWith = differenceWith;
|
||
lodash2.drop = drop;
|
||
lodash2.dropRight = dropRight;
|
||
lodash2.dropRightWhile = dropRightWhile;
|
||
lodash2.dropWhile = dropWhile;
|
||
lodash2.fill = fill;
|
||
lodash2.filter = filter;
|
||
lodash2.flatMap = flatMap;
|
||
lodash2.flatMapDeep = flatMapDeep;
|
||
lodash2.flatMapDepth = flatMapDepth;
|
||
lodash2.flatten = flatten;
|
||
lodash2.flattenDeep = flattenDeep;
|
||
lodash2.flattenDepth = flattenDepth;
|
||
lodash2.flip = flip;
|
||
lodash2.flow = flow;
|
||
lodash2.flowRight = flowRight;
|
||
lodash2.fromPairs = fromPairs;
|
||
lodash2.functions = functions;
|
||
lodash2.functionsIn = functionsIn;
|
||
lodash2.groupBy = groupBy;
|
||
lodash2.initial = initial;
|
||
lodash2.intersection = intersection;
|
||
lodash2.intersectionBy = intersectionBy;
|
||
lodash2.intersectionWith = intersectionWith;
|
||
lodash2.invert = invert;
|
||
lodash2.invertBy = invertBy;
|
||
lodash2.invokeMap = invokeMap;
|
||
lodash2.iteratee = iteratee;
|
||
lodash2.keyBy = keyBy;
|
||
lodash2.keys = keys;
|
||
lodash2.keysIn = keysIn;
|
||
lodash2.map = map;
|
||
lodash2.mapKeys = mapKeys;
|
||
lodash2.mapValues = mapValues;
|
||
lodash2.matches = matches;
|
||
lodash2.matchesProperty = matchesProperty;
|
||
lodash2.memoize = memoize;
|
||
lodash2.merge = merge;
|
||
lodash2.mergeWith = mergeWith;
|
||
lodash2.method = method;
|
||
lodash2.methodOf = methodOf;
|
||
lodash2.mixin = mixin;
|
||
lodash2.negate = negate;
|
||
lodash2.nthArg = nthArg;
|
||
lodash2.omit = omit;
|
||
lodash2.omitBy = omitBy;
|
||
lodash2.once = once;
|
||
lodash2.orderBy = orderBy;
|
||
lodash2.over = over;
|
||
lodash2.overArgs = overArgs;
|
||
lodash2.overEvery = overEvery;
|
||
lodash2.overSome = overSome;
|
||
lodash2.partial = partial;
|
||
lodash2.partialRight = partialRight;
|
||
lodash2.partition = partition;
|
||
lodash2.pick = pick;
|
||
lodash2.pickBy = pickBy;
|
||
lodash2.property = property;
|
||
lodash2.propertyOf = propertyOf;
|
||
lodash2.pull = pull;
|
||
lodash2.pullAll = pullAll;
|
||
lodash2.pullAllBy = pullAllBy;
|
||
lodash2.pullAllWith = pullAllWith;
|
||
lodash2.pullAt = pullAt;
|
||
lodash2.range = range;
|
||
lodash2.rangeRight = rangeRight;
|
||
lodash2.rearg = rearg;
|
||
lodash2.reject = reject;
|
||
lodash2.remove = remove;
|
||
lodash2.rest = rest;
|
||
lodash2.reverse = reverse;
|
||
lodash2.sampleSize = sampleSize;
|
||
lodash2.set = set;
|
||
lodash2.setWith = setWith;
|
||
lodash2.shuffle = shuffle;
|
||
lodash2.slice = slice;
|
||
lodash2.sortBy = sortBy;
|
||
lodash2.sortedUniq = sortedUniq;
|
||
lodash2.sortedUniqBy = sortedUniqBy;
|
||
lodash2.split = split;
|
||
lodash2.spread = spread;
|
||
lodash2.tail = tail;
|
||
lodash2.take = take;
|
||
lodash2.takeRight = takeRight;
|
||
lodash2.takeRightWhile = takeRightWhile;
|
||
lodash2.takeWhile = takeWhile;
|
||
lodash2.tap = tap;
|
||
lodash2.throttle = throttle;
|
||
lodash2.thru = thru;
|
||
lodash2.toArray = toArray;
|
||
lodash2.toPairs = toPairs;
|
||
lodash2.toPairsIn = toPairsIn;
|
||
lodash2.toPath = toPath;
|
||
lodash2.toPlainObject = toPlainObject;
|
||
lodash2.transform = transform;
|
||
lodash2.unary = unary;
|
||
lodash2.union = union;
|
||
lodash2.unionBy = unionBy;
|
||
lodash2.unionWith = unionWith;
|
||
lodash2.uniq = uniq;
|
||
lodash2.uniqBy = uniqBy;
|
||
lodash2.uniqWith = uniqWith;
|
||
lodash2.unset = unset;
|
||
lodash2.unzip = unzip;
|
||
lodash2.unzipWith = unzipWith;
|
||
lodash2.update = update;
|
||
lodash2.updateWith = updateWith;
|
||
lodash2.values = values;
|
||
lodash2.valuesIn = valuesIn;
|
||
lodash2.without = without;
|
||
lodash2.words = words;
|
||
lodash2.wrap = wrap;
|
||
lodash2.xor = xor;
|
||
lodash2.xorBy = xorBy;
|
||
lodash2.xorWith = xorWith;
|
||
lodash2.zip = zip;
|
||
lodash2.zipObject = zipObject;
|
||
lodash2.zipObjectDeep = zipObjectDeep;
|
||
lodash2.zipWith = zipWith;
|
||
lodash2.entries = toPairs;
|
||
lodash2.entriesIn = toPairsIn;
|
||
lodash2.extend = assignIn;
|
||
lodash2.extendWith = assignInWith;
|
||
mixin(lodash2, lodash2);
|
||
lodash2.add = add;
|
||
lodash2.attempt = attempt;
|
||
lodash2.camelCase = camelCase;
|
||
lodash2.capitalize = capitalize;
|
||
lodash2.ceil = ceil;
|
||
lodash2.clamp = clamp;
|
||
lodash2.clone = clone;
|
||
lodash2.cloneDeep = cloneDeep;
|
||
lodash2.cloneDeepWith = cloneDeepWith;
|
||
lodash2.cloneWith = cloneWith;
|
||
lodash2.conformsTo = conformsTo;
|
||
lodash2.deburr = deburr;
|
||
lodash2.defaultTo = defaultTo;
|
||
lodash2.divide = divide;
|
||
lodash2.endsWith = endsWith;
|
||
lodash2.eq = eq;
|
||
lodash2.escape = escape;
|
||
lodash2.escapeRegExp = escapeRegExp;
|
||
lodash2.every = every;
|
||
lodash2.find = find;
|
||
lodash2.findIndex = findIndex;
|
||
lodash2.findKey = findKey;
|
||
lodash2.findLast = findLast;
|
||
lodash2.findLastIndex = findLastIndex;
|
||
lodash2.findLastKey = findLastKey;
|
||
lodash2.floor = floor;
|
||
lodash2.forEach = forEach;
|
||
lodash2.forEachRight = forEachRight;
|
||
lodash2.forIn = forIn;
|
||
lodash2.forInRight = forInRight;
|
||
lodash2.forOwn = forOwn;
|
||
lodash2.forOwnRight = forOwnRight;
|
||
lodash2.get = get;
|
||
lodash2.gt = gt;
|
||
lodash2.gte = gte;
|
||
lodash2.has = has;
|
||
lodash2.hasIn = hasIn;
|
||
lodash2.head = head;
|
||
lodash2.identity = identity;
|
||
lodash2.includes = includes;
|
||
lodash2.indexOf = indexOf;
|
||
lodash2.inRange = inRange;
|
||
lodash2.invoke = invoke;
|
||
lodash2.isArguments = isArguments;
|
||
lodash2.isArray = isArray;
|
||
lodash2.isArrayBuffer = isArrayBuffer;
|
||
lodash2.isArrayLike = isArrayLike;
|
||
lodash2.isArrayLikeObject = isArrayLikeObject;
|
||
lodash2.isBoolean = isBoolean;
|
||
lodash2.isBuffer = isBuffer;
|
||
lodash2.isDate = isDate;
|
||
lodash2.isElement = isElement;
|
||
lodash2.isEmpty = isEmpty;
|
||
lodash2.isEqual = isEqual;
|
||
lodash2.isEqualWith = isEqualWith;
|
||
lodash2.isError = isError;
|
||
lodash2.isFinite = isFinite;
|
||
lodash2.isFunction = isFunction;
|
||
lodash2.isInteger = isInteger;
|
||
lodash2.isLength = isLength;
|
||
lodash2.isMap = isMap;
|
||
lodash2.isMatch = isMatch;
|
||
lodash2.isMatchWith = isMatchWith;
|
||
lodash2.isNaN = isNaN;
|
||
lodash2.isNative = isNative;
|
||
lodash2.isNil = isNil;
|
||
lodash2.isNull = isNull;
|
||
lodash2.isNumber = isNumber;
|
||
lodash2.isObject = isObject;
|
||
lodash2.isObjectLike = isObjectLike;
|
||
lodash2.isPlainObject = isPlainObject;
|
||
lodash2.isRegExp = isRegExp;
|
||
lodash2.isSafeInteger = isSafeInteger;
|
||
lodash2.isSet = isSet;
|
||
lodash2.isString = isString;
|
||
lodash2.isSymbol = isSymbol;
|
||
lodash2.isTypedArray = isTypedArray;
|
||
lodash2.isUndefined = isUndefined;
|
||
lodash2.isWeakMap = isWeakMap;
|
||
lodash2.isWeakSet = isWeakSet;
|
||
lodash2.join = join;
|
||
lodash2.kebabCase = kebabCase;
|
||
lodash2.last = last;
|
||
lodash2.lastIndexOf = lastIndexOf;
|
||
lodash2.lowerCase = lowerCase;
|
||
lodash2.lowerFirst = lowerFirst;
|
||
lodash2.lt = lt;
|
||
lodash2.lte = lte;
|
||
lodash2.max = max;
|
||
lodash2.maxBy = maxBy;
|
||
lodash2.mean = mean;
|
||
lodash2.meanBy = meanBy;
|
||
lodash2.min = min;
|
||
lodash2.minBy = minBy;
|
||
lodash2.stubArray = stubArray;
|
||
lodash2.stubFalse = stubFalse;
|
||
lodash2.stubObject = stubObject;
|
||
lodash2.stubString = stubString;
|
||
lodash2.stubTrue = stubTrue;
|
||
lodash2.multiply = multiply;
|
||
lodash2.nth = nth;
|
||
lodash2.noConflict = noConflict;
|
||
lodash2.noop = noop;
|
||
lodash2.now = now;
|
||
lodash2.pad = pad;
|
||
lodash2.padEnd = padEnd;
|
||
lodash2.padStart = padStart;
|
||
lodash2.parseInt = parseInt2;
|
||
lodash2.random = random;
|
||
lodash2.reduce = reduce;
|
||
lodash2.reduceRight = reduceRight;
|
||
lodash2.repeat = repeat;
|
||
lodash2.replace = replace;
|
||
lodash2.result = result;
|
||
lodash2.round = round;
|
||
lodash2.runInContext = runInContext2;
|
||
lodash2.sample = sample;
|
||
lodash2.size = size;
|
||
lodash2.snakeCase = snakeCase;
|
||
lodash2.some = some;
|
||
lodash2.sortedIndex = sortedIndex;
|
||
lodash2.sortedIndexBy = sortedIndexBy;
|
||
lodash2.sortedIndexOf = sortedIndexOf;
|
||
lodash2.sortedLastIndex = sortedLastIndex;
|
||
lodash2.sortedLastIndexBy = sortedLastIndexBy;
|
||
lodash2.sortedLastIndexOf = sortedLastIndexOf;
|
||
lodash2.startCase = startCase;
|
||
lodash2.startsWith = startsWith;
|
||
lodash2.subtract = subtract;
|
||
lodash2.sum = sum;
|
||
lodash2.sumBy = sumBy;
|
||
lodash2.template = template;
|
||
lodash2.times = times;
|
||
lodash2.toFinite = toFinite;
|
||
lodash2.toInteger = toInteger;
|
||
lodash2.toLength = toLength;
|
||
lodash2.toLower = toLower;
|
||
lodash2.toNumber = toNumber;
|
||
lodash2.toSafeInteger = toSafeInteger;
|
||
lodash2.toString = toString;
|
||
lodash2.toUpper = toUpper;
|
||
lodash2.trim = trim;
|
||
lodash2.trimEnd = trimEnd;
|
||
lodash2.trimStart = trimStart;
|
||
lodash2.truncate = truncate;
|
||
lodash2.unescape = unescape;
|
||
lodash2.uniqueId = uniqueId;
|
||
lodash2.upperCase = upperCase;
|
||
lodash2.upperFirst = upperFirst;
|
||
lodash2.each = forEach;
|
||
lodash2.eachRight = forEachRight;
|
||
lodash2.first = head;
|
||
mixin(lodash2, function() {
|
||
var source = {};
|
||
baseForOwn(lodash2, function(func, methodName) {
|
||
if (!hasOwnProperty.call(lodash2.prototype, methodName)) {
|
||
source[methodName] = func;
|
||
}
|
||
});
|
||
return source;
|
||
}(), { "chain": false });
|
||
lodash2.VERSION = VERSION;
|
||
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
||
lodash2[methodName].placeholder = lodash2;
|
||
});
|
||
arrayEach(["drop", "take"], function(methodName, index2) {
|
||
LazyWrapper.prototype[methodName] = function(n) {
|
||
n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
|
||
var result2 = this.__filtered__ && !index2 ? new LazyWrapper(this) : this.clone();
|
||
if (result2.__filtered__) {
|
||
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
||
} else {
|
||
result2.__views__.push({
|
||
"size": nativeMin(n, MAX_ARRAY_LENGTH),
|
||
"type": methodName + (result2.__dir__ < 0 ? "Right" : "")
|
||
});
|
||
}
|
||
return result2;
|
||
};
|
||
LazyWrapper.prototype[methodName + "Right"] = function(n) {
|
||
return this.reverse()[methodName](n).reverse();
|
||
};
|
||
});
|
||
arrayEach(["filter", "map", "takeWhile"], function(methodName, index2) {
|
||
var type = index2 + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
||
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
||
var result2 = this.clone();
|
||
result2.__iteratees__.push({
|
||
"iteratee": getIteratee(iteratee2, 3),
|
||
"type": type
|
||
});
|
||
result2.__filtered__ = result2.__filtered__ || isFilter;
|
||
return result2;
|
||
};
|
||
});
|
||
arrayEach(["head", "last"], function(methodName, index2) {
|
||
var takeName = "take" + (index2 ? "Right" : "");
|
||
LazyWrapper.prototype[methodName] = function() {
|
||
return this[takeName](1).value()[0];
|
||
};
|
||
});
|
||
arrayEach(["initial", "tail"], function(methodName, index2) {
|
||
var dropName = "drop" + (index2 ? "" : "Right");
|
||
LazyWrapper.prototype[methodName] = function() {
|
||
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
||
};
|
||
});
|
||
LazyWrapper.prototype.compact = function() {
|
||
return this.filter(identity);
|
||
};
|
||
LazyWrapper.prototype.find = function(predicate) {
|
||
return this.filter(predicate).head();
|
||
};
|
||
LazyWrapper.prototype.findLast = function(predicate) {
|
||
return this.reverse().find(predicate);
|
||
};
|
||
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
||
if (typeof path == "function") {
|
||
return new LazyWrapper(this);
|
||
}
|
||
return this.map(function(value) {
|
||
return baseInvoke(value, path, args);
|
||
});
|
||
});
|
||
LazyWrapper.prototype.reject = function(predicate) {
|
||
return this.filter(negate(getIteratee(predicate)));
|
||
};
|
||
LazyWrapper.prototype.slice = function(start, end) {
|
||
start = toInteger(start);
|
||
var result2 = this;
|
||
if (result2.__filtered__ && (start > 0 || end < 0)) {
|
||
return new LazyWrapper(result2);
|
||
}
|
||
if (start < 0) {
|
||
result2 = result2.takeRight(-start);
|
||
} else if (start) {
|
||
result2 = result2.drop(start);
|
||
}
|
||
if (end !== undefined$1) {
|
||
end = toInteger(end);
|
||
result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
|
||
}
|
||
return result2;
|
||
};
|
||
LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
||
return this.reverse().takeWhile(predicate).reverse();
|
||
};
|
||
LazyWrapper.prototype.toArray = function() {
|
||
return this.take(MAX_ARRAY_LENGTH);
|
||
};
|
||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash2[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
|
||
if (!lodashFunc) {
|
||
return;
|
||
}
|
||
lodash2.prototype[methodName] = function() {
|
||
var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
|
||
var interceptor = function(value2) {
|
||
var result3 = lodashFunc.apply(lodash2, arrayPush([value2], args));
|
||
return isTaker && chainAll ? result3[0] : result3;
|
||
};
|
||
if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
|
||
isLazy = useLazy = false;
|
||
}
|
||
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
|
||
if (!retUnwrapped && useLazy) {
|
||
value = onlyLazy ? value : new LazyWrapper(this);
|
||
var result2 = func.apply(value, args);
|
||
result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 });
|
||
return new LodashWrapper(result2, chainAll);
|
||
}
|
||
if (isUnwrapped && onlyLazy) {
|
||
return func.apply(this, args);
|
||
}
|
||
result2 = this.thru(interceptor);
|
||
return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
|
||
};
|
||
});
|
||
arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
|
||
var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
||
lodash2.prototype[methodName] = function() {
|
||
var args = arguments;
|
||
if (retUnwrapped && !this.__chain__) {
|
||
var value = this.value();
|
||
return func.apply(isArray(value) ? value : [], args);
|
||
}
|
||
return this[chainName](function(value2) {
|
||
return func.apply(isArray(value2) ? value2 : [], args);
|
||
});
|
||
};
|
||
});
|
||
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
||
var lodashFunc = lodash2[methodName];
|
||
if (lodashFunc) {
|
||
var key = lodashFunc.name + "";
|
||
if (!hasOwnProperty.call(realNames, key)) {
|
||
realNames[key] = [];
|
||
}
|
||
realNames[key].push({ "name": methodName, "func": lodashFunc });
|
||
}
|
||
});
|
||
realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
|
||
"name": "wrapper",
|
||
"func": undefined$1
|
||
}];
|
||
LazyWrapper.prototype.clone = lazyClone;
|
||
LazyWrapper.prototype.reverse = lazyReverse;
|
||
LazyWrapper.prototype.value = lazyValue;
|
||
lodash2.prototype.at = wrapperAt;
|
||
lodash2.prototype.chain = wrapperChain;
|
||
lodash2.prototype.commit = wrapperCommit;
|
||
lodash2.prototype.next = wrapperNext;
|
||
lodash2.prototype.plant = wrapperPlant;
|
||
lodash2.prototype.reverse = wrapperReverse;
|
||
lodash2.prototype.toJSON = lodash2.prototype.valueOf = lodash2.prototype.value = wrapperValue;
|
||
lodash2.prototype.first = lodash2.prototype.head;
|
||
if (symIterator) {
|
||
lodash2.prototype[symIterator] = wrapperToIterator;
|
||
}
|
||
return lodash2;
|
||
};
|
||
var _ = runInContext();
|
||
if (freeModule) {
|
||
(freeModule.exports = _)._ = _;
|
||
freeExports._ = _;
|
||
} else {
|
||
root._ = _;
|
||
}
|
||
}).call(commonjsGlobal);
|
||
})(lodash, lodash.exports);
|
||
var lodashExports = lodash.exports;
|
||
var _style_0$52 = { "close": { "": { "position": "absolute", "right": "20rpx", "top": "5rpx" } }, "oclock": { "": { "flexDirection": "row", "width": "460rpx", "height": "210rpx", "paddingTop": "5rpx", "paddingRight": "5rpx", "paddingBottom": "5rpx", "paddingLeft": "5rpx", "boxShadow": "0 0 8rpx rgba(0, 0, 0, 0.3)", "borderRadius": "25rpx" } }, "text": { ".oclock .select ": { "fontSize": "48rpx", "color": "#333333" }, ".btns .button.confirm ": { "color": "#ffffff" }, ".btns .button.cancel ": { "color": "#333333" }, ".btns .button ": { "textAlign": "center" } }, "button": { ".btns ": { "width": "460rpx", "height": "72rpx", "borderRadius": "10rpx" }, ".btns .confirm": { "backgroundColor": "#111111" }, ".btns .cancel": { "backgroundColor": "#dcdcdc" } } };
|
||
var _sfc_main$52 = {
|
||
__name: "time",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue3.getCurrentInstance)();
|
||
const typeList = (0, import_vue3.reactive)([{
|
||
name: "\u5012\u8BA1\u65F6\u95F9\u949F",
|
||
key: "countDown"
|
||
}, {
|
||
name: "\u65F6\u95F4\u95F9\u949F",
|
||
key: "time"
|
||
}]);
|
||
const typeIndex = (0, import_vue3.ref)(0);
|
||
const hour = (0, import_vue3.reactive)([]);
|
||
const hourIndex = (0, import_vue3.ref)(0);
|
||
const minute = (0, import_vue3.reactive)([]);
|
||
const minuteIndex = (0, import_vue3.ref)(0);
|
||
const alarm = (0, import_vue3.computed)(() => {
|
||
let result = uni.$store.state.alarmTime;
|
||
return result;
|
||
});
|
||
const yMd = (0, import_vue3.ref)("");
|
||
const visible = (0, import_vue3.ref)(true);
|
||
(0, import_vue3.onMounted)(() => {
|
||
const date = /* @__PURE__ */ new Date();
|
||
yMd.value = `${date.getFullYear()}-${util$1.toTwo(date.getMonth() + 1)}-${util$1.toTwo(date.getDate())}`;
|
||
init();
|
||
util$1.isLogin().then(() => {
|
||
getAlarm();
|
||
});
|
||
uni.$on("login", () => {
|
||
getAlarm();
|
||
});
|
||
uni.$on("logout", () => {
|
||
uni.$store.commit("setState", {
|
||
key: "alarmTime",
|
||
value: ""
|
||
});
|
||
});
|
||
});
|
||
function getAlarm() {
|
||
api.video.getAlarm().then((rs) => {
|
||
if (rs.code == 200) {
|
||
const result = rs.data;
|
||
if (!result)
|
||
return;
|
||
setTime(result.endTime);
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
function handleType(ev) {
|
||
const index2 = ev.detail.value;
|
||
if (typeIndex.value === index2)
|
||
return;
|
||
typeIndex.value = index2;
|
||
if (typeList[index2].key == "time") {
|
||
const date = /* @__PURE__ */ new Date();
|
||
hourIndex.value = hour.findIndex((node) => node == date.getHours());
|
||
minuteIndex.value = minute.findIndex((node) => node == date.getMinutes());
|
||
} else if (typeList[index2].key == "countDown") {
|
||
hourIndex.value = 0;
|
||
minuteIndex.value = 0;
|
||
}
|
||
}
|
||
function init() {
|
||
for (let i2 = 0; i2 < 24; i2++) {
|
||
hour.push(i2);
|
||
}
|
||
for (let i2 = 0; i2 < 60; i2++) {
|
||
minute.push(i2);
|
||
}
|
||
}
|
||
function setTime(endTime) {
|
||
const currentTime = new Date(util$1.formatTime("yyyy-MM-dd HH:mm:ss")).valueOf();
|
||
const alarmTime = new Date(endTime).valueOf();
|
||
if (alarmTime < currentTime)
|
||
return;
|
||
setTimeout(() => {
|
||
util$1.alert({
|
||
content: "\u95F9\u949F\u63D0\u9192\u65F6\u95F4\u5230",
|
||
showCancel: false
|
||
});
|
||
uni.$store.commit("setState", {
|
||
key: "alarmTime",
|
||
value: ""
|
||
});
|
||
}, alarmTime - currentTime);
|
||
uni.$store.commit("setState", {
|
||
key: "alarmTime",
|
||
value: endTime
|
||
});
|
||
}
|
||
function handleHour(ev) {
|
||
const index2 = ev.detail.value[0];
|
||
if (hourIndex.value === index2)
|
||
return;
|
||
hourIndex.value = index2;
|
||
}
|
||
function handleMinute(ev) {
|
||
const index2 = ev.detail.value[0];
|
||
if (minuteIndex.value === index2)
|
||
return;
|
||
minuteIndex.value = index2;
|
||
}
|
||
function open() {
|
||
proxy.$refs.time.open();
|
||
}
|
||
function close() {
|
||
proxy.$refs.time.close();
|
||
}
|
||
function handleSubmit() {
|
||
const type = typeList[typeIndex.value];
|
||
let endTime = yMd.value;
|
||
if (type.key == "countDown") {
|
||
if (hourIndex.value === 0 && minuteIndex.value === 0) {
|
||
util$1.alert("\u5F53\u524D\u65F6\u95F4\u5DF2\u5230");
|
||
return;
|
||
}
|
||
endTime = util$1.strtotime(`+${hour[hourIndex.value]} hour`, (/* @__PURE__ */ new Date()).getTime());
|
||
endTime = util$1.strtotime(`+${minute[minuteIndex.value]} minute`, endTime);
|
||
endTime = new Date(endTime).setSeconds(0);
|
||
endTime = util$1.formatTime("yyyy-MM-dd HH:mm:ss", endTime);
|
||
} else if (type.key == "time") {
|
||
endTime += ` ${util$1.toTwo(hour[hourIndex.value])}:${util$1.toTwo(minute[minuteIndex.value])}:00`;
|
||
const currentTime = new Date(util$1.formatTime("yyyy-MM-dd HH:mm:ss")).valueOf();
|
||
const alarmTime = new Date(endTime).valueOf();
|
||
if (alarmTime < currentTime) {
|
||
util$1.alert("\u8BBE\u7F6E\u95F9\u949F\u65F6\u95F4\u5E94\u5927\u4E8E\u5F53\u524D\u65F6\u95F4");
|
||
return;
|
||
}
|
||
}
|
||
api.video.setAlarm({
|
||
query: {
|
||
endTime
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
util$1.alert("\u8BBE\u7F6E\u6210\u529F");
|
||
setTime(endTime);
|
||
close();
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, typeList, typeIndex, hour, hourIndex, minute, minuteIndex, alarm, yMd, visible, getAlarm, handleType, init, setTime, handleHour, handleMinute, open, close, handleSubmit, onMounted: import_vue3.onMounted, ref: import_vue3.ref, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, watch: import_vue3.watch, computed: import_vue3.computed, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
}, get before() {
|
||
return lodashExports.before;
|
||
}, get result() {
|
||
return lodashExports.result;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$52(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_picker = (0, import_vue3.resolveComponent)("picker");
|
||
const _component_picker_view_column = (0, import_vue3.resolveComponent)("picker-view-column");
|
||
const _component_picker_view = (0, import_vue3.resolveComponent)("picker-view");
|
||
const _component_uni_popup = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "time",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("view", { class: "popBot plr60 bfff" }, [
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
class: "close",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.time.close())
|
||
}, [
|
||
(0, import_vue3.createVNode)(_component_uni_icons, {
|
||
type: "close",
|
||
size: "36rpx",
|
||
color: "#333"
|
||
})
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u6807\u9898 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "title mtb40" }, [
|
||
(0, import_vue3.createVNode)(_component_picker, {
|
||
class: "df fdr jcc aic",
|
||
range: $setup.typeList,
|
||
onChange: $setup.handleType,
|
||
value: $setup.typeIndex,
|
||
"range-key": "name"
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "tac f40" },
|
||
(0, import_vue3.toDisplayString)($setup.typeList[$setup.typeIndex].name),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
(0, import_vue3.createVNode)(_component_uni_icons, {
|
||
type: "right",
|
||
color: "#999",
|
||
size: "32rpx"
|
||
})
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["range", "value"])
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u526F\u6807\u9898 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "" }, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "f32" },
|
||
"\u95F9\u949F\u63D0\u9192\u65F6\u95F4\uFF1A" + (0, import_vue3.toDisplayString)($setup.alarm || "\u672A\u8BBE\u7F6E"),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u64CD\u4F5C\u53F0 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "oclockBox aic mtb25" }, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "oclock" }, [
|
||
(0, import_vue3.createCommentVNode)(" \u9009\u62E9\u5668 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "f1" }, [
|
||
$setup.visible ? ((0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(_component_picker_view, {
|
||
key: 0,
|
||
class: "select f1",
|
||
value: [$setup.hourIndex],
|
||
"indicator-class": "option active",
|
||
"indicator-style": "height: 56rpx;",
|
||
onChange: $setup.handleHour
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createVNode)(_component_picker_view_column, null, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.hour, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
key: index2,
|
||
class: "option fdr aic jcc"
|
||
}, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue3.toDisplayString)(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
index2 === $setup.hourIndex ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("u-text", {
|
||
key: 0,
|
||
class: "text"
|
||
}, "\u65F6")) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
})
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["value"])) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "jcc" }, [
|
||
(0, import_vue3.createElementVNode)("u-text", null, ":")
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "f1" }, [
|
||
$setup.visible ? ((0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(_component_picker_view, {
|
||
key: 0,
|
||
class: "select f1",
|
||
value: [$setup.minuteIndex],
|
||
"indicator-class": "option active",
|
||
"indicator-style": "height: 56rpx;",
|
||
onChange: $setup.handleMinute
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createVNode)(_component_picker_view_column, null, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.minute, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
key: index2,
|
||
class: "option fdr aic jcc"
|
||
}, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue3.toDisplayString)(item),
|
||
1
|
||
/* TEXT */
|
||
),
|
||
index2 === $setup.minuteIndex ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("u-text", {
|
||
key: 0,
|
||
class: "text"
|
||
}, "\u5206")) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
})
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}, 8, ["value"])) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
])
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u6587\u5B57\u63D0\u793A "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "mt10" }, [
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "c666 f20" }, "\u9884\u5148\u8BBE\u7F6E\u89C2\u5F71\u65F6\u95F4\uFF0C\u5230\u65F6\u81EA\u52A8\u63D0\u9192")
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "btns mtb25" }, [
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
class: "button jcc confirm mtb10",
|
||
onClick: $setup.handleSubmit
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text" }, "\u786E\u8BA4")
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
class: "button jcc cancel mtb10",
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.close())
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text" }, "\u5173\u95ED")
|
||
])
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
);
|
||
}
|
||
var timeAlt = /* @__PURE__ */ _export_sfc(_sfc_main$52, [["render", _sfc_render$52], ["styles", [_style_0$52]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/time.vue"]]);
|
||
var _imports_0$12 = "/static/leftMenu1.png";
|
||
var _imports_1$1 = "/static/leftMenu2.png";
|
||
var _imports_2$1 = "/static/leftMenu3.png";
|
||
var _imports_32 = "/static/leftMenu5.png";
|
||
var _imports_42 = "/static/leftMenu6.png";
|
||
var _style_0$42 = { "leftMenuAlt": { "": { "width": "600rpx", "backgroundColor": "#F4F4F4" } } };
|
||
var _sfc_main$42 = {
|
||
__name: "leftMenu",
|
||
setup(__props, { expose: __expose }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue3.getCurrentInstance)();
|
||
(0, import_vue3.onMounted)(() => {
|
||
});
|
||
function open() {
|
||
proxy.$refs.leftMenu.open();
|
||
}
|
||
function close() {
|
||
proxy.$refs.leftMenu.close();
|
||
}
|
||
function getUserInfos(userRecommend) {
|
||
video.getUserInfo({
|
||
query: {
|
||
userRecommend
|
||
}
|
||
}).then((rs) => {
|
||
formatAppLog("log", "at components/index/leftMenu.vue:42", rs);
|
||
if (rs.data !== null) {
|
||
uni.navigateTo({
|
||
url: "/pages/index/beInvited?header=" + rs.data.userPortrait + "&userId=" + rs.data.userId + "&userNickname=" + rs.data.userNickname
|
||
});
|
||
}
|
||
});
|
||
}
|
||
function scanQRCode() {
|
||
uni.scanCode({
|
||
success: (res) => {
|
||
formatAppLog("log", "at components/index/leftMenu.vue:56", "\u626B\u63CF\u7ED3\u679C\uFF1A" + res.result);
|
||
getUserInfos(res.result);
|
||
},
|
||
fail: (err) => {
|
||
formatAppLog("error", "at components/index/leftMenu.vue:62", "\u626B\u63CF\u5931\u8D25\uFF1A" + err);
|
||
uni.showToast({
|
||
title: "\u626B\u63CF\u5931\u8D25",
|
||
icon: "none"
|
||
});
|
||
}
|
||
});
|
||
}
|
||
function link(url) {
|
||
util$1.isAuth({
|
||
success: (rs) => {
|
||
uni.navigateTo({
|
||
url
|
||
});
|
||
}
|
||
});
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, open, close, getUserInfos, scanQRCode, link, onMounted: import_vue3.onMounted, ref: import_vue3.ref, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, watch: import_vue3.watch, get videoApi() {
|
||
return video;
|
||
}, statusBar, get util() {
|
||
return util$1;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$42(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_navigator = (0, import_vue3.resolveComponent)("navigator");
|
||
const _component_uni_popup = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "leftMenu",
|
||
type: "left"
|
||
},
|
||
{
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("view", { class: "leftMenuAlt f1 plr30" }, [
|
||
(0, import_vue3.createCommentVNode)(" \u72B6\u6001\u6761 "),
|
||
(0, import_vue3.createVNode)($setup["statusBar"]),
|
||
(0, import_vue3.createCommentVNode)(" \u626B\u4E00\u626B "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "df fdr jcr aic mtb30" }, [
|
||
(0, import_vue3.createVNode)(_component_uni_icons, {
|
||
type: "scan",
|
||
size: "40rpx"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", {
|
||
class: "ml10 c333 f24",
|
||
onClick: $setup.scanQRCode
|
||
}, "\u626B\u4E00\u626B")
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u83DC\u5355\u5217\u8868 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "menuList mtb30 f1" }, [
|
||
(0, import_vue3.createElementVNode)("scroll-view", {
|
||
scrollY: "true",
|
||
class: "scroll f1",
|
||
showScrollbar: false
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "list" }, [
|
||
(0, import_vue3.createVNode)(_component_navigator, {
|
||
url: "/pages/index/wallet",
|
||
class: "item df fdr aic mtb15 ptb40 plr30 bfff br20",
|
||
"hover-class": "none"
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80 mr25",
|
||
src: _imports_0$12,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text f1 c333 f28" }, "\u6211\u7684\u94B1\u5305")
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}),
|
||
(0, import_vue3.createVNode)(_component_navigator, {
|
||
url: "/pages/index/integralMall",
|
||
class: "item df fdr aic mtb15 ptb40 plr30 bfff br20",
|
||
"hover-class": "none"
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80 mr25",
|
||
src: _imports_1$1,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text f1 c333 f28" }, "\u5377\u8F74\u79EF\u5206")
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}),
|
||
(0, import_vue3.createVNode)(_component_navigator, {
|
||
url: "/pages/index/durian",
|
||
class: "item df fdr aic mtb15 ptb40 plr30 bfff br20",
|
||
"hover-class": "none"
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80 mr25",
|
||
src: _imports_2$1,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text f1 c333 f28" }, "\u69B4\u83B2\u679C\u6811")
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
}),
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $setup.link("/pages/index/myTeam")),
|
||
class: "item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80 mr25",
|
||
src: _imports_32,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text f1 c333 f28" }, "\u6211\u7684\u56E2\u961F")
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
onClick: _cache[1] || (_cache[1] = ($event) => $setup.link("/pages/index/myQrCode")),
|
||
class: "item df fdr aic mtb15 ptb40 plr30 bfff br20"
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh80 mr25",
|
||
src: _imports_42,
|
||
mode: "aspectFit"
|
||
}),
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "text f1 c333 f28" }, "\u9080\u8BF7\u597D\u53CB\u5206\u4EABAPP")
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(' <navigator url="/pages/shop/settle" class="item df fdr aic mtb15 ptb40 plr30 bfff br20">\r\n <image class="wh80 mr25" src="/static/leftMenu7.png" mode="aspectFit" />\r\n <text class="text f1 c333 f28">\u5546\u5BB6\u5165\u9A7B</text>\r\n </navigator> '),
|
||
(0, import_vue3.createCommentVNode)(' <view class="item df fdr aic mtb15 ptb40 plr30 bfff br20">\r\n <image class="wh80 mr25" src="/static/leftMenu9.png" mode="aspectFit" />\r\n <text class="text f1 c333 f28">\u8054\u7CFB\u5BA2\u670D</text>\r\n </view>\r\n\r\n <view class="item df fdr aic mtb15 ptb40 plr30 bfff br20">\r\n <image class="wh80 mr25" src="/static/leftMenu8.png" mode="aspectFit" />\r\n <text class="text f1 c333 f28">\u4E5D\u4EBF\u6253\u8F66</text>\r\n </view> ')
|
||
])
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
);
|
||
}
|
||
var leftMenuAlt = /* @__PURE__ */ _export_sfc(_sfc_main$42, [["render", _sfc_render$42], ["styles", [_style_0$42]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/leftMenu.vue"]]);
|
||
var _style_0$32 = { "discBox": { "": { "alignItems": "flex-end", "justifyContent": "flex-end" } }, "disc": { ".discBox ": { "width": "110rpx", "height": "110rpx" } }, "image": { ".discBox .disc ": { "width": "90rpx", "height": "90rpx", "borderRadius": 50, "boxShadow": "0 0 10rpx rgba(255, 255, 0, 0.8)" } } };
|
||
var _sfc_main$32 = {
|
||
__name: "disc",
|
||
setup(__props, { expose: __expose }) {
|
||
const rotate = (0, import_vue3.ref)(0);
|
||
const timer = (0, import_vue3.ref)(null);
|
||
const limitTime = (0, import_vue3.ref)(5);
|
||
const step = (0, import_vue3.ref)(0.05);
|
||
const playState = (0, import_vue3.ref)(false);
|
||
const discStyle = (0, import_vue3.computed)(() => {
|
||
let result = {
|
||
transform: `rotate(${rotate.value}deg)`
|
||
};
|
||
return result;
|
||
});
|
||
const userinfo = (0, import_vue3.computed)(() => {
|
||
let result = uni.$store.state.userinfo;
|
||
return result;
|
||
});
|
||
(0, import_vue3.onMounted)(() => {
|
||
});
|
||
function play() {
|
||
if (playState.value)
|
||
return;
|
||
timer.value = setInterval(() => {
|
||
if (rotate.value >= 360) {
|
||
rotate.value = 0;
|
||
}
|
||
rotate.value += 360 / limitTime.value * (step.value / 1);
|
||
}, step.value * 1e3);
|
||
playState.value = true;
|
||
}
|
||
function pause() {
|
||
if (!playState.value)
|
||
return;
|
||
clearInterval(timer.value);
|
||
timer.value = null;
|
||
playState.value = false;
|
||
}
|
||
function handleDisc() {
|
||
uni.navigateTo({
|
||
url: "/pages/index/durian"
|
||
});
|
||
}
|
||
__expose({
|
||
play,
|
||
pause
|
||
});
|
||
const __returned__ = { rotate, timer, limitTime, step, playState, discStyle, userinfo, play, pause, handleDisc, computed: import_vue3.computed, onMounted: import_vue3.onMounted, reactive: import_vue3.reactive, ref: import_vue3.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$32(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
[
|
||
(0, import_vue3.createCommentVNode)(" cd\u5531\u7247 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "discBox" }, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "disc fmid",
|
||
style: (0, import_vue3.normalizeStyle)($setup.discStyle),
|
||
onClick: $setup.handleDisc
|
||
},
|
||
[
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "image wh100 cir",
|
||
src: $setup.userinfo.userPortrait,
|
||
mode: "aspectFill"
|
||
}, null, 8, ["src"])
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)
|
||
])
|
||
],
|
||
2112
|
||
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
||
);
|
||
}
|
||
var disc = /* @__PURE__ */ _export_sfc(_sfc_main$32, [["render", _sfc_render$32], ["styles", [_style_0$32]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/disc.vue"]]);
|
||
var _style_0$22 = { "menuAlt": { "": { "backgroundColor": "#f2f2f2", "borderTopLeftRadius": "30rpx", "borderTopRightRadius": "30rpx", "borderBottomRightRadius": 0, "borderBottomLeftRadius": 0 } }, "line": { ".menuAlt .listArea .line+": { "borderTopWidth": "2rpx", "borderTopStyle": "solid", "borderTopColor": "#eeeeee" } }, "text": { ".speed .item ": { "color": "#999999", "transitionDuration": 300 }, ".speed .item.active ": { "color": "#1c1c1c" } }, "@TRANSITION": { "text": { "duration": 300 } } };
|
||
var _sfc_main$22 = {
|
||
__name: "moreMenu",
|
||
emits: ["changeSpeed"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
const {
|
||
proxy
|
||
} = (0, import_vue3.getCurrentInstance)();
|
||
const emit = __emit;
|
||
const speed = (0, import_vue3.reactive)([
|
||
{
|
||
name: "0.5",
|
||
value: 0.5
|
||
},
|
||
{
|
||
name: "\u6B63\u5E38",
|
||
value: 1
|
||
},
|
||
{
|
||
name: "1.25",
|
||
value: 1.25
|
||
},
|
||
{
|
||
name: "1.5",
|
||
value: 1.5
|
||
},
|
||
{
|
||
name: "2",
|
||
value: 2
|
||
}
|
||
]);
|
||
const speedIndex = (0, import_vue3.ref)(1);
|
||
const videoDetail = (0, import_vue3.reactive)({});
|
||
(0, import_vue3.onMounted)(() => {
|
||
});
|
||
function open(item) {
|
||
Object.assign(videoDetail, {}, item);
|
||
speedIndex.value = speed.findIndex((node) => node.value == item.speed);
|
||
proxy.$refs.menu.open();
|
||
}
|
||
function close() {
|
||
Object.assign(videoDetail, {});
|
||
proxy.$refs.menu.close();
|
||
}
|
||
function link(url) {
|
||
util$1.isLogin().then((rs) => {
|
||
uni.navigateTo({
|
||
url
|
||
});
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
close();
|
||
}
|
||
function handleSpeed(item) {
|
||
emit("changeSpeed", item);
|
||
close();
|
||
}
|
||
__expose({
|
||
open,
|
||
close
|
||
});
|
||
const __returned__ = { proxy, emit, speed, speedIndex, videoDetail, open, close, link, handleSpeed, onMounted: import_vue3.onMounted, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, ref: import_vue3.ref, get util() {
|
||
return util$1;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_uni_icons = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-icons"), __easycom_0$1);
|
||
const _component_uni_popup = resolveEasycom((0, import_vue3.resolveDynamicComponent)("uni-popup"), __easycom_1$1);
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createBlock)(
|
||
_component_uni_popup,
|
||
{
|
||
ref: "menu",
|
||
type: "bottom"
|
||
},
|
||
{
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createCommentVNode)(" "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "menuAlt" }, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "header df jcr fdr ptb10 plr10" }, [
|
||
(0, import_vue3.createVNode)(_component_uni_icons, {
|
||
type: "closeempty",
|
||
onClick: $setup.close
|
||
})
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "listArea mtb30 mlr30 plr30 bfff" }, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "line rows fdr ptb30" }, [
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "key f1 c111 f28" }, "\u500D\u901F"),
|
||
(0, import_vue3.createElementVNode)("view", { class: "value speed df jcsb fdr f1 ml30" }, [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.speed, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
class: (0, import_vue3.normalizeClass)(["item", { "active": $setup.speedIndex == index2 }]),
|
||
key: index2,
|
||
onClick: ($event) => $setup.handleSpeed(item)
|
||
}, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text f28" },
|
||
(0, import_vue3.toDisplayString)(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
], 10, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
])
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
class: "line rows fdr ptb30",
|
||
onClick: _cache[0] || (_cache[0] = ($event) => $setup.link($setup.util.setUrl("/pages/index/report", { userId: $setup.videoDetail.userId })))
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-text", { class: "key f1 c111 f28" }, "\u4E3E\u62A5\u4F5C\u8005"),
|
||
(0, import_vue3.createElementVNode)("view", { class: "value f1 ml30" })
|
||
])
|
||
])
|
||
])
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
},
|
||
512
|
||
/* NEED_PATCH */
|
||
);
|
||
}
|
||
var moreMenu = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$22], ["styles", [_style_0$22]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/moreMenu.vue"]]);
|
||
var _style_0$12 = { "durationBox": { "": { "paddingTop": "60rpx" } }, "duration": { ".durationBox ": { "width": "750rpx", "backgroundColor": "rgba(255,255,255,0.3)" } }, "line": { ".durationBox .duration ": { "width": 0, "height": "2rpx", "backgroundColor": "rgba(255,255,255,0.8)", "transitionDuration": 250 } }, "@TRANSITION": { "line": { "duration": 250 } } };
|
||
var _sfc_main$12 = {
|
||
__name: "videoProgress",
|
||
props: {
|
||
progress: {
|
||
type: [Number, String],
|
||
default: 0
|
||
},
|
||
item: {
|
||
type: Object
|
||
}
|
||
},
|
||
emits: ["change", "end"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
__expose();
|
||
const props = __props;
|
||
const emit = __emit;
|
||
const trigger = (0, import_vue3.ref)(false);
|
||
function onStart() {
|
||
}
|
||
function onMove(ev) {
|
||
}
|
||
function onEnd(ev) {
|
||
ev.changedTouches[0].screenX;
|
||
formatAppLog("log", "at components/index/videoProgress.vue:43", "item", props.item);
|
||
emit("end");
|
||
return;
|
||
}
|
||
const __returned__ = { props, emit, trigger, onStart, onMove, onEnd, ref: import_vue3.ref };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"view",
|
||
{
|
||
class: "durationBox",
|
||
onTouchstart: (0, import_vue3.withModifiers)($setup.onStart, ["stop"]),
|
||
onTouchmove: (0, import_vue3.withModifiers)($setup.onMove, ["stop"]),
|
||
onTouchend: (0, import_vue3.withModifiers)($setup.onEnd, ["stop"]),
|
||
renderWhole: true
|
||
},
|
||
[
|
||
(0, import_vue3.createElementVNode)("view", { class: "duration" }, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"view",
|
||
{
|
||
class: "line",
|
||
style: (0, import_vue3.normalizeStyle)({ width: $props.progress + "rpx" })
|
||
},
|
||
null,
|
||
4
|
||
/* STYLE */
|
||
)
|
||
])
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
);
|
||
}
|
||
var videoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$12], ["styles", [_style_0$12]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/components/index/videoProgress.vue"]]);
|
||
var _imports_02 = "/static/indexList.png";
|
||
var _imports_13 = "/static/indexSearch.png";
|
||
var _imports_22 = "/static/indexOclock.png";
|
||
var _style_02 = { "page": { "": { "backgroundColor": "#161616" } }, "top": { "": { "zIndex": 10 } }, "list": { ".tab ": { "marginTop": 0, "marginRight": "20rpx", "marginBottom": 0, "marginLeft": "20rpx" } }, "text": { ".tab .list.active ": { "color": "#ffffff" }, ".tab .list ": { "color": "rgba(255,255,255,0.7)" } }, "line": { ".tab .list.active ": { "opacity": 1 }, ".tab .list ": { "marginTop": 0, "marginRight": "10rpx", "marginBottom": 0, "marginLeft": "10rpx", "height": "5rpx", "backgroundColor": "#ffffff", "opacity": 0 } }, "oclockHint": { "": { "backgroundColor": "rgba(0,0,0,0.3)" } }, "image": { ".oclockHint ": { "marginTop": "300rpx", "width": "750rpx" } }, "disc": { "": { "marginRight": "20rpx" } }, "videoProgress": { "": { "position": "fixed", "left": 0, "right": 0, "bottom": "120rpx", "zIndex": 1 } } };
|
||
var _sfc_main2 = {
|
||
__name: "index",
|
||
setup(__props, { expose: __expose }) {
|
||
__expose();
|
||
const {
|
||
proxy
|
||
} = (0, import_vue3.getCurrentInstance)();
|
||
const dom22 = requireNativePlugin("dom");
|
||
const oclockWindow = (0, import_vue3.ref)(false);
|
||
const readSecond = (0, import_vue3.reactive)({
|
||
// 单个视频最大
|
||
max: 20,
|
||
// 累计
|
||
count: 0,
|
||
// 总数
|
||
total: 0,
|
||
// 总数最大
|
||
totalMax: 300,
|
||
// 定时器
|
||
timer: null
|
||
});
|
||
const tab = (0, import_vue3.reactive)([
|
||
// {
|
||
// name: '同城',
|
||
// },
|
||
{
|
||
name: "\u5173\u6CE8",
|
||
load: false,
|
||
listData: () => attList.data,
|
||
getList: () => getAttList(),
|
||
getMoreList: () => getMoreAttList(),
|
||
refreshList: () => refreshAttList()
|
||
},
|
||
{
|
||
name: "\u63A8\u8350",
|
||
load: false,
|
||
listData: () => recList.data,
|
||
getList: () => getRecList(),
|
||
getMoreList: () => getMoreRecList(),
|
||
refreshList: () => refreshRecList()
|
||
}
|
||
]);
|
||
const tabIndex = (0, import_vue3.ref)(1);
|
||
const startY = (0, import_vue3.ref)(0);
|
||
const currentLast = (0, import_vue3.reactive)([0, 0]);
|
||
const current = (0, import_vue3.reactive)([0, 0]);
|
||
const recList = (0, import_vue3.reactive)({
|
||
data: [],
|
||
pageNum: 1,
|
||
total: 0,
|
||
homePageSize: 7,
|
||
shopPageSize: 2,
|
||
otherPageSize: 1
|
||
});
|
||
const attList = (0, import_vue3.reactive)({
|
||
data: [],
|
||
pageSize: 10,
|
||
pageNum: 1,
|
||
total: 0,
|
||
timer: null
|
||
});
|
||
const viewHeight = (0, import_vue3.ref)(0);
|
||
const discOffsetTop = (0, import_vue3.ref)(0);
|
||
const footerMenuHeight = (0, import_vue3.ref)(0);
|
||
const userinfo = (0, import_vue3.computed)(() => {
|
||
let result = uni.$store.state.userinfo || {};
|
||
return result;
|
||
});
|
||
const tabCurrent = (0, import_vue3.computed)(() => {
|
||
let result = tab[tabIndex.value];
|
||
return result;
|
||
});
|
||
const currentVideoRef = (0, import_vue3.computed)(() => {
|
||
let result = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||
return result;
|
||
});
|
||
onLoad(() => {
|
||
const systemInfo = uni.getSystemInfoSync();
|
||
discOffsetTop.value = systemInfo.safeAreaInsets.top + 44 + 10;
|
||
if (!uni.getStorageSync("alarmAlt")) {
|
||
setTimeout(() => {
|
||
oclockWindow.value = true;
|
||
}, 1e3);
|
||
}
|
||
tabCurrent.value.getList();
|
||
util$1.isLogin().then((rs) => {
|
||
getTask();
|
||
});
|
||
uni.$on("login", () => {
|
||
tabCurrent.value.refreshList();
|
||
getTask();
|
||
});
|
||
uni.$on("logout", () => {
|
||
tabCurrent.value.refreshList();
|
||
});
|
||
uni.$on("updateVideo", (item) => {
|
||
if (!item && !item.videoId)
|
||
return;
|
||
const list = tabCurrent.value.listData();
|
||
const findIndex = list.findIndex((node) => node.videoId == item.videoId);
|
||
if (findIndex >= 0)
|
||
list.splice(findIndex, 1, __spreadValues(__spreadValues({}, tabCurrent.value.listData()[findIndex]), item));
|
||
});
|
||
uni.$on("focusUser", (param) => {
|
||
if (!param.userId)
|
||
return;
|
||
refreshAttList();
|
||
for (var index2 = 0; index2 < recList.data.length; i++) {
|
||
const item = recList.data[index2];
|
||
if (item.userId == param.userId) {
|
||
item.isAttention = param.result;
|
||
recList.data.splice(index2, 1, item);
|
||
}
|
||
}
|
||
});
|
||
});
|
||
onReady(() => {
|
||
dom22.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||
viewHeight.value = option.size.height;
|
||
});
|
||
});
|
||
onShow(() => {
|
||
uni.$emit("changeMine", "default");
|
||
});
|
||
onHide(() => {
|
||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause();
|
||
});
|
||
onUnload(() => {
|
||
uni.$off("login");
|
||
uni.$off("logout");
|
||
uni.$off("updateVideo");
|
||
uni.$off("focusUser");
|
||
});
|
||
function getTask() {
|
||
api.video.viewingTasks().then((rs) => {
|
||
if (rs.code == 200) {
|
||
const result = rs.data;
|
||
if (!result)
|
||
return;
|
||
if (result)
|
||
readSecond.total = Number(result.seconds) || 0;
|
||
return;
|
||
}
|
||
});
|
||
}
|
||
function readSecondAdd() {
|
||
clearInterval(readSecond.timer);
|
||
if (readSecond.total >= readSecond.totalMax)
|
||
return;
|
||
readSecond.timer = setInterval(() => {
|
||
if (readSecond.count > readSecond.max) {
|
||
readSecond.total += readSecond.count;
|
||
readSecond.count = 0;
|
||
if (readSecond.total >= readSecond.totalMax) {
|
||
return;
|
||
}
|
||
clearInterval(readSecond.timer);
|
||
} else
|
||
readSecond.count++;
|
||
}, 1e3);
|
||
}
|
||
function readSecondPause() {
|
||
clearInterval(readSecond.timer);
|
||
}
|
||
function refreshAttList() {
|
||
attList.pageNum = 1;
|
||
attList.total = 0;
|
||
getAttList();
|
||
}
|
||
function getMoreAttList() {
|
||
if (attList.total <= attList.data.length)
|
||
return;
|
||
attList.pageNum++;
|
||
getAttList();
|
||
}
|
||
function getAttList() {
|
||
api.video.followVideo({
|
||
query: {
|
||
pageSize: attList.pageSize,
|
||
pageNum: attList.pageNum
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
attList.data.push(...rs.rows.map((item) => {
|
||
item.format_videoUrl = util$1.format_url(item.videoUrl, "video");
|
||
item.format_header = util$1.format_url(item.header, "img");
|
||
return item;
|
||
}));
|
||
attList.total = rs.total;
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function refreshRecList() {
|
||
recList.pageNum = 1;
|
||
recList.total = 0;
|
||
getRecList();
|
||
}
|
||
function getMoreRecList() {
|
||
if (recList.total <= recList.data.length)
|
||
return;
|
||
recList.pageNum++;
|
||
getRecList();
|
||
}
|
||
function getRecList() {
|
||
Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then((rs) => {
|
||
const list = rs.reduce((last, now) => last.concat(now.rows), []).sort(() => Math.random() - 0.5);
|
||
recList.total = rs.reduce((last, now) => last + now.total, 0);
|
||
if (recList.pageNum == 1)
|
||
recList.data.length = 0;
|
||
recList.data.push(...list.map((item) => {
|
||
item.format_videoUrl = util$1.format_url(item.videoUrl, "video");
|
||
item.format_header = util$1.format_url(item.header, "img");
|
||
item.speed = 1;
|
||
return item;
|
||
}));
|
||
formatAppLog("log", "at pages/index/index.nvue:341", "result", recList.data, rs);
|
||
if (recList.total > 1 && recList.data.length <= 1)
|
||
getMoreRecList();
|
||
setTimeout(() => {
|
||
const pages = getCurrentPages();
|
||
if (pages[pages.length - 1].route == "pages/index/index") {
|
||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true;
|
||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play();
|
||
}
|
||
}, 50);
|
||
}).catch((rs) => {
|
||
formatAppLog("log", "at pages/index/index.nvue:355", "index catch", rs);
|
||
});
|
||
}
|
||
function getHomeVideo() {
|
||
return new Promise((resolve, reject) => {
|
||
api.video.homeVideo({
|
||
query: {
|
||
userId: userinfo.value.userId || "",
|
||
pageNum: recList.pageNum,
|
||
pageSize: recList.homePageSize
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
resolve(rs);
|
||
return;
|
||
}
|
||
reject(rs);
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function getShopVideo() {
|
||
return new Promise((resolve, reject) => {
|
||
api.video.businessHomeVideo({
|
||
query: {
|
||
userId: userinfo.value.userId || "",
|
||
pageNum: recList.pageNum,
|
||
pageSize: recList.shopPageSize
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
resolve(rs);
|
||
return;
|
||
}
|
||
reject(rs);
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function getOtherVideo() {
|
||
return new Promise((resolve, reject) => {
|
||
api.video.otherHomeVideo({
|
||
query: {
|
||
userId: userinfo.value.userId || "",
|
||
pageNum: recList.pageNum,
|
||
pageSize: recList.otherPageSize
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
resolve(rs);
|
||
return;
|
||
}
|
||
reject(rs);
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function scrollTo(target) {
|
||
const tab_index = tabIndex.value;
|
||
const element = proxy.$refs[`cellRef${tab_index}`][target];
|
||
const lastVideoRef = proxy.$refs[`videoRef${tab_index}`][currentLast[tab_index]];
|
||
dom22.scrollToElement(element, {
|
||
animated: true
|
||
});
|
||
if (current[tab_index] != currentLast[tab_index]) {
|
||
(0, import_vue3.nextTick)(() => {
|
||
lastVideoRef.playState.value = false;
|
||
lastVideoRef.pause();
|
||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].playState.value = true;
|
||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].play();
|
||
});
|
||
readSecondPause();
|
||
browseLog(lastVideoRef);
|
||
readSecond.total += readSecond.count;
|
||
if (readSecond.total < readSecond.totalMax)
|
||
readSecondAdd();
|
||
}
|
||
}
|
||
function onTouchstart(ev, index2) {
|
||
Object.assign(currentLast, current);
|
||
startY.value = ev.changedTouches[0].screenY;
|
||
}
|
||
function onTouchend(ev, index2) {
|
||
const endY = ev.changedTouches[0].screenY;
|
||
const list = tabCurrent.value.listData();
|
||
if (!list[0])
|
||
return;
|
||
if (endY - startY.value < -50) {
|
||
if (current[index2] < list.length - 1)
|
||
current[index2]++;
|
||
scrollTo(current[index2]);
|
||
} else if (endY - startY.value > 50) {
|
||
if (current[index2] > 0)
|
||
current[index2]--;
|
||
scrollTo(current[index2]);
|
||
} else if (endY - startY.value == 0)
|
||
;
|
||
else {
|
||
scrollTo(current[index2]);
|
||
}
|
||
}
|
||
function handle_tab(index2) {
|
||
if (tabIndex.value === index2)
|
||
return;
|
||
if (tab[index2].name == "\u5173\u6CE8" && !userinfo.value.userId) {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
return;
|
||
}
|
||
if (proxy.$refs[`videoRef${tabIndex.value}`]) {
|
||
const lastVideoRef = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||
lastVideoRef.pause();
|
||
readSecondPause();
|
||
browseLog(lastVideoRef);
|
||
readSecond.total += readSecond.count;
|
||
if (readSecond.total < readSecond.totalMax)
|
||
readSecondAdd();
|
||
}
|
||
tabIndex.value = index2;
|
||
if (tabCurrent.value.load && proxy.$refs[`videoRef${index2}`])
|
||
proxy.$refs[`videoRef${index2}`][current[index2]].play();
|
||
else
|
||
tabCurrent.value.getList();
|
||
tab[tabIndex.value].load = true;
|
||
}
|
||
function handleShowTime() {
|
||
proxy.$refs.timeRef.open();
|
||
}
|
||
function handleShowCommentAlt(item) {
|
||
proxy.$refs.commentRef.open(item);
|
||
currentVideoRef.value.pause();
|
||
}
|
||
function handleShowCollectAlt(item) {
|
||
proxy.$refs.collectRef.open(item);
|
||
}
|
||
function handleShowShareFirend(item) {
|
||
proxy.$refs.shareFirendRef.open(item);
|
||
}
|
||
function handleVideoOnPlay() {
|
||
if (proxy.$refs.discRef)
|
||
proxy.$refs.discRef.play();
|
||
if (readSecond.total < readSecond.totalMax)
|
||
readSecondAdd();
|
||
}
|
||
function handleVideoOnPause() {
|
||
if (proxy.$refs.discRef)
|
||
proxy.$refs.discRef.pause();
|
||
readSecondPause();
|
||
}
|
||
function browseLog(element) {
|
||
util$1.isLogin().then((rs) => {
|
||
if (readSecond.count == 0)
|
||
return;
|
||
api.video.browseLog({
|
||
query: {
|
||
videoId: element.item.videoId,
|
||
seconds: readSecond.count
|
||
}
|
||
}).then((rs2) => {
|
||
if (rs2.code != 200) {
|
||
formatAppLog("log", "at pages/index/index.nvue:602", "browseLog err", rs2);
|
||
}
|
||
});
|
||
});
|
||
}
|
||
function videoLike(param) {
|
||
const {
|
||
index: index2,
|
||
isLike
|
||
} = param;
|
||
const item = tabCurrent.value.listData()[index2];
|
||
let type = 1;
|
||
if (item.isLike == 0)
|
||
type = isLike;
|
||
api.video.videoLike({
|
||
query: {
|
||
// 0赞1取消赞 3私密赞
|
||
type,
|
||
// 视频id
|
||
videoId: item.videoId
|
||
}
|
||
}).then((rs) => {
|
||
if (rs.code == 200) {
|
||
item.isLike = {
|
||
0: 1,
|
||
1: 0,
|
||
3: 3
|
||
}[type];
|
||
type == 1 ? item.likes-- : item.likes++;
|
||
uni.$emit("updateVideo", item);
|
||
return;
|
||
}
|
||
util$1.alert({
|
||
content: rs.msg,
|
||
showCancel: false
|
||
});
|
||
});
|
||
}
|
||
function setAlarm() {
|
||
oclockWindow.value = false;
|
||
uni.setStorageSync("alarmAlt", true);
|
||
}
|
||
function showLeftMenu() {
|
||
util$1.isLogin().then((rs) => {
|
||
proxy.$refs.leftMenuRef.open();
|
||
}).catch(() => {
|
||
uni.navigateTo({
|
||
url: "/pages/login/loginPhone"
|
||
});
|
||
});
|
||
}
|
||
function handleSpeed(item) {
|
||
const speed = item.value;
|
||
const tab_index = tabIndex.value;
|
||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].videoCtx().playbackRate(speed);
|
||
tabCurrent.value.listData()[current[tab_index]].speed = speed;
|
||
}
|
||
function onProgressEnd(ev) {
|
||
}
|
||
const __returned__ = { proxy, dom: dom22, oclockWindow, readSecond, tab, tabIndex, startY, currentLast, current, recList, attList, viewHeight, discOffsetTop, footerMenuHeight, userinfo, tabCurrent, currentVideoRef, getTask, readSecondAdd, readSecondPause, refreshAttList, getMoreAttList, getAttList, refreshRecList, getMoreRecList, getRecList, getHomeVideo, getShopVideo, getOtherVideo, scrollTo, onTouchstart, onTouchend, handle_tab, handleShowTime, handleShowCommentAlt, handleShowCollectAlt, handleShowShareFirend, handleVideoOnPlay, handleVideoOnPause, browseLog, videoLike, setAlarm, showLeftMenu, handleSpeed, onProgressEnd, ref: import_vue3.ref, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, computed: import_vue3.computed, nextTick: import_vue3.nextTick, get onLoad() {
|
||
return onLoad;
|
||
}, get onReady() {
|
||
return onReady;
|
||
}, get onHide() {
|
||
return onHide;
|
||
}, get onShow() {
|
||
return onShow;
|
||
}, get onUnload() {
|
||
return onUnload;
|
||
}, get util() {
|
||
return util$1;
|
||
}, get api() {
|
||
return api;
|
||
}, statusBar, indexVideo, footerMneu: __easycom_02, timeAlt, commentAlt, collectAlt, shareFirendAlt, leftMenuAlt, disc, moreMenu, get videoProgress() {
|
||
return videoProgress;
|
||
} };
|
||
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
||
return __returned__;
|
||
}
|
||
};
|
||
function _sfc_render2(_ctx, _cache, $props, $setup, $data, $options) {
|
||
const _component_navigator = (0, import_vue3.resolveComponent)("navigator");
|
||
const _component_footerMenu = resolveEasycom((0, import_vue3.resolveDynamicComponent)("footerMenu"), __easycom_02);
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", null, [
|
||
(0, import_vue3.createCommentVNode)(" \u9875\u9762\u5185\u5BB9 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "page pr f1" }, [
|
||
(0, import_vue3.createCommentVNode)(" \u9876\u90E8\u5185\u5BB9 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "top pf t0 l0 r0" }, [
|
||
(0, import_vue3.createVNode)($setup["statusBar"]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "menu head fdr jcsa aic plr40" }, [
|
||
(0, import_vue3.createElementVNode)("view", {
|
||
class: "sider",
|
||
onClick: $setup.showLeftMenu
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh40",
|
||
src: _imports_02,
|
||
mode: "aspectFit"
|
||
})
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "f1" }, [
|
||
((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
class: "tab fdr jcc",
|
||
key: $setup.tabIndex
|
||
}, [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.tab, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)("view", {
|
||
class: (0, import_vue3.normalizeClass)(["list", [{ "active": index2 === $setup.tabIndex }]]),
|
||
key: index2,
|
||
onClick: (0, import_vue3.withModifiers)(($event) => $setup.handle_tab(index2), ["stop"])
|
||
}, [
|
||
(0, import_vue3.createElementVNode)("view", { class: "txt" }, [
|
||
(0, import_vue3.createElementVNode)(
|
||
"u-text",
|
||
{ class: "text" },
|
||
(0, import_vue3.toDisplayString)(item.name),
|
||
1
|
||
/* TEXT */
|
||
)
|
||
]),
|
||
(0, import_vue3.createElementVNode)("view", { class: "line" })
|
||
], 10, ["onClick"]);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
]))
|
||
]),
|
||
(0, import_vue3.createVNode)(_component_navigator, {
|
||
url: "/pages/index/search",
|
||
class: "search"
|
||
}, {
|
||
default: (0, import_vue3.withCtx)(() => [
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "wh65",
|
||
src: _imports_13,
|
||
mode: "aspectFit"
|
||
})
|
||
]),
|
||
_: 1
|
||
/* STABLE */
|
||
})
|
||
])
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u6709\u6548\u8BFB\u79D2\u5531\u7247 "),
|
||
$setup.userinfo.userId ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "disc pf r0",
|
||
style: (0, import_vue3.normalizeStyle)({ top: $setup.discOffsetTop + "px" })
|
||
},
|
||
[
|
||
(0, import_vue3.createVNode)(
|
||
$setup["disc"],
|
||
{ ref: "discRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
],
|
||
4
|
||
/* STYLE */
|
||
)) : (0, import_vue3.createCommentVNode)("v-if", true),
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)($setup.tab, (item, index2) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
{ key: index2 },
|
||
[
|
||
$setup.tabIndex == index2 ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"view",
|
||
{
|
||
key: 0,
|
||
class: "f1",
|
||
ref_for: true,
|
||
ref: "containerRef"
|
||
},
|
||
[
|
||
(0, import_vue3.createCommentVNode)(" \u4E3B\u8981\u5185\u5BB9\u533A\u57DF "),
|
||
(0, import_vue3.createElementVNode)("list", {
|
||
class: "container f1",
|
||
showScrollbar: false,
|
||
onTouchstart: ($event) => $setup.onTouchstart($event, index2),
|
||
onTouchend: ($event) => $setup.onTouchend($event, index2),
|
||
onLoadmore: item.getMoreList
|
||
}, [
|
||
((0, import_vue3.openBlock)(true), (0, import_vue3.createElementBlock)(
|
||
import_vue3.Fragment,
|
||
null,
|
||
(0, import_vue3.renderList)(item.listData(), (secItem, secIndex) => {
|
||
return (0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"cell",
|
||
{
|
||
class: "cell",
|
||
style: (0, import_vue3.normalizeStyle)([{ height: $setup.viewHeight + "px" }]),
|
||
ref_for: true,
|
||
ref: `cellRef` + index2,
|
||
key: secIndex,
|
||
onClick: _cache[0] || (_cache[0] = (0, import_vue3.withModifiers)(() => {
|
||
}, ["stop"]))
|
||
},
|
||
[
|
||
(0, import_vue3.createCommentVNode)(" \u89C6\u9891 "),
|
||
(0, import_vue3.createVNode)($setup["indexVideo"], {
|
||
ref_for: true,
|
||
ref: "videoRef" + index2,
|
||
tabIndex: index2,
|
||
current: $setup.current[index2],
|
||
item: secItem,
|
||
index: secIndex,
|
||
onShowTime: $setup.handleShowTime,
|
||
onShowComment: $setup.handleShowCommentAlt,
|
||
onShowCollect: $setup.handleShowCollectAlt,
|
||
onShowShareFirend: $setup.handleShowShareFirend,
|
||
onOnPlay: $setup.handleVideoOnPlay,
|
||
onOnPause: $setup.handleVideoOnPause,
|
||
onLike: $setup.videoLike,
|
||
onLongtap: ($event) => _ctx.$refs.moreMenuRef.open(secItem)
|
||
}, null, 8, ["tabIndex", "current", "item", "index", "onLongtap"])
|
||
],
|
||
4
|
||
/* STYLE */
|
||
);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
))
|
||
], 40, ["onTouchstart", "onTouchend", "onLoadmore"]),
|
||
(0, import_vue3.createCommentVNode)(` :style="{bottom: footerMenuHeight+'px'}" `),
|
||
(0, import_vue3.createCommentVNode)(" \u89C6\u9891\u8FDB\u5EA6\u6761 "),
|
||
(0, import_vue3.createElementVNode)("view", { class: "videoProgress" }, [
|
||
(0, import_vue3.createVNode)($setup["videoProgress"], {
|
||
item: item.listData()[$setup.current[$setup.tabIndex]],
|
||
onEnd: $setup.onProgressEnd
|
||
}, null, 8, ["item"])
|
||
])
|
||
],
|
||
512
|
||
/* NEED_PATCH */
|
||
)) : (0, import_vue3.createCommentVNode)("v-if", true)
|
||
],
|
||
64
|
||
/* STABLE_FRAGMENT */
|
||
);
|
||
}),
|
||
128
|
||
/* KEYED_FRAGMENT */
|
||
)),
|
||
(0, import_vue3.createCommentVNode)(" \u8BA1\u65F6\u63D0\u793A "),
|
||
$setup.oclockWindow ? ((0, import_vue3.openBlock)(), (0, import_vue3.createElementBlock)(
|
||
"view",
|
||
{
|
||
key: 1,
|
||
class: "oclockHint pa pfull fmid",
|
||
onTouchstart: _cache[1] || (_cache[1] = (0, import_vue3.withModifiers)(() => {
|
||
}, ["stop"])),
|
||
onClick: (0, import_vue3.withModifiers)($setup.setAlarm, ["stop"])
|
||
},
|
||
[
|
||
(0, import_vue3.createElementVNode)("u-image", {
|
||
class: "image",
|
||
src: _imports_22,
|
||
mode: "widthFix"
|
||
})
|
||
],
|
||
32
|
||
/* NEED_HYDRATION */
|
||
)) : (0, import_vue3.createCommentVNode)("v-if", true),
|
||
(0, import_vue3.createCommentVNode)(" \u5E95\u90E8\u5BFC\u822A "),
|
||
(0, import_vue3.createVNode)(
|
||
_component_footerMenu,
|
||
{
|
||
ref: "footerMenuRef",
|
||
page: "index",
|
||
subject: "dark"
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
]),
|
||
(0, import_vue3.createCommentVNode)(" \u957F\u6309\u83DC\u5355 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["moreMenu"],
|
||
{
|
||
ref: "moreMenuRef",
|
||
onChangeSpeed: $setup.handleSpeed
|
||
},
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u95F9\u949F\u5F39\u7A97 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["timeAlt"],
|
||
{ ref: "timeRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u8BC4\u8BBA\u5F39\u7A97 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["commentAlt"],
|
||
{ ref: "commentRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u6536\u85CF\u5F39\u7A97 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["collectAlt"],
|
||
{ ref: "collectRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u5206\u4EAB\u5230\u597D\u53CB\u5F39\u7A97 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["shareFirendAlt"],
|
||
{ ref: "shareFirendRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
),
|
||
(0, import_vue3.createCommentVNode)(" \u5DE6\u4FA7\u83DC\u5355\u5F39\u7A97 "),
|
||
(0, import_vue3.createVNode)(
|
||
$setup["leftMenuAlt"],
|
||
{ ref: "leftMenuRef" },
|
||
null,
|
||
512
|
||
/* NEED_PATCH */
|
||
)
|
||
]);
|
||
}
|
||
var index = /* @__PURE__ */ _export_sfc(_sfc_main2, [["render", _sfc_render2], ["styles", [_style_02]], ["__file", "D:/document/\u4E5D\u4EBF\u5546\u57CE/jy/jiuyi2/pages/index/index.nvue"]]);
|
||
|
||
// <stdin>
|
||
var webview = plus.webview.currentWebview();
|
||
if (webview) {
|
||
const __pageId = parseInt(webview.id);
|
||
const __pagePath = "pages/index/index";
|
||
let __pageQuery = {};
|
||
try {
|
||
__pageQuery = JSON.parse(webview.__query__);
|
||
} catch (e) {
|
||
}
|
||
index.mpType = "page";
|
||
const app = Vue.createPageApp(index, { $store: getApp({ allowDefault: true }).$store, __pageId, __pagePath, __pageQuery });
|
||
app.provide("__globalStyles", Vue.useCssStyles([...__uniConfig.styles, ...index.styles || []]));
|
||
app.mount("#root");
|
||
}
|
||
})();
|
||
/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/
|