gt-sanity 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +341 -3946
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +343 -3947
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -18
- package/src/actions/translateAction.tsx +24 -0
- package/src/components/TranslateButton.tsx +29 -0
- package/src/components/TranslationsProvider.tsx +35 -29
- package/src/components/tab/TranslationView.tsx +135 -87
- package/src/index.ts +15 -0
- package/src/serialization/BaseSerializationConfig.ts +1 -1
- package/src/utils/serialize.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,11 +8,12 @@ import { libraryDefaultLocale } from "generaltranslation/internal";
|
|
|
8
8
|
import { htmlToBlocks } from "@portabletext/block-tools";
|
|
9
9
|
import { Schema } from "@sanity/schema";
|
|
10
10
|
import { toHTML } from "@portabletext/to-html";
|
|
11
|
+
import merge from "lodash.merge";
|
|
11
12
|
import { extractWithPath, arrayToJSONMatchPath } from "@sanity/mutator";
|
|
12
13
|
import { JSONPath } from "jsonpath-plus";
|
|
13
14
|
import JSONPointer from "jsonpointer";
|
|
14
|
-
import { CheckmarkCircleIcon, DownloadIcon, LinkIcon, PublishIcon } from "@sanity/icons";
|
|
15
|
-
import { Link, route } from "sanity/router";
|
|
15
|
+
import { CheckmarkCircleIcon, DownloadIcon, LinkIcon, PublishIcon, TranslateIcon } from "@sanity/icons";
|
|
16
|
+
import { useRouter, Link, route } from "sanity/router";
|
|
16
17
|
const useClient = () => useClient$1({ apiVersion: "2025-09-15" });
|
|
17
18
|
function useSecrets(id) {
|
|
18
19
|
const [loading, setLoading] = useState(!0), [secrets, setSecrets] = useState(null), client = useClient();
|
|
@@ -595,3682 +596,8 @@ const deserializeArray = (arrayHTML, deserializers = customDeserializers, blockD
|
|
|
595
596
|
deserializeDocument: deserializeDocument$1,
|
|
596
597
|
deserializeHTML
|
|
597
598
|
};
|
|
598
|
-
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, lodash$1 = { exports: {} };
|
|
599
|
-
/**
|
|
600
|
-
* @license
|
|
601
|
-
* Lodash <https://lodash.com/>
|
|
602
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
603
|
-
* Released under MIT license <https://lodash.com/license>
|
|
604
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
605
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
606
|
-
*/
|
|
607
|
-
var lodash = lodash$1.exports, hasRequiredLodash;
|
|
608
|
-
function requireLodash() {
|
|
609
|
-
return hasRequiredLodash || (hasRequiredLodash = 1, (function(module, exports) {
|
|
610
|
-
(function() {
|
|
611
|
-
var undefined$1, VERSION = "4.17.21", LARGE_ARRAY_SIZE = 200, 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`", HASH_UNDEFINED = "__lodash_hash_undefined__", MAX_MEMOIZE_SIZE = 500, PLACEHOLDER = "__lodash_placeholder__", CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4, COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2, 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, DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...", HOT_COUNT = 800, HOT_SPAN = 16, LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3, INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = NaN, MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1, wrapFlags = [
|
|
612
|
-
["ary", WRAP_ARY_FLAG],
|
|
613
|
-
["bind", WRAP_BIND_FLAG],
|
|
614
|
-
["bindKey", WRAP_BIND_KEY_FLAG],
|
|
615
|
-
["curry", WRAP_CURRY_FLAG],
|
|
616
|
-
["curryRight", WRAP_CURRY_RIGHT_FLAG],
|
|
617
|
-
["flip", WRAP_FLIP_FLAG],
|
|
618
|
-
["partial", WRAP_PARTIAL_FLAG],
|
|
619
|
-
["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
|
|
620
|
-
["rearg", WRAP_REARG_FLAG]
|
|
621
|
-
], 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]", 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]", reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g, reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source), reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g, reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source), reTrimStart = /^\s+/, reWhitespace = /\s/, reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /, reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/, reEscapeChar = /\\(\\)?/g, reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, reFlags = /\w*$/, reIsBadHex = /^[-+]0x[0-9a-f]+$/i, reIsBinary = /^0b[01]+$/i, reIsHostCtor = /^\[object .+?Constructor\]$/, reIsOctal = /^0o[0-7]+$/i, reIsUint = /^(?:0|[1-9]\d*)$/, reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, reNoMatch = /($^)/, reUnescapedString = /['\n\r\u2028\u2029\\]/g, 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, 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", 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("|") + ")", reApos = RegExp(rsApos, "g"), reComboMark = RegExp(rsCombo, "g"), reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"), reUnicodeWord = RegExp([
|
|
622
|
-
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
|
|
623
|
-
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
|
|
624
|
-
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
|
|
625
|
-
rsUpper + "+" + rsOptContrUpper,
|
|
626
|
-
rsOrdUpper,
|
|
627
|
-
rsOrdLower,
|
|
628
|
-
rsDigits,
|
|
629
|
-
rsEmoji
|
|
630
|
-
].join("|"), "g"), reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"), reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, contextProps = [
|
|
631
|
-
"Array",
|
|
632
|
-
"Buffer",
|
|
633
|
-
"DataView",
|
|
634
|
-
"Date",
|
|
635
|
-
"Error",
|
|
636
|
-
"Float32Array",
|
|
637
|
-
"Float64Array",
|
|
638
|
-
"Function",
|
|
639
|
-
"Int8Array",
|
|
640
|
-
"Int16Array",
|
|
641
|
-
"Int32Array",
|
|
642
|
-
"Map",
|
|
643
|
-
"Math",
|
|
644
|
-
"Object",
|
|
645
|
-
"Promise",
|
|
646
|
-
"RegExp",
|
|
647
|
-
"Set",
|
|
648
|
-
"String",
|
|
649
|
-
"Symbol",
|
|
650
|
-
"TypeError",
|
|
651
|
-
"Uint8Array",
|
|
652
|
-
"Uint8ClampedArray",
|
|
653
|
-
"Uint16Array",
|
|
654
|
-
"Uint32Array",
|
|
655
|
-
"WeakMap",
|
|
656
|
-
"_",
|
|
657
|
-
"clearTimeout",
|
|
658
|
-
"isFinite",
|
|
659
|
-
"parseInt",
|
|
660
|
-
"setTimeout"
|
|
661
|
-
], templateCounter = -1, typedArrayTags = {};
|
|
662
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0, 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] = !1;
|
|
663
|
-
var cloneableTags = {};
|
|
664
|
-
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] = !0, cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1;
|
|
665
|
-
var deburredLetters = {
|
|
666
|
-
// Latin-1 Supplement block.
|
|
667
|
-
\u00C0: "A",
|
|
668
|
-
\u00C1: "A",
|
|
669
|
-
\u00C2: "A",
|
|
670
|
-
\u00C3: "A",
|
|
671
|
-
\u00C4: "A",
|
|
672
|
-
\u00C5: "A",
|
|
673
|
-
\u00E0: "a",
|
|
674
|
-
\u00E1: "a",
|
|
675
|
-
\u00E2: "a",
|
|
676
|
-
\u00E3: "a",
|
|
677
|
-
\u00E4: "a",
|
|
678
|
-
\u00E5: "a",
|
|
679
|
-
\u00C7: "C",
|
|
680
|
-
\u00E7: "c",
|
|
681
|
-
\u00D0: "D",
|
|
682
|
-
\u00F0: "d",
|
|
683
|
-
\u00C8: "E",
|
|
684
|
-
\u00C9: "E",
|
|
685
|
-
\u00CA: "E",
|
|
686
|
-
\u00CB: "E",
|
|
687
|
-
\u00E8: "e",
|
|
688
|
-
\u00E9: "e",
|
|
689
|
-
\u00EA: "e",
|
|
690
|
-
\u00EB: "e",
|
|
691
|
-
\u00CC: "I",
|
|
692
|
-
\u00CD: "I",
|
|
693
|
-
\u00CE: "I",
|
|
694
|
-
\u00CF: "I",
|
|
695
|
-
\u00EC: "i",
|
|
696
|
-
\u00ED: "i",
|
|
697
|
-
\u00EE: "i",
|
|
698
|
-
\u00EF: "i",
|
|
699
|
-
\u00D1: "N",
|
|
700
|
-
\u00F1: "n",
|
|
701
|
-
\u00D2: "O",
|
|
702
|
-
\u00D3: "O",
|
|
703
|
-
\u00D4: "O",
|
|
704
|
-
\u00D5: "O",
|
|
705
|
-
\u00D6: "O",
|
|
706
|
-
\u00D8: "O",
|
|
707
|
-
\u00F2: "o",
|
|
708
|
-
\u00F3: "o",
|
|
709
|
-
\u00F4: "o",
|
|
710
|
-
\u00F5: "o",
|
|
711
|
-
\u00F6: "o",
|
|
712
|
-
\u00F8: "o",
|
|
713
|
-
\u00D9: "U",
|
|
714
|
-
\u00DA: "U",
|
|
715
|
-
\u00DB: "U",
|
|
716
|
-
\u00DC: "U",
|
|
717
|
-
\u00F9: "u",
|
|
718
|
-
\u00FA: "u",
|
|
719
|
-
\u00FB: "u",
|
|
720
|
-
\u00FC: "u",
|
|
721
|
-
\u00DD: "Y",
|
|
722
|
-
\u00FD: "y",
|
|
723
|
-
\u00FF: "y",
|
|
724
|
-
\u00C6: "Ae",
|
|
725
|
-
\u00E6: "ae",
|
|
726
|
-
\u00DE: "Th",
|
|
727
|
-
\u00FE: "th",
|
|
728
|
-
\u00DF: "ss",
|
|
729
|
-
// Latin Extended-A block.
|
|
730
|
-
\u0100: "A",
|
|
731
|
-
\u0102: "A",
|
|
732
|
-
\u0104: "A",
|
|
733
|
-
\u0101: "a",
|
|
734
|
-
\u0103: "a",
|
|
735
|
-
\u0105: "a",
|
|
736
|
-
\u0106: "C",
|
|
737
|
-
\u0108: "C",
|
|
738
|
-
\u010A: "C",
|
|
739
|
-
\u010C: "C",
|
|
740
|
-
\u0107: "c",
|
|
741
|
-
\u0109: "c",
|
|
742
|
-
\u010B: "c",
|
|
743
|
-
\u010D: "c",
|
|
744
|
-
\u010E: "D",
|
|
745
|
-
\u0110: "D",
|
|
746
|
-
\u010F: "d",
|
|
747
|
-
\u0111: "d",
|
|
748
|
-
\u0112: "E",
|
|
749
|
-
\u0114: "E",
|
|
750
|
-
\u0116: "E",
|
|
751
|
-
\u0118: "E",
|
|
752
|
-
\u011A: "E",
|
|
753
|
-
\u0113: "e",
|
|
754
|
-
\u0115: "e",
|
|
755
|
-
\u0117: "e",
|
|
756
|
-
\u0119: "e",
|
|
757
|
-
\u011B: "e",
|
|
758
|
-
\u011C: "G",
|
|
759
|
-
\u011E: "G",
|
|
760
|
-
\u0120: "G",
|
|
761
|
-
\u0122: "G",
|
|
762
|
-
\u011D: "g",
|
|
763
|
-
\u011F: "g",
|
|
764
|
-
\u0121: "g",
|
|
765
|
-
\u0123: "g",
|
|
766
|
-
\u0124: "H",
|
|
767
|
-
\u0126: "H",
|
|
768
|
-
\u0125: "h",
|
|
769
|
-
\u0127: "h",
|
|
770
|
-
\u0128: "I",
|
|
771
|
-
\u012A: "I",
|
|
772
|
-
\u012C: "I",
|
|
773
|
-
\u012E: "I",
|
|
774
|
-
\u0130: "I",
|
|
775
|
-
\u0129: "i",
|
|
776
|
-
\u012B: "i",
|
|
777
|
-
\u012D: "i",
|
|
778
|
-
\u012F: "i",
|
|
779
|
-
\u0131: "i",
|
|
780
|
-
\u0134: "J",
|
|
781
|
-
\u0135: "j",
|
|
782
|
-
\u0136: "K",
|
|
783
|
-
\u0137: "k",
|
|
784
|
-
\u0138: "k",
|
|
785
|
-
\u0139: "L",
|
|
786
|
-
\u013B: "L",
|
|
787
|
-
\u013D: "L",
|
|
788
|
-
\u013F: "L",
|
|
789
|
-
\u0141: "L",
|
|
790
|
-
\u013A: "l",
|
|
791
|
-
\u013C: "l",
|
|
792
|
-
\u013E: "l",
|
|
793
|
-
\u0140: "l",
|
|
794
|
-
\u0142: "l",
|
|
795
|
-
\u0143: "N",
|
|
796
|
-
\u0145: "N",
|
|
797
|
-
\u0147: "N",
|
|
798
|
-
\u014A: "N",
|
|
799
|
-
\u0144: "n",
|
|
800
|
-
\u0146: "n",
|
|
801
|
-
\u0148: "n",
|
|
802
|
-
\u014B: "n",
|
|
803
|
-
\u014C: "O",
|
|
804
|
-
\u014E: "O",
|
|
805
|
-
\u0150: "O",
|
|
806
|
-
\u014D: "o",
|
|
807
|
-
\u014F: "o",
|
|
808
|
-
\u0151: "o",
|
|
809
|
-
\u0154: "R",
|
|
810
|
-
\u0156: "R",
|
|
811
|
-
\u0158: "R",
|
|
812
|
-
\u0155: "r",
|
|
813
|
-
\u0157: "r",
|
|
814
|
-
\u0159: "r",
|
|
815
|
-
\u015A: "S",
|
|
816
|
-
\u015C: "S",
|
|
817
|
-
\u015E: "S",
|
|
818
|
-
\u0160: "S",
|
|
819
|
-
\u015B: "s",
|
|
820
|
-
\u015D: "s",
|
|
821
|
-
\u015F: "s",
|
|
822
|
-
\u0161: "s",
|
|
823
|
-
\u0162: "T",
|
|
824
|
-
\u0164: "T",
|
|
825
|
-
\u0166: "T",
|
|
826
|
-
\u0163: "t",
|
|
827
|
-
\u0165: "t",
|
|
828
|
-
\u0167: "t",
|
|
829
|
-
\u0168: "U",
|
|
830
|
-
\u016A: "U",
|
|
831
|
-
\u016C: "U",
|
|
832
|
-
\u016E: "U",
|
|
833
|
-
\u0170: "U",
|
|
834
|
-
\u0172: "U",
|
|
835
|
-
\u0169: "u",
|
|
836
|
-
\u016B: "u",
|
|
837
|
-
\u016D: "u",
|
|
838
|
-
\u016F: "u",
|
|
839
|
-
\u0171: "u",
|
|
840
|
-
\u0173: "u",
|
|
841
|
-
\u0174: "W",
|
|
842
|
-
\u0175: "w",
|
|
843
|
-
\u0176: "Y",
|
|
844
|
-
\u0177: "y",
|
|
845
|
-
\u0178: "Y",
|
|
846
|
-
\u0179: "Z",
|
|
847
|
-
\u017B: "Z",
|
|
848
|
-
\u017D: "Z",
|
|
849
|
-
\u017A: "z",
|
|
850
|
-
\u017C: "z",
|
|
851
|
-
\u017E: "z",
|
|
852
|
-
\u0132: "IJ",
|
|
853
|
-
\u0133: "ij",
|
|
854
|
-
\u0152: "Oe",
|
|
855
|
-
\u0153: "oe",
|
|
856
|
-
\u0149: "'n",
|
|
857
|
-
\u017F: "s"
|
|
858
|
-
}, htmlEscapes = {
|
|
859
|
-
"&": "&",
|
|
860
|
-
"<": "<",
|
|
861
|
-
">": ">",
|
|
862
|
-
'"': """,
|
|
863
|
-
"'": "'"
|
|
864
|
-
}, htmlUnescapes = {
|
|
865
|
-
"&": "&",
|
|
866
|
-
"<": "<",
|
|
867
|
-
">": ">",
|
|
868
|
-
""": '"',
|
|
869
|
-
"'": "'"
|
|
870
|
-
}, stringEscapes = {
|
|
871
|
-
"\\": "\\",
|
|
872
|
-
"'": "'",
|
|
873
|
-
"\n": "n",
|
|
874
|
-
"\r": "r",
|
|
875
|
-
"\u2028": "u2028",
|
|
876
|
-
"\u2029": "u2029"
|
|
877
|
-
}, freeParseFloat = parseFloat, freeParseInt = parseInt, freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal, freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function("return this")(), freeExports = exports && !exports.nodeType && exports, freeModule = freeExports && !0 && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, freeProcess = moduleExports && freeGlobal.process, nodeUtil = (function() {
|
|
878
|
-
try {
|
|
879
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
880
|
-
return types || freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
881
|
-
} catch {
|
|
882
|
-
}
|
|
883
|
-
})(), nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
884
|
-
function apply(func, thisArg, args) {
|
|
885
|
-
switch (args.length) {
|
|
886
|
-
case 0:
|
|
887
|
-
return func.call(thisArg);
|
|
888
|
-
case 1:
|
|
889
|
-
return func.call(thisArg, args[0]);
|
|
890
|
-
case 2:
|
|
891
|
-
return func.call(thisArg, args[0], args[1]);
|
|
892
|
-
case 3:
|
|
893
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
894
|
-
}
|
|
895
|
-
return func.apply(thisArg, args);
|
|
896
|
-
}
|
|
897
|
-
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
898
|
-
for (var index = -1, length2 = array == null ? 0 : array.length; ++index < length2; ) {
|
|
899
|
-
var value = array[index];
|
|
900
|
-
setter(accumulator, value, iteratee(value), array);
|
|
901
|
-
}
|
|
902
|
-
return accumulator;
|
|
903
|
-
}
|
|
904
|
-
function arrayEach(array, iteratee) {
|
|
905
|
-
for (var index = -1, length2 = array == null ? 0 : array.length; ++index < length2 && iteratee(array[index], index, array) !== !1; )
|
|
906
|
-
;
|
|
907
|
-
return array;
|
|
908
|
-
}
|
|
909
|
-
function arrayEachRight(array, iteratee) {
|
|
910
|
-
for (var length2 = array == null ? 0 : array.length; length2-- && iteratee(array[length2], length2, array) !== !1; )
|
|
911
|
-
;
|
|
912
|
-
return array;
|
|
913
|
-
}
|
|
914
|
-
function arrayEvery(array, predicate) {
|
|
915
|
-
for (var index = -1, length2 = array == null ? 0 : array.length; ++index < length2; )
|
|
916
|
-
if (!predicate(array[index], index, array))
|
|
917
|
-
return !1;
|
|
918
|
-
return !0;
|
|
919
|
-
}
|
|
920
|
-
function arrayFilter(array, predicate) {
|
|
921
|
-
for (var index = -1, length2 = array == null ? 0 : array.length, resIndex = 0, result = []; ++index < length2; ) {
|
|
922
|
-
var value = array[index];
|
|
923
|
-
predicate(value, index, array) && (result[resIndex++] = value);
|
|
924
|
-
}
|
|
925
|
-
return result;
|
|
926
|
-
}
|
|
927
|
-
function arrayIncludes(array, value) {
|
|
928
|
-
var length2 = array == null ? 0 : array.length;
|
|
929
|
-
return !!length2 && baseIndexOf(array, value, 0) > -1;
|
|
930
|
-
}
|
|
931
|
-
function arrayIncludesWith(array, value, comparator) {
|
|
932
|
-
for (var index = -1, length2 = array == null ? 0 : array.length; ++index < length2; )
|
|
933
|
-
if (comparator(value, array[index]))
|
|
934
|
-
return !0;
|
|
935
|
-
return !1;
|
|
936
|
-
}
|
|
937
|
-
function arrayMap(array, iteratee) {
|
|
938
|
-
for (var index = -1, length2 = array == null ? 0 : array.length, result = Array(length2); ++index < length2; )
|
|
939
|
-
result[index] = iteratee(array[index], index, array);
|
|
940
|
-
return result;
|
|
941
|
-
}
|
|
942
|
-
function arrayPush(array, values) {
|
|
943
|
-
for (var index = -1, length2 = values.length, offset = array.length; ++index < length2; )
|
|
944
|
-
array[offset + index] = values[index];
|
|
945
|
-
return array;
|
|
946
|
-
}
|
|
947
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
948
|
-
var index = -1, length2 = array == null ? 0 : array.length;
|
|
949
|
-
for (initAccum && length2 && (accumulator = array[++index]); ++index < length2; )
|
|
950
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
951
|
-
return accumulator;
|
|
952
|
-
}
|
|
953
|
-
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
|
954
|
-
var length2 = array == null ? 0 : array.length;
|
|
955
|
-
for (initAccum && length2 && (accumulator = array[--length2]); length2--; )
|
|
956
|
-
accumulator = iteratee(accumulator, array[length2], length2, array);
|
|
957
|
-
return accumulator;
|
|
958
|
-
}
|
|
959
|
-
function arraySome(array, predicate) {
|
|
960
|
-
for (var index = -1, length2 = array == null ? 0 : array.length; ++index < length2; )
|
|
961
|
-
if (predicate(array[index], index, array))
|
|
962
|
-
return !0;
|
|
963
|
-
return !1;
|
|
964
|
-
}
|
|
965
|
-
var asciiSize = baseProperty("length");
|
|
966
|
-
function asciiToArray(string) {
|
|
967
|
-
return string.split("");
|
|
968
|
-
}
|
|
969
|
-
function asciiWords(string) {
|
|
970
|
-
return string.match(reAsciiWord) || [];
|
|
971
|
-
}
|
|
972
|
-
function baseFindKey(collection, predicate, eachFunc) {
|
|
973
|
-
var result;
|
|
974
|
-
return eachFunc(collection, function(value, key, collection2) {
|
|
975
|
-
if (predicate(value, key, collection2))
|
|
976
|
-
return result = key, !1;
|
|
977
|
-
}), result;
|
|
978
|
-
}
|
|
979
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
980
|
-
for (var length2 = array.length, index = fromIndex + (fromRight ? 1 : -1); fromRight ? index-- : ++index < length2; )
|
|
981
|
-
if (predicate(array[index], index, array))
|
|
982
|
-
return index;
|
|
983
|
-
return -1;
|
|
984
|
-
}
|
|
985
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
986
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
987
|
-
}
|
|
988
|
-
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
989
|
-
for (var index = fromIndex - 1, length2 = array.length; ++index < length2; )
|
|
990
|
-
if (comparator(array[index], value))
|
|
991
|
-
return index;
|
|
992
|
-
return -1;
|
|
993
|
-
}
|
|
994
|
-
function baseIsNaN(value) {
|
|
995
|
-
return value !== value;
|
|
996
|
-
}
|
|
997
|
-
function baseMean(array, iteratee) {
|
|
998
|
-
var length2 = array == null ? 0 : array.length;
|
|
999
|
-
return length2 ? baseSum(array, iteratee) / length2 : NAN;
|
|
1000
|
-
}
|
|
1001
|
-
function baseProperty(key) {
|
|
1002
|
-
return function(object) {
|
|
1003
|
-
return object == null ? undefined$1 : object[key];
|
|
1004
|
-
};
|
|
1005
|
-
}
|
|
1006
|
-
function basePropertyOf(object) {
|
|
1007
|
-
return function(key) {
|
|
1008
|
-
return object == null ? undefined$1 : object[key];
|
|
1009
|
-
};
|
|
1010
|
-
}
|
|
1011
|
-
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
1012
|
-
return eachFunc(collection, function(value, index, collection2) {
|
|
1013
|
-
accumulator = initAccum ? (initAccum = !1, value) : iteratee(accumulator, value, index, collection2);
|
|
1014
|
-
}), accumulator;
|
|
1015
|
-
}
|
|
1016
|
-
function baseSortBy(array, comparer) {
|
|
1017
|
-
var length2 = array.length;
|
|
1018
|
-
for (array.sort(comparer); length2--; )
|
|
1019
|
-
array[length2] = array[length2].value;
|
|
1020
|
-
return array;
|
|
1021
|
-
}
|
|
1022
|
-
function baseSum(array, iteratee) {
|
|
1023
|
-
for (var result, index = -1, length2 = array.length; ++index < length2; ) {
|
|
1024
|
-
var current = iteratee(array[index]);
|
|
1025
|
-
current !== undefined$1 && (result = result === undefined$1 ? current : result + current);
|
|
1026
|
-
}
|
|
1027
|
-
return result;
|
|
1028
|
-
}
|
|
1029
|
-
function baseTimes(n, iteratee) {
|
|
1030
|
-
for (var index = -1, result = Array(n); ++index < n; )
|
|
1031
|
-
result[index] = iteratee(index);
|
|
1032
|
-
return result;
|
|
1033
|
-
}
|
|
1034
|
-
function baseToPairs(object, props) {
|
|
1035
|
-
return arrayMap(props, function(key) {
|
|
1036
|
-
return [key, object[key]];
|
|
1037
|
-
});
|
|
1038
|
-
}
|
|
1039
|
-
function baseTrim(string) {
|
|
1040
|
-
return string && string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "");
|
|
1041
|
-
}
|
|
1042
|
-
function baseUnary(func) {
|
|
1043
|
-
return function(value) {
|
|
1044
|
-
return func(value);
|
|
1045
|
-
};
|
|
1046
|
-
}
|
|
1047
|
-
function baseValues(object, props) {
|
|
1048
|
-
return arrayMap(props, function(key) {
|
|
1049
|
-
return object[key];
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
function cacheHas(cache, key) {
|
|
1053
|
-
return cache.has(key);
|
|
1054
|
-
}
|
|
1055
|
-
function charsStartIndex(strSymbols, chrSymbols) {
|
|
1056
|
-
for (var index = -1, length2 = strSymbols.length; ++index < length2 && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1; )
|
|
1057
|
-
;
|
|
1058
|
-
return index;
|
|
1059
|
-
}
|
|
1060
|
-
function charsEndIndex(strSymbols, chrSymbols) {
|
|
1061
|
-
for (var index = strSymbols.length; index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1; )
|
|
1062
|
-
;
|
|
1063
|
-
return index;
|
|
1064
|
-
}
|
|
1065
|
-
function countHolders(array, placeholder) {
|
|
1066
|
-
for (var length2 = array.length, result = 0; length2--; )
|
|
1067
|
-
array[length2] === placeholder && ++result;
|
|
1068
|
-
return result;
|
|
1069
|
-
}
|
|
1070
|
-
var deburrLetter = basePropertyOf(deburredLetters), escapeHtmlChar = basePropertyOf(htmlEscapes);
|
|
1071
|
-
function escapeStringChar(chr) {
|
|
1072
|
-
return "\\" + stringEscapes[chr];
|
|
1073
|
-
}
|
|
1074
|
-
function getValue(object, key) {
|
|
1075
|
-
return object == null ? undefined$1 : object[key];
|
|
1076
|
-
}
|
|
1077
|
-
function hasUnicode(string) {
|
|
1078
|
-
return reHasUnicode.test(string);
|
|
1079
|
-
}
|
|
1080
|
-
function hasUnicodeWord(string) {
|
|
1081
|
-
return reHasUnicodeWord.test(string);
|
|
1082
|
-
}
|
|
1083
|
-
function iteratorToArray(iterator) {
|
|
1084
|
-
for (var data, result = []; !(data = iterator.next()).done; )
|
|
1085
|
-
result.push(data.value);
|
|
1086
|
-
return result;
|
|
1087
|
-
}
|
|
1088
|
-
function mapToArray(map) {
|
|
1089
|
-
var index = -1, result = Array(map.size);
|
|
1090
|
-
return map.forEach(function(value, key) {
|
|
1091
|
-
result[++index] = [key, value];
|
|
1092
|
-
}), result;
|
|
1093
|
-
}
|
|
1094
|
-
function overArg(func, transform) {
|
|
1095
|
-
return function(arg) {
|
|
1096
|
-
return func(transform(arg));
|
|
1097
|
-
};
|
|
1098
|
-
}
|
|
1099
|
-
function replaceHolders(array, placeholder) {
|
|
1100
|
-
for (var index = -1, length2 = array.length, resIndex = 0, result = []; ++index < length2; ) {
|
|
1101
|
-
var value = array[index];
|
|
1102
|
-
(value === placeholder || value === PLACEHOLDER) && (array[index] = PLACEHOLDER, result[resIndex++] = index);
|
|
1103
|
-
}
|
|
1104
|
-
return result;
|
|
1105
|
-
}
|
|
1106
|
-
function setToArray(set) {
|
|
1107
|
-
var index = -1, result = Array(set.size);
|
|
1108
|
-
return set.forEach(function(value) {
|
|
1109
|
-
result[++index] = value;
|
|
1110
|
-
}), result;
|
|
1111
|
-
}
|
|
1112
|
-
function setToPairs(set) {
|
|
1113
|
-
var index = -1, result = Array(set.size);
|
|
1114
|
-
return set.forEach(function(value) {
|
|
1115
|
-
result[++index] = [value, value];
|
|
1116
|
-
}), result;
|
|
1117
|
-
}
|
|
1118
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
1119
|
-
for (var index = fromIndex - 1, length2 = array.length; ++index < length2; )
|
|
1120
|
-
if (array[index] === value)
|
|
1121
|
-
return index;
|
|
1122
|
-
return -1;
|
|
1123
|
-
}
|
|
1124
|
-
function strictLastIndexOf(array, value, fromIndex) {
|
|
1125
|
-
for (var index = fromIndex + 1; index--; )
|
|
1126
|
-
if (array[index] === value)
|
|
1127
|
-
return index;
|
|
1128
|
-
return index;
|
|
1129
|
-
}
|
|
1130
|
-
function stringSize(string) {
|
|
1131
|
-
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
|
|
1132
|
-
}
|
|
1133
|
-
function stringToArray(string) {
|
|
1134
|
-
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
1135
|
-
}
|
|
1136
|
-
function trimmedEndIndex(string) {
|
|
1137
|
-
for (var index = string.length; index-- && reWhitespace.test(string.charAt(index)); )
|
|
1138
|
-
;
|
|
1139
|
-
return index;
|
|
1140
|
-
}
|
|
1141
|
-
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
1142
|
-
function unicodeSize(string) {
|
|
1143
|
-
for (var result = reUnicode.lastIndex = 0; reUnicode.test(string); )
|
|
1144
|
-
++result;
|
|
1145
|
-
return result;
|
|
1146
|
-
}
|
|
1147
|
-
function unicodeToArray(string) {
|
|
1148
|
-
return string.match(reUnicode) || [];
|
|
1149
|
-
}
|
|
1150
|
-
function unicodeWords(string) {
|
|
1151
|
-
return string.match(reUnicodeWord) || [];
|
|
1152
|
-
}
|
|
1153
|
-
var runInContext = (function runInContext2(context) {
|
|
1154
|
-
context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps));
|
|
1155
|
-
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, TypeError = context.TypeError, arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype, coreJsData = context["__core-js_shared__"], funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, idCounter = 0, maskSrcKey = (function() {
|
|
1156
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
1157
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
1158
|
-
})(), nativeObjectToString = objectProto.toString, objectCtorString = funcToString.call(Object2), oldDash = root._, reIsNative = RegExp2(
|
|
1159
|
-
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1160
|
-
), Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer ? Buffer.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, defineProperty = (function() {
|
|
1161
|
-
try {
|
|
1162
|
-
var func = getNative(Object2, "defineProperty");
|
|
1163
|
-
return func({}, "", {}), func;
|
|
1164
|
-
} catch {
|
|
1165
|
-
}
|
|
1166
|
-
})(), ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout, nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.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, DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"), metaMap = WeakMap && new WeakMap(), realNames = {}, dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap), symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1167
|
-
function lodash2(value) {
|
|
1168
|
-
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1169
|
-
if (value instanceof LodashWrapper)
|
|
1170
|
-
return value;
|
|
1171
|
-
if (hasOwnProperty.call(value, "__wrapped__"))
|
|
1172
|
-
return wrapperClone(value);
|
|
1173
|
-
}
|
|
1174
|
-
return new LodashWrapper(value);
|
|
1175
|
-
}
|
|
1176
|
-
var baseCreate = /* @__PURE__ */ (function() {
|
|
1177
|
-
function object() {
|
|
1178
|
-
}
|
|
1179
|
-
return function(proto) {
|
|
1180
|
-
if (!isObject(proto))
|
|
1181
|
-
return {};
|
|
1182
|
-
if (objectCreate)
|
|
1183
|
-
return objectCreate(proto);
|
|
1184
|
-
object.prototype = proto;
|
|
1185
|
-
var result2 = new object();
|
|
1186
|
-
return object.prototype = undefined$1, result2;
|
|
1187
|
-
};
|
|
1188
|
-
})();
|
|
1189
|
-
function baseLodash() {
|
|
1190
|
-
}
|
|
1191
|
-
function LodashWrapper(value, chainAll) {
|
|
1192
|
-
this.__wrapped__ = value, this.__actions__ = [], this.__chain__ = !!chainAll, this.__index__ = 0, this.__values__ = undefined$1;
|
|
1193
|
-
}
|
|
1194
|
-
lodash2.templateSettings = {
|
|
1195
|
-
/**
|
|
1196
|
-
* Used to detect `data` property values to be HTML-escaped.
|
|
1197
|
-
*
|
|
1198
|
-
* @memberOf _.templateSettings
|
|
1199
|
-
* @type {RegExp}
|
|
1200
|
-
*/
|
|
1201
|
-
escape: reEscape,
|
|
1202
|
-
/**
|
|
1203
|
-
* Used to detect code to be evaluated.
|
|
1204
|
-
*
|
|
1205
|
-
* @memberOf _.templateSettings
|
|
1206
|
-
* @type {RegExp}
|
|
1207
|
-
*/
|
|
1208
|
-
evaluate: reEvaluate,
|
|
1209
|
-
/**
|
|
1210
|
-
* Used to detect `data` property values to inject.
|
|
1211
|
-
*
|
|
1212
|
-
* @memberOf _.templateSettings
|
|
1213
|
-
* @type {RegExp}
|
|
1214
|
-
*/
|
|
1215
|
-
interpolate: reInterpolate,
|
|
1216
|
-
/**
|
|
1217
|
-
* Used to reference the data object in the template text.
|
|
1218
|
-
*
|
|
1219
|
-
* @memberOf _.templateSettings
|
|
1220
|
-
* @type {string}
|
|
1221
|
-
*/
|
|
1222
|
-
variable: "",
|
|
1223
|
-
/**
|
|
1224
|
-
* Used to import variables into the compiled template.
|
|
1225
|
-
*
|
|
1226
|
-
* @memberOf _.templateSettings
|
|
1227
|
-
* @type {Object}
|
|
1228
|
-
*/
|
|
1229
|
-
imports: {
|
|
1230
|
-
/**
|
|
1231
|
-
* A reference to the `lodash` function.
|
|
1232
|
-
*
|
|
1233
|
-
* @memberOf _.templateSettings.imports
|
|
1234
|
-
* @type {Function}
|
|
1235
|
-
*/
|
|
1236
|
-
_: lodash2
|
|
1237
|
-
}
|
|
1238
|
-
}, lodash2.prototype = baseLodash.prototype, lodash2.prototype.constructor = lodash2, LodashWrapper.prototype = baseCreate(baseLodash.prototype), LodashWrapper.prototype.constructor = LodashWrapper;
|
|
1239
|
-
function LazyWrapper(value) {
|
|
1240
|
-
this.__wrapped__ = value, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = MAX_ARRAY_LENGTH, this.__views__ = [];
|
|
1241
|
-
}
|
|
1242
|
-
function lazyClone() {
|
|
1243
|
-
var result2 = new LazyWrapper(this.__wrapped__);
|
|
1244
|
-
return 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__), result2;
|
|
1245
|
-
}
|
|
1246
|
-
function lazyReverse() {
|
|
1247
|
-
if (this.__filtered__) {
|
|
1248
|
-
var result2 = new LazyWrapper(this);
|
|
1249
|
-
result2.__dir__ = -1, result2.__filtered__ = !0;
|
|
1250
|
-
} else
|
|
1251
|
-
result2 = this.clone(), result2.__dir__ *= -1;
|
|
1252
|
-
return result2;
|
|
1253
|
-
}
|
|
1254
|
-
function lazyValue() {
|
|
1255
|
-
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, length2 = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length2, this.__takeCount__);
|
|
1256
|
-
if (!isArr || !isRight && arrLength == length2 && takeCount == length2)
|
|
1257
|
-
return baseWrapperValue(array, this.__actions__);
|
|
1258
|
-
var result2 = [];
|
|
1259
|
-
outer:
|
|
1260
|
-
for (; length2-- && resIndex < takeCount; ) {
|
|
1261
|
-
index += dir;
|
|
1262
|
-
for (var iterIndex = -1, value = array[index]; ++iterIndex < iterLength; ) {
|
|
1263
|
-
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
|
|
1264
|
-
if (type == LAZY_MAP_FLAG)
|
|
1265
|
-
value = computed;
|
|
1266
|
-
else if (!computed) {
|
|
1267
|
-
if (type == LAZY_FILTER_FLAG)
|
|
1268
|
-
continue outer;
|
|
1269
|
-
break outer;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
result2[resIndex++] = value;
|
|
1273
|
-
}
|
|
1274
|
-
return result2;
|
|
1275
|
-
}
|
|
1276
|
-
LazyWrapper.prototype = baseCreate(baseLodash.prototype), LazyWrapper.prototype.constructor = LazyWrapper;
|
|
1277
|
-
function Hash(entries) {
|
|
1278
|
-
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
1279
|
-
for (this.clear(); ++index < length2; ) {
|
|
1280
|
-
var entry = entries[index];
|
|
1281
|
-
this.set(entry[0], entry[1]);
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
function hashClear() {
|
|
1285
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0;
|
|
1286
|
-
}
|
|
1287
|
-
function hashDelete(key) {
|
|
1288
|
-
var result2 = this.has(key) && delete this.__data__[key];
|
|
1289
|
-
return this.size -= result2 ? 1 : 0, result2;
|
|
1290
|
-
}
|
|
1291
|
-
function hashGet(key) {
|
|
1292
|
-
var data = this.__data__;
|
|
1293
|
-
if (nativeCreate) {
|
|
1294
|
-
var result2 = data[key];
|
|
1295
|
-
return result2 === HASH_UNDEFINED ? undefined$1 : result2;
|
|
1296
|
-
}
|
|
1297
|
-
return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
|
|
1298
|
-
}
|
|
1299
|
-
function hashHas(key) {
|
|
1300
|
-
var data = this.__data__;
|
|
1301
|
-
return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key);
|
|
1302
|
-
}
|
|
1303
|
-
function hashSet(key, value) {
|
|
1304
|
-
var data = this.__data__;
|
|
1305
|
-
return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value, this;
|
|
1306
|
-
}
|
|
1307
|
-
Hash.prototype.clear = hashClear, Hash.prototype.delete = hashDelete, Hash.prototype.get = hashGet, Hash.prototype.has = hashHas, Hash.prototype.set = hashSet;
|
|
1308
|
-
function ListCache(entries) {
|
|
1309
|
-
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
1310
|
-
for (this.clear(); ++index < length2; ) {
|
|
1311
|
-
var entry = entries[index];
|
|
1312
|
-
this.set(entry[0], entry[1]);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
function listCacheClear() {
|
|
1316
|
-
this.__data__ = [], this.size = 0;
|
|
1317
|
-
}
|
|
1318
|
-
function listCacheDelete(key) {
|
|
1319
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1320
|
-
if (index < 0)
|
|
1321
|
-
return !1;
|
|
1322
|
-
var lastIndex = data.length - 1;
|
|
1323
|
-
return index == lastIndex ? data.pop() : splice.call(data, index, 1), --this.size, !0;
|
|
1324
|
-
}
|
|
1325
|
-
function listCacheGet(key) {
|
|
1326
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1327
|
-
return index < 0 ? undefined$1 : data[index][1];
|
|
1328
|
-
}
|
|
1329
|
-
function listCacheHas(key) {
|
|
1330
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
1331
|
-
}
|
|
1332
|
-
function listCacheSet(key, value) {
|
|
1333
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1334
|
-
return index < 0 ? (++this.size, data.push([key, value])) : data[index][1] = value, this;
|
|
1335
|
-
}
|
|
1336
|
-
ListCache.prototype.clear = listCacheClear, ListCache.prototype.delete = listCacheDelete, ListCache.prototype.get = listCacheGet, ListCache.prototype.has = listCacheHas, ListCache.prototype.set = listCacheSet;
|
|
1337
|
-
function MapCache(entries) {
|
|
1338
|
-
var index = -1, length2 = entries == null ? 0 : entries.length;
|
|
1339
|
-
for (this.clear(); ++index < length2; ) {
|
|
1340
|
-
var entry = entries[index];
|
|
1341
|
-
this.set(entry[0], entry[1]);
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
function mapCacheClear() {
|
|
1345
|
-
this.size = 0, this.__data__ = {
|
|
1346
|
-
hash: new Hash(),
|
|
1347
|
-
map: new (Map2 || ListCache)(),
|
|
1348
|
-
string: new Hash()
|
|
1349
|
-
};
|
|
1350
|
-
}
|
|
1351
|
-
function mapCacheDelete(key) {
|
|
1352
|
-
var result2 = getMapData(this, key).delete(key);
|
|
1353
|
-
return this.size -= result2 ? 1 : 0, result2;
|
|
1354
|
-
}
|
|
1355
|
-
function mapCacheGet(key) {
|
|
1356
|
-
return getMapData(this, key).get(key);
|
|
1357
|
-
}
|
|
1358
|
-
function mapCacheHas(key) {
|
|
1359
|
-
return getMapData(this, key).has(key);
|
|
1360
|
-
}
|
|
1361
|
-
function mapCacheSet(key, value) {
|
|
1362
|
-
var data = getMapData(this, key), size2 = data.size;
|
|
1363
|
-
return data.set(key, value), this.size += data.size == size2 ? 0 : 1, this;
|
|
1364
|
-
}
|
|
1365
|
-
MapCache.prototype.clear = mapCacheClear, MapCache.prototype.delete = mapCacheDelete, MapCache.prototype.get = mapCacheGet, MapCache.prototype.has = mapCacheHas, MapCache.prototype.set = mapCacheSet;
|
|
1366
|
-
function SetCache(values2) {
|
|
1367
|
-
var index = -1, length2 = values2 == null ? 0 : values2.length;
|
|
1368
|
-
for (this.__data__ = new MapCache(); ++index < length2; )
|
|
1369
|
-
this.add(values2[index]);
|
|
1370
|
-
}
|
|
1371
|
-
function setCacheAdd(value) {
|
|
1372
|
-
return this.__data__.set(value, HASH_UNDEFINED), this;
|
|
1373
|
-
}
|
|
1374
|
-
function setCacheHas(value) {
|
|
1375
|
-
return this.__data__.has(value);
|
|
1376
|
-
}
|
|
1377
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd, SetCache.prototype.has = setCacheHas;
|
|
1378
|
-
function Stack2(entries) {
|
|
1379
|
-
var data = this.__data__ = new ListCache(entries);
|
|
1380
|
-
this.size = data.size;
|
|
1381
|
-
}
|
|
1382
|
-
function stackClear() {
|
|
1383
|
-
this.__data__ = new ListCache(), this.size = 0;
|
|
1384
|
-
}
|
|
1385
|
-
function stackDelete(key) {
|
|
1386
|
-
var data = this.__data__, result2 = data.delete(key);
|
|
1387
|
-
return this.size = data.size, result2;
|
|
1388
|
-
}
|
|
1389
|
-
function stackGet(key) {
|
|
1390
|
-
return this.__data__.get(key);
|
|
1391
|
-
}
|
|
1392
|
-
function stackHas(key) {
|
|
1393
|
-
return this.__data__.has(key);
|
|
1394
|
-
}
|
|
1395
|
-
function stackSet(key, value) {
|
|
1396
|
-
var data = this.__data__;
|
|
1397
|
-
if (data instanceof ListCache) {
|
|
1398
|
-
var pairs = data.__data__;
|
|
1399
|
-
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1)
|
|
1400
|
-
return pairs.push([key, value]), this.size = ++data.size, this;
|
|
1401
|
-
data = this.__data__ = new MapCache(pairs);
|
|
1402
|
-
}
|
|
1403
|
-
return data.set(key, value), this.size = data.size, this;
|
|
1404
|
-
}
|
|
1405
|
-
Stack2.prototype.clear = stackClear, Stack2.prototype.delete = stackDelete, Stack2.prototype.get = stackGet, Stack2.prototype.has = stackHas, Stack2.prototype.set = stackSet;
|
|
1406
|
-
function arrayLikeKeys(value, inherited) {
|
|
1407
|
-
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) : [], length2 = result2.length;
|
|
1408
|
-
for (var key in value)
|
|
1409
|
-
(inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1410
|
-
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1411
|
-
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1412
|
-
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
1413
|
-
isIndex(key, length2))) && result2.push(key);
|
|
1414
|
-
return result2;
|
|
1415
|
-
}
|
|
1416
|
-
function arraySample(array) {
|
|
1417
|
-
var length2 = array.length;
|
|
1418
|
-
return length2 ? array[baseRandom(0, length2 - 1)] : undefined$1;
|
|
1419
|
-
}
|
|
1420
|
-
function arraySampleSize(array, n) {
|
|
1421
|
-
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
|
1422
|
-
}
|
|
1423
|
-
function arrayShuffle(array) {
|
|
1424
|
-
return shuffleSelf(copyArray(array));
|
|
1425
|
-
}
|
|
1426
|
-
function assignMergeValue(object, key, value) {
|
|
1427
|
-
(value !== undefined$1 && !eq(object[key], value) || value === undefined$1 && !(key in object)) && baseAssignValue(object, key, value);
|
|
1428
|
-
}
|
|
1429
|
-
function assignValue(object, key, value) {
|
|
1430
|
-
var objValue = object[key];
|
|
1431
|
-
(!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined$1 && !(key in object)) && baseAssignValue(object, key, value);
|
|
1432
|
-
}
|
|
1433
|
-
function assocIndexOf(array, key) {
|
|
1434
|
-
for (var length2 = array.length; length2--; )
|
|
1435
|
-
if (eq(array[length2][0], key))
|
|
1436
|
-
return length2;
|
|
1437
|
-
return -1;
|
|
1438
|
-
}
|
|
1439
|
-
function baseAggregator(collection, setter, iteratee2, accumulator) {
|
|
1440
|
-
return baseEach(collection, function(value, key, collection2) {
|
|
1441
|
-
setter(accumulator, value, iteratee2(value), collection2);
|
|
1442
|
-
}), accumulator;
|
|
1443
|
-
}
|
|
1444
|
-
function baseAssign(object, source) {
|
|
1445
|
-
return object && copyObject(source, keys(source), object);
|
|
1446
|
-
}
|
|
1447
|
-
function baseAssignIn(object, source) {
|
|
1448
|
-
return object && copyObject(source, keysIn(source), object);
|
|
1449
|
-
}
|
|
1450
|
-
function baseAssignValue(object, key, value) {
|
|
1451
|
-
key == "__proto__" && defineProperty ? defineProperty(object, key, {
|
|
1452
|
-
configurable: !0,
|
|
1453
|
-
enumerable: !0,
|
|
1454
|
-
value,
|
|
1455
|
-
writable: !0
|
|
1456
|
-
}) : object[key] = value;
|
|
1457
|
-
}
|
|
1458
|
-
function baseAt(object, paths) {
|
|
1459
|
-
for (var index = -1, length2 = paths.length, result2 = Array2(length2), skip = object == null; ++index < length2; )
|
|
1460
|
-
result2[index] = skip ? undefined$1 : get(object, paths[index]);
|
|
1461
|
-
return result2;
|
|
1462
|
-
}
|
|
1463
|
-
function baseClamp(number, lower, upper) {
|
|
1464
|
-
return number === number && (upper !== undefined$1 && (number = number <= upper ? number : upper), lower !== undefined$1 && (number = number >= lower ? number : lower)), number;
|
|
1465
|
-
}
|
|
1466
|
-
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1467
|
-
var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
1468
|
-
if (customizer && (result2 = object ? customizer(value, key, object, stack) : customizer(value)), result2 !== undefined$1)
|
|
1469
|
-
return result2;
|
|
1470
|
-
if (!isObject(value))
|
|
1471
|
-
return value;
|
|
1472
|
-
var isArr = isArray(value);
|
|
1473
|
-
if (isArr) {
|
|
1474
|
-
if (result2 = initCloneArray(value), !isDeep)
|
|
1475
|
-
return copyArray(value, result2);
|
|
1476
|
-
} else {
|
|
1477
|
-
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1478
|
-
if (isBuffer(value))
|
|
1479
|
-
return cloneBuffer(value, isDeep);
|
|
1480
|
-
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
1481
|
-
if (result2 = isFlat || isFunc ? {} : initCloneObject(value), !isDeep)
|
|
1482
|
-
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
|
|
1483
|
-
} else {
|
|
1484
|
-
if (!cloneableTags[tag])
|
|
1485
|
-
return object ? value : {};
|
|
1486
|
-
result2 = initCloneByTag(value, tag, isDeep);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
stack || (stack = new Stack2());
|
|
1490
|
-
var stacked = stack.get(value);
|
|
1491
|
-
if (stacked)
|
|
1492
|
-
return stacked;
|
|
1493
|
-
stack.set(value, result2), isSet(value) ? value.forEach(function(subValue) {
|
|
1494
|
-
result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
1495
|
-
}) : isMap(value) && value.forEach(function(subValue, key2) {
|
|
1496
|
-
result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1497
|
-
});
|
|
1498
|
-
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys, props = isArr ? undefined$1 : keysFunc(value);
|
|
1499
|
-
return arrayEach(props || value, function(subValue, key2) {
|
|
1500
|
-
props && (key2 = subValue, subValue = value[key2]), assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1501
|
-
}), result2;
|
|
1502
|
-
}
|
|
1503
|
-
function baseConforms(source) {
|
|
1504
|
-
var props = keys(source);
|
|
1505
|
-
return function(object) {
|
|
1506
|
-
return baseConformsTo(object, source, props);
|
|
1507
|
-
};
|
|
1508
|
-
}
|
|
1509
|
-
function baseConformsTo(object, source, props) {
|
|
1510
|
-
var length2 = props.length;
|
|
1511
|
-
if (object == null)
|
|
1512
|
-
return !length2;
|
|
1513
|
-
for (object = Object2(object); length2--; ) {
|
|
1514
|
-
var key = props[length2], predicate = source[key], value = object[key];
|
|
1515
|
-
if (value === undefined$1 && !(key in object) || !predicate(value))
|
|
1516
|
-
return !1;
|
|
1517
|
-
}
|
|
1518
|
-
return !0;
|
|
1519
|
-
}
|
|
1520
|
-
function baseDelay(func, wait, args) {
|
|
1521
|
-
if (typeof func != "function")
|
|
1522
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1523
|
-
return setTimeout2(function() {
|
|
1524
|
-
func.apply(undefined$1, args);
|
|
1525
|
-
}, wait);
|
|
1526
|
-
}
|
|
1527
|
-
function baseDifference(array, values2, iteratee2, comparator) {
|
|
1528
|
-
var index = -1, includes2 = arrayIncludes, isCommon = !0, length2 = array.length, result2 = [], valuesLength = values2.length;
|
|
1529
|
-
if (!length2)
|
|
1530
|
-
return result2;
|
|
1531
|
-
iteratee2 && (values2 = arrayMap(values2, baseUnary(iteratee2))), comparator ? (includes2 = arrayIncludesWith, isCommon = !1) : values2.length >= LARGE_ARRAY_SIZE && (includes2 = cacheHas, isCommon = !1, values2 = new SetCache(values2));
|
|
1532
|
-
outer:
|
|
1533
|
-
for (; ++index < length2; ) {
|
|
1534
|
-
var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
|
|
1535
|
-
if (value = comparator || value !== 0 ? value : 0, isCommon && computed === computed) {
|
|
1536
|
-
for (var valuesIndex = valuesLength; valuesIndex--; )
|
|
1537
|
-
if (values2[valuesIndex] === computed)
|
|
1538
|
-
continue outer;
|
|
1539
|
-
result2.push(value);
|
|
1540
|
-
} else includes2(values2, computed, comparator) || result2.push(value);
|
|
1541
|
-
}
|
|
1542
|
-
return result2;
|
|
1543
|
-
}
|
|
1544
|
-
var baseEach = createBaseEach(baseForOwn), baseEachRight = createBaseEach(baseForOwnRight, !0);
|
|
1545
|
-
function baseEvery(collection, predicate) {
|
|
1546
|
-
var result2 = !0;
|
|
1547
|
-
return baseEach(collection, function(value, index, collection2) {
|
|
1548
|
-
return result2 = !!predicate(value, index, collection2), result2;
|
|
1549
|
-
}), result2;
|
|
1550
|
-
}
|
|
1551
|
-
function baseExtremum(array, iteratee2, comparator) {
|
|
1552
|
-
for (var index = -1, length2 = array.length; ++index < length2; ) {
|
|
1553
|
-
var value = array[index], current = iteratee2(value);
|
|
1554
|
-
if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed)))
|
|
1555
|
-
var computed = current, result2 = value;
|
|
1556
|
-
}
|
|
1557
|
-
return result2;
|
|
1558
|
-
}
|
|
1559
|
-
function baseFill(array, value, start, end) {
|
|
1560
|
-
var length2 = array.length;
|
|
1561
|
-
for (start = toInteger(start), start < 0 && (start = -start > length2 ? 0 : length2 + start), end = end === undefined$1 || end > length2 ? length2 : toInteger(end), end < 0 && (end += length2), end = start > end ? 0 : toLength(end); start < end; )
|
|
1562
|
-
array[start++] = value;
|
|
1563
|
-
return array;
|
|
1564
|
-
}
|
|
1565
|
-
function baseFilter(collection, predicate) {
|
|
1566
|
-
var result2 = [];
|
|
1567
|
-
return baseEach(collection, function(value, index, collection2) {
|
|
1568
|
-
predicate(value, index, collection2) && result2.push(value);
|
|
1569
|
-
}), result2;
|
|
1570
|
-
}
|
|
1571
|
-
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
|
1572
|
-
var index = -1, length2 = array.length;
|
|
1573
|
-
for (predicate || (predicate = isFlattenable), result2 || (result2 = []); ++index < length2; ) {
|
|
1574
|
-
var value = array[index];
|
|
1575
|
-
depth > 0 && predicate(value) ? depth > 1 ? baseFlatten(value, depth - 1, predicate, isStrict, result2) : arrayPush(result2, value) : isStrict || (result2[result2.length] = value);
|
|
1576
|
-
}
|
|
1577
|
-
return result2;
|
|
1578
|
-
}
|
|
1579
|
-
var baseFor = createBaseFor(), baseForRight = createBaseFor(!0);
|
|
1580
|
-
function baseForOwn(object, iteratee2) {
|
|
1581
|
-
return object && baseFor(object, iteratee2, keys);
|
|
1582
|
-
}
|
|
1583
|
-
function baseForOwnRight(object, iteratee2) {
|
|
1584
|
-
return object && baseForRight(object, iteratee2, keys);
|
|
1585
|
-
}
|
|
1586
|
-
function baseFunctions(object, props) {
|
|
1587
|
-
return arrayFilter(props, function(key) {
|
|
1588
|
-
return isFunction(object[key]);
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
function baseGet(object, path) {
|
|
1592
|
-
path = castPath(path, object);
|
|
1593
|
-
for (var index = 0, length2 = path.length; object != null && index < length2; )
|
|
1594
|
-
object = object[toKey(path[index++])];
|
|
1595
|
-
return index && index == length2 ? object : undefined$1;
|
|
1596
|
-
}
|
|
1597
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1598
|
-
var result2 = keysFunc(object);
|
|
1599
|
-
return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
|
|
1600
|
-
}
|
|
1601
|
-
function baseGetTag(value) {
|
|
1602
|
-
return value == null ? value === undefined$1 ? undefinedTag : nullTag : symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
|
|
1603
|
-
}
|
|
1604
|
-
function baseGt(value, other) {
|
|
1605
|
-
return value > other;
|
|
1606
|
-
}
|
|
1607
|
-
function baseHas(object, key) {
|
|
1608
|
-
return object != null && hasOwnProperty.call(object, key);
|
|
1609
|
-
}
|
|
1610
|
-
function baseHasIn(object, key) {
|
|
1611
|
-
return object != null && key in Object2(object);
|
|
1612
|
-
}
|
|
1613
|
-
function baseInRange(number, start, end) {
|
|
1614
|
-
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
|
1615
|
-
}
|
|
1616
|
-
function baseIntersection(arrays, iteratee2, comparator) {
|
|
1617
|
-
for (var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length2 = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = 1 / 0, result2 = []; othIndex--; ) {
|
|
1618
|
-
var array = arrays[othIndex];
|
|
1619
|
-
othIndex && iteratee2 && (array = arrayMap(array, baseUnary(iteratee2))), maxLength = nativeMin(array.length, maxLength), caches[othIndex] = !comparator && (iteratee2 || length2 >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
|
|
1620
|
-
}
|
|
1621
|
-
array = arrays[0];
|
|
1622
|
-
var index = -1, seen = caches[0];
|
|
1623
|
-
outer:
|
|
1624
|
-
for (; ++index < length2 && result2.length < maxLength; ) {
|
|
1625
|
-
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1626
|
-
if (value = comparator || value !== 0 ? value : 0, !(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
|
1627
|
-
for (othIndex = othLength; --othIndex; ) {
|
|
1628
|
-
var cache = caches[othIndex];
|
|
1629
|
-
if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator)))
|
|
1630
|
-
continue outer;
|
|
1631
|
-
}
|
|
1632
|
-
seen && seen.push(computed), result2.push(value);
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
return result2;
|
|
1636
|
-
}
|
|
1637
|
-
function baseInverter(object, setter, iteratee2, accumulator) {
|
|
1638
|
-
return baseForOwn(object, function(value, key, object2) {
|
|
1639
|
-
setter(accumulator, iteratee2(value), key, object2);
|
|
1640
|
-
}), accumulator;
|
|
1641
|
-
}
|
|
1642
|
-
function baseInvoke(object, path, args) {
|
|
1643
|
-
path = castPath(path, object), object = parent(object, path);
|
|
1644
|
-
var func = object == null ? object : object[toKey(last(path))];
|
|
1645
|
-
return func == null ? undefined$1 : apply(func, object, args);
|
|
1646
|
-
}
|
|
1647
|
-
function baseIsArguments(value) {
|
|
1648
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
1649
|
-
}
|
|
1650
|
-
function baseIsArrayBuffer(value) {
|
|
1651
|
-
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
|
1652
|
-
}
|
|
1653
|
-
function baseIsDate(value) {
|
|
1654
|
-
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
|
1655
|
-
}
|
|
1656
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1657
|
-
return value === other ? !0 : value == null || other == null || !isObjectLike(value) && !isObjectLike(other) ? value !== value && other !== other : baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1658
|
-
}
|
|
1659
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1660
|
-
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1661
|
-
objTag = objTag == argsTag ? objectTag : objTag, othTag = othTag == argsTag ? objectTag : othTag;
|
|
1662
|
-
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1663
|
-
if (isSameTag && isBuffer(object)) {
|
|
1664
|
-
if (!isBuffer(other))
|
|
1665
|
-
return !1;
|
|
1666
|
-
objIsArr = !0, objIsObj = !1;
|
|
1667
|
-
}
|
|
1668
|
-
if (isSameTag && !objIsObj)
|
|
1669
|
-
return stack || (stack = new Stack2()), objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1670
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1671
|
-
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1672
|
-
if (objIsWrapped || othIsWrapped) {
|
|
1673
|
-
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1674
|
-
return stack || (stack = new Stack2()), equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
return isSameTag ? (stack || (stack = new Stack2()), equalObjects(object, other, bitmask, customizer, equalFunc, stack)) : !1;
|
|
1678
|
-
}
|
|
1679
|
-
function baseIsMap(value) {
|
|
1680
|
-
return isObjectLike(value) && getTag(value) == mapTag;
|
|
1681
|
-
}
|
|
1682
|
-
function baseIsMatch(object, source, matchData, customizer) {
|
|
1683
|
-
var index = matchData.length, length2 = index, noCustomizer = !customizer;
|
|
1684
|
-
if (object == null)
|
|
1685
|
-
return !length2;
|
|
1686
|
-
for (object = Object2(object); index--; ) {
|
|
1687
|
-
var data = matchData[index];
|
|
1688
|
-
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object))
|
|
1689
|
-
return !1;
|
|
1690
|
-
}
|
|
1691
|
-
for (; ++index < length2; ) {
|
|
1692
|
-
data = matchData[index];
|
|
1693
|
-
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1694
|
-
if (noCustomizer && data[2]) {
|
|
1695
|
-
if (objValue === undefined$1 && !(key in object))
|
|
1696
|
-
return !1;
|
|
1697
|
-
} else {
|
|
1698
|
-
var stack = new Stack2();
|
|
1699
|
-
if (customizer)
|
|
1700
|
-
var result2 = customizer(objValue, srcValue, key, object, source, stack);
|
|
1701
|
-
if (!(result2 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2))
|
|
1702
|
-
return !1;
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
return !0;
|
|
1706
|
-
}
|
|
1707
|
-
function baseIsNative(value) {
|
|
1708
|
-
if (!isObject(value) || isMasked(value))
|
|
1709
|
-
return !1;
|
|
1710
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
1711
|
-
return pattern.test(toSource(value));
|
|
1712
|
-
}
|
|
1713
|
-
function baseIsRegExp(value) {
|
|
1714
|
-
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
|
1715
|
-
}
|
|
1716
|
-
function baseIsSet(value) {
|
|
1717
|
-
return isObjectLike(value) && getTag(value) == setTag;
|
|
1718
|
-
}
|
|
1719
|
-
function baseIsTypedArray(value) {
|
|
1720
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1721
|
-
}
|
|
1722
|
-
function baseIteratee(value) {
|
|
1723
|
-
return typeof value == "function" ? value : value == null ? identity : typeof value == "object" ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value);
|
|
1724
|
-
}
|
|
1725
|
-
function baseKeys(object) {
|
|
1726
|
-
if (!isPrototype(object))
|
|
1727
|
-
return nativeKeys(object);
|
|
1728
|
-
var result2 = [];
|
|
1729
|
-
for (var key in Object2(object))
|
|
1730
|
-
hasOwnProperty.call(object, key) && key != "constructor" && result2.push(key);
|
|
1731
|
-
return result2;
|
|
1732
|
-
}
|
|
1733
|
-
function baseKeysIn(object) {
|
|
1734
|
-
if (!isObject(object))
|
|
1735
|
-
return nativeKeysIn(object);
|
|
1736
|
-
var isProto = isPrototype(object), result2 = [];
|
|
1737
|
-
for (var key in object)
|
|
1738
|
-
key == "constructor" && (isProto || !hasOwnProperty.call(object, key)) || result2.push(key);
|
|
1739
|
-
return result2;
|
|
1740
|
-
}
|
|
1741
|
-
function baseLt(value, other) {
|
|
1742
|
-
return value < other;
|
|
1743
|
-
}
|
|
1744
|
-
function baseMap(collection, iteratee2) {
|
|
1745
|
-
var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
1746
|
-
return baseEach(collection, function(value, key, collection2) {
|
|
1747
|
-
result2[++index] = iteratee2(value, key, collection2);
|
|
1748
|
-
}), result2;
|
|
1749
|
-
}
|
|
1750
|
-
function baseMatches(source) {
|
|
1751
|
-
var matchData = getMatchData(source);
|
|
1752
|
-
return matchData.length == 1 && matchData[0][2] ? matchesStrictComparable(matchData[0][0], matchData[0][1]) : function(object) {
|
|
1753
|
-
return object === source || baseIsMatch(object, source, matchData);
|
|
1754
|
-
};
|
|
1755
|
-
}
|
|
1756
|
-
function baseMatchesProperty(path, srcValue) {
|
|
1757
|
-
return isKey(path) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path), srcValue) : function(object) {
|
|
1758
|
-
var objValue = get(object, path);
|
|
1759
|
-
return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1760
|
-
};
|
|
1761
|
-
}
|
|
1762
|
-
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
1763
|
-
object !== source && baseFor(source, function(srcValue, key) {
|
|
1764
|
-
if (stack || (stack = new Stack2()), isObject(srcValue))
|
|
1765
|
-
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1766
|
-
else {
|
|
1767
|
-
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
|
1768
|
-
newValue === undefined$1 && (newValue = srcValue), assignMergeValue(object, key, newValue);
|
|
1769
|
-
}
|
|
1770
|
-
}, keysIn);
|
|
1771
|
-
}
|
|
1772
|
-
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
1773
|
-
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
|
1774
|
-
if (stacked) {
|
|
1775
|
-
assignMergeValue(object, key, stacked);
|
|
1776
|
-
return;
|
|
1777
|
-
}
|
|
1778
|
-
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined$1, isCommon = newValue === undefined$1;
|
|
1779
|
-
if (isCommon) {
|
|
1780
|
-
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1781
|
-
newValue = srcValue, isArr || isBuff || isTyped ? isArray(objValue) ? newValue = objValue : isArrayLikeObject(objValue) ? newValue = copyArray(objValue) : isBuff ? (isCommon = !1, newValue = cloneBuffer(srcValue, !0)) : isTyped ? (isCommon = !1, newValue = cloneTypedArray(srcValue, !0)) : newValue = [] : isPlainObject(srcValue) || isArguments(srcValue) ? (newValue = objValue, isArguments(objValue) ? newValue = toPlainObject(objValue) : (!isObject(objValue) || isFunction(objValue)) && (newValue = initCloneObject(srcValue))) : isCommon = !1;
|
|
1782
|
-
}
|
|
1783
|
-
isCommon && (stack.set(srcValue, newValue), mergeFunc(newValue, srcValue, srcIndex, customizer, stack), stack.delete(srcValue)), assignMergeValue(object, key, newValue);
|
|
1784
|
-
}
|
|
1785
|
-
function baseNth(array, n) {
|
|
1786
|
-
var length2 = array.length;
|
|
1787
|
-
if (length2)
|
|
1788
|
-
return n += n < 0 ? length2 : 0, isIndex(n, length2) ? array[n] : undefined$1;
|
|
1789
|
-
}
|
|
1790
|
-
function baseOrderBy(collection, iteratees, orders) {
|
|
1791
|
-
iteratees.length ? iteratees = arrayMap(iteratees, function(iteratee2) {
|
|
1792
|
-
return isArray(iteratee2) ? function(value) {
|
|
1793
|
-
return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
|
|
1794
|
-
} : iteratee2;
|
|
1795
|
-
}) : iteratees = [identity];
|
|
1796
|
-
var index = -1;
|
|
1797
|
-
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
1798
|
-
var result2 = baseMap(collection, function(value, key, collection2) {
|
|
1799
|
-
var criteria = arrayMap(iteratees, function(iteratee2) {
|
|
1800
|
-
return iteratee2(value);
|
|
1801
|
-
});
|
|
1802
|
-
return { criteria, index: ++index, value };
|
|
1803
|
-
});
|
|
1804
|
-
return baseSortBy(result2, function(object, other) {
|
|
1805
|
-
return compareMultiple(object, other, orders);
|
|
1806
|
-
});
|
|
1807
|
-
}
|
|
1808
|
-
function basePick(object, paths) {
|
|
1809
|
-
return basePickBy(object, paths, function(value, path) {
|
|
1810
|
-
return hasIn(object, path);
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1813
|
-
function basePickBy(object, paths, predicate) {
|
|
1814
|
-
for (var index = -1, length2 = paths.length, result2 = {}; ++index < length2; ) {
|
|
1815
|
-
var path = paths[index], value = baseGet(object, path);
|
|
1816
|
-
predicate(value, path) && baseSet(result2, castPath(path, object), value);
|
|
1817
|
-
}
|
|
1818
|
-
return result2;
|
|
1819
|
-
}
|
|
1820
|
-
function basePropertyDeep(path) {
|
|
1821
|
-
return function(object) {
|
|
1822
|
-
return baseGet(object, path);
|
|
1823
|
-
};
|
|
1824
|
-
}
|
|
1825
|
-
function basePullAll(array, values2, iteratee2, comparator) {
|
|
1826
|
-
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length2 = values2.length, seen = array;
|
|
1827
|
-
for (array === values2 && (values2 = copyArray(values2)), iteratee2 && (seen = arrayMap(array, baseUnary(iteratee2))); ++index < length2; )
|
|
1828
|
-
for (var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value; (fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1; )
|
|
1829
|
-
seen !== array && splice.call(seen, fromIndex, 1), splice.call(array, fromIndex, 1);
|
|
1830
|
-
return array;
|
|
1831
|
-
}
|
|
1832
|
-
function basePullAt(array, indexes) {
|
|
1833
|
-
for (var length2 = array ? indexes.length : 0, lastIndex = length2 - 1; length2--; ) {
|
|
1834
|
-
var index = indexes[length2];
|
|
1835
|
-
if (length2 == lastIndex || index !== previous) {
|
|
1836
|
-
var previous = index;
|
|
1837
|
-
isIndex(index) ? splice.call(array, index, 1) : baseUnset(array, index);
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
return array;
|
|
1841
|
-
}
|
|
1842
|
-
function baseRandom(lower, upper) {
|
|
1843
|
-
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
|
1844
|
-
}
|
|
1845
|
-
function baseRange(start, end, step, fromRight) {
|
|
1846
|
-
for (var index = -1, length2 = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length2); length2--; )
|
|
1847
|
-
result2[fromRight ? length2 : ++index] = start, start += step;
|
|
1848
|
-
return result2;
|
|
1849
|
-
}
|
|
1850
|
-
function baseRepeat(string, n) {
|
|
1851
|
-
var result2 = "";
|
|
1852
|
-
if (!string || n < 1 || n > MAX_SAFE_INTEGER)
|
|
1853
|
-
return result2;
|
|
1854
|
-
do
|
|
1855
|
-
n % 2 && (result2 += string), n = nativeFloor(n / 2), n && (string += string);
|
|
1856
|
-
while (n);
|
|
1857
|
-
return result2;
|
|
1858
|
-
}
|
|
1859
|
-
function baseRest(func, start) {
|
|
1860
|
-
return setToString(overRest(func, start, identity), func + "");
|
|
1861
|
-
}
|
|
1862
|
-
function baseSample(collection) {
|
|
1863
|
-
return arraySample(values(collection));
|
|
1864
|
-
}
|
|
1865
|
-
function baseSampleSize(collection, n) {
|
|
1866
|
-
var array = values(collection);
|
|
1867
|
-
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
1868
|
-
}
|
|
1869
|
-
function baseSet(object, path, value, customizer) {
|
|
1870
|
-
if (!isObject(object))
|
|
1871
|
-
return object;
|
|
1872
|
-
path = castPath(path, object);
|
|
1873
|
-
for (var index = -1, length2 = path.length, lastIndex = length2 - 1, nested = object; nested != null && ++index < length2; ) {
|
|
1874
|
-
var key = toKey(path[index]), newValue = value;
|
|
1875
|
-
if (key === "__proto__" || key === "constructor" || key === "prototype")
|
|
1876
|
-
return object;
|
|
1877
|
-
if (index != lastIndex) {
|
|
1878
|
-
var objValue = nested[key];
|
|
1879
|
-
newValue = customizer ? customizer(objValue, key, nested) : undefined$1, newValue === undefined$1 && (newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {});
|
|
1880
|
-
}
|
|
1881
|
-
assignValue(nested, key, newValue), nested = nested[key];
|
|
1882
|
-
}
|
|
1883
|
-
return object;
|
|
1884
|
-
}
|
|
1885
|
-
var baseSetData = metaMap ? function(func, data) {
|
|
1886
|
-
return metaMap.set(func, data), func;
|
|
1887
|
-
} : identity, baseSetToString = defineProperty ? function(func, string) {
|
|
1888
|
-
return defineProperty(func, "toString", {
|
|
1889
|
-
configurable: !0,
|
|
1890
|
-
enumerable: !1,
|
|
1891
|
-
value: constant(string),
|
|
1892
|
-
writable: !0
|
|
1893
|
-
});
|
|
1894
|
-
} : identity;
|
|
1895
|
-
function baseShuffle(collection) {
|
|
1896
|
-
return shuffleSelf(values(collection));
|
|
1897
|
-
}
|
|
1898
|
-
function baseSlice(array, start, end) {
|
|
1899
|
-
var index = -1, length2 = array.length;
|
|
1900
|
-
start < 0 && (start = -start > length2 ? 0 : length2 + start), end = end > length2 ? length2 : end, end < 0 && (end += length2), length2 = start > end ? 0 : end - start >>> 0, start >>>= 0;
|
|
1901
|
-
for (var result2 = Array2(length2); ++index < length2; )
|
|
1902
|
-
result2[index] = array[index + start];
|
|
1903
|
-
return result2;
|
|
1904
|
-
}
|
|
1905
|
-
function baseSome(collection, predicate) {
|
|
1906
|
-
var result2;
|
|
1907
|
-
return baseEach(collection, function(value, index, collection2) {
|
|
1908
|
-
return result2 = predicate(value, index, collection2), !result2;
|
|
1909
|
-
}), !!result2;
|
|
1910
|
-
}
|
|
1911
|
-
function baseSortedIndex(array, value, retHighest) {
|
|
1912
|
-
var low = 0, high = array == null ? low : array.length;
|
|
1913
|
-
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
|
|
1914
|
-
for (; low < high; ) {
|
|
1915
|
-
var mid = low + high >>> 1, computed = array[mid];
|
|
1916
|
-
computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value) ? low = mid + 1 : high = mid;
|
|
1917
|
-
}
|
|
1918
|
-
return high;
|
|
1919
|
-
}
|
|
1920
|
-
return baseSortedIndexBy(array, value, identity, retHighest);
|
|
1921
|
-
}
|
|
1922
|
-
function baseSortedIndexBy(array, value, iteratee2, retHighest) {
|
|
1923
|
-
var low = 0, high = array == null ? 0 : array.length;
|
|
1924
|
-
if (high === 0)
|
|
1925
|
-
return 0;
|
|
1926
|
-
value = iteratee2(value);
|
|
1927
|
-
for (var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1; low < high; ) {
|
|
1928
|
-
var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined$1, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
|
|
1929
|
-
if (valIsNaN)
|
|
1930
|
-
var setLow = retHighest || othIsReflexive;
|
|
1931
|
-
else valIsUndefined ? setLow = othIsReflexive && (retHighest || othIsDefined) : valIsNull ? setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull) : valIsSymbol ? setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol) : othIsNull || othIsSymbol ? setLow = !1 : setLow = retHighest ? computed <= value : computed < value;
|
|
1932
|
-
setLow ? low = mid + 1 : high = mid;
|
|
1933
|
-
}
|
|
1934
|
-
return nativeMin(high, MAX_ARRAY_INDEX);
|
|
1935
|
-
}
|
|
1936
|
-
function baseSortedUniq(array, iteratee2) {
|
|
1937
|
-
for (var index = -1, length2 = array.length, resIndex = 0, result2 = []; ++index < length2; ) {
|
|
1938
|
-
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1939
|
-
if (!index || !eq(computed, seen)) {
|
|
1940
|
-
var seen = computed;
|
|
1941
|
-
result2[resIndex++] = value === 0 ? 0 : value;
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
return result2;
|
|
1945
|
-
}
|
|
1946
|
-
function baseToNumber(value) {
|
|
1947
|
-
return typeof value == "number" ? value : isSymbol(value) ? NAN : +value;
|
|
1948
|
-
}
|
|
1949
|
-
function baseToString(value) {
|
|
1950
|
-
if (typeof value == "string")
|
|
1951
|
-
return value;
|
|
1952
|
-
if (isArray(value))
|
|
1953
|
-
return arrayMap(value, baseToString) + "";
|
|
1954
|
-
if (isSymbol(value))
|
|
1955
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
1956
|
-
var result2 = value + "";
|
|
1957
|
-
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
1958
|
-
}
|
|
1959
|
-
function baseUniq(array, iteratee2, comparator) {
|
|
1960
|
-
var index = -1, includes2 = arrayIncludes, length2 = array.length, isCommon = !0, result2 = [], seen = result2;
|
|
1961
|
-
if (comparator)
|
|
1962
|
-
isCommon = !1, includes2 = arrayIncludesWith;
|
|
1963
|
-
else if (length2 >= LARGE_ARRAY_SIZE) {
|
|
1964
|
-
var set2 = iteratee2 ? null : createSet(array);
|
|
1965
|
-
if (set2)
|
|
1966
|
-
return setToArray(set2);
|
|
1967
|
-
isCommon = !1, includes2 = cacheHas, seen = new SetCache();
|
|
1968
|
-
} else
|
|
1969
|
-
seen = iteratee2 ? [] : result2;
|
|
1970
|
-
outer:
|
|
1971
|
-
for (; ++index < length2; ) {
|
|
1972
|
-
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1973
|
-
if (value = comparator || value !== 0 ? value : 0, isCommon && computed === computed) {
|
|
1974
|
-
for (var seenIndex = seen.length; seenIndex--; )
|
|
1975
|
-
if (seen[seenIndex] === computed)
|
|
1976
|
-
continue outer;
|
|
1977
|
-
iteratee2 && seen.push(computed), result2.push(value);
|
|
1978
|
-
} else includes2(seen, computed, comparator) || (seen !== result2 && seen.push(computed), result2.push(value));
|
|
1979
|
-
}
|
|
1980
|
-
return result2;
|
|
1981
|
-
}
|
|
1982
|
-
function baseUnset(object, path) {
|
|
1983
|
-
return path = castPath(path, object), object = parent(object, path), object == null || delete object[toKey(last(path))];
|
|
1984
|
-
}
|
|
1985
|
-
function baseUpdate(object, path, updater, customizer) {
|
|
1986
|
-
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|
1987
|
-
}
|
|
1988
|
-
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
1989
|
-
for (var length2 = array.length, index = fromRight ? length2 : -1; (fromRight ? index-- : ++index < length2) && predicate(array[index], index, array); )
|
|
1990
|
-
;
|
|
1991
|
-
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length2) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length2 : index);
|
|
1992
|
-
}
|
|
1993
|
-
function baseWrapperValue(value, actions) {
|
|
1994
|
-
var result2 = value;
|
|
1995
|
-
return result2 instanceof LazyWrapper && (result2 = result2.value()), arrayReduce(actions, function(result3, action) {
|
|
1996
|
-
return action.func.apply(action.thisArg, arrayPush([result3], action.args));
|
|
1997
|
-
}, result2);
|
|
1998
|
-
}
|
|
1999
|
-
function baseXor(arrays, iteratee2, comparator) {
|
|
2000
|
-
var length2 = arrays.length;
|
|
2001
|
-
if (length2 < 2)
|
|
2002
|
-
return length2 ? baseUniq(arrays[0]) : [];
|
|
2003
|
-
for (var index = -1, result2 = Array2(length2); ++index < length2; )
|
|
2004
|
-
for (var array = arrays[index], othIndex = -1; ++othIndex < length2; )
|
|
2005
|
-
othIndex != index && (result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator));
|
|
2006
|
-
return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
|
|
2007
|
-
}
|
|
2008
|
-
function baseZipObject(props, values2, assignFunc) {
|
|
2009
|
-
for (var index = -1, length2 = props.length, valsLength = values2.length, result2 = {}; ++index < length2; ) {
|
|
2010
|
-
var value = index < valsLength ? values2[index] : undefined$1;
|
|
2011
|
-
assignFunc(result2, props[index], value);
|
|
2012
|
-
}
|
|
2013
|
-
return result2;
|
|
2014
|
-
}
|
|
2015
|
-
function castArrayLikeObject(value) {
|
|
2016
|
-
return isArrayLikeObject(value) ? value : [];
|
|
2017
|
-
}
|
|
2018
|
-
function castFunction(value) {
|
|
2019
|
-
return typeof value == "function" ? value : identity;
|
|
2020
|
-
}
|
|
2021
|
-
function castPath(value, object) {
|
|
2022
|
-
return isArray(value) ? value : isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
2023
|
-
}
|
|
2024
|
-
var castRest = baseRest;
|
|
2025
|
-
function castSlice(array, start, end) {
|
|
2026
|
-
var length2 = array.length;
|
|
2027
|
-
return end = end === undefined$1 ? length2 : end, !start && end >= length2 ? array : baseSlice(array, start, end);
|
|
2028
|
-
}
|
|
2029
|
-
var clearTimeout = ctxClearTimeout || function(id) {
|
|
2030
|
-
return root.clearTimeout(id);
|
|
2031
|
-
};
|
|
2032
|
-
function cloneBuffer(buffer, isDeep) {
|
|
2033
|
-
if (isDeep)
|
|
2034
|
-
return buffer.slice();
|
|
2035
|
-
var length2 = buffer.length, result2 = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2);
|
|
2036
|
-
return buffer.copy(result2), result2;
|
|
2037
|
-
}
|
|
2038
|
-
function cloneArrayBuffer(arrayBuffer) {
|
|
2039
|
-
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2040
|
-
return new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer)), result2;
|
|
2041
|
-
}
|
|
2042
|
-
function cloneDataView(dataView, isDeep) {
|
|
2043
|
-
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
2044
|
-
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2045
|
-
}
|
|
2046
|
-
function cloneRegExp(regexp) {
|
|
2047
|
-
var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
2048
|
-
return result2.lastIndex = regexp.lastIndex, result2;
|
|
2049
|
-
}
|
|
2050
|
-
function cloneSymbol(symbol) {
|
|
2051
|
-
return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
|
|
2052
|
-
}
|
|
2053
|
-
function cloneTypedArray(typedArray, isDeep) {
|
|
2054
|
-
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2055
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2056
|
-
}
|
|
2057
|
-
function compareAscending(value, other) {
|
|
2058
|
-
if (value !== other) {
|
|
2059
|
-
var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value), othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
|
2060
|
-
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive)
|
|
2061
|
-
return 1;
|
|
2062
|
-
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive)
|
|
2063
|
-
return -1;
|
|
2064
|
-
}
|
|
2065
|
-
return 0;
|
|
2066
|
-
}
|
|
2067
|
-
function compareMultiple(object, other, orders) {
|
|
2068
|
-
for (var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length2 = objCriteria.length, ordersLength = orders.length; ++index < length2; ) {
|
|
2069
|
-
var result2 = compareAscending(objCriteria[index], othCriteria[index]);
|
|
2070
|
-
if (result2) {
|
|
2071
|
-
if (index >= ordersLength)
|
|
2072
|
-
return result2;
|
|
2073
|
-
var order = orders[index];
|
|
2074
|
-
return result2 * (order == "desc" ? -1 : 1);
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
return object.index - other.index;
|
|
2078
|
-
}
|
|
2079
|
-
function composeArgs(args, partials, holders, isCurried) {
|
|
2080
|
-
for (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; ++leftIndex < leftLength; )
|
|
2081
|
-
result2[leftIndex] = partials[leftIndex];
|
|
2082
|
-
for (; ++argsIndex < holdersLength; )
|
|
2083
|
-
(isUncurried || argsIndex < argsLength) && (result2[holders[argsIndex]] = args[argsIndex]);
|
|
2084
|
-
for (; rangeLength--; )
|
|
2085
|
-
result2[leftIndex++] = args[argsIndex++];
|
|
2086
|
-
return result2;
|
|
2087
|
-
}
|
|
2088
|
-
function composeArgsRight(args, partials, holders, isCurried) {
|
|
2089
|
-
for (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; ++argsIndex < rangeLength; )
|
|
2090
|
-
result2[argsIndex] = args[argsIndex];
|
|
2091
|
-
for (var offset = argsIndex; ++rightIndex < rightLength; )
|
|
2092
|
-
result2[offset + rightIndex] = partials[rightIndex];
|
|
2093
|
-
for (; ++holdersIndex < holdersLength; )
|
|
2094
|
-
(isUncurried || argsIndex < argsLength) && (result2[offset + holders[holdersIndex]] = args[argsIndex++]);
|
|
2095
|
-
return result2;
|
|
2096
|
-
}
|
|
2097
|
-
function copyArray(source, array) {
|
|
2098
|
-
var index = -1, length2 = source.length;
|
|
2099
|
-
for (array || (array = Array2(length2)); ++index < length2; )
|
|
2100
|
-
array[index] = source[index];
|
|
2101
|
-
return array;
|
|
2102
|
-
}
|
|
2103
|
-
function copyObject(source, props, object, customizer) {
|
|
2104
|
-
var isNew = !object;
|
|
2105
|
-
object || (object = {});
|
|
2106
|
-
for (var index = -1, length2 = props.length; ++index < length2; ) {
|
|
2107
|
-
var key = props[index], newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined$1;
|
|
2108
|
-
newValue === undefined$1 && (newValue = source[key]), isNew ? baseAssignValue(object, key, newValue) : assignValue(object, key, newValue);
|
|
2109
|
-
}
|
|
2110
|
-
return object;
|
|
2111
|
-
}
|
|
2112
|
-
function copySymbols(source, object) {
|
|
2113
|
-
return copyObject(source, getSymbols(source), object);
|
|
2114
|
-
}
|
|
2115
|
-
function copySymbolsIn(source, object) {
|
|
2116
|
-
return copyObject(source, getSymbolsIn(source), object);
|
|
2117
|
-
}
|
|
2118
|
-
function createAggregator(setter, initializer) {
|
|
2119
|
-
return function(collection, iteratee2) {
|
|
2120
|
-
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
|
|
2121
|
-
return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
|
|
2122
|
-
};
|
|
2123
|
-
}
|
|
2124
|
-
function createAssigner(assigner) {
|
|
2125
|
-
return baseRest(function(object, sources) {
|
|
2126
|
-
var index = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : undefined$1, guard = length2 > 2 ? sources[2] : undefined$1;
|
|
2127
|
-
for (customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : undefined$1, guard && isIterateeCall(sources[0], sources[1], guard) && (customizer = length2 < 3 ? undefined$1 : customizer, length2 = 1), object = Object2(object); ++index < length2; ) {
|
|
2128
|
-
var source = sources[index];
|
|
2129
|
-
source && assigner(object, source, index, customizer);
|
|
2130
|
-
}
|
|
2131
|
-
return object;
|
|
2132
|
-
});
|
|
2133
|
-
}
|
|
2134
|
-
function createBaseEach(eachFunc, fromRight) {
|
|
2135
|
-
return function(collection, iteratee2) {
|
|
2136
|
-
if (collection == null)
|
|
2137
|
-
return collection;
|
|
2138
|
-
if (!isArrayLike(collection))
|
|
2139
|
-
return eachFunc(collection, iteratee2);
|
|
2140
|
-
for (var length2 = collection.length, index = fromRight ? length2 : -1, iterable = Object2(collection); (fromRight ? index-- : ++index < length2) && iteratee2(iterable[index], index, iterable) !== !1; )
|
|
2141
|
-
;
|
|
2142
|
-
return collection;
|
|
2143
|
-
};
|
|
2144
|
-
}
|
|
2145
|
-
function createBaseFor(fromRight) {
|
|
2146
|
-
return function(object, iteratee2, keysFunc) {
|
|
2147
|
-
for (var index = -1, iterable = Object2(object), props = keysFunc(object), length2 = props.length; length2--; ) {
|
|
2148
|
-
var key = props[fromRight ? length2 : ++index];
|
|
2149
|
-
if (iteratee2(iterable[key], key, iterable) === !1)
|
|
2150
|
-
break;
|
|
2151
|
-
}
|
|
2152
|
-
return object;
|
|
2153
|
-
};
|
|
2154
|
-
}
|
|
2155
|
-
function createBind(func, bitmask, thisArg) {
|
|
2156
|
-
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
|
2157
|
-
function wrapper() {
|
|
2158
|
-
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
|
2159
|
-
return fn.apply(isBind ? thisArg : this, arguments);
|
|
2160
|
-
}
|
|
2161
|
-
return wrapper;
|
|
2162
|
-
}
|
|
2163
|
-
function createCaseFirst(methodName) {
|
|
2164
|
-
return function(string) {
|
|
2165
|
-
string = toString(string);
|
|
2166
|
-
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1, chr = strSymbols ? strSymbols[0] : string.charAt(0), trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
2167
|
-
return chr[methodName]() + trailing;
|
|
2168
|
-
};
|
|
2169
|
-
}
|
|
2170
|
-
function createCompounder(callback) {
|
|
2171
|
-
return function(string) {
|
|
2172
|
-
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
|
|
2173
|
-
};
|
|
2174
|
-
}
|
|
2175
|
-
function createCtor(Ctor) {
|
|
2176
|
-
return function() {
|
|
2177
|
-
var args = arguments;
|
|
2178
|
-
switch (args.length) {
|
|
2179
|
-
case 0:
|
|
2180
|
-
return new Ctor();
|
|
2181
|
-
case 1:
|
|
2182
|
-
return new Ctor(args[0]);
|
|
2183
|
-
case 2:
|
|
2184
|
-
return new Ctor(args[0], args[1]);
|
|
2185
|
-
case 3:
|
|
2186
|
-
return new Ctor(args[0], args[1], args[2]);
|
|
2187
|
-
case 4:
|
|
2188
|
-
return new Ctor(args[0], args[1], args[2], args[3]);
|
|
2189
|
-
case 5:
|
|
2190
|
-
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
|
2191
|
-
case 6:
|
|
2192
|
-
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
|
2193
|
-
case 7:
|
|
2194
|
-
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
2195
|
-
}
|
|
2196
|
-
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
|
2197
|
-
return isObject(result2) ? result2 : thisBinding;
|
|
2198
|
-
};
|
|
2199
|
-
}
|
|
2200
|
-
function createCurry(func, bitmask, arity) {
|
|
2201
|
-
var Ctor = createCtor(func);
|
|
2202
|
-
function wrapper() {
|
|
2203
|
-
for (var length2 = arguments.length, args = Array2(length2), index = length2, placeholder = getHolder(wrapper); index--; )
|
|
2204
|
-
args[index] = arguments[index];
|
|
2205
|
-
var holders = length2 < 3 && args[0] !== placeholder && args[length2 - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|
2206
|
-
if (length2 -= holders.length, length2 < arity)
|
|
2207
|
-
return createRecurry(
|
|
2208
|
-
func,
|
|
2209
|
-
bitmask,
|
|
2210
|
-
createHybrid,
|
|
2211
|
-
wrapper.placeholder,
|
|
2212
|
-
undefined$1,
|
|
2213
|
-
args,
|
|
2214
|
-
holders,
|
|
2215
|
-
undefined$1,
|
|
2216
|
-
undefined$1,
|
|
2217
|
-
arity - length2
|
|
2218
|
-
);
|
|
2219
|
-
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
|
2220
|
-
return apply(fn, this, args);
|
|
2221
|
-
}
|
|
2222
|
-
return wrapper;
|
|
2223
|
-
}
|
|
2224
|
-
function createFind(findIndexFunc) {
|
|
2225
|
-
return function(collection, predicate, fromIndex) {
|
|
2226
|
-
var iterable = Object2(collection);
|
|
2227
|
-
if (!isArrayLike(collection)) {
|
|
2228
|
-
var iteratee2 = getIteratee(predicate, 3);
|
|
2229
|
-
collection = keys(collection), predicate = function(key) {
|
|
2230
|
-
return iteratee2(iterable[key], key, iterable);
|
|
2231
|
-
};
|
|
2232
|
-
}
|
|
2233
|
-
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
2234
|
-
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined$1;
|
|
2235
|
-
};
|
|
2236
|
-
}
|
|
2237
|
-
function createFlow(fromRight) {
|
|
2238
|
-
return flatRest(function(funcs) {
|
|
2239
|
-
var length2 = funcs.length, index = length2, prereq = LodashWrapper.prototype.thru;
|
|
2240
|
-
for (fromRight && funcs.reverse(); index--; ) {
|
|
2241
|
-
var func = funcs[index];
|
|
2242
|
-
if (typeof func != "function")
|
|
2243
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2244
|
-
if (prereq && !wrapper && getFuncName(func) == "wrapper")
|
|
2245
|
-
var wrapper = new LodashWrapper([], !0);
|
|
2246
|
-
}
|
|
2247
|
-
for (index = wrapper ? index : length2; ++index < length2; ) {
|
|
2248
|
-
func = funcs[index];
|
|
2249
|
-
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
|
|
2250
|
-
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]) : wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
|
|
2251
|
-
}
|
|
2252
|
-
return function() {
|
|
2253
|
-
var args = arguments, value = args[0];
|
|
2254
|
-
if (wrapper && args.length == 1 && isArray(value))
|
|
2255
|
-
return wrapper.plant(value).value();
|
|
2256
|
-
for (var index2 = 0, result2 = length2 ? funcs[index2].apply(this, args) : value; ++index2 < length2; )
|
|
2257
|
-
result2 = funcs[index2].call(this, result2);
|
|
2258
|
-
return result2;
|
|
2259
|
-
};
|
|
2260
|
-
});
|
|
2261
|
-
}
|
|
2262
|
-
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
|
2263
|
-
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);
|
|
2264
|
-
function wrapper() {
|
|
2265
|
-
for (var length2 = arguments.length, args = Array2(length2), index = length2; index--; )
|
|
2266
|
-
args[index] = arguments[index];
|
|
2267
|
-
if (isCurried)
|
|
2268
|
-
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
|
2269
|
-
if (partials && (args = composeArgs(args, partials, holders, isCurried)), partialsRight && (args = composeArgsRight(args, partialsRight, holdersRight, isCurried)), length2 -= holdersCount, isCurried && length2 < arity) {
|
|
2270
|
-
var newHolders = replaceHolders(args, placeholder);
|
|
2271
|
-
return createRecurry(
|
|
2272
|
-
func,
|
|
2273
|
-
bitmask,
|
|
2274
|
-
createHybrid,
|
|
2275
|
-
wrapper.placeholder,
|
|
2276
|
-
thisArg,
|
|
2277
|
-
args,
|
|
2278
|
-
newHolders,
|
|
2279
|
-
argPos,
|
|
2280
|
-
ary2,
|
|
2281
|
-
arity - length2
|
|
2282
|
-
);
|
|
2283
|
-
}
|
|
2284
|
-
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
|
|
2285
|
-
return length2 = args.length, argPos ? args = reorder(args, argPos) : isFlip && length2 > 1 && args.reverse(), isAry && ary2 < length2 && (args.length = ary2), this && this !== root && this instanceof wrapper && (fn = Ctor || createCtor(fn)), fn.apply(thisBinding, args);
|
|
2286
|
-
}
|
|
2287
|
-
return wrapper;
|
|
2288
|
-
}
|
|
2289
|
-
function createInverter(setter, toIteratee) {
|
|
2290
|
-
return function(object, iteratee2) {
|
|
2291
|
-
return baseInverter(object, setter, toIteratee(iteratee2), {});
|
|
2292
|
-
};
|
|
2293
|
-
}
|
|
2294
|
-
function createMathOperation(operator, defaultValue) {
|
|
2295
|
-
return function(value, other) {
|
|
2296
|
-
var result2;
|
|
2297
|
-
if (value === undefined$1 && other === undefined$1)
|
|
2298
|
-
return defaultValue;
|
|
2299
|
-
if (value !== undefined$1 && (result2 = value), other !== undefined$1) {
|
|
2300
|
-
if (result2 === undefined$1)
|
|
2301
|
-
return other;
|
|
2302
|
-
typeof value == "string" || typeof other == "string" ? (value = baseToString(value), other = baseToString(other)) : (value = baseToNumber(value), other = baseToNumber(other)), result2 = operator(value, other);
|
|
2303
|
-
}
|
|
2304
|
-
return result2;
|
|
2305
|
-
};
|
|
2306
|
-
}
|
|
2307
|
-
function createOver(arrayFunc) {
|
|
2308
|
-
return flatRest(function(iteratees) {
|
|
2309
|
-
return iteratees = arrayMap(iteratees, baseUnary(getIteratee())), baseRest(function(args) {
|
|
2310
|
-
var thisArg = this;
|
|
2311
|
-
return arrayFunc(iteratees, function(iteratee2) {
|
|
2312
|
-
return apply(iteratee2, thisArg, args);
|
|
2313
|
-
});
|
|
2314
|
-
});
|
|
2315
|
-
});
|
|
2316
|
-
}
|
|
2317
|
-
function createPadding(length2, chars) {
|
|
2318
|
-
chars = chars === undefined$1 ? " " : baseToString(chars);
|
|
2319
|
-
var charsLength = chars.length;
|
|
2320
|
-
if (charsLength < 2)
|
|
2321
|
-
return charsLength ? baseRepeat(chars, length2) : chars;
|
|
2322
|
-
var result2 = baseRepeat(chars, nativeCeil(length2 / stringSize(chars)));
|
|
2323
|
-
return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length2).join("") : result2.slice(0, length2);
|
|
2324
|
-
}
|
|
2325
|
-
function createPartial(func, bitmask, thisArg, partials) {
|
|
2326
|
-
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
|
|
2327
|
-
function wrapper() {
|
|
2328
|
-
for (var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; ++leftIndex < leftLength; )
|
|
2329
|
-
args[leftIndex] = partials[leftIndex];
|
|
2330
|
-
for (; argsLength--; )
|
|
2331
|
-
args[leftIndex++] = arguments[++argsIndex];
|
|
2332
|
-
return apply(fn, isBind ? thisArg : this, args);
|
|
2333
|
-
}
|
|
2334
|
-
return wrapper;
|
|
2335
|
-
}
|
|
2336
|
-
function createRange(fromRight) {
|
|
2337
|
-
return function(start, end, step) {
|
|
2338
|
-
return step && typeof step != "number" && isIterateeCall(start, end, step) && (end = step = undefined$1), start = toFinite(start), end === undefined$1 ? (end = start, start = 0) : end = toFinite(end), step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step), baseRange(start, end, step, fromRight);
|
|
2339
|
-
};
|
|
2340
|
-
}
|
|
2341
|
-
function createRelationalOperation(operator) {
|
|
2342
|
-
return function(value, other) {
|
|
2343
|
-
return typeof value == "string" && typeof other == "string" || (value = toNumber(value), other = toNumber(other)), operator(value, other);
|
|
2344
|
-
};
|
|
2345
|
-
}
|
|
2346
|
-
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
|
|
2347
|
-
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;
|
|
2348
|
-
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG, bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG), bitmask & WRAP_CURRY_BOUND_FLAG || (bitmask &= -4);
|
|
2349
|
-
var newData = [
|
|
2350
|
-
func,
|
|
2351
|
-
bitmask,
|
|
2352
|
-
thisArg,
|
|
2353
|
-
newPartials,
|
|
2354
|
-
newHolders,
|
|
2355
|
-
newPartialsRight,
|
|
2356
|
-
newHoldersRight,
|
|
2357
|
-
argPos,
|
|
2358
|
-
ary2,
|
|
2359
|
-
arity
|
|
2360
|
-
], result2 = wrapFunc.apply(undefined$1, newData);
|
|
2361
|
-
return isLaziable(func) && setData(result2, newData), result2.placeholder = placeholder, setWrapToString(result2, func, bitmask);
|
|
2362
|
-
}
|
|
2363
|
-
function createRound(methodName) {
|
|
2364
|
-
var func = Math2[methodName];
|
|
2365
|
-
return function(number, precision) {
|
|
2366
|
-
if (number = toNumber(number), precision = precision == null ? 0 : nativeMin(toInteger(precision), 292), precision && nativeIsFinite(number)) {
|
|
2367
|
-
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
|
|
2368
|
-
return pair = (toString(value) + "e").split("e"), +(pair[0] + "e" + (+pair[1] - precision));
|
|
2369
|
-
}
|
|
2370
|
-
return func(number);
|
|
2371
|
-
};
|
|
2372
|
-
}
|
|
2373
|
-
var createSet = Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY ? function(values2) {
|
|
2374
|
-
return new Set2(values2);
|
|
2375
|
-
} : noop;
|
|
2376
|
-
function createToPairs(keysFunc) {
|
|
2377
|
-
return function(object) {
|
|
2378
|
-
var tag = getTag(object);
|
|
2379
|
-
return tag == mapTag ? mapToArray(object) : tag == setTag ? setToPairs(object) : baseToPairs(object, keysFunc(object));
|
|
2380
|
-
};
|
|
2381
|
-
}
|
|
2382
|
-
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
|
|
2383
|
-
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
|
|
2384
|
-
if (!isBindKey && typeof func != "function")
|
|
2385
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2386
|
-
var length2 = partials ? partials.length : 0;
|
|
2387
|
-
if (length2 || (bitmask &= -97, partials = holders = undefined$1), ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0), arity = arity === undefined$1 ? arity : toInteger(arity), length2 -= holders ? holders.length : 0, bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
|
|
2388
|
-
var partialsRight = partials, holdersRight = holders;
|
|
2389
|
-
partials = holders = undefined$1;
|
|
2390
|
-
}
|
|
2391
|
-
var data = isBindKey ? undefined$1 : getData(func), newData = [
|
|
2392
|
-
func,
|
|
2393
|
-
bitmask,
|
|
2394
|
-
thisArg,
|
|
2395
|
-
partials,
|
|
2396
|
-
holders,
|
|
2397
|
-
partialsRight,
|
|
2398
|
-
holdersRight,
|
|
2399
|
-
argPos,
|
|
2400
|
-
ary2,
|
|
2401
|
-
arity
|
|
2402
|
-
];
|
|
2403
|
-
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] - length2, 0), !arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG) && (bitmask &= -25), !bitmask || bitmask == WRAP_BIND_FLAG)
|
|
2404
|
-
var result2 = createBind(func, bitmask, thisArg);
|
|
2405
|
-
else bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG ? result2 = createCurry(func, bitmask, arity) : (bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length ? result2 = createPartial(func, bitmask, thisArg, partials) : result2 = createHybrid.apply(undefined$1, newData);
|
|
2406
|
-
var setter = data ? baseSetData : setData;
|
|
2407
|
-
return setWrapToString(setter(result2, newData), func, bitmask);
|
|
2408
|
-
}
|
|
2409
|
-
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
|
2410
|
-
return objValue === undefined$1 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key) ? srcValue : objValue;
|
|
2411
|
-
}
|
|
2412
|
-
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2413
|
-
return isObject(objValue) && isObject(srcValue) && (stack.set(srcValue, objValue), baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack), stack.delete(srcValue)), objValue;
|
|
2414
|
-
}
|
|
2415
|
-
function customOmitClone(value) {
|
|
2416
|
-
return isPlainObject(value) ? undefined$1 : value;
|
|
2417
|
-
}
|
|
2418
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
2419
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
2420
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength))
|
|
2421
|
-
return !1;
|
|
2422
|
-
var arrStacked = stack.get(array), othStacked = stack.get(other);
|
|
2423
|
-
if (arrStacked && othStacked)
|
|
2424
|
-
return arrStacked == other && othStacked == array;
|
|
2425
|
-
var index = -1, result2 = !0, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
|
|
2426
|
-
for (stack.set(array, other), stack.set(other, array); ++index < arrLength; ) {
|
|
2427
|
-
var arrValue = array[index], othValue = other[index];
|
|
2428
|
-
if (customizer)
|
|
2429
|
-
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
2430
|
-
if (compared !== undefined$1) {
|
|
2431
|
-
if (compared)
|
|
2432
|
-
continue;
|
|
2433
|
-
result2 = !1;
|
|
2434
|
-
break;
|
|
2435
|
-
}
|
|
2436
|
-
if (seen) {
|
|
2437
|
-
if (!arraySome(other, function(othValue2, othIndex) {
|
|
2438
|
-
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack)))
|
|
2439
|
-
return seen.push(othIndex);
|
|
2440
|
-
})) {
|
|
2441
|
-
result2 = !1;
|
|
2442
|
-
break;
|
|
2443
|
-
}
|
|
2444
|
-
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
2445
|
-
result2 = !1;
|
|
2446
|
-
break;
|
|
2447
|
-
}
|
|
2448
|
-
}
|
|
2449
|
-
return stack.delete(array), stack.delete(other), result2;
|
|
2450
|
-
}
|
|
2451
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
2452
|
-
switch (tag) {
|
|
2453
|
-
case dataViewTag:
|
|
2454
|
-
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset)
|
|
2455
|
-
return !1;
|
|
2456
|
-
object = object.buffer, other = other.buffer;
|
|
2457
|
-
case arrayBufferTag:
|
|
2458
|
-
return !(object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other)));
|
|
2459
|
-
case boolTag:
|
|
2460
|
-
case dateTag:
|
|
2461
|
-
case numberTag:
|
|
2462
|
-
return eq(+object, +other);
|
|
2463
|
-
case errorTag:
|
|
2464
|
-
return object.name == other.name && object.message == other.message;
|
|
2465
|
-
case regexpTag:
|
|
2466
|
-
case stringTag:
|
|
2467
|
-
return object == other + "";
|
|
2468
|
-
case mapTag:
|
|
2469
|
-
var convert = mapToArray;
|
|
2470
|
-
case setTag:
|
|
2471
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
2472
|
-
if (convert || (convert = setToArray), object.size != other.size && !isPartial)
|
|
2473
|
-
return !1;
|
|
2474
|
-
var stacked = stack.get(object);
|
|
2475
|
-
if (stacked)
|
|
2476
|
-
return stacked == other;
|
|
2477
|
-
bitmask |= COMPARE_UNORDERED_FLAG, stack.set(object, other);
|
|
2478
|
-
var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
2479
|
-
return stack.delete(object), result2;
|
|
2480
|
-
case symbolTag:
|
|
2481
|
-
if (symbolValueOf)
|
|
2482
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
2483
|
-
}
|
|
2484
|
-
return !1;
|
|
2485
|
-
}
|
|
2486
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
2487
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
2488
|
-
if (objLength != othLength && !isPartial)
|
|
2489
|
-
return !1;
|
|
2490
|
-
for (var index = objLength; index--; ) {
|
|
2491
|
-
var key = objProps[index];
|
|
2492
|
-
if (!(isPartial ? key in other : hasOwnProperty.call(other, key)))
|
|
2493
|
-
return !1;
|
|
2494
|
-
}
|
|
2495
|
-
var objStacked = stack.get(object), othStacked = stack.get(other);
|
|
2496
|
-
if (objStacked && othStacked)
|
|
2497
|
-
return objStacked == other && othStacked == object;
|
|
2498
|
-
var result2 = !0;
|
|
2499
|
-
stack.set(object, other), stack.set(other, object);
|
|
2500
|
-
for (var skipCtor = isPartial; ++index < objLength; ) {
|
|
2501
|
-
key = objProps[index];
|
|
2502
|
-
var objValue = object[key], othValue = other[key];
|
|
2503
|
-
if (customizer)
|
|
2504
|
-
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
2505
|
-
if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
2506
|
-
result2 = !1;
|
|
2507
|
-
break;
|
|
2508
|
-
}
|
|
2509
|
-
skipCtor || (skipCtor = key == "constructor");
|
|
2510
|
-
}
|
|
2511
|
-
if (result2 && !skipCtor) {
|
|
2512
|
-
var objCtor = object.constructor, othCtor = other.constructor;
|
|
2513
|
-
objCtor != othCtor && "constructor" in object && "constructor" in other && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor) && (result2 = !1);
|
|
2514
|
-
}
|
|
2515
|
-
return stack.delete(object), stack.delete(other), result2;
|
|
2516
|
-
}
|
|
2517
|
-
function flatRest(func) {
|
|
2518
|
-
return setToString(overRest(func, undefined$1, flatten), func + "");
|
|
2519
|
-
}
|
|
2520
|
-
function getAllKeys(object) {
|
|
2521
|
-
return baseGetAllKeys(object, keys, getSymbols);
|
|
2522
|
-
}
|
|
2523
|
-
function getAllKeysIn(object) {
|
|
2524
|
-
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|
2525
|
-
}
|
|
2526
|
-
var getData = metaMap ? function(func) {
|
|
2527
|
-
return metaMap.get(func);
|
|
2528
|
-
} : noop;
|
|
2529
|
-
function getFuncName(func) {
|
|
2530
|
-
for (var result2 = func.name + "", array = realNames[result2], length2 = hasOwnProperty.call(realNames, result2) ? array.length : 0; length2--; ) {
|
|
2531
|
-
var data = array[length2], otherFunc = data.func;
|
|
2532
|
-
if (otherFunc == null || otherFunc == func)
|
|
2533
|
-
return data.name;
|
|
2534
|
-
}
|
|
2535
|
-
return result2;
|
|
2536
|
-
}
|
|
2537
|
-
function getHolder(func) {
|
|
2538
|
-
var object = hasOwnProperty.call(lodash2, "placeholder") ? lodash2 : func;
|
|
2539
|
-
return object.placeholder;
|
|
2540
|
-
}
|
|
2541
|
-
function getIteratee() {
|
|
2542
|
-
var result2 = lodash2.iteratee || iteratee;
|
|
2543
|
-
return result2 = result2 === iteratee ? baseIteratee : result2, arguments.length ? result2(arguments[0], arguments[1]) : result2;
|
|
2544
|
-
}
|
|
2545
|
-
function getMapData(map2, key) {
|
|
2546
|
-
var data = map2.__data__;
|
|
2547
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
2548
|
-
}
|
|
2549
|
-
function getMatchData(object) {
|
|
2550
|
-
for (var result2 = keys(object), length2 = result2.length; length2--; ) {
|
|
2551
|
-
var key = result2[length2], value = object[key];
|
|
2552
|
-
result2[length2] = [key, value, isStrictComparable(value)];
|
|
2553
|
-
}
|
|
2554
|
-
return result2;
|
|
2555
|
-
}
|
|
2556
|
-
function getNative(object, key) {
|
|
2557
|
-
var value = getValue(object, key);
|
|
2558
|
-
return baseIsNative(value) ? value : undefined$1;
|
|
2559
|
-
}
|
|
2560
|
-
function getRawTag(value) {
|
|
2561
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
2562
|
-
try {
|
|
2563
|
-
value[symToStringTag] = undefined$1;
|
|
2564
|
-
var unmasked = !0;
|
|
2565
|
-
} catch {
|
|
2566
|
-
}
|
|
2567
|
-
var result2 = nativeObjectToString.call(value);
|
|
2568
|
-
return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result2;
|
|
2569
|
-
}
|
|
2570
|
-
var getSymbols = nativeGetSymbols ? function(object) {
|
|
2571
|
-
return object == null ? [] : (object = Object2(object), arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
2572
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
2573
|
-
}));
|
|
2574
|
-
} : stubArray, getSymbolsIn = nativeGetSymbols ? function(object) {
|
|
2575
|
-
for (var result2 = []; object; )
|
|
2576
|
-
arrayPush(result2, getSymbols(object)), object = getPrototype(object);
|
|
2577
|
-
return result2;
|
|
2578
|
-
} : stubArray, getTag = baseGetTag;
|
|
2579
|
-
(DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) && (getTag = function(value) {
|
|
2580
|
-
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
2581
|
-
if (ctorString)
|
|
2582
|
-
switch (ctorString) {
|
|
2583
|
-
case dataViewCtorString:
|
|
2584
|
-
return dataViewTag;
|
|
2585
|
-
case mapCtorString:
|
|
2586
|
-
return mapTag;
|
|
2587
|
-
case promiseCtorString:
|
|
2588
|
-
return promiseTag;
|
|
2589
|
-
case setCtorString:
|
|
2590
|
-
return setTag;
|
|
2591
|
-
case weakMapCtorString:
|
|
2592
|
-
return weakMapTag;
|
|
2593
|
-
}
|
|
2594
|
-
return result2;
|
|
2595
|
-
});
|
|
2596
|
-
function getView(start, end, transforms) {
|
|
2597
|
-
for (var index = -1, length2 = transforms.length; ++index < length2; ) {
|
|
2598
|
-
var data = transforms[index], size2 = data.size;
|
|
2599
|
-
switch (data.type) {
|
|
2600
|
-
case "drop":
|
|
2601
|
-
start += size2;
|
|
2602
|
-
break;
|
|
2603
|
-
case "dropRight":
|
|
2604
|
-
end -= size2;
|
|
2605
|
-
break;
|
|
2606
|
-
case "take":
|
|
2607
|
-
end = nativeMin(end, start + size2);
|
|
2608
|
-
break;
|
|
2609
|
-
case "takeRight":
|
|
2610
|
-
start = nativeMax(start, end - size2);
|
|
2611
|
-
break;
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
return { start, end };
|
|
2615
|
-
}
|
|
2616
|
-
function getWrapDetails(source) {
|
|
2617
|
-
var match2 = source.match(reWrapDetails);
|
|
2618
|
-
return match2 ? match2[1].split(reSplitDetails) : [];
|
|
2619
|
-
}
|
|
2620
|
-
function hasPath(object, path, hasFunc) {
|
|
2621
|
-
path = castPath(path, object);
|
|
2622
|
-
for (var index = -1, length2 = path.length, result2 = !1; ++index < length2; ) {
|
|
2623
|
-
var key = toKey(path[index]);
|
|
2624
|
-
if (!(result2 = object != null && hasFunc(object, key)))
|
|
2625
|
-
break;
|
|
2626
|
-
object = object[key];
|
|
2627
|
-
}
|
|
2628
|
-
return result2 || ++index != length2 ? result2 : (length2 = object == null ? 0 : object.length, !!length2 && isLength(length2) && isIndex(key, length2) && (isArray(object) || isArguments(object)));
|
|
2629
|
-
}
|
|
2630
|
-
function initCloneArray(array) {
|
|
2631
|
-
var length2 = array.length, result2 = new array.constructor(length2);
|
|
2632
|
-
return length2 && typeof array[0] == "string" && hasOwnProperty.call(array, "index") && (result2.index = array.index, result2.input = array.input), result2;
|
|
2633
|
-
}
|
|
2634
|
-
function initCloneObject(object) {
|
|
2635
|
-
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
2636
|
-
}
|
|
2637
|
-
function initCloneByTag(object, tag, isDeep) {
|
|
2638
|
-
var Ctor = object.constructor;
|
|
2639
|
-
switch (tag) {
|
|
2640
|
-
case arrayBufferTag:
|
|
2641
|
-
return cloneArrayBuffer(object);
|
|
2642
|
-
case boolTag:
|
|
2643
|
-
case dateTag:
|
|
2644
|
-
return new Ctor(+object);
|
|
2645
|
-
case dataViewTag:
|
|
2646
|
-
return cloneDataView(object, isDeep);
|
|
2647
|
-
case float32Tag:
|
|
2648
|
-
case float64Tag:
|
|
2649
|
-
case int8Tag:
|
|
2650
|
-
case int16Tag:
|
|
2651
|
-
case int32Tag:
|
|
2652
|
-
case uint8Tag:
|
|
2653
|
-
case uint8ClampedTag:
|
|
2654
|
-
case uint16Tag:
|
|
2655
|
-
case uint32Tag:
|
|
2656
|
-
return cloneTypedArray(object, isDeep);
|
|
2657
|
-
case mapTag:
|
|
2658
|
-
return new Ctor();
|
|
2659
|
-
case numberTag:
|
|
2660
|
-
case stringTag:
|
|
2661
|
-
return new Ctor(object);
|
|
2662
|
-
case regexpTag:
|
|
2663
|
-
return cloneRegExp(object);
|
|
2664
|
-
case setTag:
|
|
2665
|
-
return new Ctor();
|
|
2666
|
-
case symbolTag:
|
|
2667
|
-
return cloneSymbol(object);
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
function insertWrapDetails(source, details) {
|
|
2671
|
-
var length2 = details.length;
|
|
2672
|
-
if (!length2)
|
|
2673
|
-
return source;
|
|
2674
|
-
var lastIndex = length2 - 1;
|
|
2675
|
-
return details[lastIndex] = (length2 > 1 ? "& " : "") + details[lastIndex], details = details.join(length2 > 2 ? ", " : " "), source.replace(reWrapComment, `{
|
|
2676
|
-
/* [wrapped with ` + details + `] */
|
|
2677
|
-
`);
|
|
2678
|
-
}
|
|
2679
|
-
function isFlattenable(value) {
|
|
2680
|
-
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
2681
|
-
}
|
|
2682
|
-
function isIndex(value, length2) {
|
|
2683
|
-
var type = typeof value;
|
|
2684
|
-
return length2 = length2 ?? MAX_SAFE_INTEGER, !!length2 && (type == "number" || type != "symbol" && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length2;
|
|
2685
|
-
}
|
|
2686
|
-
function isIterateeCall(value, index, object) {
|
|
2687
|
-
if (!isObject(object))
|
|
2688
|
-
return !1;
|
|
2689
|
-
var type = typeof index;
|
|
2690
|
-
return (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) ? eq(object[index], value) : !1;
|
|
2691
|
-
}
|
|
2692
|
-
function isKey(value, object) {
|
|
2693
|
-
if (isArray(value))
|
|
2694
|
-
return !1;
|
|
2695
|
-
var type = typeof value;
|
|
2696
|
-
return type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value) ? !0 : reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
|
|
2697
|
-
}
|
|
2698
|
-
function isKeyable(value) {
|
|
2699
|
-
var type = typeof value;
|
|
2700
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
2701
|
-
}
|
|
2702
|
-
function isLaziable(func) {
|
|
2703
|
-
var funcName = getFuncName(func), other = lodash2[funcName];
|
|
2704
|
-
if (typeof other != "function" || !(funcName in LazyWrapper.prototype))
|
|
2705
|
-
return !1;
|
|
2706
|
-
if (func === other)
|
|
2707
|
-
return !0;
|
|
2708
|
-
var data = getData(other);
|
|
2709
|
-
return !!data && func === data[0];
|
|
2710
|
-
}
|
|
2711
|
-
function isMasked(func) {
|
|
2712
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
2713
|
-
}
|
|
2714
|
-
var isMaskable = coreJsData ? isFunction : stubFalse;
|
|
2715
|
-
function isPrototype(value) {
|
|
2716
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
2717
|
-
return value === proto;
|
|
2718
|
-
}
|
|
2719
|
-
function isStrictComparable(value) {
|
|
2720
|
-
return value === value && !isObject(value);
|
|
2721
|
-
}
|
|
2722
|
-
function matchesStrictComparable(key, srcValue) {
|
|
2723
|
-
return function(object) {
|
|
2724
|
-
return object == null ? !1 : object[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object));
|
|
2725
|
-
};
|
|
2726
|
-
}
|
|
2727
|
-
function memoizeCapped(func) {
|
|
2728
|
-
var result2 = memoize2(func, function(key) {
|
|
2729
|
-
return cache.size === MAX_MEMOIZE_SIZE && cache.clear(), key;
|
|
2730
|
-
}), cache = result2.cache;
|
|
2731
|
-
return result2;
|
|
2732
|
-
}
|
|
2733
|
-
function mergeData(data, source) {
|
|
2734
|
-
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG), 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;
|
|
2735
|
-
if (!(isCommon || isCombo))
|
|
2736
|
-
return data;
|
|
2737
|
-
srcBitmask & WRAP_BIND_FLAG && (data[2] = source[2], newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG);
|
|
2738
|
-
var value = source[3];
|
|
2739
|
-
if (value) {
|
|
2740
|
-
var partials = data[3];
|
|
2741
|
-
data[3] = partials ? composeArgs(partials, value, source[4]) : value, data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
|
2742
|
-
}
|
|
2743
|
-
return value = source[5], 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], value && (data[7] = value), srcBitmask & WRAP_ARY_FLAG && (data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8])), data[9] == null && (data[9] = source[9]), data[0] = source[0], data[1] = newBitmask, data;
|
|
2744
|
-
}
|
|
2745
|
-
function nativeKeysIn(object) {
|
|
2746
|
-
var result2 = [];
|
|
2747
|
-
if (object != null)
|
|
2748
|
-
for (var key in Object2(object))
|
|
2749
|
-
result2.push(key);
|
|
2750
|
-
return result2;
|
|
2751
|
-
}
|
|
2752
|
-
function objectToString(value) {
|
|
2753
|
-
return nativeObjectToString.call(value);
|
|
2754
|
-
}
|
|
2755
|
-
function overRest(func, start, transform2) {
|
|
2756
|
-
return start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0), function() {
|
|
2757
|
-
for (var args = arguments, index = -1, length2 = nativeMax(args.length - start, 0), array = Array2(length2); ++index < length2; )
|
|
2758
|
-
array[index] = args[start + index];
|
|
2759
|
-
index = -1;
|
|
2760
|
-
for (var otherArgs = Array2(start + 1); ++index < start; )
|
|
2761
|
-
otherArgs[index] = args[index];
|
|
2762
|
-
return otherArgs[start] = transform2(array), apply(func, this, otherArgs);
|
|
2763
|
-
};
|
|
2764
|
-
}
|
|
2765
|
-
function parent(object, path) {
|
|
2766
|
-
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
2767
|
-
}
|
|
2768
|
-
function reorder(array, indexes) {
|
|
2769
|
-
for (var arrLength = array.length, length2 = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); length2--; ) {
|
|
2770
|
-
var index = indexes[length2];
|
|
2771
|
-
array[length2] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
|
|
2772
|
-
}
|
|
2773
|
-
return array;
|
|
2774
|
-
}
|
|
2775
|
-
function safeGet(object, key) {
|
|
2776
|
-
if (!(key === "constructor" && typeof object[key] == "function") && key != "__proto__")
|
|
2777
|
-
return object[key];
|
|
2778
|
-
}
|
|
2779
|
-
var setData = shortOut(baseSetData), setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
2780
|
-
return root.setTimeout(func, wait);
|
|
2781
|
-
}, setToString = shortOut(baseSetToString);
|
|
2782
|
-
function setWrapToString(wrapper, reference, bitmask) {
|
|
2783
|
-
var source = reference + "";
|
|
2784
|
-
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
|
|
2785
|
-
}
|
|
2786
|
-
function shortOut(func) {
|
|
2787
|
-
var count = 0, lastCalled = 0;
|
|
2788
|
-
return function() {
|
|
2789
|
-
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
2790
|
-
if (lastCalled = stamp, remaining > 0) {
|
|
2791
|
-
if (++count >= HOT_COUNT)
|
|
2792
|
-
return arguments[0];
|
|
2793
|
-
} else
|
|
2794
|
-
count = 0;
|
|
2795
|
-
return func.apply(undefined$1, arguments);
|
|
2796
|
-
};
|
|
2797
|
-
}
|
|
2798
|
-
function shuffleSelf(array, size2) {
|
|
2799
|
-
var index = -1, length2 = array.length, lastIndex = length2 - 1;
|
|
2800
|
-
for (size2 = size2 === undefined$1 ? length2 : size2; ++index < size2; ) {
|
|
2801
|
-
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|
2802
|
-
array[rand] = array[index], array[index] = value;
|
|
2803
|
-
}
|
|
2804
|
-
return array.length = size2, array;
|
|
2805
|
-
}
|
|
2806
|
-
var stringToPath = memoizeCapped(function(string) {
|
|
2807
|
-
var result2 = [];
|
|
2808
|
-
return string.charCodeAt(0) === 46 && result2.push(""), string.replace(rePropName, function(match2, number, quote, subString) {
|
|
2809
|
-
result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match2);
|
|
2810
|
-
}), result2;
|
|
2811
|
-
});
|
|
2812
|
-
function toKey(value) {
|
|
2813
|
-
if (typeof value == "string" || isSymbol(value))
|
|
2814
|
-
return value;
|
|
2815
|
-
var result2 = value + "";
|
|
2816
|
-
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
|
|
2817
|
-
}
|
|
2818
|
-
function toSource(func) {
|
|
2819
|
-
if (func != null) {
|
|
2820
|
-
try {
|
|
2821
|
-
return funcToString.call(func);
|
|
2822
|
-
} catch {
|
|
2823
|
-
}
|
|
2824
|
-
try {
|
|
2825
|
-
return func + "";
|
|
2826
|
-
} catch {
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
|
-
return "";
|
|
2830
|
-
}
|
|
2831
|
-
function updateWrapDetails(details, bitmask) {
|
|
2832
|
-
return arrayEach(wrapFlags, function(pair) {
|
|
2833
|
-
var value = "_." + pair[0];
|
|
2834
|
-
bitmask & pair[1] && !arrayIncludes(details, value) && details.push(value);
|
|
2835
|
-
}), details.sort();
|
|
2836
|
-
}
|
|
2837
|
-
function wrapperClone(wrapper) {
|
|
2838
|
-
if (wrapper instanceof LazyWrapper)
|
|
2839
|
-
return wrapper.clone();
|
|
2840
|
-
var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
|
2841
|
-
return result2.__actions__ = copyArray(wrapper.__actions__), result2.__index__ = wrapper.__index__, result2.__values__ = wrapper.__values__, result2;
|
|
2842
|
-
}
|
|
2843
|
-
function chunk(array, size2, guard) {
|
|
2844
|
-
(guard ? isIterateeCall(array, size2, guard) : size2 === undefined$1) ? size2 = 1 : size2 = nativeMax(toInteger(size2), 0);
|
|
2845
|
-
var length2 = array == null ? 0 : array.length;
|
|
2846
|
-
if (!length2 || size2 < 1)
|
|
2847
|
-
return [];
|
|
2848
|
-
for (var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length2 / size2)); index < length2; )
|
|
2849
|
-
result2[resIndex++] = baseSlice(array, index, index += size2);
|
|
2850
|
-
return result2;
|
|
2851
|
-
}
|
|
2852
|
-
function compact(array) {
|
|
2853
|
-
for (var index = -1, length2 = array == null ? 0 : array.length, resIndex = 0, result2 = []; ++index < length2; ) {
|
|
2854
|
-
var value = array[index];
|
|
2855
|
-
value && (result2[resIndex++] = value);
|
|
2856
|
-
}
|
|
2857
|
-
return result2;
|
|
2858
|
-
}
|
|
2859
|
-
function concat() {
|
|
2860
|
-
var length2 = arguments.length;
|
|
2861
|
-
if (!length2)
|
|
2862
|
-
return [];
|
|
2863
|
-
for (var args = Array2(length2 - 1), array = arguments[0], index = length2; index--; )
|
|
2864
|
-
args[index - 1] = arguments[index];
|
|
2865
|
-
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
|
2866
|
-
}
|
|
2867
|
-
var difference = baseRest(function(array, values2) {
|
|
2868
|
-
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, !0)) : [];
|
|
2869
|
-
}), differenceBy = baseRest(function(array, values2) {
|
|
2870
|
-
var iteratee2 = last(values2);
|
|
2871
|
-
return isArrayLikeObject(iteratee2) && (iteratee2 = undefined$1), isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, !0), getIteratee(iteratee2, 2)) : [];
|
|
2872
|
-
}), differenceWith = baseRest(function(array, values2) {
|
|
2873
|
-
var comparator = last(values2);
|
|
2874
|
-
return isArrayLikeObject(comparator) && (comparator = undefined$1), isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, !0), undefined$1, comparator) : [];
|
|
2875
|
-
});
|
|
2876
|
-
function drop(array, n, guard) {
|
|
2877
|
-
var length2 = array == null ? 0 : array.length;
|
|
2878
|
-
return length2 ? (n = guard || n === undefined$1 ? 1 : toInteger(n), baseSlice(array, n < 0 ? 0 : n, length2)) : [];
|
|
2879
|
-
}
|
|
2880
|
-
function dropRight(array, n, guard) {
|
|
2881
|
-
var length2 = array == null ? 0 : array.length;
|
|
2882
|
-
return length2 ? (n = guard || n === undefined$1 ? 1 : toInteger(n), n = length2 - n, baseSlice(array, 0, n < 0 ? 0 : n)) : [];
|
|
2883
|
-
}
|
|
2884
|
-
function dropRightWhile(array, predicate) {
|
|
2885
|
-
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !0, !0) : [];
|
|
2886
|
-
}
|
|
2887
|
-
function dropWhile(array, predicate) {
|
|
2888
|
-
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !0) : [];
|
|
2889
|
-
}
|
|
2890
|
-
function fill(array, value, start, end) {
|
|
2891
|
-
var length2 = array == null ? 0 : array.length;
|
|
2892
|
-
return length2 ? (start && typeof start != "number" && isIterateeCall(array, value, start) && (start = 0, end = length2), baseFill(array, value, start, end)) : [];
|
|
2893
|
-
}
|
|
2894
|
-
function findIndex(array, predicate, fromIndex) {
|
|
2895
|
-
var length2 = array == null ? 0 : array.length;
|
|
2896
|
-
if (!length2)
|
|
2897
|
-
return -1;
|
|
2898
|
-
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
2899
|
-
return index < 0 && (index = nativeMax(length2 + index, 0)), baseFindIndex(array, getIteratee(predicate, 3), index);
|
|
2900
|
-
}
|
|
2901
|
-
function findLastIndex(array, predicate, fromIndex) {
|
|
2902
|
-
var length2 = array == null ? 0 : array.length;
|
|
2903
|
-
if (!length2)
|
|
2904
|
-
return -1;
|
|
2905
|
-
var index = length2 - 1;
|
|
2906
|
-
return fromIndex !== undefined$1 && (index = toInteger(fromIndex), index = fromIndex < 0 ? nativeMax(length2 + index, 0) : nativeMin(index, length2 - 1)), baseFindIndex(array, getIteratee(predicate, 3), index, !0);
|
|
2907
|
-
}
|
|
2908
|
-
function flatten(array) {
|
|
2909
|
-
var length2 = array == null ? 0 : array.length;
|
|
2910
|
-
return length2 ? baseFlatten(array, 1) : [];
|
|
2911
|
-
}
|
|
2912
|
-
function flattenDeep(array) {
|
|
2913
|
-
var length2 = array == null ? 0 : array.length;
|
|
2914
|
-
return length2 ? baseFlatten(array, INFINITY) : [];
|
|
2915
|
-
}
|
|
2916
|
-
function flattenDepth(array, depth) {
|
|
2917
|
-
var length2 = array == null ? 0 : array.length;
|
|
2918
|
-
return length2 ? (depth = depth === undefined$1 ? 1 : toInteger(depth), baseFlatten(array, depth)) : [];
|
|
2919
|
-
}
|
|
2920
|
-
function fromPairs(pairs) {
|
|
2921
|
-
for (var index = -1, length2 = pairs == null ? 0 : pairs.length, result2 = {}; ++index < length2; ) {
|
|
2922
|
-
var pair = pairs[index];
|
|
2923
|
-
result2[pair[0]] = pair[1];
|
|
2924
|
-
}
|
|
2925
|
-
return result2;
|
|
2926
|
-
}
|
|
2927
|
-
function head(array) {
|
|
2928
|
-
return array && array.length ? array[0] : undefined$1;
|
|
2929
|
-
}
|
|
2930
|
-
function indexOf(array, value, fromIndex) {
|
|
2931
|
-
var length2 = array == null ? 0 : array.length;
|
|
2932
|
-
if (!length2)
|
|
2933
|
-
return -1;
|
|
2934
|
-
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
2935
|
-
return index < 0 && (index = nativeMax(length2 + index, 0)), baseIndexOf(array, value, index);
|
|
2936
|
-
}
|
|
2937
|
-
function initial(array) {
|
|
2938
|
-
var length2 = array == null ? 0 : array.length;
|
|
2939
|
-
return length2 ? baseSlice(array, 0, -1) : [];
|
|
2940
|
-
}
|
|
2941
|
-
var intersection = baseRest(function(arrays) {
|
|
2942
|
-
var mapped = arrayMap(arrays, castArrayLikeObject);
|
|
2943
|
-
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
|
2944
|
-
}), intersectionBy = baseRest(function(arrays) {
|
|
2945
|
-
var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
2946
|
-
return iteratee2 === last(mapped) ? iteratee2 = undefined$1 : mapped.pop(), mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
|
|
2947
|
-
}), intersectionWith = baseRest(function(arrays) {
|
|
2948
|
-
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|
2949
|
-
return comparator = typeof comparator == "function" ? comparator : undefined$1, comparator && mapped.pop(), mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : [];
|
|
2950
|
-
});
|
|
2951
|
-
function join(array, separator) {
|
|
2952
|
-
return array == null ? "" : nativeJoin.call(array, separator);
|
|
2953
|
-
}
|
|
2954
|
-
function last(array) {
|
|
2955
|
-
var length2 = array == null ? 0 : array.length;
|
|
2956
|
-
return length2 ? array[length2 - 1] : undefined$1;
|
|
2957
|
-
}
|
|
2958
|
-
function lastIndexOf(array, value, fromIndex) {
|
|
2959
|
-
var length2 = array == null ? 0 : array.length;
|
|
2960
|
-
if (!length2)
|
|
2961
|
-
return -1;
|
|
2962
|
-
var index = length2;
|
|
2963
|
-
return fromIndex !== undefined$1 && (index = toInteger(fromIndex), index = index < 0 ? nativeMax(length2 + index, 0) : nativeMin(index, length2 - 1)), value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, !0);
|
|
2964
|
-
}
|
|
2965
|
-
function nth(array, n) {
|
|
2966
|
-
return array && array.length ? baseNth(array, toInteger(n)) : undefined$1;
|
|
2967
|
-
}
|
|
2968
|
-
var pull = baseRest(pullAll);
|
|
2969
|
-
function pullAll(array, values2) {
|
|
2970
|
-
return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
|
|
2971
|
-
}
|
|
2972
|
-
function pullAllBy(array, values2, iteratee2) {
|
|
2973
|
-
return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
|
|
2974
|
-
}
|
|
2975
|
-
function pullAllWith(array, values2, comparator) {
|
|
2976
|
-
return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined$1, comparator) : array;
|
|
2977
|
-
}
|
|
2978
|
-
var pullAt = flatRest(function(array, indexes) {
|
|
2979
|
-
var length2 = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
|
2980
|
-
return basePullAt(array, arrayMap(indexes, function(index) {
|
|
2981
|
-
return isIndex(index, length2) ? +index : index;
|
|
2982
|
-
}).sort(compareAscending)), result2;
|
|
2983
|
-
});
|
|
2984
|
-
function remove(array, predicate) {
|
|
2985
|
-
var result2 = [];
|
|
2986
|
-
if (!(array && array.length))
|
|
2987
|
-
return result2;
|
|
2988
|
-
var index = -1, indexes = [], length2 = array.length;
|
|
2989
|
-
for (predicate = getIteratee(predicate, 3); ++index < length2; ) {
|
|
2990
|
-
var value = array[index];
|
|
2991
|
-
predicate(value, index, array) && (result2.push(value), indexes.push(index));
|
|
2992
|
-
}
|
|
2993
|
-
return basePullAt(array, indexes), result2;
|
|
2994
|
-
}
|
|
2995
|
-
function reverse(array) {
|
|
2996
|
-
return array == null ? array : nativeReverse.call(array);
|
|
2997
|
-
}
|
|
2998
|
-
function slice2(array, start, end) {
|
|
2999
|
-
var length2 = array == null ? 0 : array.length;
|
|
3000
|
-
return length2 ? (end && typeof end != "number" && isIterateeCall(array, start, end) ? (start = 0, end = length2) : (start = start == null ? 0 : toInteger(start), end = end === undefined$1 ? length2 : toInteger(end)), baseSlice(array, start, end)) : [];
|
|
3001
|
-
}
|
|
3002
|
-
function sortedIndex(array, value) {
|
|
3003
|
-
return baseSortedIndex(array, value);
|
|
3004
|
-
}
|
|
3005
|
-
function sortedIndexBy(array, value, iteratee2) {
|
|
3006
|
-
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
|
|
3007
|
-
}
|
|
3008
|
-
function sortedIndexOf(array, value) {
|
|
3009
|
-
var length2 = array == null ? 0 : array.length;
|
|
3010
|
-
if (length2) {
|
|
3011
|
-
var index = baseSortedIndex(array, value);
|
|
3012
|
-
if (index < length2 && eq(array[index], value))
|
|
3013
|
-
return index;
|
|
3014
|
-
}
|
|
3015
|
-
return -1;
|
|
3016
|
-
}
|
|
3017
|
-
function sortedLastIndex(array, value) {
|
|
3018
|
-
return baseSortedIndex(array, value, !0);
|
|
3019
|
-
}
|
|
3020
|
-
function sortedLastIndexBy(array, value, iteratee2) {
|
|
3021
|
-
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), !0);
|
|
3022
|
-
}
|
|
3023
|
-
function sortedLastIndexOf(array, value) {
|
|
3024
|
-
var length2 = array == null ? 0 : array.length;
|
|
3025
|
-
if (length2) {
|
|
3026
|
-
var index = baseSortedIndex(array, value, !0) - 1;
|
|
3027
|
-
if (eq(array[index], value))
|
|
3028
|
-
return index;
|
|
3029
|
-
}
|
|
3030
|
-
return -1;
|
|
3031
|
-
}
|
|
3032
|
-
function sortedUniq(array) {
|
|
3033
|
-
return array && array.length ? baseSortedUniq(array) : [];
|
|
3034
|
-
}
|
|
3035
|
-
function sortedUniqBy(array, iteratee2) {
|
|
3036
|
-
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
|
|
3037
|
-
}
|
|
3038
|
-
function tail(array) {
|
|
3039
|
-
var length2 = array == null ? 0 : array.length;
|
|
3040
|
-
return length2 ? baseSlice(array, 1, length2) : [];
|
|
3041
|
-
}
|
|
3042
|
-
function take(array, n, guard) {
|
|
3043
|
-
return array && array.length ? (n = guard || n === undefined$1 ? 1 : toInteger(n), baseSlice(array, 0, n < 0 ? 0 : n)) : [];
|
|
3044
|
-
}
|
|
3045
|
-
function takeRight(array, n, guard) {
|
|
3046
|
-
var length2 = array == null ? 0 : array.length;
|
|
3047
|
-
return length2 ? (n = guard || n === undefined$1 ? 1 : toInteger(n), n = length2 - n, baseSlice(array, n < 0 ? 0 : n, length2)) : [];
|
|
3048
|
-
}
|
|
3049
|
-
function takeRightWhile(array, predicate) {
|
|
3050
|
-
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !1, !0) : [];
|
|
3051
|
-
}
|
|
3052
|
-
function takeWhile(array, predicate) {
|
|
3053
|
-
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
|
|
3054
|
-
}
|
|
3055
|
-
var union = baseRest(function(arrays) {
|
|
3056
|
-
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0));
|
|
3057
|
-
}), unionBy = baseRest(function(arrays) {
|
|
3058
|
-
var iteratee2 = last(arrays);
|
|
3059
|
-
return isArrayLikeObject(iteratee2) && (iteratee2 = undefined$1), baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0), getIteratee(iteratee2, 2));
|
|
3060
|
-
}), unionWith = baseRest(function(arrays) {
|
|
3061
|
-
var comparator = last(arrays);
|
|
3062
|
-
return comparator = typeof comparator == "function" ? comparator : undefined$1, baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0), undefined$1, comparator);
|
|
3063
|
-
});
|
|
3064
|
-
function uniq(array) {
|
|
3065
|
-
return array && array.length ? baseUniq(array) : [];
|
|
3066
|
-
}
|
|
3067
|
-
function uniqBy(array, iteratee2) {
|
|
3068
|
-
return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
|
|
3069
|
-
}
|
|
3070
|
-
function uniqWith(array, comparator) {
|
|
3071
|
-
return comparator = typeof comparator == "function" ? comparator : undefined$1, array && array.length ? baseUniq(array, undefined$1, comparator) : [];
|
|
3072
|
-
}
|
|
3073
|
-
function unzip(array) {
|
|
3074
|
-
if (!(array && array.length))
|
|
3075
|
-
return [];
|
|
3076
|
-
var length2 = 0;
|
|
3077
|
-
return array = arrayFilter(array, function(group) {
|
|
3078
|
-
if (isArrayLikeObject(group))
|
|
3079
|
-
return length2 = nativeMax(group.length, length2), !0;
|
|
3080
|
-
}), baseTimes(length2, function(index) {
|
|
3081
|
-
return arrayMap(array, baseProperty(index));
|
|
3082
|
-
});
|
|
3083
|
-
}
|
|
3084
|
-
function unzipWith(array, iteratee2) {
|
|
3085
|
-
if (!(array && array.length))
|
|
3086
|
-
return [];
|
|
3087
|
-
var result2 = unzip(array);
|
|
3088
|
-
return iteratee2 == null ? result2 : arrayMap(result2, function(group) {
|
|
3089
|
-
return apply(iteratee2, undefined$1, group);
|
|
3090
|
-
});
|
|
3091
|
-
}
|
|
3092
|
-
var without = baseRest(function(array, values2) {
|
|
3093
|
-
return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
|
|
3094
|
-
}), xor = baseRest(function(arrays) {
|
|
3095
|
-
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
|
3096
|
-
}), xorBy = baseRest(function(arrays) {
|
|
3097
|
-
var iteratee2 = last(arrays);
|
|
3098
|
-
return isArrayLikeObject(iteratee2) && (iteratee2 = undefined$1), baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
|
|
3099
|
-
}), xorWith = baseRest(function(arrays) {
|
|
3100
|
-
var comparator = last(arrays);
|
|
3101
|
-
return comparator = typeof comparator == "function" ? comparator : undefined$1, baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator);
|
|
3102
|
-
}), zip = baseRest(unzip);
|
|
3103
|
-
function zipObject(props, values2) {
|
|
3104
|
-
return baseZipObject(props || [], values2 || [], assignValue);
|
|
3105
|
-
}
|
|
3106
|
-
function zipObjectDeep(props, values2) {
|
|
3107
|
-
return baseZipObject(props || [], values2 || [], baseSet);
|
|
3108
|
-
}
|
|
3109
|
-
var zipWith = baseRest(function(arrays) {
|
|
3110
|
-
var length2 = arrays.length, iteratee2 = length2 > 1 ? arrays[length2 - 1] : undefined$1;
|
|
3111
|
-
return iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1, unzipWith(arrays, iteratee2);
|
|
3112
|
-
});
|
|
3113
|
-
function chain(value) {
|
|
3114
|
-
var result2 = lodash2(value);
|
|
3115
|
-
return result2.__chain__ = !0, result2;
|
|
3116
|
-
}
|
|
3117
|
-
function tap(value, interceptor) {
|
|
3118
|
-
return interceptor(value), value;
|
|
3119
|
-
}
|
|
3120
|
-
function thru(value, interceptor) {
|
|
3121
|
-
return interceptor(value);
|
|
3122
|
-
}
|
|
3123
|
-
var wrapperAt = flatRest(function(paths) {
|
|
3124
|
-
var length2 = paths.length, start = length2 ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
|
|
3125
|
-
return baseAt(object, paths);
|
|
3126
|
-
};
|
|
3127
|
-
return length2 > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start) ? this.thru(interceptor) : (value = value.slice(start, +start + (length2 ? 1 : 0)), value.__actions__.push({
|
|
3128
|
-
func: thru,
|
|
3129
|
-
args: [interceptor],
|
|
3130
|
-
thisArg: undefined$1
|
|
3131
|
-
}), new LodashWrapper(value, this.__chain__).thru(function(array) {
|
|
3132
|
-
return length2 && !array.length && array.push(undefined$1), array;
|
|
3133
|
-
}));
|
|
3134
|
-
});
|
|
3135
|
-
function wrapperChain() {
|
|
3136
|
-
return chain(this);
|
|
3137
|
-
}
|
|
3138
|
-
function wrapperCommit() {
|
|
3139
|
-
return new LodashWrapper(this.value(), this.__chain__);
|
|
3140
|
-
}
|
|
3141
|
-
function wrapperNext() {
|
|
3142
|
-
this.__values__ === undefined$1 && (this.__values__ = toArray(this.value()));
|
|
3143
|
-
var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++];
|
|
3144
|
-
return { done, value };
|
|
3145
|
-
}
|
|
3146
|
-
function wrapperToIterator() {
|
|
3147
|
-
return this;
|
|
3148
|
-
}
|
|
3149
|
-
function wrapperPlant(value) {
|
|
3150
|
-
for (var result2, parent2 = this; parent2 instanceof baseLodash; ) {
|
|
3151
|
-
var clone2 = wrapperClone(parent2);
|
|
3152
|
-
clone2.__index__ = 0, clone2.__values__ = undefined$1, result2 ? previous.__wrapped__ = clone2 : result2 = clone2;
|
|
3153
|
-
var previous = clone2;
|
|
3154
|
-
parent2 = parent2.__wrapped__;
|
|
3155
|
-
}
|
|
3156
|
-
return previous.__wrapped__ = value, result2;
|
|
3157
|
-
}
|
|
3158
|
-
function wrapperReverse() {
|
|
3159
|
-
var value = this.__wrapped__;
|
|
3160
|
-
if (value instanceof LazyWrapper) {
|
|
3161
|
-
var wrapped = value;
|
|
3162
|
-
return this.__actions__.length && (wrapped = new LazyWrapper(this)), wrapped = wrapped.reverse(), wrapped.__actions__.push({
|
|
3163
|
-
func: thru,
|
|
3164
|
-
args: [reverse],
|
|
3165
|
-
thisArg: undefined$1
|
|
3166
|
-
}), new LodashWrapper(wrapped, this.__chain__);
|
|
3167
|
-
}
|
|
3168
|
-
return this.thru(reverse);
|
|
3169
|
-
}
|
|
3170
|
-
function wrapperValue() {
|
|
3171
|
-
return baseWrapperValue(this.__wrapped__, this.__actions__);
|
|
3172
|
-
}
|
|
3173
|
-
var countBy = createAggregator(function(result2, value, key) {
|
|
3174
|
-
hasOwnProperty.call(result2, key) ? ++result2[key] : baseAssignValue(result2, key, 1);
|
|
3175
|
-
});
|
|
3176
|
-
function every(collection, predicate, guard) {
|
|
3177
|
-
var func = isArray(collection) ? arrayEvery : baseEvery;
|
|
3178
|
-
return guard && isIterateeCall(collection, predicate, guard) && (predicate = undefined$1), func(collection, getIteratee(predicate, 3));
|
|
3179
|
-
}
|
|
3180
|
-
function filter2(collection, predicate) {
|
|
3181
|
-
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
3182
|
-
return func(collection, getIteratee(predicate, 3));
|
|
3183
|
-
}
|
|
3184
|
-
var find = createFind(findIndex), findLast = createFind(findLastIndex);
|
|
3185
|
-
function flatMap(collection, iteratee2) {
|
|
3186
|
-
return baseFlatten(map(collection, iteratee2), 1);
|
|
3187
|
-
}
|
|
3188
|
-
function flatMapDeep(collection, iteratee2) {
|
|
3189
|
-
return baseFlatten(map(collection, iteratee2), INFINITY);
|
|
3190
|
-
}
|
|
3191
|
-
function flatMapDepth(collection, iteratee2, depth) {
|
|
3192
|
-
return depth = depth === undefined$1 ? 1 : toInteger(depth), baseFlatten(map(collection, iteratee2), depth);
|
|
3193
|
-
}
|
|
3194
|
-
function forEach(collection, iteratee2) {
|
|
3195
|
-
var func = isArray(collection) ? arrayEach : baseEach;
|
|
3196
|
-
return func(collection, getIteratee(iteratee2, 3));
|
|
3197
|
-
}
|
|
3198
|
-
function forEachRight(collection, iteratee2) {
|
|
3199
|
-
var func = isArray(collection) ? arrayEachRight : baseEachRight;
|
|
3200
|
-
return func(collection, getIteratee(iteratee2, 3));
|
|
3201
|
-
}
|
|
3202
|
-
var groupBy = createAggregator(function(result2, value, key) {
|
|
3203
|
-
hasOwnProperty.call(result2, key) ? result2[key].push(value) : baseAssignValue(result2, key, [value]);
|
|
3204
|
-
});
|
|
3205
|
-
function includes(collection, value, fromIndex, guard) {
|
|
3206
|
-
collection = isArrayLike(collection) ? collection : values(collection), fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|
3207
|
-
var length2 = collection.length;
|
|
3208
|
-
return fromIndex < 0 && (fromIndex = nativeMax(length2 + fromIndex, 0)), isString(collection) ? fromIndex <= length2 && collection.indexOf(value, fromIndex) > -1 : !!length2 && baseIndexOf(collection, value, fromIndex) > -1;
|
|
3209
|
-
}
|
|
3210
|
-
var invokeMap = baseRest(function(collection, path, args) {
|
|
3211
|
-
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
3212
|
-
return baseEach(collection, function(value) {
|
|
3213
|
-
result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|
3214
|
-
}), result2;
|
|
3215
|
-
}), keyBy = createAggregator(function(result2, value, key) {
|
|
3216
|
-
baseAssignValue(result2, key, value);
|
|
3217
|
-
});
|
|
3218
|
-
function map(collection, iteratee2) {
|
|
3219
|
-
var func = isArray(collection) ? arrayMap : baseMap;
|
|
3220
|
-
return func(collection, getIteratee(iteratee2, 3));
|
|
3221
|
-
}
|
|
3222
|
-
function orderBy(collection, iteratees, orders, guard) {
|
|
3223
|
-
return collection == null ? [] : (isArray(iteratees) || (iteratees = iteratees == null ? [] : [iteratees]), orders = guard ? undefined$1 : orders, isArray(orders) || (orders = orders == null ? [] : [orders]), baseOrderBy(collection, iteratees, orders));
|
|
3224
|
-
}
|
|
3225
|
-
var partition = createAggregator(function(result2, value, key) {
|
|
3226
|
-
result2[key ? 0 : 1].push(value);
|
|
3227
|
-
}, function() {
|
|
3228
|
-
return [[], []];
|
|
3229
|
-
});
|
|
3230
|
-
function reduce(collection, iteratee2, accumulator) {
|
|
3231
|
-
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|
3232
|
-
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
|
|
3233
|
-
}
|
|
3234
|
-
function reduceRight(collection, iteratee2, accumulator) {
|
|
3235
|
-
var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
|
|
3236
|
-
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
|
|
3237
|
-
}
|
|
3238
|
-
function reject(collection, predicate) {
|
|
3239
|
-
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
3240
|
-
return func(collection, negate(getIteratee(predicate, 3)));
|
|
3241
|
-
}
|
|
3242
|
-
function sample(collection) {
|
|
3243
|
-
var func = isArray(collection) ? arraySample : baseSample;
|
|
3244
|
-
return func(collection);
|
|
3245
|
-
}
|
|
3246
|
-
function sampleSize(collection, n, guard) {
|
|
3247
|
-
(guard ? isIterateeCall(collection, n, guard) : n === undefined$1) ? n = 1 : n = toInteger(n);
|
|
3248
|
-
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
|
|
3249
|
-
return func(collection, n);
|
|
3250
|
-
}
|
|
3251
|
-
function shuffle(collection) {
|
|
3252
|
-
var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
|
3253
|
-
return func(collection);
|
|
3254
|
-
}
|
|
3255
|
-
function size(collection) {
|
|
3256
|
-
if (collection == null)
|
|
3257
|
-
return 0;
|
|
3258
|
-
if (isArrayLike(collection))
|
|
3259
|
-
return isString(collection) ? stringSize(collection) : collection.length;
|
|
3260
|
-
var tag = getTag(collection);
|
|
3261
|
-
return tag == mapTag || tag == setTag ? collection.size : baseKeys(collection).length;
|
|
3262
|
-
}
|
|
3263
|
-
function some(collection, predicate, guard) {
|
|
3264
|
-
var func = isArray(collection) ? arraySome : baseSome;
|
|
3265
|
-
return guard && isIterateeCall(collection, predicate, guard) && (predicate = undefined$1), func(collection, getIteratee(predicate, 3));
|
|
3266
|
-
}
|
|
3267
|
-
var sortBy = baseRest(function(collection, iteratees) {
|
|
3268
|
-
if (collection == null)
|
|
3269
|
-
return [];
|
|
3270
|
-
var length2 = iteratees.length;
|
|
3271
|
-
return length2 > 1 && isIterateeCall(collection, iteratees[0], iteratees[1]) ? iteratees = [] : length2 > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2]) && (iteratees = [iteratees[0]]), baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
|
3272
|
-
}), now = ctxNow || function() {
|
|
3273
|
-
return root.Date.now();
|
|
3274
|
-
};
|
|
3275
|
-
function after(n, func) {
|
|
3276
|
-
if (typeof func != "function")
|
|
3277
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3278
|
-
return n = toInteger(n), function() {
|
|
3279
|
-
if (--n < 1)
|
|
3280
|
-
return func.apply(this, arguments);
|
|
3281
|
-
};
|
|
3282
|
-
}
|
|
3283
|
-
function ary(func, n, guard) {
|
|
3284
|
-
return n = guard ? undefined$1 : n, n = func && n == null ? func.length : n, createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n);
|
|
3285
|
-
}
|
|
3286
|
-
function before(n, func) {
|
|
3287
|
-
var result2;
|
|
3288
|
-
if (typeof func != "function")
|
|
3289
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3290
|
-
return n = toInteger(n), function() {
|
|
3291
|
-
return --n > 0 && (result2 = func.apply(this, arguments)), n <= 1 && (func = undefined$1), result2;
|
|
3292
|
-
};
|
|
3293
|
-
}
|
|
3294
|
-
var bind = baseRest(function(func, thisArg, partials) {
|
|
3295
|
-
var bitmask = WRAP_BIND_FLAG;
|
|
3296
|
-
if (partials.length) {
|
|
3297
|
-
var holders = replaceHolders(partials, getHolder(bind));
|
|
3298
|
-
bitmask |= WRAP_PARTIAL_FLAG;
|
|
3299
|
-
}
|
|
3300
|
-
return createWrap(func, bitmask, thisArg, partials, holders);
|
|
3301
|
-
}), bindKey = baseRest(function(object, key, partials) {
|
|
3302
|
-
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
|
|
3303
|
-
if (partials.length) {
|
|
3304
|
-
var holders = replaceHolders(partials, getHolder(bindKey));
|
|
3305
|
-
bitmask |= WRAP_PARTIAL_FLAG;
|
|
3306
|
-
}
|
|
3307
|
-
return createWrap(key, bitmask, object, partials, holders);
|
|
3308
|
-
});
|
|
3309
|
-
function curry(func, arity, guard) {
|
|
3310
|
-
arity = guard ? undefined$1 : arity;
|
|
3311
|
-
var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
|
|
3312
|
-
return result2.placeholder = curry.placeholder, result2;
|
|
3313
|
-
}
|
|
3314
|
-
function curryRight(func, arity, guard) {
|
|
3315
|
-
arity = guard ? undefined$1 : arity;
|
|
3316
|
-
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity);
|
|
3317
|
-
return result2.placeholder = curryRight.placeholder, result2;
|
|
3318
|
-
}
|
|
3319
|
-
function debounce(func, wait, options) {
|
|
3320
|
-
var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = !1, maxing = !1, trailing = !0;
|
|
3321
|
-
if (typeof func != "function")
|
|
3322
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3323
|
-
wait = toNumber(wait) || 0, 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);
|
|
3324
|
-
function invokeFunc(time) {
|
|
3325
|
-
var args = lastArgs, thisArg = lastThis;
|
|
3326
|
-
return lastArgs = lastThis = undefined$1, lastInvokeTime = time, result2 = func.apply(thisArg, args), result2;
|
|
3327
|
-
}
|
|
3328
|
-
function leadingEdge(time) {
|
|
3329
|
-
return lastInvokeTime = time, timerId = setTimeout2(timerExpired, wait), leading ? invokeFunc(time) : result2;
|
|
3330
|
-
}
|
|
3331
|
-
function remainingWait(time) {
|
|
3332
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
3333
|
-
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
3334
|
-
}
|
|
3335
|
-
function shouldInvoke(time) {
|
|
3336
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
3337
|
-
return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
3338
|
-
}
|
|
3339
|
-
function timerExpired() {
|
|
3340
|
-
var time = now();
|
|
3341
|
-
if (shouldInvoke(time))
|
|
3342
|
-
return trailingEdge(time);
|
|
3343
|
-
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
3344
|
-
}
|
|
3345
|
-
function trailingEdge(time) {
|
|
3346
|
-
return timerId = undefined$1, trailing && lastArgs ? invokeFunc(time) : (lastArgs = lastThis = undefined$1, result2);
|
|
3347
|
-
}
|
|
3348
|
-
function cancel() {
|
|
3349
|
-
timerId !== undefined$1 && clearTimeout(timerId), lastInvokeTime = 0, lastArgs = lastCallTime = lastThis = timerId = undefined$1;
|
|
3350
|
-
}
|
|
3351
|
-
function flush() {
|
|
3352
|
-
return timerId === undefined$1 ? result2 : trailingEdge(now());
|
|
3353
|
-
}
|
|
3354
|
-
function debounced() {
|
|
3355
|
-
var time = now(), isInvoking = shouldInvoke(time);
|
|
3356
|
-
if (lastArgs = arguments, lastThis = this, lastCallTime = time, isInvoking) {
|
|
3357
|
-
if (timerId === undefined$1)
|
|
3358
|
-
return leadingEdge(lastCallTime);
|
|
3359
|
-
if (maxing)
|
|
3360
|
-
return clearTimeout(timerId), timerId = setTimeout2(timerExpired, wait), invokeFunc(lastCallTime);
|
|
3361
|
-
}
|
|
3362
|
-
return timerId === undefined$1 && (timerId = setTimeout2(timerExpired, wait)), result2;
|
|
3363
|
-
}
|
|
3364
|
-
return debounced.cancel = cancel, debounced.flush = flush, debounced;
|
|
3365
|
-
}
|
|
3366
|
-
var defer = baseRest(function(func, args) {
|
|
3367
|
-
return baseDelay(func, 1, args);
|
|
3368
|
-
}), delay = baseRest(function(func, wait, args) {
|
|
3369
|
-
return baseDelay(func, toNumber(wait) || 0, args);
|
|
3370
|
-
});
|
|
3371
|
-
function flip(func) {
|
|
3372
|
-
return createWrap(func, WRAP_FLIP_FLAG);
|
|
3373
|
-
}
|
|
3374
|
-
function memoize2(func, resolver) {
|
|
3375
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function")
|
|
3376
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3377
|
-
var memoized = function() {
|
|
3378
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
3379
|
-
if (cache.has(key))
|
|
3380
|
-
return cache.get(key);
|
|
3381
|
-
var result2 = func.apply(this, args);
|
|
3382
|
-
return memoized.cache = cache.set(key, result2) || cache, result2;
|
|
3383
|
-
};
|
|
3384
|
-
return memoized.cache = new (memoize2.Cache || MapCache)(), memoized;
|
|
3385
|
-
}
|
|
3386
|
-
memoize2.Cache = MapCache;
|
|
3387
|
-
function negate(predicate) {
|
|
3388
|
-
if (typeof predicate != "function")
|
|
3389
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3390
|
-
return function() {
|
|
3391
|
-
var args = arguments;
|
|
3392
|
-
switch (args.length) {
|
|
3393
|
-
case 0:
|
|
3394
|
-
return !predicate.call(this);
|
|
3395
|
-
case 1:
|
|
3396
|
-
return !predicate.call(this, args[0]);
|
|
3397
|
-
case 2:
|
|
3398
|
-
return !predicate.call(this, args[0], args[1]);
|
|
3399
|
-
case 3:
|
|
3400
|
-
return !predicate.call(this, args[0], args[1], args[2]);
|
|
3401
|
-
}
|
|
3402
|
-
return !predicate.apply(this, args);
|
|
3403
|
-
};
|
|
3404
|
-
}
|
|
3405
|
-
function once(func) {
|
|
3406
|
-
return before(2, func);
|
|
3407
|
-
}
|
|
3408
|
-
var overArgs = castRest(function(func, transforms) {
|
|
3409
|
-
transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
|
3410
|
-
var funcsLength = transforms.length;
|
|
3411
|
-
return baseRest(function(args) {
|
|
3412
|
-
for (var index = -1, length2 = nativeMin(args.length, funcsLength); ++index < length2; )
|
|
3413
|
-
args[index] = transforms[index].call(this, args[index]);
|
|
3414
|
-
return apply(func, this, args);
|
|
3415
|
-
});
|
|
3416
|
-
}), partial = baseRest(function(func, partials) {
|
|
3417
|
-
var holders = replaceHolders(partials, getHolder(partial));
|
|
3418
|
-
return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders);
|
|
3419
|
-
}), partialRight = baseRest(function(func, partials) {
|
|
3420
|
-
var holders = replaceHolders(partials, getHolder(partialRight));
|
|
3421
|
-
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders);
|
|
3422
|
-
}), rearg = flatRest(function(func, indexes) {
|
|
3423
|
-
return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes);
|
|
3424
|
-
});
|
|
3425
|
-
function rest(func, start) {
|
|
3426
|
-
if (typeof func != "function")
|
|
3427
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3428
|
-
return start = start === undefined$1 ? start : toInteger(start), baseRest(func, start);
|
|
3429
|
-
}
|
|
3430
|
-
function spread(func, start) {
|
|
3431
|
-
if (typeof func != "function")
|
|
3432
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3433
|
-
return start = start == null ? 0 : nativeMax(toInteger(start), 0), baseRest(function(args) {
|
|
3434
|
-
var array = args[start], otherArgs = castSlice(args, 0, start);
|
|
3435
|
-
return array && arrayPush(otherArgs, array), apply(func, this, otherArgs);
|
|
3436
|
-
});
|
|
3437
|
-
}
|
|
3438
|
-
function throttle(func, wait, options) {
|
|
3439
|
-
var leading = !0, trailing = !0;
|
|
3440
|
-
if (typeof func != "function")
|
|
3441
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3442
|
-
return isObject(options) && (leading = "leading" in options ? !!options.leading : leading, trailing = "trailing" in options ? !!options.trailing : trailing), debounce(func, wait, {
|
|
3443
|
-
leading,
|
|
3444
|
-
maxWait: wait,
|
|
3445
|
-
trailing
|
|
3446
|
-
});
|
|
3447
|
-
}
|
|
3448
|
-
function unary(func) {
|
|
3449
|
-
return ary(func, 1);
|
|
3450
|
-
}
|
|
3451
|
-
function wrap(value, wrapper) {
|
|
3452
|
-
return partial(castFunction(wrapper), value);
|
|
3453
|
-
}
|
|
3454
|
-
function castArray() {
|
|
3455
|
-
if (!arguments.length)
|
|
3456
|
-
return [];
|
|
3457
|
-
var value = arguments[0];
|
|
3458
|
-
return isArray(value) ? value : [value];
|
|
3459
|
-
}
|
|
3460
|
-
function clone(value) {
|
|
3461
|
-
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
3462
|
-
}
|
|
3463
|
-
function cloneWith(value, customizer) {
|
|
3464
|
-
return customizer = typeof customizer == "function" ? customizer : undefined$1, baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
|
|
3465
|
-
}
|
|
3466
|
-
function cloneDeep(value) {
|
|
3467
|
-
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
3468
|
-
}
|
|
3469
|
-
function cloneDeepWith(value, customizer) {
|
|
3470
|
-
return customizer = typeof customizer == "function" ? customizer : undefined$1, baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
|
|
3471
|
-
}
|
|
3472
|
-
function conformsTo(object, source) {
|
|
3473
|
-
return source == null || baseConformsTo(object, source, keys(source));
|
|
3474
|
-
}
|
|
3475
|
-
function eq(value, other) {
|
|
3476
|
-
return value === other || value !== value && other !== other;
|
|
3477
|
-
}
|
|
3478
|
-
var gt2 = createRelationalOperation(baseGt), gte = createRelationalOperation(function(value, other) {
|
|
3479
|
-
return value >= other;
|
|
3480
|
-
}), isArguments = baseIsArguments(/* @__PURE__ */ (function() {
|
|
3481
|
-
return arguments;
|
|
3482
|
-
})()) ? baseIsArguments : function(value) {
|
|
3483
|
-
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
3484
|
-
}, isArray = Array2.isArray, isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
|
3485
|
-
function isArrayLike(value) {
|
|
3486
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
3487
|
-
}
|
|
3488
|
-
function isArrayLikeObject(value) {
|
|
3489
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
3490
|
-
}
|
|
3491
|
-
function isBoolean(value) {
|
|
3492
|
-
return value === !0 || value === !1 || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
3493
|
-
}
|
|
3494
|
-
var isBuffer = nativeIsBuffer || stubFalse, isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
3495
|
-
function isElement(value) {
|
|
3496
|
-
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
|
3497
|
-
}
|
|
3498
|
-
function isEmpty(value) {
|
|
3499
|
-
if (value == null)
|
|
3500
|
-
return !0;
|
|
3501
|
-
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value)))
|
|
3502
|
-
return !value.length;
|
|
3503
|
-
var tag = getTag(value);
|
|
3504
|
-
if (tag == mapTag || tag == setTag)
|
|
3505
|
-
return !value.size;
|
|
3506
|
-
if (isPrototype(value))
|
|
3507
|
-
return !baseKeys(value).length;
|
|
3508
|
-
for (var key in value)
|
|
3509
|
-
if (hasOwnProperty.call(value, key))
|
|
3510
|
-
return !1;
|
|
3511
|
-
return !0;
|
|
3512
|
-
}
|
|
3513
|
-
function isEqual(value, other) {
|
|
3514
|
-
return baseIsEqual(value, other);
|
|
3515
|
-
}
|
|
3516
|
-
function isEqualWith(value, other, customizer) {
|
|
3517
|
-
customizer = typeof customizer == "function" ? customizer : undefined$1;
|
|
3518
|
-
var result2 = customizer ? customizer(value, other) : undefined$1;
|
|
3519
|
-
return result2 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result2;
|
|
3520
|
-
}
|
|
3521
|
-
function isError(value) {
|
|
3522
|
-
if (!isObjectLike(value))
|
|
3523
|
-
return !1;
|
|
3524
|
-
var tag = baseGetTag(value);
|
|
3525
|
-
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
|
|
3526
|
-
}
|
|
3527
|
-
function isFinite(value) {
|
|
3528
|
-
return typeof value == "number" && nativeIsFinite(value);
|
|
3529
|
-
}
|
|
3530
|
-
function isFunction(value) {
|
|
3531
|
-
if (!isObject(value))
|
|
3532
|
-
return !1;
|
|
3533
|
-
var tag = baseGetTag(value);
|
|
3534
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
3535
|
-
}
|
|
3536
|
-
function isInteger(value) {
|
|
3537
|
-
return typeof value == "number" && value == toInteger(value);
|
|
3538
|
-
}
|
|
3539
|
-
function isLength(value) {
|
|
3540
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
3541
|
-
}
|
|
3542
|
-
function isObject(value) {
|
|
3543
|
-
var type = typeof value;
|
|
3544
|
-
return value != null && (type == "object" || type == "function");
|
|
3545
|
-
}
|
|
3546
|
-
function isObjectLike(value) {
|
|
3547
|
-
return value != null && typeof value == "object";
|
|
3548
|
-
}
|
|
3549
|
-
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
3550
|
-
function isMatch(object, source) {
|
|
3551
|
-
return object === source || baseIsMatch(object, source, getMatchData(source));
|
|
3552
|
-
}
|
|
3553
|
-
function isMatchWith(object, source, customizer) {
|
|
3554
|
-
return customizer = typeof customizer == "function" ? customizer : undefined$1, baseIsMatch(object, source, getMatchData(source), customizer);
|
|
3555
|
-
}
|
|
3556
|
-
function isNaN(value) {
|
|
3557
|
-
return isNumber(value) && value != +value;
|
|
3558
|
-
}
|
|
3559
|
-
function isNative(value) {
|
|
3560
|
-
if (isMaskable(value))
|
|
3561
|
-
throw new Error2(CORE_ERROR_TEXT);
|
|
3562
|
-
return baseIsNative(value);
|
|
3563
|
-
}
|
|
3564
|
-
function isNull(value) {
|
|
3565
|
-
return value === null;
|
|
3566
|
-
}
|
|
3567
|
-
function isNil(value) {
|
|
3568
|
-
return value == null;
|
|
3569
|
-
}
|
|
3570
|
-
function isNumber(value) {
|
|
3571
|
-
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
3572
|
-
}
|
|
3573
|
-
function isPlainObject(value) {
|
|
3574
|
-
if (!isObjectLike(value) || baseGetTag(value) != objectTag)
|
|
3575
|
-
return !1;
|
|
3576
|
-
var proto = getPrototype(value);
|
|
3577
|
-
if (proto === null)
|
|
3578
|
-
return !0;
|
|
3579
|
-
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
3580
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
3581
|
-
}
|
|
3582
|
-
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
|
|
3583
|
-
function isSafeInteger(value) {
|
|
3584
|
-
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
|
|
3585
|
-
}
|
|
3586
|
-
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
3587
|
-
function isString(value) {
|
|
3588
|
-
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
3589
|
-
}
|
|
3590
|
-
function isSymbol(value) {
|
|
3591
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
3592
|
-
}
|
|
3593
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
3594
|
-
function isUndefined(value) {
|
|
3595
|
-
return value === undefined$1;
|
|
3596
|
-
}
|
|
3597
|
-
function isWeakMap(value) {
|
|
3598
|
-
return isObjectLike(value) && getTag(value) == weakMapTag;
|
|
3599
|
-
}
|
|
3600
|
-
function isWeakSet(value) {
|
|
3601
|
-
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
|
|
3602
|
-
}
|
|
3603
|
-
var lt2 = createRelationalOperation(baseLt), lte = createRelationalOperation(function(value, other) {
|
|
3604
|
-
return value <= other;
|
|
3605
|
-
});
|
|
3606
|
-
function toArray(value) {
|
|
3607
|
-
if (!value)
|
|
3608
|
-
return [];
|
|
3609
|
-
if (isArrayLike(value))
|
|
3610
|
-
return isString(value) ? stringToArray(value) : copyArray(value);
|
|
3611
|
-
if (symIterator && value[symIterator])
|
|
3612
|
-
return iteratorToArray(value[symIterator]());
|
|
3613
|
-
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
|
|
3614
|
-
return func(value);
|
|
3615
|
-
}
|
|
3616
|
-
function toFinite(value) {
|
|
3617
|
-
if (!value)
|
|
3618
|
-
return value === 0 ? value : 0;
|
|
3619
|
-
if (value = toNumber(value), value === INFINITY || value === -INFINITY) {
|
|
3620
|
-
var sign = value < 0 ? -1 : 1;
|
|
3621
|
-
return sign * MAX_INTEGER;
|
|
3622
|
-
}
|
|
3623
|
-
return value === value ? value : 0;
|
|
3624
|
-
}
|
|
3625
|
-
function toInteger(value) {
|
|
3626
|
-
var result2 = toFinite(value), remainder = result2 % 1;
|
|
3627
|
-
return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
|
|
3628
|
-
}
|
|
3629
|
-
function toLength(value) {
|
|
3630
|
-
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
|
|
3631
|
-
}
|
|
3632
|
-
function toNumber(value) {
|
|
3633
|
-
if (typeof value == "number")
|
|
3634
|
-
return value;
|
|
3635
|
-
if (isSymbol(value))
|
|
3636
|
-
return NAN;
|
|
3637
|
-
if (isObject(value)) {
|
|
3638
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
3639
|
-
value = isObject(other) ? other + "" : other;
|
|
3640
|
-
}
|
|
3641
|
-
if (typeof value != "string")
|
|
3642
|
-
return value === 0 ? value : +value;
|
|
3643
|
-
value = baseTrim(value);
|
|
3644
|
-
var isBinary = reIsBinary.test(value);
|
|
3645
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
3646
|
-
}
|
|
3647
|
-
function toPlainObject(value) {
|
|
3648
|
-
return copyObject(value, keysIn(value));
|
|
3649
|
-
}
|
|
3650
|
-
function toSafeInteger(value) {
|
|
3651
|
-
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
|
|
3652
|
-
}
|
|
3653
|
-
function toString(value) {
|
|
3654
|
-
return value == null ? "" : baseToString(value);
|
|
3655
|
-
}
|
|
3656
|
-
var assign2 = createAssigner(function(object, source) {
|
|
3657
|
-
if (isPrototype(source) || isArrayLike(source)) {
|
|
3658
|
-
copyObject(source, keys(source), object);
|
|
3659
|
-
return;
|
|
3660
|
-
}
|
|
3661
|
-
for (var key in source)
|
|
3662
|
-
hasOwnProperty.call(source, key) && assignValue(object, key, source[key]);
|
|
3663
|
-
}), assignIn = createAssigner(function(object, source) {
|
|
3664
|
-
copyObject(source, keysIn(source), object);
|
|
3665
|
-
}), assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
3666
|
-
copyObject(source, keysIn(source), object, customizer);
|
|
3667
|
-
}), assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
3668
|
-
copyObject(source, keys(source), object, customizer);
|
|
3669
|
-
}), at2 = flatRest(baseAt);
|
|
3670
|
-
function create(prototype, properties) {
|
|
3671
|
-
var result2 = baseCreate(prototype);
|
|
3672
|
-
return properties == null ? result2 : baseAssign(result2, properties);
|
|
3673
|
-
}
|
|
3674
|
-
var defaults = baseRest(function(object, sources) {
|
|
3675
|
-
object = Object2(object);
|
|
3676
|
-
var index = -1, length2 = sources.length, guard = length2 > 2 ? sources[2] : undefined$1;
|
|
3677
|
-
for (guard && isIterateeCall(sources[0], sources[1], guard) && (length2 = 1); ++index < length2; )
|
|
3678
|
-
for (var source = sources[index], props = keysIn(source), propsIndex = -1, propsLength = props.length; ++propsIndex < propsLength; ) {
|
|
3679
|
-
var key = props[propsIndex], value = object[key];
|
|
3680
|
-
(value === undefined$1 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) && (object[key] = source[key]);
|
|
3681
|
-
}
|
|
3682
|
-
return object;
|
|
3683
|
-
}), defaultsDeep = baseRest(function(args) {
|
|
3684
|
-
return args.push(undefined$1, customDefaultsMerge), apply(mergeWith, undefined$1, args);
|
|
3685
|
-
});
|
|
3686
|
-
function findKey(object, predicate) {
|
|
3687
|
-
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
|
3688
|
-
}
|
|
3689
|
-
function findLastKey(object, predicate) {
|
|
3690
|
-
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
|
3691
|
-
}
|
|
3692
|
-
function forIn(object, iteratee2) {
|
|
3693
|
-
return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
|
|
3694
|
-
}
|
|
3695
|
-
function forInRight(object, iteratee2) {
|
|
3696
|
-
return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
|
|
3697
|
-
}
|
|
3698
|
-
function forOwn(object, iteratee2) {
|
|
3699
|
-
return object && baseForOwn(object, getIteratee(iteratee2, 3));
|
|
3700
|
-
}
|
|
3701
|
-
function forOwnRight(object, iteratee2) {
|
|
3702
|
-
return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
|
|
3703
|
-
}
|
|
3704
|
-
function functions(object) {
|
|
3705
|
-
return object == null ? [] : baseFunctions(object, keys(object));
|
|
3706
|
-
}
|
|
3707
|
-
function functionsIn(object) {
|
|
3708
|
-
return object == null ? [] : baseFunctions(object, keysIn(object));
|
|
3709
|
-
}
|
|
3710
|
-
function get(object, path, defaultValue) {
|
|
3711
|
-
var result2 = object == null ? undefined$1 : baseGet(object, path);
|
|
3712
|
-
return result2 === undefined$1 ? defaultValue : result2;
|
|
3713
|
-
}
|
|
3714
|
-
function has(object, path) {
|
|
3715
|
-
return object != null && hasPath(object, path, baseHas);
|
|
3716
|
-
}
|
|
3717
|
-
function hasIn(object, path) {
|
|
3718
|
-
return object != null && hasPath(object, path, baseHasIn);
|
|
3719
|
-
}
|
|
3720
|
-
var invert = createInverter(function(result2, value, key) {
|
|
3721
|
-
value != null && typeof value.toString != "function" && (value = nativeObjectToString.call(value)), result2[value] = key;
|
|
3722
|
-
}, constant(identity)), invertBy = createInverter(function(result2, value, key) {
|
|
3723
|
-
value != null && typeof value.toString != "function" && (value = nativeObjectToString.call(value)), hasOwnProperty.call(result2, value) ? result2[value].push(key) : result2[value] = [key];
|
|
3724
|
-
}, getIteratee), invoke = baseRest(baseInvoke);
|
|
3725
|
-
function keys(object) {
|
|
3726
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
3727
|
-
}
|
|
3728
|
-
function keysIn(object) {
|
|
3729
|
-
return isArrayLike(object) ? arrayLikeKeys(object, !0) : baseKeysIn(object);
|
|
3730
|
-
}
|
|
3731
|
-
function mapKeys(object, iteratee2) {
|
|
3732
|
-
var result2 = {};
|
|
3733
|
-
return iteratee2 = getIteratee(iteratee2, 3), baseForOwn(object, function(value, key, object2) {
|
|
3734
|
-
baseAssignValue(result2, iteratee2(value, key, object2), value);
|
|
3735
|
-
}), result2;
|
|
3736
|
-
}
|
|
3737
|
-
function mapValues(object, iteratee2) {
|
|
3738
|
-
var result2 = {};
|
|
3739
|
-
return iteratee2 = getIteratee(iteratee2, 3), baseForOwn(object, function(value, key, object2) {
|
|
3740
|
-
baseAssignValue(result2, key, iteratee2(value, key, object2));
|
|
3741
|
-
}), result2;
|
|
3742
|
-
}
|
|
3743
|
-
var merge = createAssigner(function(object, source, srcIndex) {
|
|
3744
|
-
baseMerge(object, source, srcIndex);
|
|
3745
|
-
}), mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|
3746
|
-
baseMerge(object, source, srcIndex, customizer);
|
|
3747
|
-
}), omit = flatRest(function(object, paths) {
|
|
3748
|
-
var result2 = {};
|
|
3749
|
-
if (object == null)
|
|
3750
|
-
return result2;
|
|
3751
|
-
var isDeep = !1;
|
|
3752
|
-
paths = arrayMap(paths, function(path) {
|
|
3753
|
-
return path = castPath(path, object), isDeep || (isDeep = path.length > 1), path;
|
|
3754
|
-
}), copyObject(object, getAllKeysIn(object), result2), isDeep && (result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone));
|
|
3755
|
-
for (var length2 = paths.length; length2--; )
|
|
3756
|
-
baseUnset(result2, paths[length2]);
|
|
3757
|
-
return result2;
|
|
3758
|
-
});
|
|
3759
|
-
function omitBy(object, predicate) {
|
|
3760
|
-
return pickBy(object, negate(getIteratee(predicate)));
|
|
3761
|
-
}
|
|
3762
|
-
var pick = flatRest(function(object, paths) {
|
|
3763
|
-
return object == null ? {} : basePick(object, paths);
|
|
3764
|
-
});
|
|
3765
|
-
function pickBy(object, predicate) {
|
|
3766
|
-
if (object == null)
|
|
3767
|
-
return {};
|
|
3768
|
-
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
|
3769
|
-
return [prop];
|
|
3770
|
-
});
|
|
3771
|
-
return predicate = getIteratee(predicate), basePickBy(object, props, function(value, path) {
|
|
3772
|
-
return predicate(value, path[0]);
|
|
3773
|
-
});
|
|
3774
|
-
}
|
|
3775
|
-
function result(object, path, defaultValue) {
|
|
3776
|
-
path = castPath(path, object);
|
|
3777
|
-
var index = -1, length2 = path.length;
|
|
3778
|
-
for (length2 || (length2 = 1, object = undefined$1); ++index < length2; ) {
|
|
3779
|
-
var value = object == null ? undefined$1 : object[toKey(path[index])];
|
|
3780
|
-
value === undefined$1 && (index = length2, value = defaultValue), object = isFunction(value) ? value.call(object) : value;
|
|
3781
|
-
}
|
|
3782
|
-
return object;
|
|
3783
|
-
}
|
|
3784
|
-
function set(object, path, value) {
|
|
3785
|
-
return object == null ? object : baseSet(object, path, value);
|
|
3786
|
-
}
|
|
3787
|
-
function setWith(object, path, value, customizer) {
|
|
3788
|
-
return customizer = typeof customizer == "function" ? customizer : undefined$1, object == null ? object : baseSet(object, path, value, customizer);
|
|
3789
|
-
}
|
|
3790
|
-
var toPairs = createToPairs(keys), toPairsIn = createToPairs(keysIn);
|
|
3791
|
-
function transform(object, iteratee2, accumulator) {
|
|
3792
|
-
var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|
3793
|
-
if (iteratee2 = getIteratee(iteratee2, 4), accumulator == null) {
|
|
3794
|
-
var Ctor = object && object.constructor;
|
|
3795
|
-
isArrLike ? accumulator = isArr ? new Ctor() : [] : isObject(object) ? accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {} : accumulator = {};
|
|
3796
|
-
}
|
|
3797
|
-
return (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
|
|
3798
|
-
return iteratee2(accumulator, value, index, object2);
|
|
3799
|
-
}), accumulator;
|
|
3800
|
-
}
|
|
3801
|
-
function unset(object, path) {
|
|
3802
|
-
return object == null ? !0 : baseUnset(object, path);
|
|
3803
|
-
}
|
|
3804
|
-
function update(object, path, updater) {
|
|
3805
|
-
return object == null ? object : baseUpdate(object, path, castFunction(updater));
|
|
3806
|
-
}
|
|
3807
|
-
function updateWith(object, path, updater, customizer) {
|
|
3808
|
-
return customizer = typeof customizer == "function" ? customizer : undefined$1, object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
|
3809
|
-
}
|
|
3810
|
-
function values(object) {
|
|
3811
|
-
return object == null ? [] : baseValues(object, keys(object));
|
|
3812
|
-
}
|
|
3813
|
-
function valuesIn(object) {
|
|
3814
|
-
return object == null ? [] : baseValues(object, keysIn(object));
|
|
3815
|
-
}
|
|
3816
|
-
function clamp(number, lower, upper) {
|
|
3817
|
-
return upper === undefined$1 && (upper = lower, lower = undefined$1), upper !== undefined$1 && (upper = toNumber(upper), upper = upper === upper ? upper : 0), lower !== undefined$1 && (lower = toNumber(lower), lower = lower === lower ? lower : 0), baseClamp(toNumber(number), lower, upper);
|
|
3818
|
-
}
|
|
3819
|
-
function inRange(number, start, end) {
|
|
3820
|
-
return start = toFinite(start), end === undefined$1 ? (end = start, start = 0) : end = toFinite(end), number = toNumber(number), baseInRange(number, start, end);
|
|
3821
|
-
}
|
|
3822
|
-
function random(lower, upper, floating) {
|
|
3823
|
-
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating) && (upper = floating = undefined$1), floating === undefined$1 && (typeof upper == "boolean" ? (floating = upper, upper = undefined$1) : typeof lower == "boolean" && (floating = lower, lower = undefined$1)), lower === undefined$1 && upper === undefined$1 ? (lower = 0, upper = 1) : (lower = toFinite(lower), upper === undefined$1 ? (upper = lower, lower = 0) : upper = toFinite(upper)), lower > upper) {
|
|
3824
|
-
var temp = lower;
|
|
3825
|
-
lower = upper, upper = temp;
|
|
3826
|
-
}
|
|
3827
|
-
if (floating || lower % 1 || upper % 1) {
|
|
3828
|
-
var rand = nativeRandom();
|
|
3829
|
-
return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
|
|
3830
|
-
}
|
|
3831
|
-
return baseRandom(lower, upper);
|
|
3832
|
-
}
|
|
3833
|
-
var camelCase = createCompounder(function(result2, word, index) {
|
|
3834
|
-
return word = word.toLowerCase(), result2 + (index ? capitalize(word) : word);
|
|
3835
|
-
});
|
|
3836
|
-
function capitalize(string) {
|
|
3837
|
-
return upperFirst(toString(string).toLowerCase());
|
|
3838
|
-
}
|
|
3839
|
-
function deburr(string) {
|
|
3840
|
-
return string = toString(string), string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
|
|
3841
|
-
}
|
|
3842
|
-
function endsWith(string, target, position2) {
|
|
3843
|
-
string = toString(string), target = baseToString(target);
|
|
3844
|
-
var length2 = string.length;
|
|
3845
|
-
position2 = position2 === undefined$1 ? length2 : baseClamp(toInteger(position2), 0, length2);
|
|
3846
|
-
var end = position2;
|
|
3847
|
-
return position2 -= target.length, position2 >= 0 && string.slice(position2, end) == target;
|
|
3848
|
-
}
|
|
3849
|
-
function escape(string) {
|
|
3850
|
-
return string = toString(string), string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
|
|
3851
|
-
}
|
|
3852
|
-
function escapeRegExp(string) {
|
|
3853
|
-
return string = toString(string), string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
|
3854
|
-
}
|
|
3855
|
-
var kebabCase = createCompounder(function(result2, word, index) {
|
|
3856
|
-
return result2 + (index ? "-" : "") + word.toLowerCase();
|
|
3857
|
-
}), lowerCase = createCompounder(function(result2, word, index) {
|
|
3858
|
-
return result2 + (index ? " " : "") + word.toLowerCase();
|
|
3859
|
-
}), lowerFirst = createCaseFirst("toLowerCase");
|
|
3860
|
-
function pad(string, length2, chars) {
|
|
3861
|
-
string = toString(string), length2 = toInteger(length2);
|
|
3862
|
-
var strLength = length2 ? stringSize(string) : 0;
|
|
3863
|
-
if (!length2 || strLength >= length2)
|
|
3864
|
-
return string;
|
|
3865
|
-
var mid = (length2 - strLength) / 2;
|
|
3866
|
-
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
|
|
3867
|
-
}
|
|
3868
|
-
function padEnd(string, length2, chars) {
|
|
3869
|
-
string = toString(string), length2 = toInteger(length2);
|
|
3870
|
-
var strLength = length2 ? stringSize(string) : 0;
|
|
3871
|
-
return length2 && strLength < length2 ? string + createPadding(length2 - strLength, chars) : string;
|
|
3872
|
-
}
|
|
3873
|
-
function padStart(string, length2, chars) {
|
|
3874
|
-
string = toString(string), length2 = toInteger(length2);
|
|
3875
|
-
var strLength = length2 ? stringSize(string) : 0;
|
|
3876
|
-
return length2 && strLength < length2 ? createPadding(length2 - strLength, chars) + string : string;
|
|
3877
|
-
}
|
|
3878
|
-
function parseInt2(string, radix, guard) {
|
|
3879
|
-
return guard || radix == null ? radix = 0 : radix && (radix = +radix), nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
|
|
3880
|
-
}
|
|
3881
|
-
function repeat(string, n, guard) {
|
|
3882
|
-
return (guard ? isIterateeCall(string, n, guard) : n === undefined$1) ? n = 1 : n = toInteger(n), baseRepeat(toString(string), n);
|
|
3883
|
-
}
|
|
3884
|
-
function replace2() {
|
|
3885
|
-
var args = arguments, string = toString(args[0]);
|
|
3886
|
-
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|
3887
|
-
}
|
|
3888
|
-
var snakeCase = createCompounder(function(result2, word, index) {
|
|
3889
|
-
return result2 + (index ? "_" : "") + word.toLowerCase();
|
|
3890
|
-
});
|
|
3891
|
-
function split(string, separator, limit) {
|
|
3892
|
-
return limit && typeof limit != "number" && isIterateeCall(string, separator, limit) && (separator = limit = undefined$1), limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0, limit ? (string = toString(string), string && (typeof separator == "string" || separator != null && !isRegExp(separator)) && (separator = baseToString(separator), !separator && hasUnicode(string)) ? castSlice(stringToArray(string), 0, limit) : string.split(separator, limit)) : [];
|
|
3893
|
-
}
|
|
3894
|
-
var startCase = createCompounder(function(result2, word, index) {
|
|
3895
|
-
return result2 + (index ? " " : "") + upperFirst(word);
|
|
3896
|
-
});
|
|
3897
|
-
function startsWith(string, target, position2) {
|
|
3898
|
-
return string = toString(string), position2 = position2 == null ? 0 : baseClamp(toInteger(position2), 0, string.length), target = baseToString(target), string.slice(position2, position2 + target.length) == target;
|
|
3899
|
-
}
|
|
3900
|
-
function template(string, options, guard) {
|
|
3901
|
-
var settings = lodash2.templateSettings;
|
|
3902
|
-
guard && isIterateeCall(string, options, guard) && (options = undefined$1), string = toString(string), options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
3903
|
-
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys), isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '", reDelimiters = RegExp2(
|
|
3904
|
-
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
|
3905
|
-
"g"
|
|
3906
|
-
), sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + `
|
|
3907
|
-
`;
|
|
3908
|
-
string.replace(reDelimiters, function(match2, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|
3909
|
-
return interpolateValue || (interpolateValue = esTemplateValue), source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar), escapeValue && (isEscaping = !0, source += `' +
|
|
3910
|
-
__e(` + escapeValue + `) +
|
|
3911
|
-
'`), evaluateValue && (isEvaluating = !0, source += `';
|
|
3912
|
-
` + evaluateValue + `;
|
|
3913
|
-
__p += '`), interpolateValue && (source += `' +
|
|
3914
|
-
((__t = (` + interpolateValue + `)) == null ? '' : __t) +
|
|
3915
|
-
'`), index = offset + match2.length, match2;
|
|
3916
|
-
}), source += `';
|
|
3917
|
-
`;
|
|
3918
|
-
var variable = hasOwnProperty.call(options, "variable") && options.variable;
|
|
3919
|
-
if (!variable)
|
|
3920
|
-
source = `with (obj) {
|
|
3921
|
-
` + source + `
|
|
3922
|
-
}
|
|
3923
|
-
`;
|
|
3924
|
-
else if (reForbiddenIdentifierChars.test(variable))
|
|
3925
|
-
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
3926
|
-
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"), source = "function(" + (variable || "obj") + `) {
|
|
3927
|
-
` + (variable ? "" : `obj || (obj = {});
|
|
3928
|
-
`) + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? `, __j = Array.prototype.join;
|
|
3929
|
-
function print() { __p += __j.call(arguments, '') }
|
|
3930
|
-
` : `;
|
|
3931
|
-
`) + source + `return __p
|
|
3932
|
-
}`;
|
|
3933
|
-
var result2 = attempt(function() {
|
|
3934
|
-
return Function2(importsKeys, sourceURL + "return " + source).apply(undefined$1, importsValues);
|
|
3935
|
-
});
|
|
3936
|
-
if (result2.source = source, isError(result2))
|
|
3937
|
-
throw result2;
|
|
3938
|
-
return result2;
|
|
3939
|
-
}
|
|
3940
|
-
function toLower(value) {
|
|
3941
|
-
return toString(value).toLowerCase();
|
|
3942
|
-
}
|
|
3943
|
-
function toUpper(value) {
|
|
3944
|
-
return toString(value).toUpperCase();
|
|
3945
|
-
}
|
|
3946
|
-
function trim2(string, chars, guard) {
|
|
3947
|
-
if (string = toString(string), string && (guard || chars === undefined$1))
|
|
3948
|
-
return baseTrim(string);
|
|
3949
|
-
if (!string || !(chars = baseToString(chars)))
|
|
3950
|
-
return string;
|
|
3951
|
-
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
|
3952
|
-
return castSlice(strSymbols, start, end).join("");
|
|
3953
|
-
}
|
|
3954
|
-
function trimEnd(string, chars, guard) {
|
|
3955
|
-
if (string = toString(string), string && (guard || chars === undefined$1))
|
|
3956
|
-
return string.slice(0, trimmedEndIndex(string) + 1);
|
|
3957
|
-
if (!string || !(chars = baseToString(chars)))
|
|
3958
|
-
return string;
|
|
3959
|
-
var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
|
3960
|
-
return castSlice(strSymbols, 0, end).join("");
|
|
3961
|
-
}
|
|
3962
|
-
function trimStart(string, chars, guard) {
|
|
3963
|
-
if (string = toString(string), string && (guard || chars === undefined$1))
|
|
3964
|
-
return string.replace(reTrimStart, "");
|
|
3965
|
-
if (!string || !(chars = baseToString(chars)))
|
|
3966
|
-
return string;
|
|
3967
|
-
var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
|
|
3968
|
-
return castSlice(strSymbols, start).join("");
|
|
3969
|
-
}
|
|
3970
|
-
function truncate(string, options) {
|
|
3971
|
-
var length2 = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
3972
|
-
if (isObject(options)) {
|
|
3973
|
-
var separator = "separator" in options ? options.separator : separator;
|
|
3974
|
-
length2 = "length" in options ? toInteger(options.length) : length2, omission = "omission" in options ? baseToString(options.omission) : omission;
|
|
3975
|
-
}
|
|
3976
|
-
string = toString(string);
|
|
3977
|
-
var strLength = string.length;
|
|
3978
|
-
if (hasUnicode(string)) {
|
|
3979
|
-
var strSymbols = stringToArray(string);
|
|
3980
|
-
strLength = strSymbols.length;
|
|
3981
|
-
}
|
|
3982
|
-
if (length2 >= strLength)
|
|
3983
|
-
return string;
|
|
3984
|
-
var end = length2 - stringSize(omission);
|
|
3985
|
-
if (end < 1)
|
|
3986
|
-
return omission;
|
|
3987
|
-
var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
|
|
3988
|
-
if (separator === undefined$1)
|
|
3989
|
-
return result2 + omission;
|
|
3990
|
-
if (strSymbols && (end += result2.length - end), isRegExp(separator)) {
|
|
3991
|
-
if (string.slice(end).search(separator)) {
|
|
3992
|
-
var match2, substring = result2;
|
|
3993
|
-
for (separator.global || (separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g")), separator.lastIndex = 0; match2 = separator.exec(substring); )
|
|
3994
|
-
var newEnd = match2.index;
|
|
3995
|
-
result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
|
|
3996
|
-
}
|
|
3997
|
-
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
3998
|
-
var index = result2.lastIndexOf(separator);
|
|
3999
|
-
index > -1 && (result2 = result2.slice(0, index));
|
|
4000
|
-
}
|
|
4001
|
-
return result2 + omission;
|
|
4002
|
-
}
|
|
4003
|
-
function unescape(string) {
|
|
4004
|
-
return string = toString(string), string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|
4005
|
-
}
|
|
4006
|
-
var upperCase = createCompounder(function(result2, word, index) {
|
|
4007
|
-
return result2 + (index ? " " : "") + word.toUpperCase();
|
|
4008
|
-
}), upperFirst = createCaseFirst("toUpperCase");
|
|
4009
|
-
function words(string, pattern, guard) {
|
|
4010
|
-
return string = toString(string), pattern = guard ? undefined$1 : pattern, pattern === undefined$1 ? hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string) : string.match(pattern) || [];
|
|
4011
|
-
}
|
|
4012
|
-
var attempt = baseRest(function(func, args) {
|
|
4013
|
-
try {
|
|
4014
|
-
return apply(func, undefined$1, args);
|
|
4015
|
-
} catch (e) {
|
|
4016
|
-
return isError(e) ? e : new Error2(e);
|
|
4017
|
-
}
|
|
4018
|
-
}), bindAll = flatRest(function(object, methodNames) {
|
|
4019
|
-
return arrayEach(methodNames, function(key) {
|
|
4020
|
-
key = toKey(key), baseAssignValue(object, key, bind(object[key], object));
|
|
4021
|
-
}), object;
|
|
4022
|
-
});
|
|
4023
|
-
function cond(pairs) {
|
|
4024
|
-
var length2 = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
|
|
4025
|
-
return pairs = length2 ? arrayMap(pairs, function(pair) {
|
|
4026
|
-
if (typeof pair[1] != "function")
|
|
4027
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
4028
|
-
return [toIteratee(pair[0]), pair[1]];
|
|
4029
|
-
}) : [], baseRest(function(args) {
|
|
4030
|
-
for (var index = -1; ++index < length2; ) {
|
|
4031
|
-
var pair = pairs[index];
|
|
4032
|
-
if (apply(pair[0], this, args))
|
|
4033
|
-
return apply(pair[1], this, args);
|
|
4034
|
-
}
|
|
4035
|
-
});
|
|
4036
|
-
}
|
|
4037
|
-
function conforms(source) {
|
|
4038
|
-
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
|
|
4039
|
-
}
|
|
4040
|
-
function constant(value) {
|
|
4041
|
-
return function() {
|
|
4042
|
-
return value;
|
|
4043
|
-
};
|
|
4044
|
-
}
|
|
4045
|
-
function defaultTo(value, defaultValue) {
|
|
4046
|
-
return value == null || value !== value ? defaultValue : value;
|
|
4047
|
-
}
|
|
4048
|
-
var flow = createFlow(), flowRight = createFlow(!0);
|
|
4049
|
-
function identity(value) {
|
|
4050
|
-
return value;
|
|
4051
|
-
}
|
|
4052
|
-
function iteratee(func) {
|
|
4053
|
-
return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
|
|
4054
|
-
}
|
|
4055
|
-
function matches(source) {
|
|
4056
|
-
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
|
|
4057
|
-
}
|
|
4058
|
-
function matchesProperty(path, srcValue) {
|
|
4059
|
-
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
|
|
4060
|
-
}
|
|
4061
|
-
var method = baseRest(function(path, args) {
|
|
4062
|
-
return function(object) {
|
|
4063
|
-
return baseInvoke(object, path, args);
|
|
4064
|
-
};
|
|
4065
|
-
}), methodOf = baseRest(function(object, args) {
|
|
4066
|
-
return function(path) {
|
|
4067
|
-
return baseInvoke(object, path, args);
|
|
4068
|
-
};
|
|
4069
|
-
});
|
|
4070
|
-
function mixin(object, source, options) {
|
|
4071
|
-
var props = keys(source), methodNames = baseFunctions(source, props);
|
|
4072
|
-
options == null && !(isObject(source) && (methodNames.length || !props.length)) && (options = source, source = object, object = this, methodNames = baseFunctions(source, keys(source)));
|
|
4073
|
-
var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
|
4074
|
-
return arrayEach(methodNames, function(methodName) {
|
|
4075
|
-
var func = source[methodName];
|
|
4076
|
-
object[methodName] = func, isFunc && (object.prototype[methodName] = function() {
|
|
4077
|
-
var chainAll = this.__chain__;
|
|
4078
|
-
if (chain2 || chainAll) {
|
|
4079
|
-
var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
|
|
4080
|
-
return actions.push({ func, args: arguments, thisArg: object }), result2.__chain__ = chainAll, result2;
|
|
4081
|
-
}
|
|
4082
|
-
return func.apply(object, arrayPush([this.value()], arguments));
|
|
4083
|
-
});
|
|
4084
|
-
}), object;
|
|
4085
|
-
}
|
|
4086
|
-
function noConflict() {
|
|
4087
|
-
return root._ === this && (root._ = oldDash), this;
|
|
4088
|
-
}
|
|
4089
|
-
function noop() {
|
|
4090
|
-
}
|
|
4091
|
-
function nthArg(n) {
|
|
4092
|
-
return n = toInteger(n), baseRest(function(args) {
|
|
4093
|
-
return baseNth(args, n);
|
|
4094
|
-
});
|
|
4095
|
-
}
|
|
4096
|
-
var over = createOver(arrayMap), overEvery = createOver(arrayEvery), overSome = createOver(arraySome);
|
|
4097
|
-
function property(path) {
|
|
4098
|
-
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
4099
|
-
}
|
|
4100
|
-
function propertyOf(object) {
|
|
4101
|
-
return function(path) {
|
|
4102
|
-
return object == null ? undefined$1 : baseGet(object, path);
|
|
4103
|
-
};
|
|
4104
|
-
}
|
|
4105
|
-
var range = createRange(), rangeRight = createRange(!0);
|
|
4106
|
-
function stubArray() {
|
|
4107
|
-
return [];
|
|
4108
|
-
}
|
|
4109
|
-
function stubFalse() {
|
|
4110
|
-
return !1;
|
|
4111
|
-
}
|
|
4112
|
-
function stubObject() {
|
|
4113
|
-
return {};
|
|
4114
|
-
}
|
|
4115
|
-
function stubString() {
|
|
4116
|
-
return "";
|
|
4117
|
-
}
|
|
4118
|
-
function stubTrue() {
|
|
4119
|
-
return !0;
|
|
4120
|
-
}
|
|
4121
|
-
function times(n, iteratee2) {
|
|
4122
|
-
if (n = toInteger(n), n < 1 || n > MAX_SAFE_INTEGER)
|
|
4123
|
-
return [];
|
|
4124
|
-
var index = MAX_ARRAY_LENGTH, length2 = nativeMin(n, MAX_ARRAY_LENGTH);
|
|
4125
|
-
iteratee2 = getIteratee(iteratee2), n -= MAX_ARRAY_LENGTH;
|
|
4126
|
-
for (var result2 = baseTimes(length2, iteratee2); ++index < n; )
|
|
4127
|
-
iteratee2(index);
|
|
4128
|
-
return result2;
|
|
4129
|
-
}
|
|
4130
|
-
function toPath(value) {
|
|
4131
|
-
return isArray(value) ? arrayMap(value, toKey) : isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
|
4132
|
-
}
|
|
4133
|
-
function uniqueId(prefix2) {
|
|
4134
|
-
var id = ++idCounter;
|
|
4135
|
-
return toString(prefix2) + id;
|
|
4136
|
-
}
|
|
4137
|
-
var add = createMathOperation(function(augend, addend) {
|
|
4138
|
-
return augend + addend;
|
|
4139
|
-
}, 0), ceil = createRound("ceil"), divide = createMathOperation(function(dividend, divisor) {
|
|
4140
|
-
return dividend / divisor;
|
|
4141
|
-
}, 1), floor = createRound("floor");
|
|
4142
|
-
function max(array) {
|
|
4143
|
-
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined$1;
|
|
4144
|
-
}
|
|
4145
|
-
function maxBy(array, iteratee2) {
|
|
4146
|
-
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined$1;
|
|
4147
|
-
}
|
|
4148
|
-
function mean(array) {
|
|
4149
|
-
return baseMean(array, identity);
|
|
4150
|
-
}
|
|
4151
|
-
function meanBy(array, iteratee2) {
|
|
4152
|
-
return baseMean(array, getIteratee(iteratee2, 2));
|
|
4153
|
-
}
|
|
4154
|
-
function min(array) {
|
|
4155
|
-
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined$1;
|
|
4156
|
-
}
|
|
4157
|
-
function minBy(array, iteratee2) {
|
|
4158
|
-
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined$1;
|
|
4159
|
-
}
|
|
4160
|
-
var multiply = createMathOperation(function(multiplier, multiplicand) {
|
|
4161
|
-
return multiplier * multiplicand;
|
|
4162
|
-
}, 1), round = createRound("round"), subtract = createMathOperation(function(minuend, subtrahend) {
|
|
4163
|
-
return minuend - subtrahend;
|
|
4164
|
-
}, 0);
|
|
4165
|
-
function sum(array) {
|
|
4166
|
-
return array && array.length ? baseSum(array, identity) : 0;
|
|
4167
|
-
}
|
|
4168
|
-
function sumBy(array, iteratee2) {
|
|
4169
|
-
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
|
|
4170
|
-
}
|
|
4171
|
-
return lodash2.after = after, lodash2.ary = ary, lodash2.assign = assign2, lodash2.assignIn = assignIn, lodash2.assignInWith = assignInWith, lodash2.assignWith = assignWith, lodash2.at = at2, 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 = filter2, 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 = memoize2, 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 = slice2, 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 = gt2, 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 = lt2, 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 = replace2, 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 = trim2, 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() {
|
|
4172
|
-
var source = {};
|
|
4173
|
-
return baseForOwn(lodash2, function(func, methodName) {
|
|
4174
|
-
hasOwnProperty.call(lodash2.prototype, methodName) || (source[methodName] = func);
|
|
4175
|
-
}), source;
|
|
4176
|
-
})(), { chain: !1 }), lodash2.VERSION = VERSION, arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
4177
|
-
lodash2[methodName].placeholder = lodash2;
|
|
4178
|
-
}), arrayEach(["drop", "take"], function(methodName, index) {
|
|
4179
|
-
LazyWrapper.prototype[methodName] = function(n) {
|
|
4180
|
-
n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
|
|
4181
|
-
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|
4182
|
-
return result2.__filtered__ ? result2.__takeCount__ = nativeMin(n, result2.__takeCount__) : result2.__views__.push({
|
|
4183
|
-
size: nativeMin(n, MAX_ARRAY_LENGTH),
|
|
4184
|
-
type: methodName + (result2.__dir__ < 0 ? "Right" : "")
|
|
4185
|
-
}), result2;
|
|
4186
|
-
}, LazyWrapper.prototype[methodName + "Right"] = function(n) {
|
|
4187
|
-
return this.reverse()[methodName](n).reverse();
|
|
4188
|
-
};
|
|
4189
|
-
}), arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
|
|
4190
|
-
var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
|
4191
|
-
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
|
4192
|
-
var result2 = this.clone();
|
|
4193
|
-
return result2.__iteratees__.push({
|
|
4194
|
-
iteratee: getIteratee(iteratee2, 3),
|
|
4195
|
-
type
|
|
4196
|
-
}), result2.__filtered__ = result2.__filtered__ || isFilter, result2;
|
|
4197
|
-
};
|
|
4198
|
-
}), arrayEach(["head", "last"], function(methodName, index) {
|
|
4199
|
-
var takeName = "take" + (index ? "Right" : "");
|
|
4200
|
-
LazyWrapper.prototype[methodName] = function() {
|
|
4201
|
-
return this[takeName](1).value()[0];
|
|
4202
|
-
};
|
|
4203
|
-
}), arrayEach(["initial", "tail"], function(methodName, index) {
|
|
4204
|
-
var dropName = "drop" + (index ? "" : "Right");
|
|
4205
|
-
LazyWrapper.prototype[methodName] = function() {
|
|
4206
|
-
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|
4207
|
-
};
|
|
4208
|
-
}), LazyWrapper.prototype.compact = function() {
|
|
4209
|
-
return this.filter(identity);
|
|
4210
|
-
}, LazyWrapper.prototype.find = function(predicate) {
|
|
4211
|
-
return this.filter(predicate).head();
|
|
4212
|
-
}, LazyWrapper.prototype.findLast = function(predicate) {
|
|
4213
|
-
return this.reverse().find(predicate);
|
|
4214
|
-
}, LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
|
4215
|
-
return typeof path == "function" ? new LazyWrapper(this) : this.map(function(value) {
|
|
4216
|
-
return baseInvoke(value, path, args);
|
|
4217
|
-
});
|
|
4218
|
-
}), LazyWrapper.prototype.reject = function(predicate) {
|
|
4219
|
-
return this.filter(negate(getIteratee(predicate)));
|
|
4220
|
-
}, LazyWrapper.prototype.slice = function(start, end) {
|
|
4221
|
-
start = toInteger(start);
|
|
4222
|
-
var result2 = this;
|
|
4223
|
-
return result2.__filtered__ && (start > 0 || end < 0) ? new LazyWrapper(result2) : (start < 0 ? result2 = result2.takeRight(-start) : start && (result2 = result2.drop(start)), end !== undefined$1 && (end = toInteger(end), result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start)), result2);
|
|
4224
|
-
}, LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
|
4225
|
-
return this.reverse().takeWhile(predicate).reverse();
|
|
4226
|
-
}, LazyWrapper.prototype.toArray = function() {
|
|
4227
|
-
return this.take(MAX_ARRAY_LENGTH);
|
|
4228
|
-
}, baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|
4229
|
-
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);
|
|
4230
|
-
lodashFunc && (lodash2.prototype[methodName] = function() {
|
|
4231
|
-
var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value), interceptor = function(value2) {
|
|
4232
|
-
var result3 = lodashFunc.apply(lodash2, arrayPush([value2], args));
|
|
4233
|
-
return isTaker && chainAll ? result3[0] : result3;
|
|
4234
|
-
};
|
|
4235
|
-
useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1 && (isLazy = useLazy = !1);
|
|
4236
|
-
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
|
|
4237
|
-
if (!retUnwrapped && useLazy) {
|
|
4238
|
-
value = onlyLazy ? value : new LazyWrapper(this);
|
|
4239
|
-
var result2 = func.apply(value, args);
|
|
4240
|
-
return result2.__actions__.push({ func: thru, args: [interceptor], thisArg: undefined$1 }), new LodashWrapper(result2, chainAll);
|
|
4241
|
-
}
|
|
4242
|
-
return isUnwrapped && onlyLazy ? func.apply(this, args) : (result2 = this.thru(interceptor), isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2);
|
|
4243
|
-
});
|
|
4244
|
-
}), arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
|
|
4245
|
-
var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
|
4246
|
-
lodash2.prototype[methodName] = function() {
|
|
4247
|
-
var args = arguments;
|
|
4248
|
-
if (retUnwrapped && !this.__chain__) {
|
|
4249
|
-
var value = this.value();
|
|
4250
|
-
return func.apply(isArray(value) ? value : [], args);
|
|
4251
|
-
}
|
|
4252
|
-
return this[chainName](function(value2) {
|
|
4253
|
-
return func.apply(isArray(value2) ? value2 : [], args);
|
|
4254
|
-
});
|
|
4255
|
-
};
|
|
4256
|
-
}), baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|
4257
|
-
var lodashFunc = lodash2[methodName];
|
|
4258
|
-
if (lodashFunc) {
|
|
4259
|
-
var key = lodashFunc.name + "";
|
|
4260
|
-
hasOwnProperty.call(realNames, key) || (realNames[key] = []), realNames[key].push({ name: methodName, func: lodashFunc });
|
|
4261
|
-
}
|
|
4262
|
-
}), realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{
|
|
4263
|
-
name: "wrapper",
|
|
4264
|
-
func: undefined$1
|
|
4265
|
-
}], 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, symIterator && (lodash2.prototype[symIterator] = wrapperToIterator), lodash2;
|
|
4266
|
-
}), _2 = runInContext();
|
|
4267
|
-
freeModule ? ((freeModule.exports = _2)._ = _2, freeExports._ = _2) : root._ = _2;
|
|
4268
|
-
}).call(lodash);
|
|
4269
|
-
})(lodash$1, lodash$1.exports)), lodash$1.exports;
|
|
4270
|
-
}
|
|
4271
|
-
var lodashExports = requireLodash();
|
|
4272
599
|
function deserializeDocument(document2) {
|
|
4273
|
-
const deserializers =
|
|
600
|
+
const deserializers = merge(
|
|
4274
601
|
{ types: {} },
|
|
4275
602
|
pluginConfig.getAdditionalDeserializers()
|
|
4276
603
|
), blockDeserializers = [
|
|
@@ -4287,7 +614,7 @@ function serializeDocument(document2, schema, baseLanguage) {
|
|
|
4287
614
|
const stopTypes = [
|
|
4288
615
|
...defaultStopTypes,
|
|
4289
616
|
...pluginConfig.getAdditionalStopTypes()
|
|
4290
|
-
], serializers =
|
|
617
|
+
], serializers = merge(
|
|
4291
618
|
customSerializers,
|
|
4292
619
|
pluginConfig.getAdditionalSerializers()
|
|
4293
620
|
);
|
|
@@ -5109,170 +1436,167 @@ const getLocales = async (secrets) => pluginConfig.getLocales().map((locale) =>
|
|
|
5109
1436
|
}
|
|
5110
1437
|
}, [secrets, documents, locales]), handleImportDocument = useCallback(
|
|
5111
1438
|
async (documentId, localeId) => {
|
|
5112
|
-
if (secrets)
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
1439
|
+
if (!secrets) return;
|
|
1440
|
+
const key = `${documentId}:${localeId}`, status = translationStatuses.get(key);
|
|
1441
|
+
if (!status?.isReady || !status.translationId) {
|
|
1442
|
+
toast.push({
|
|
1443
|
+
title: `Translation not ready for ${documentId} (${localeId})`,
|
|
1444
|
+
status: "warning",
|
|
1445
|
+
closable: !0
|
|
1446
|
+
});
|
|
1447
|
+
return;
|
|
1448
|
+
}
|
|
1449
|
+
const document2 = documents.find(
|
|
1450
|
+
(doc) => (doc._id?.replace("drafts.", "") || doc._id) === documentId
|
|
1451
|
+
);
|
|
1452
|
+
if (!document2) {
|
|
1453
|
+
toast.push({
|
|
1454
|
+
title: `Document ${documentId} not found`,
|
|
1455
|
+
status: "error",
|
|
1456
|
+
closable: !0
|
|
1457
|
+
});
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
try {
|
|
1461
|
+
const downloadedFiles = await downloadTranslations(
|
|
1462
|
+
[
|
|
1463
|
+
{
|
|
1464
|
+
documentId,
|
|
1465
|
+
versionId: document2._rev,
|
|
1466
|
+
translationId: status.translationId,
|
|
1467
|
+
locale: localeId
|
|
1468
|
+
}
|
|
1469
|
+
],
|
|
1470
|
+
secrets
|
|
1471
|
+
);
|
|
1472
|
+
if (downloadedFiles.length > 0)
|
|
1473
|
+
try {
|
|
1474
|
+
const docInfo = {
|
|
1475
|
+
documentId,
|
|
1476
|
+
versionId: document2._rev
|
|
1477
|
+
};
|
|
1478
|
+
await importDocument(
|
|
1479
|
+
docInfo,
|
|
1480
|
+
localeId,
|
|
1481
|
+
downloadedFiles[0].data,
|
|
1482
|
+
translationContext,
|
|
1483
|
+
!1
|
|
1484
|
+
), setDownloadStatus((prev2) => ({
|
|
1485
|
+
...prev2,
|
|
1486
|
+
downloaded: /* @__PURE__ */ new Set([...prev2.downloaded, key])
|
|
1487
|
+
})), setImportedTranslations((prev2) => /* @__PURE__ */ new Set([...prev2, key])), toast.push({
|
|
1488
|
+
title: `Successfully imported translation for ${documentId} (${localeId})`,
|
|
1489
|
+
status: "success",
|
|
5119
1490
|
closable: !0
|
|
5120
1491
|
});
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
(doc) => (doc._id?.replace("drafts.", "") || doc._id) === documentId
|
|
5125
|
-
);
|
|
5126
|
-
if (!document2) {
|
|
5127
|
-
toast.push({
|
|
5128
|
-
title: `Document ${documentId} not found`,
|
|
1492
|
+
} catch (importError) {
|
|
1493
|
+
console.error("Failed to import translation:", importError), toast.push({
|
|
1494
|
+
title: `Failed to import translation for ${documentId} (${localeId})`,
|
|
5129
1495
|
status: "error",
|
|
5130
1496
|
closable: !0
|
|
5131
1497
|
});
|
|
5132
|
-
return;
|
|
5133
1498
|
}
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
versionId: document2._rev,
|
|
5139
|
-
translationId: status.translationId,
|
|
5140
|
-
locale: localeId
|
|
5141
|
-
}
|
|
5142
|
-
],
|
|
5143
|
-
secrets
|
|
5144
|
-
);
|
|
5145
|
-
if (downloadedFiles.length > 0)
|
|
5146
|
-
try {
|
|
5147
|
-
const docInfo = {
|
|
5148
|
-
documentId,
|
|
5149
|
-
versionId: document2._rev
|
|
5150
|
-
};
|
|
5151
|
-
await importDocument(
|
|
5152
|
-
docInfo,
|
|
5153
|
-
localeId,
|
|
5154
|
-
downloadedFiles[0].data,
|
|
5155
|
-
translationContext,
|
|
5156
|
-
!1
|
|
5157
|
-
), setDownloadStatus((prev2) => ({
|
|
5158
|
-
...prev2,
|
|
5159
|
-
downloaded: /* @__PURE__ */ new Set([...prev2.downloaded, key])
|
|
5160
|
-
})), setImportedTranslations((prev2) => /* @__PURE__ */ new Set([...prev2, key])), toast.push({
|
|
5161
|
-
title: `Successfully imported translation for ${documentId} (${localeId})`,
|
|
5162
|
-
status: "success",
|
|
5163
|
-
closable: !0
|
|
5164
|
-
});
|
|
5165
|
-
} catch (importError) {
|
|
5166
|
-
console.error("Failed to import translation:", importError), toast.push({
|
|
5167
|
-
title: `Failed to import translation for ${documentId} (${localeId})`,
|
|
5168
|
-
status: "error",
|
|
5169
|
-
closable: !0
|
|
5170
|
-
});
|
|
5171
|
-
}
|
|
5172
|
-
else
|
|
5173
|
-
toast.push({
|
|
5174
|
-
title: `No translation content received for ${documentId}`,
|
|
5175
|
-
status: "warning",
|
|
5176
|
-
closable: !0
|
|
5177
|
-
});
|
|
5178
|
-
} catch (error) {
|
|
5179
|
-
console.error("Error importing translation:", error), toast.push({
|
|
5180
|
-
title: `Error importing translation for ${documentId}`,
|
|
5181
|
-
status: "error",
|
|
1499
|
+
else
|
|
1500
|
+
toast.push({
|
|
1501
|
+
title: `No translation content received for ${documentId}`,
|
|
1502
|
+
status: "warning",
|
|
5182
1503
|
closable: !0
|
|
5183
1504
|
});
|
|
5184
|
-
}
|
|
5185
|
-
},
|
|
5186
|
-
[secrets, documents, translationContext]
|
|
5187
|
-
), handlePatchDocumentReferences = useCallback(async () => {
|
|
5188
|
-
if (!(!secrets || documents.length === 0)) {
|
|
5189
|
-
setIsBusy(!0);
|
|
5190
|
-
try {
|
|
5191
|
-
const availableLocaleIds = locales.filter((locale) => locale.enabled !== !1).map((locale) => locale.localeId), patchTasks = [];
|
|
5192
|
-
for (const doc of documents)
|
|
5193
|
-
for (const localeId of availableLocaleIds)
|
|
5194
|
-
patchTasks.push({ doc, localeId });
|
|
5195
|
-
setImportProgress({
|
|
5196
|
-
current: 0,
|
|
5197
|
-
total: patchTasks.length,
|
|
5198
|
-
isImporting: !0
|
|
5199
|
-
});
|
|
5200
|
-
const result = await processBatch(
|
|
5201
|
-
patchTasks,
|
|
5202
|
-
async ({ doc, localeId }) => {
|
|
5203
|
-
const sourceLocale = pluginConfig.getSourceLocale();
|
|
5204
|
-
if (localeId === sourceLocale)
|
|
5205
|
-
return { patched: !1, doc, localeId, skipped: !0 };
|
|
5206
|
-
const translatedDoc = await findTranslatedDocumentForLocale(
|
|
5207
|
-
doc._id,
|
|
5208
|
-
localeId,
|
|
5209
|
-
client
|
|
5210
|
-
);
|
|
5211
|
-
if (!translatedDoc)
|
|
5212
|
-
return { patched: !1, doc, localeId, noTranslation: !0 };
|
|
5213
|
-
const resolvedDoc = await resolveRefs(
|
|
5214
|
-
translatedDoc,
|
|
5215
|
-
localeId,
|
|
5216
|
-
client
|
|
5217
|
-
);
|
|
5218
|
-
if (resolvedDoc !== translatedDoc) {
|
|
5219
|
-
const mutation = {
|
|
5220
|
-
patch: {
|
|
5221
|
-
id: translatedDoc._id,
|
|
5222
|
-
set: resolvedDoc
|
|
5223
|
-
}
|
|
5224
|
-
};
|
|
5225
|
-
return await client.mutate([mutation]), { patched: !0, doc: translatedDoc, localeId };
|
|
5226
|
-
}
|
|
5227
|
-
return { patched: !1, doc: translatedDoc, localeId };
|
|
5228
|
-
},
|
|
5229
|
-
{
|
|
5230
|
-
onProgress: (current, total) => {
|
|
5231
|
-
setImportProgress({
|
|
5232
|
-
current,
|
|
5233
|
-
total,
|
|
5234
|
-
isImporting: !0
|
|
5235
|
-
});
|
|
5236
|
-
},
|
|
5237
|
-
onItemFailure: ({ doc, localeId }, error) => {
|
|
5238
|
-
console.error(
|
|
5239
|
-
`Failed to patch references for ${doc._id} (${localeId}):`,
|
|
5240
|
-
error
|
|
5241
|
-
);
|
|
5242
|
-
}
|
|
5243
|
-
}
|
|
5244
|
-
), patchedCount = result.successfulItems.filter(
|
|
5245
|
-
(item) => item.patched
|
|
5246
|
-
).length;
|
|
5247
|
-
toast.push({
|
|
5248
|
-
title: `Patched references in ${patchedCount} documents${result.failureCount > 0 ? `, ${result.failureCount} failed` : ""}`,
|
|
5249
|
-
status: patchedCount > 0 || result.failureCount === 0 ? "success" : "error",
|
|
5250
|
-
closable: !0
|
|
5251
|
-
});
|
|
5252
1505
|
} catch (error) {
|
|
5253
|
-
console.error("Error
|
|
5254
|
-
title:
|
|
1506
|
+
console.error("Error importing translation:", error), toast.push({
|
|
1507
|
+
title: `Error importing translation for ${documentId}`,
|
|
5255
1508
|
status: "error",
|
|
5256
1509
|
closable: !0
|
|
5257
1510
|
});
|
|
5258
|
-
} finally {
|
|
5259
|
-
setIsBusy(!1), setImportProgress({ current: 0, total: 0, isImporting: !1 });
|
|
5260
1511
|
}
|
|
1512
|
+
},
|
|
1513
|
+
[secrets, documents, translationContext, translationStatuses]
|
|
1514
|
+
), handlePatchDocumentReferences = useCallback(async () => {
|
|
1515
|
+
if (!secrets || documents.length === 0) return 0;
|
|
1516
|
+
setIsBusy(!0);
|
|
1517
|
+
try {
|
|
1518
|
+
const availableLocaleIds = locales.filter((locale) => locale.enabled !== !1).map((locale) => locale.localeId), patchTasks = [];
|
|
1519
|
+
for (const doc of documents)
|
|
1520
|
+
for (const localeId of availableLocaleIds)
|
|
1521
|
+
patchTasks.push({ doc, localeId });
|
|
1522
|
+
setImportProgress({
|
|
1523
|
+
current: 0,
|
|
1524
|
+
total: patchTasks.length,
|
|
1525
|
+
isImporting: !0
|
|
1526
|
+
});
|
|
1527
|
+
const result = await processBatch(
|
|
1528
|
+
patchTasks,
|
|
1529
|
+
async ({ doc, localeId }) => {
|
|
1530
|
+
const sourceLocale = pluginConfig.getSourceLocale();
|
|
1531
|
+
if (localeId === sourceLocale)
|
|
1532
|
+
return { patched: !1, doc, localeId, skipped: !0 };
|
|
1533
|
+
const translatedDoc = await findTranslatedDocumentForLocale(
|
|
1534
|
+
doc._id,
|
|
1535
|
+
localeId,
|
|
1536
|
+
client
|
|
1537
|
+
);
|
|
1538
|
+
if (!translatedDoc)
|
|
1539
|
+
return { patched: !1, doc, localeId, noTranslation: !0 };
|
|
1540
|
+
const resolvedDoc = await resolveRefs(
|
|
1541
|
+
translatedDoc,
|
|
1542
|
+
localeId,
|
|
1543
|
+
client
|
|
1544
|
+
);
|
|
1545
|
+
if (resolvedDoc !== translatedDoc) {
|
|
1546
|
+
const mutation = {
|
|
1547
|
+
patch: {
|
|
1548
|
+
id: translatedDoc._id,
|
|
1549
|
+
set: resolvedDoc
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
return await client.mutate([mutation]), { patched: !0, doc: translatedDoc, localeId };
|
|
1553
|
+
}
|
|
1554
|
+
return { patched: !1, doc: translatedDoc, localeId };
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
onProgress: (current, total) => {
|
|
1558
|
+
setImportProgress({
|
|
1559
|
+
current,
|
|
1560
|
+
total,
|
|
1561
|
+
isImporting: !0
|
|
1562
|
+
});
|
|
1563
|
+
},
|
|
1564
|
+
onItemFailure: ({ doc, localeId }, error) => {
|
|
1565
|
+
console.error(
|
|
1566
|
+
`Failed to patch references for ${doc._id} (${localeId}):`,
|
|
1567
|
+
error
|
|
1568
|
+
);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
), patchedCount = result.successfulItems.filter(
|
|
1572
|
+
(item) => item.patched
|
|
1573
|
+
).length;
|
|
1574
|
+
return toast.push({
|
|
1575
|
+
title: `Patched references in ${patchedCount} documents${result.failureCount > 0 ? `, ${result.failureCount} failed` : ""}`,
|
|
1576
|
+
status: patchedCount > 0 || result.failureCount === 0 ? "success" : "error",
|
|
1577
|
+
closable: !0
|
|
1578
|
+
}), patchedCount;
|
|
1579
|
+
} catch (error) {
|
|
1580
|
+
return console.error("Error patching document references:", error), toast.push({
|
|
1581
|
+
title: "Error patching document references",
|
|
1582
|
+
status: "error",
|
|
1583
|
+
closable: !0
|
|
1584
|
+
}), 0;
|
|
1585
|
+
} finally {
|
|
1586
|
+
setIsBusy(!1), setImportProgress({ current: 0, total: 0, isImporting: !1 });
|
|
5261
1587
|
}
|
|
5262
1588
|
}, [secrets, documents, locales, client]), handlePublishAllTranslations = useCallback(async () => {
|
|
5263
|
-
if (!
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
}
|
|
5275
|
-
const translationMetadata = await client.fetch(`*[
|
|
1589
|
+
if (!secrets || documents.length === 0) return 0;
|
|
1590
|
+
setIsBusy(!0);
|
|
1591
|
+
try {
|
|
1592
|
+
const sourceLocale = pluginConfig.getSourceLocale(), publishedDocumentIds = documents.filter((doc) => !doc._id.startsWith("drafts.")).map((doc) => doc._id);
|
|
1593
|
+
if (publishedDocumentIds.length === 0)
|
|
1594
|
+
return toast.push({
|
|
1595
|
+
title: "No published source documents found to publish translations for",
|
|
1596
|
+
status: "warning",
|
|
1597
|
+
closable: !0
|
|
1598
|
+
}), 0;
|
|
1599
|
+
const translationMetadata = await client.fetch(`*[
|
|
5276
1600
|
_type == 'translation.metadata' &&
|
|
5277
1601
|
translations[_key == $sourceLocale][0].value._ref in $publishedDocumentIds
|
|
5278
1602
|
] {
|
|
@@ -5282,39 +1606,36 @@ const getLocales = async (secrets) => pluginConfig.getLocales().map((locale) =>
|
|
|
5282
1606
|
'docId': value._ref
|
|
5283
1607
|
}
|
|
5284
1608
|
}`, {
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
});
|
|
5292
|
-
}), translationDocIds.length === 0) {
|
|
5293
|
-
toast.push({
|
|
5294
|
-
title: "No translation documents found to publish",
|
|
5295
|
-
status: "warning",
|
|
5296
|
-
closable: !0
|
|
5297
|
-
});
|
|
5298
|
-
return;
|
|
5299
|
-
}
|
|
5300
|
-
const translatedDocumentIds = await publishTranslations(
|
|
5301
|
-
translationDocIds,
|
|
5302
|
-
client
|
|
5303
|
-
);
|
|
5304
|
-
toast.push({
|
|
5305
|
-
title: `Published ${translatedDocumentIds.length} translation documents`,
|
|
5306
|
-
status: "success",
|
|
5307
|
-
closable: !0
|
|
1609
|
+
sourceLocale,
|
|
1610
|
+
publishedDocumentIds
|
|
1611
|
+
}), translationDocIds = [];
|
|
1612
|
+
if (translationMetadata.forEach((metadata) => {
|
|
1613
|
+
metadata.translationDocs?.forEach((translation) => {
|
|
1614
|
+
translation.docId && translationDocIds.push(translation.docId);
|
|
5308
1615
|
});
|
|
5309
|
-
}
|
|
5310
|
-
|
|
5311
|
-
title: "
|
|
5312
|
-
status: "
|
|
1616
|
+
}), translationDocIds.length === 0)
|
|
1617
|
+
return toast.push({
|
|
1618
|
+
title: "No translation documents found to publish",
|
|
1619
|
+
status: "warning",
|
|
5313
1620
|
closable: !0
|
|
5314
|
-
});
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
1621
|
+
}), 0;
|
|
1622
|
+
const translatedDocumentIds = await publishTranslations(
|
|
1623
|
+
translationDocIds,
|
|
1624
|
+
client
|
|
1625
|
+
);
|
|
1626
|
+
return toast.push({
|
|
1627
|
+
title: `Published ${translatedDocumentIds.length} translation documents`,
|
|
1628
|
+
status: "success",
|
|
1629
|
+
closable: !0
|
|
1630
|
+
}), translatedDocumentIds.length;
|
|
1631
|
+
} catch (error) {
|
|
1632
|
+
return console.error("Error publishing translations:", error), toast.push({
|
|
1633
|
+
title: "Error publishing translations",
|
|
1634
|
+
status: "error",
|
|
1635
|
+
closable: !0
|
|
1636
|
+
}), 0;
|
|
1637
|
+
} finally {
|
|
1638
|
+
setIsBusy(!1);
|
|
5318
1639
|
}
|
|
5319
1640
|
}, [secrets, documents, client]);
|
|
5320
1641
|
useEffect(() => {
|
|
@@ -6622,8 +2943,9 @@ const WrapText = dt(Box)`
|
|
|
6622
2943
|
isRefreshing,
|
|
6623
2944
|
importedTranslations,
|
|
6624
2945
|
setLocales,
|
|
6625
|
-
handlePatchDocumentReferences
|
|
6626
|
-
|
|
2946
|
+
handlePatchDocumentReferences,
|
|
2947
|
+
handlePublishAllTranslations
|
|
2948
|
+
} = useTranslations(), [autoImport, setAutoImport] = useState(!1), [isImporting, setIsImporting] = useState(!1), [autoRefresh, setAutoRefresh] = useState(!0), [autoPatchReferences, setAutoPatchReferences] = useState(!0), [autoPublish, setAutoPublish] = useState(!0), [isPublishing, setIsPublishing] = useState(!1), toast = useToast(), document2 = documents[0], currentDocumentLanguage = useMemo(() => {
|
|
6627
2949
|
if (!document2) return null;
|
|
6628
2950
|
const languageField = pluginConfig.getLanguageField();
|
|
6629
2951
|
return document2[languageField] || pluginConfig.getSourceLocale();
|
|
@@ -6632,57 +2954,48 @@ const WrapText = dt(Box)`
|
|
|
6632
2954
|
return locales.filter(
|
|
6633
2955
|
(locale) => locale.enabled !== !1 && locale.localeId !== sourceLocale
|
|
6634
2956
|
);
|
|
6635
|
-
}, [locales]), documentId = useMemo(() => document2 ? document2._id?.replace("drafts.", "") || document2._id : null, [document2]),
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
availableLocales,
|
|
6655
|
-
translationStatuses,
|
|
6656
|
-
importedTranslations,
|
|
6657
|
-
handleImportDocument
|
|
6658
|
-
]), handleImportAll = useCallback(async () => {
|
|
6659
|
-
if (!(isImporting || !documentId)) {
|
|
6660
|
-
setIsImporting(!0);
|
|
6661
|
-
try {
|
|
6662
|
-
const readyTranslations = availableLocales.filter((locale) => {
|
|
6663
|
-
const key = `${documentId}:${locale.localeId}`;
|
|
6664
|
-
return translationStatuses.get(key)?.isReady && !importedTranslations.has(key);
|
|
6665
|
-
});
|
|
6666
|
-
for (const locale of readyTranslations)
|
|
6667
|
-
await handleImportDocument(documentId, locale.localeId);
|
|
6668
|
-
} finally {
|
|
6669
|
-
setIsImporting(!1);
|
|
2957
|
+
}, [locales]), documentId = useMemo(() => document2 ? document2._id?.replace("drafts.", "") || document2._id : null, [document2]), handleImportTranslations = useCallback(
|
|
2958
|
+
async (options = {}) => {
|
|
2959
|
+
const { autoOnly = !1 } = options;
|
|
2960
|
+
if (isImporting || !documentId || autoOnly && !autoImport) return;
|
|
2961
|
+
const readyTranslations = availableLocales.filter((locale) => {
|
|
2962
|
+
const key = `${documentId}:${locale.localeId}`;
|
|
2963
|
+
return translationStatuses.get(key)?.isReady && !importedTranslations.has(key);
|
|
2964
|
+
});
|
|
2965
|
+
if (readyTranslations.length !== 0) {
|
|
2966
|
+
setIsImporting(!0);
|
|
2967
|
+
try {
|
|
2968
|
+
await Promise.all(
|
|
2969
|
+
readyTranslations.map(
|
|
2970
|
+
(locale) => handleImportDocument(documentId, locale.localeId)
|
|
2971
|
+
)
|
|
2972
|
+
), autoPatchReferences && await handlePatchDocumentReferences(), autoPublish && await handlePublishAllTranslations();
|
|
2973
|
+
} finally {
|
|
2974
|
+
setIsImporting(!1);
|
|
2975
|
+
}
|
|
6670
2976
|
}
|
|
6671
|
-
}
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
2977
|
+
},
|
|
2978
|
+
[
|
|
2979
|
+
autoImport,
|
|
2980
|
+
isImporting,
|
|
2981
|
+
documentId,
|
|
2982
|
+
availableLocales,
|
|
2983
|
+
translationStatuses,
|
|
2984
|
+
importedTranslations,
|
|
2985
|
+
handleImportDocument,
|
|
2986
|
+
autoPatchReferences,
|
|
2987
|
+
handlePatchDocumentReferences,
|
|
2988
|
+
autoPublish,
|
|
2989
|
+
handlePublishAllTranslations,
|
|
2990
|
+
toast
|
|
2991
|
+
]
|
|
2992
|
+
);
|
|
6680
2993
|
useEffect(() => {
|
|
6681
|
-
|
|
6682
|
-
}, [
|
|
2994
|
+
handleImportTranslations({ autoOnly: !0 });
|
|
2995
|
+
}, [handleImportTranslations]), useEffect(() => {
|
|
6683
2996
|
if (!autoRefresh || !documentId || availableLocales.length === 0) return;
|
|
6684
2997
|
const interval = setInterval(async () => {
|
|
6685
|
-
await handleRefreshAll(), await
|
|
2998
|
+
await handleRefreshAll(), await handleImportTranslations({ autoOnly: !0 });
|
|
6686
2999
|
}, 1e4);
|
|
6687
3000
|
return () => clearInterval(interval);
|
|
6688
3001
|
}, [
|
|
@@ -6690,9 +3003,9 @@ const WrapText = dt(Box)`
|
|
|
6690
3003
|
documentId,
|
|
6691
3004
|
availableLocales.length,
|
|
6692
3005
|
handleRefreshAll,
|
|
6693
|
-
|
|
3006
|
+
handleImportTranslations
|
|
6694
3007
|
]), useEffect(() => {
|
|
6695
|
-
(async () => (await handleRefreshAll(), await
|
|
3008
|
+
(async () => (await handleRefreshAll(), await handleImportTranslations({ autoOnly: !0 })))();
|
|
6696
3009
|
}, []);
|
|
6697
3010
|
const toggleLocale = useCallback(
|
|
6698
3011
|
(localeId, shouldEnable) => {
|
|
@@ -6800,59 +3113,116 @@ const WrapText = dt(Box)`
|
|
|
6800
3113
|
Button,
|
|
6801
3114
|
{
|
|
6802
3115
|
mode: "ghost",
|
|
6803
|
-
|
|
3116
|
+
tone: "primary",
|
|
3117
|
+
onClick: () => handleImportTranslations(),
|
|
6804
3118
|
text: isImporting ? "Importing..." : "Import All",
|
|
6805
3119
|
icon: DownloadIcon,
|
|
6806
3120
|
disabled: isImporting || availableLocales.every((locale) => {
|
|
6807
3121
|
const key = `${documentId}:${locale.localeId}`;
|
|
6808
3122
|
return !translationStatuses.get(key)?.isReady || importedTranslations.has(key);
|
|
6809
|
-
})
|
|
3123
|
+
}),
|
|
3124
|
+
style: { minWidth: "180px" }
|
|
6810
3125
|
}
|
|
6811
3126
|
),
|
|
6812
|
-
/* @__PURE__ */ jsxs(
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
return translationStatuses.get(key)?.isReady;
|
|
6823
|
-
}).length
|
|
3127
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", children: [
|
|
3128
|
+
/* @__PURE__ */ jsx(
|
|
3129
|
+
Switch,
|
|
3130
|
+
{
|
|
3131
|
+
checked: autoImport,
|
|
3132
|
+
onChange: () => setAutoImport(!autoImport),
|
|
3133
|
+
disabled: isImporting
|
|
3134
|
+
}
|
|
3135
|
+
),
|
|
3136
|
+
/* @__PURE__ */ jsx(Text, { size: 1, children: "Auto-import when complete" })
|
|
6824
3137
|
] })
|
|
6825
3138
|
] }),
|
|
6826
|
-
/* @__PURE__ */ jsxs(
|
|
6827
|
-
|
|
3139
|
+
/* @__PURE__ */ jsxs(Text, { size: 1, muted: !0, children: [
|
|
3140
|
+
"Imported",
|
|
3141
|
+
" ",
|
|
3142
|
+
availableLocales.filter((locale) => {
|
|
3143
|
+
const key = `${documentId}:${locale.localeId}`;
|
|
3144
|
+
return importedTranslations.has(key);
|
|
3145
|
+
}).length,
|
|
3146
|
+
"/",
|
|
3147
|
+
availableLocales.filter((locale) => {
|
|
3148
|
+
const key = `${documentId}:${locale.localeId}`;
|
|
3149
|
+
return translationStatuses.get(key)?.isReady;
|
|
3150
|
+
}).length
|
|
3151
|
+
] })
|
|
3152
|
+
] }),
|
|
3153
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", justify: "flex-start", children: [
|
|
3154
|
+
/* @__PURE__ */ jsx(
|
|
3155
|
+
Tooltip,
|
|
3156
|
+
{
|
|
3157
|
+
placement: "top",
|
|
3158
|
+
content: `Replaces references to ${pluginConfig.getSourceLocale()} documents in this document with the corresponding translated document reference`,
|
|
3159
|
+
children: /* @__PURE__ */ jsx(
|
|
3160
|
+
Button,
|
|
3161
|
+
{
|
|
3162
|
+
mode: "ghost",
|
|
3163
|
+
tone: "caution",
|
|
3164
|
+
onClick: async () => {
|
|
3165
|
+
await handlePatchDocumentReferences();
|
|
3166
|
+
},
|
|
3167
|
+
text: isBusy ? "Patching..." : "Patch References",
|
|
3168
|
+
icon: isBusy ? null : LinkIcon,
|
|
3169
|
+
disabled: isBusy || isImporting,
|
|
3170
|
+
style: { minWidth: "180px" }
|
|
3171
|
+
}
|
|
3172
|
+
)
|
|
3173
|
+
}
|
|
3174
|
+
),
|
|
3175
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", children: [
|
|
6828
3176
|
/* @__PURE__ */ jsx(
|
|
6829
3177
|
Switch,
|
|
6830
3178
|
{
|
|
6831
|
-
checked:
|
|
6832
|
-
onChange: () =>
|
|
6833
|
-
disabled: isImporting
|
|
3179
|
+
checked: autoPatchReferences,
|
|
3180
|
+
onChange: () => setAutoPatchReferences(!autoPatchReferences),
|
|
3181
|
+
disabled: isImporting || isBusy
|
|
6834
3182
|
}
|
|
6835
|
-
)
|
|
3183
|
+
),
|
|
3184
|
+
/* @__PURE__ */ jsx(Text, { size: 1, children: "Auto-patch after import" })
|
|
6836
3185
|
] })
|
|
6837
3186
|
] }),
|
|
6838
|
-
/* @__PURE__ */
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
3187
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", justify: "flex-start", children: [
|
|
3188
|
+
/* @__PURE__ */ jsx(
|
|
3189
|
+
Tooltip,
|
|
3190
|
+
{
|
|
3191
|
+
placement: "top",
|
|
3192
|
+
content: "Publishes all translations (if the source document is published)",
|
|
3193
|
+
children: /* @__PURE__ */ jsx(
|
|
3194
|
+
Button,
|
|
3195
|
+
{
|
|
3196
|
+
mode: "ghost",
|
|
3197
|
+
tone: "positive",
|
|
3198
|
+
onClick: async () => {
|
|
3199
|
+
setIsPublishing(!0);
|
|
3200
|
+
try {
|
|
3201
|
+
await handlePublishAllTranslations();
|
|
3202
|
+
} finally {
|
|
3203
|
+
setIsPublishing(!1);
|
|
3204
|
+
}
|
|
3205
|
+
},
|
|
3206
|
+
text: isPublishing ? "Publishing..." : "Publish Translations",
|
|
3207
|
+
icon: isPublishing ? null : PublishIcon,
|
|
3208
|
+
disabled: isBusy || isPublishing || isImporting,
|
|
3209
|
+
style: { minWidth: "180px" }
|
|
3210
|
+
}
|
|
3211
|
+
)
|
|
3212
|
+
}
|
|
3213
|
+
),
|
|
3214
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", children: [
|
|
3215
|
+
/* @__PURE__ */ jsx(
|
|
3216
|
+
Switch,
|
|
6845
3217
|
{
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
text: isBusy ? "Patching..." : "Patch Document References",
|
|
6850
|
-
icon: isBusy ? null : LinkIcon,
|
|
6851
|
-
disabled: isBusy
|
|
3218
|
+
checked: autoPublish,
|
|
3219
|
+
onChange: () => setAutoPublish(!autoPublish),
|
|
3220
|
+
disabled: isPublishing || isImporting || isBusy
|
|
6852
3221
|
}
|
|
6853
|
-
)
|
|
6854
|
-
|
|
6855
|
-
|
|
3222
|
+
),
|
|
3223
|
+
/* @__PURE__ */ jsx(Text, { size: 1, children: "Auto-publish after import" })
|
|
3224
|
+
] })
|
|
3225
|
+
] })
|
|
6856
3226
|
] })
|
|
6857
3227
|
] })
|
|
6858
3228
|
] }) : /* @__PURE__ */ jsx(Card, { padding: 4, tone: "neutral", border: !0, children: /* @__PURE__ */ jsxs(Text, { size: 1, muted: !0, children: [
|
|
@@ -6864,6 +3234,21 @@ const WrapText = dt(Box)`
|
|
|
6864
3234
|
}, TranslationTab = (props) => {
|
|
6865
3235
|
const { displayed } = props.document;
|
|
6866
3236
|
return /* @__PURE__ */ jsx(BaseTranslationWrapper, { showContainer: !1, children: /* @__PURE__ */ jsx(TranslationsProvider, { singleDocument: displayed, children: /* @__PURE__ */ jsx(TranslationView, {}) }) });
|
|
3237
|
+
}, translateAction = (props) => {
|
|
3238
|
+
const router = useRouter();
|
|
3239
|
+
return {
|
|
3240
|
+
label: "Translate",
|
|
3241
|
+
icon: TranslateIcon,
|
|
3242
|
+
tone: "primary",
|
|
3243
|
+
onHandle: () => {
|
|
3244
|
+
const { id, type } = props;
|
|
3245
|
+
router.navigateIntent("edit", {
|
|
3246
|
+
id,
|
|
3247
|
+
type,
|
|
3248
|
+
view: "general-translation"
|
|
3249
|
+
});
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
6867
3252
|
}, TranslationsTable = () => {
|
|
6868
3253
|
const {
|
|
6869
3254
|
documents,
|
|
@@ -7293,7 +3678,17 @@ const WrapText = dt(Box)`
|
|
|
7293
3678
|
component: TranslationsTool,
|
|
7294
3679
|
router: route.create("/*")
|
|
7295
3680
|
}
|
|
7296
|
-
]
|
|
3681
|
+
],
|
|
3682
|
+
document: {
|
|
3683
|
+
views: [
|
|
3684
|
+
{
|
|
3685
|
+
id: "general-translation",
|
|
3686
|
+
title: "Translations",
|
|
3687
|
+
component: TranslationTab
|
|
3688
|
+
}
|
|
3689
|
+
],
|
|
3690
|
+
actions: (prev2) => [...prev2, translateAction]
|
|
3691
|
+
}
|
|
7297
3692
|
})
|
|
7298
3693
|
);
|
|
7299
3694
|
export {
|
|
@@ -7306,6 +3701,7 @@ export {
|
|
|
7306
3701
|
defaultStopTypes,
|
|
7307
3702
|
detachGTData,
|
|
7308
3703
|
findLatestDraft,
|
|
7309
|
-
gtPlugin
|
|
3704
|
+
gtPlugin,
|
|
3705
|
+
translateAction
|
|
7310
3706
|
};
|
|
7311
3707
|
//# sourceMappingURL=index.mjs.map
|