Official MailerLite Sign Up Forms - Version 1.3

Version Description

WordPress 5 block Updated the MailerLite API to V2 Added Double opt-in feature Updated admin design

Download this release

Release Info

Developer mailerlite
Plugin Icon 128x128 Official MailerLite Sign Up Forms
Version 1.3
Comparing to
See all releases

Code changes from version 1.2.8 to 1.3

assets/css/mailerlite.css CHANGED
@@ -1,8 +1,8 @@
1
  .mailerlite-activate {
2
- background: #FFF;
3
  max-width: 750px;
4
  padding: 30px;
5
- border-radius: 5px;
6
  }
7
 
8
  .mailerlite-activate .description-block {
@@ -20,10 +20,13 @@
20
  padding-top: 25px;
21
  }
22
 
23
- .mailerlite-activate .input-block .popups {
24
- padding: 15px;
25
- display: inline;
26
- margin: 15px 15px 15px 30px;
 
 
 
27
  }
28
 
29
  .mailerlite-empty-list {
@@ -38,12 +41,6 @@
38
  float: right;
39
  }
40
 
41
- .mailerlite-header {
42
- height: 100px;
43
- background: url('../image/header.png');
44
- margin: 0px 0px 20px -20px;
45
- }
46
-
47
  .popup-description {
48
  background: #ffffff;
49
  margin: 10px 0px 10px 0px;
@@ -60,11 +57,76 @@
60
  }
61
 
62
  p.info {
63
- background: #fcf8e3;
64
  padding: 15px;
65
  }
66
 
67
- p.success {
68
- background: #dff0d8;
69
  padding: 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
1
  .mailerlite-activate {
2
+ /*background: #FFF;
3
  max-width: 750px;
4
  padding: 30px;
5
+ border-radius: 5px;*/
6
  }
7
 
8
  .mailerlite-activate .description-block {
20
  padding-top: 25px;
21
  }
22
 
23
+ .mailerlite-activate .popups {
24
+ padding: 4px 15px;
25
+ display: inline-block;
26
+ font-weight: 600;
27
+ border-radius: 2px;
28
+ margin: 0 10px 0 0;
29
+
30
  }
31
 
32
  .mailerlite-empty-list {
41
  float: right;
42
  }
43
 
 
 
 
 
 
 
44
  .popup-description {
45
  background: #ffffff;
46
  margin: 10px 0px 10px 0px;
57
  }
58
 
59
  p.info {
 
60
  padding: 15px;
61
  }
62
 
63
+ p.gray {
64
+ background: #dcdcdc;
65
  padding: 15px;
66
+ }
67
+
68
+ p.success {
69
+ background: #09c269;
70
+ color: #fff;
71
+ }
72
+
73
+ .notice {
74
+ position: relative;
75
+ }
76
+
77
+ .tab-content {
78
+ display: none
79
+ }
80
+
81
+ .tab-content.active {
82
+ display: block
83
+ }
84
+
85
+ .form-large {
86
+ padding: 3px 8px;
87
+ font-size: 1.7em;
88
+ line-height: 100%;
89
+ height: 1.7em;
90
+ width: 100%;
91
+ outline: 0;
92
+ margin: 0 0 3px;
93
+ background-color: #fff;
94
+ }
95
+
96
+ .mailerlite-icon {
97
+ width: 100%;
98
+ max-width: 440px;
99
+ }
100
+
101
+ .mailerlite-row {
102
+ margin: 10px auto;
103
+ max-width: 700px;
104
+ display: flex;
105
+ flex-wrap: wrap;
106
+ }
107
+
108
+ .mailerlite-col {
109
+ align-self: center;
110
+ padding: 0 10px;
111
+ max-width: 100%;
112
+ }
113
+
114
+ @media screen and (max-width: 782px) {
115
+
116
+ }
117
+
118
+ .mailerlite-col .mailerlite-icon {
119
+ margin: 0 auto;
120
+ display: block;
121
+ }
122
+
123
+ @media screen and (min-width: 783px) {
124
+ .mailerlite-list {
125
+ display: flex;
126
+ }
127
+
128
+ .mailerlite-col {
129
+ flex-basis: 0;
130
+ flex-grow: 1;
131
+ }
132
  }
assets/css/mailerlite_forms.css CHANGED
@@ -37,7 +37,7 @@
37
  }
38
 
39
  .mailerlite-form-loader {
40
- display:none;
41
  text-align: center;
42
  font-weight: bold;
43
  margin: 0 20px;
37
  }
38
 
39
  .mailerlite-form-loader {
40
+ display: none;
41
  text-align: center;
42
  font-weight: bold;
43
  margin: 0 20px;
assets/image/custom_form.png ADDED
Binary file
assets/image/icon.png CHANGED
Binary file
assets/image/mailerlite_form.png ADDED
Binary file
assets/image/widget_logo.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="21px" viewBox="0 0 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->
4
+ <title>mailerlitelogo</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="mailerlitelogo" transform="translate(0.198319, 0.325455)" fill="#09C269" fill-rule="nonzero">
8
+ <path d="M17.2807581,0.115646258 L2.78853487,0.115646258 C1.28807741,0.115646258 0.0437956203,1.34864717 0.0437956203,2.8355012 L0.0437956203,11.9016843 L0.0437956203,13.6786562 L0.0437956203,20.1156463 L3.83153579,16.3985111 L17.2990564,16.3985111 C18.7995138,16.3985111 20.0437956,15.1655103 20.0437956,13.6786562 L20.0437956,2.8355012 C20.0254974,1.3305148 18.7995138,0.115646258 17.2807581,0.115646258 Z" id="Shape-path"></path>
9
+ </g>
10
+ </g>
11
+ </svg>
assets/js/block.build.js ADDED
@@ -0,0 +1,112341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = {};
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__(moduleId) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if(installedModules[moduleId]) {
10
+ /******/ return installedModules[moduleId].exports;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules[moduleId] = {
14
+ /******/ i: moduleId,
15
+ /******/ l: false,
16
+ /******/ exports: {}
17
+ /******/ };
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module.l = true;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module.exports;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__.m = modules;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__.c = installedModules;
35
+ /******/
36
+ /******/ // define getter function for harmony exports
37
+ /******/ __webpack_require__.d = function(exports, name, getter) {
38
+ /******/ if(!__webpack_require__.o(exports, name)) {
39
+ /******/ Object.defineProperty(exports, name, {
40
+ /******/ configurable: false,
41
+ /******/ enumerable: true,
42
+ /******/ get: getter
43
+ /******/ });
44
+ /******/ }
45
+ /******/ };
46
+ /******/
47
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
48
+ /******/ __webpack_require__.n = function(module) {
49
+ /******/ var getter = module && module.__esModule ?
50
+ /******/ function getDefault() { return module['default']; } :
51
+ /******/ function getModuleExports() { return module; };
52
+ /******/ __webpack_require__.d(getter, 'a', getter);
53
+ /******/ return getter;
54
+ /******/ };
55
+ /******/
56
+ /******/ // Object.prototype.hasOwnProperty.call
57
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
+ /******/
59
+ /******/ // __webpack_public_path__
60
+ /******/ __webpack_require__.p = "";
61
+ /******/
62
+ /******/ // Load entry module and return exports
63
+ /******/ return __webpack_require__(__webpack_require__.s = 352);
64
+ /******/ })
65
+ /************************************************************************/
66
+ /******/ ([
67
+ /* 0 */
68
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
69
+
70
+ "use strict";
71
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__react__ = __webpack_require__(79);
72
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["a"]; });
73
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["b"]; });
74
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["c"]; });
75
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["e"]; });
76
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["f"]; });
77
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["g"]; });
78
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["h"]; });
79
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["i"]; });
80
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["j"]; });
81
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_0__react__["k"]; });
82
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__react_platform__ = __webpack_require__(357);
83
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_1__react_platform__["a"]; });
84
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(365);
85
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_2__utils__["a"]; });
86
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__serialize__ = __webpack_require__(366);
87
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_3__serialize__["a"]; });
88
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__raw_html__ = __webpack_require__(109);
89
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__raw_html__["a"]; });
90
+
91
+
92
+
93
+
94
+
95
+ //# sourceMappingURL=index.js.map
96
+
97
+ /***/ }),
98
+ /* 1 */
99
+ /***/ (function(module, exports, __webpack_require__) {
100
+
101
+ /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
102
+
103
+ ;(function (global, factory) {
104
+ true ? module.exports = factory() :
105
+ typeof define === 'function' && define.amd ? define(factory) :
106
+ global.moment = factory()
107
+ }(this, (function () { 'use strict';
108
+
109
+ var hookCallback;
110
+
111
+ function hooks () {
112
+ return hookCallback.apply(null, arguments);
113
+ }
114
+
115
+ // This is done to register the method called with moment()
116
+ // without creating circular dependencies.
117
+ function setHookCallback (callback) {
118
+ hookCallback = callback;
119
+ }
120
+
121
+ function isArray(input) {
122
+ return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
123
+ }
124
+
125
+ function isObject(input) {
126
+ // IE8 will treat undefined and null as object if it wasn't for
127
+ // input != null
128
+ return input != null && Object.prototype.toString.call(input) === '[object Object]';
129
+ }
130
+
131
+ function isObjectEmpty(obj) {
132
+ if (Object.getOwnPropertyNames) {
133
+ return (Object.getOwnPropertyNames(obj).length === 0);
134
+ } else {
135
+ var k;
136
+ for (k in obj) {
137
+ if (obj.hasOwnProperty(k)) {
138
+ return false;
139
+ }
140
+ }
141
+ return true;
142
+ }
143
+ }
144
+
145
+ function isUndefined(input) {
146
+ return input === void 0;
147
+ }
148
+
149
+ function isNumber(input) {
150
+ return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
151
+ }
152
+
153
+ function isDate(input) {
154
+ return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
155
+ }
156
+
157
+ function map(arr, fn) {
158
+ var res = [], i;
159
+ for (i = 0; i < arr.length; ++i) {
160
+ res.push(fn(arr[i], i));
161
+ }
162
+ return res;
163
+ }
164
+
165
+ function hasOwnProp(a, b) {
166
+ return Object.prototype.hasOwnProperty.call(a, b);
167
+ }
168
+
169
+ function extend(a, b) {
170
+ for (var i in b) {
171
+ if (hasOwnProp(b, i)) {
172
+ a[i] = b[i];
173
+ }
174
+ }
175
+
176
+ if (hasOwnProp(b, 'toString')) {
177
+ a.toString = b.toString;
178
+ }
179
+
180
+ if (hasOwnProp(b, 'valueOf')) {
181
+ a.valueOf = b.valueOf;
182
+ }
183
+
184
+ return a;
185
+ }
186
+
187
+ function createUTC (input, format, locale, strict) {
188
+ return createLocalOrUTC(input, format, locale, strict, true).utc();
189
+ }
190
+
191
+ function defaultParsingFlags() {
192
+ // We need to deep clone this object.
193
+ return {
194
+ empty : false,
195
+ unusedTokens : [],
196
+ unusedInput : [],
197
+ overflow : -2,
198
+ charsLeftOver : 0,
199
+ nullInput : false,
200
+ invalidMonth : null,
201
+ invalidFormat : false,
202
+ userInvalidated : false,
203
+ iso : false,
204
+ parsedDateParts : [],
205
+ meridiem : null,
206
+ rfc2822 : false,
207
+ weekdayMismatch : false
208
+ };
209
+ }
210
+
211
+ function getParsingFlags(m) {
212
+ if (m._pf == null) {
213
+ m._pf = defaultParsingFlags();
214
+ }
215
+ return m._pf;
216
+ }
217
+
218
+ var some;
219
+ if (Array.prototype.some) {
220
+ some = Array.prototype.some;
221
+ } else {
222
+ some = function (fun) {
223
+ var t = Object(this);
224
+ var len = t.length >>> 0;
225
+
226
+ for (var i = 0; i < len; i++) {
227
+ if (i in t && fun.call(this, t[i], i, t)) {
228
+ return true;
229
+ }
230
+ }
231
+
232
+ return false;
233
+ };
234
+ }
235
+
236
+ function isValid(m) {
237
+ if (m._isValid == null) {
238
+ var flags = getParsingFlags(m);
239
+ var parsedParts = some.call(flags.parsedDateParts, function (i) {
240
+ return i != null;
241
+ });
242
+ var isNowValid = !isNaN(m._d.getTime()) &&
243
+ flags.overflow < 0 &&
244
+ !flags.empty &&
245
+ !flags.invalidMonth &&
246
+ !flags.invalidWeekday &&
247
+ !flags.weekdayMismatch &&
248
+ !flags.nullInput &&
249
+ !flags.invalidFormat &&
250
+ !flags.userInvalidated &&
251
+ (!flags.meridiem || (flags.meridiem && parsedParts));
252
+
253
+ if (m._strict) {
254
+ isNowValid = isNowValid &&
255
+ flags.charsLeftOver === 0 &&
256
+ flags.unusedTokens.length === 0 &&
257
+ flags.bigHour === undefined;
258
+ }
259
+
260
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
261
+ m._isValid = isNowValid;
262
+ }
263
+ else {
264
+ return isNowValid;
265
+ }
266
+ }
267
+ return m._isValid;
268
+ }
269
+
270
+ function createInvalid (flags) {
271
+ var m = createUTC(NaN);
272
+ if (flags != null) {
273
+ extend(getParsingFlags(m), flags);
274
+ }
275
+ else {
276
+ getParsingFlags(m).userInvalidated = true;
277
+ }
278
+
279
+ return m;
280
+ }
281
+
282
+ // Plugins that add properties should also add the key here (null value),
283
+ // so we can properly clone ourselves.
284
+ var momentProperties = hooks.momentProperties = [];
285
+
286
+ function copyConfig(to, from) {
287
+ var i, prop, val;
288
+
289
+ if (!isUndefined(from._isAMomentObject)) {
290
+ to._isAMomentObject = from._isAMomentObject;
291
+ }
292
+ if (!isUndefined(from._i)) {
293
+ to._i = from._i;
294
+ }
295
+ if (!isUndefined(from._f)) {
296
+ to._f = from._f;
297
+ }
298
+ if (!isUndefined(from._l)) {
299
+ to._l = from._l;
300
+ }
301
+ if (!isUndefined(from._strict)) {
302
+ to._strict = from._strict;
303
+ }
304
+ if (!isUndefined(from._tzm)) {
305
+ to._tzm = from._tzm;
306
+ }
307
+ if (!isUndefined(from._isUTC)) {
308
+ to._isUTC = from._isUTC;
309
+ }
310
+ if (!isUndefined(from._offset)) {
311
+ to._offset = from._offset;
312
+ }
313
+ if (!isUndefined(from._pf)) {
314
+ to._pf = getParsingFlags(from);
315
+ }
316
+ if (!isUndefined(from._locale)) {
317
+ to._locale = from._locale;
318
+ }
319
+
320
+ if (momentProperties.length > 0) {
321
+ for (i = 0; i < momentProperties.length; i++) {
322
+ prop = momentProperties[i];
323
+ val = from[prop];
324
+ if (!isUndefined(val)) {
325
+ to[prop] = val;
326
+ }
327
+ }
328
+ }
329
+
330
+ return to;
331
+ }
332
+
333
+ var updateInProgress = false;
334
+
335
+ // Moment prototype object
336
+ function Moment(config) {
337
+ copyConfig(this, config);
338
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
339
+ if (!this.isValid()) {
340
+ this._d = new Date(NaN);
341
+ }
342
+ // Prevent infinite loop in case updateOffset creates new moment
343
+ // objects.
344
+ if (updateInProgress === false) {
345
+ updateInProgress = true;
346
+ hooks.updateOffset(this);
347
+ updateInProgress = false;
348
+ }
349
+ }
350
+
351
+ function isMoment (obj) {
352
+ return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
353
+ }
354
+
355
+ function absFloor (number) {
356
+ if (number < 0) {
357
+ // -0 -> 0
358
+ return Math.ceil(number) || 0;
359
+ } else {
360
+ return Math.floor(number);
361
+ }
362
+ }
363
+
364
+ function toInt(argumentForCoercion) {
365
+ var coercedNumber = +argumentForCoercion,
366
+ value = 0;
367
+
368
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
369
+ value = absFloor(coercedNumber);
370
+ }
371
+
372
+ return value;
373
+ }
374
+
375
+ // compare two arrays, return the number of differences
376
+ function compareArrays(array1, array2, dontConvert) {
377
+ var len = Math.min(array1.length, array2.length),
378
+ lengthDiff = Math.abs(array1.length - array2.length),
379
+ diffs = 0,
380
+ i;
381
+ for (i = 0; i < len; i++) {
382
+ if ((dontConvert && array1[i] !== array2[i]) ||
383
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
384
+ diffs++;
385
+ }
386
+ }
387
+ return diffs + lengthDiff;
388
+ }
389
+
390
+ function warn(msg) {
391
+ if (hooks.suppressDeprecationWarnings === false &&
392
+ (typeof console !== 'undefined') && console.warn) {
393
+ console.warn('Deprecation warning: ' + msg);
394
+ }
395
+ }
396
+
397
+ function deprecate(msg, fn) {
398
+ var firstTime = true;
399
+
400
+ return extend(function () {
401
+ if (hooks.deprecationHandler != null) {
402
+ hooks.deprecationHandler(null, msg);
403
+ }
404
+ if (firstTime) {
405
+ var args = [];
406
+ var arg;
407
+ for (var i = 0; i < arguments.length; i++) {
408
+ arg = '';
409
+ if (typeof arguments[i] === 'object') {
410
+ arg += '\n[' + i + '] ';
411
+ for (var key in arguments[0]) {
412
+ arg += key + ': ' + arguments[0][key] + ', ';
413
+ }
414
+ arg = arg.slice(0, -2); // Remove trailing comma and space
415
+ } else {
416
+ arg = arguments[i];
417
+ }
418
+ args.push(arg);
419
+ }
420
+ warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
421
+ firstTime = false;
422
+ }
423
+ return fn.apply(this, arguments);
424
+ }, fn);
425
+ }
426
+
427
+ var deprecations = {};
428
+
429
+ function deprecateSimple(name, msg) {
430
+ if (hooks.deprecationHandler != null) {
431
+ hooks.deprecationHandler(name, msg);
432
+ }
433
+ if (!deprecations[name]) {
434
+ warn(msg);
435
+ deprecations[name] = true;
436
+ }
437
+ }
438
+
439
+ hooks.suppressDeprecationWarnings = false;
440
+ hooks.deprecationHandler = null;
441
+
442
+ function isFunction(input) {
443
+ return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
444
+ }
445
+
446
+ function set (config) {
447
+ var prop, i;
448
+ for (i in config) {
449
+ prop = config[i];
450
+ if (isFunction(prop)) {
451
+ this[i] = prop;
452
+ } else {
453
+ this['_' + i] = prop;
454
+ }
455
+ }
456
+ this._config = config;
457
+ // Lenient ordinal parsing accepts just a number in addition to
458
+ // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
459
+ // TODO: Remove "ordinalParse" fallback in next major release.
460
+ this._dayOfMonthOrdinalParseLenient = new RegExp(
461
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
462
+ '|' + (/\d{1,2}/).source);
463
+ }
464
+
465
+ function mergeConfigs(parentConfig, childConfig) {
466
+ var res = extend({}, parentConfig), prop;
467
+ for (prop in childConfig) {
468
+ if (hasOwnProp(childConfig, prop)) {
469
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
470
+ res[prop] = {};
471
+ extend(res[prop], parentConfig[prop]);
472
+ extend(res[prop], childConfig[prop]);
473
+ } else if (childConfig[prop] != null) {
474
+ res[prop] = childConfig[prop];
475
+ } else {
476
+ delete res[prop];
477
+ }
478
+ }
479
+ }
480
+ for (prop in parentConfig) {
481
+ if (hasOwnProp(parentConfig, prop) &&
482
+ !hasOwnProp(childConfig, prop) &&
483
+ isObject(parentConfig[prop])) {
484
+ // make sure changes to properties don't modify parent config
485
+ res[prop] = extend({}, res[prop]);
486
+ }
487
+ }
488
+ return res;
489
+ }
490
+
491
+ function Locale(config) {
492
+ if (config != null) {
493
+ this.set(config);
494
+ }
495
+ }
496
+
497
+ var keys;
498
+
499
+ if (Object.keys) {
500
+ keys = Object.keys;
501
+ } else {
502
+ keys = function (obj) {
503
+ var i, res = [];
504
+ for (i in obj) {
505
+ if (hasOwnProp(obj, i)) {
506
+ res.push(i);
507
+ }
508
+ }
509
+ return res;
510
+ };
511
+ }
512
+
513
+ var defaultCalendar = {
514
+ sameDay : '[Today at] LT',
515
+ nextDay : '[Tomorrow at] LT',
516
+ nextWeek : 'dddd [at] LT',
517
+ lastDay : '[Yesterday at] LT',
518
+ lastWeek : '[Last] dddd [at] LT',
519
+ sameElse : 'L'
520
+ };
521
+
522
+ function calendar (key, mom, now) {
523
+ var output = this._calendar[key] || this._calendar['sameElse'];
524
+ return isFunction(output) ? output.call(mom, now) : output;
525
+ }
526
+
527
+ var defaultLongDateFormat = {
528
+ LTS : 'h:mm:ss A',
529
+ LT : 'h:mm A',
530
+ L : 'MM/DD/YYYY',
531
+ LL : 'MMMM D, YYYY',
532
+ LLL : 'MMMM D, YYYY h:mm A',
533
+ LLLL : 'dddd, MMMM D, YYYY h:mm A'
534
+ };
535
+
536
+ function longDateFormat (key) {
537
+ var format = this._longDateFormat[key],
538
+ formatUpper = this._longDateFormat[key.toUpperCase()];
539
+
540
+ if (format || !formatUpper) {
541
+ return format;
542
+ }
543
+
544
+ this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
545
+ return val.slice(1);
546
+ });
547
+
548
+ return this._longDateFormat[key];
549
+ }
550
+
551
+ var defaultInvalidDate = 'Invalid date';
552
+
553
+ function invalidDate () {
554
+ return this._invalidDate;
555
+ }
556
+
557
+ var defaultOrdinal = '%d';
558
+ var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
559
+
560
+ function ordinal (number) {
561
+ return this._ordinal.replace('%d', number);
562
+ }
563
+
564
+ var defaultRelativeTime = {
565
+ future : 'in %s',
566
+ past : '%s ago',
567
+ s : 'a few seconds',
568
+ ss : '%d seconds',
569
+ m : 'a minute',
570
+ mm : '%d minutes',
571
+ h : 'an hour',
572
+ hh : '%d hours',
573
+ d : 'a day',
574
+ dd : '%d days',
575
+ M : 'a month',
576
+ MM : '%d months',
577
+ y : 'a year',
578
+ yy : '%d years'
579
+ };
580
+
581
+ function relativeTime (number, withoutSuffix, string, isFuture) {
582
+ var output = this._relativeTime[string];
583
+ return (isFunction(output)) ?
584
+ output(number, withoutSuffix, string, isFuture) :
585
+ output.replace(/%d/i, number);
586
+ }
587
+
588
+ function pastFuture (diff, output) {
589
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
590
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
591
+ }
592
+
593
+ var aliases = {};
594
+
595
+ function addUnitAlias (unit, shorthand) {
596
+ var lowerCase = unit.toLowerCase();
597
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
598
+ }
599
+
600
+ function normalizeUnits(units) {
601
+ return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
602
+ }
603
+
604
+ function normalizeObjectUnits(inputObject) {
605
+ var normalizedInput = {},
606
+ normalizedProp,
607
+ prop;
608
+
609
+ for (prop in inputObject) {
610
+ if (hasOwnProp(inputObject, prop)) {
611
+ normalizedProp = normalizeUnits(prop);
612
+ if (normalizedProp) {
613
+ normalizedInput[normalizedProp] = inputObject[prop];
614
+ }
615
+ }
616
+ }
617
+
618
+ return normalizedInput;
619
+ }
620
+
621
+ var priorities = {};
622
+
623
+ function addUnitPriority(unit, priority) {
624
+ priorities[unit] = priority;
625
+ }
626
+
627
+ function getPrioritizedUnits(unitsObj) {
628
+ var units = [];
629
+ for (var u in unitsObj) {
630
+ units.push({unit: u, priority: priorities[u]});
631
+ }
632
+ units.sort(function (a, b) {
633
+ return a.priority - b.priority;
634
+ });
635
+ return units;
636
+ }
637
+
638
+ function zeroFill(number, targetLength, forceSign) {
639
+ var absNumber = '' + Math.abs(number),
640
+ zerosToFill = targetLength - absNumber.length,
641
+ sign = number >= 0;
642
+ return (sign ? (forceSign ? '+' : '') : '-') +
643
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
644
+ }
645
+
646
+ var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
647
+
648
+ var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
649
+
650
+ var formatFunctions = {};
651
+
652
+ var formatTokenFunctions = {};
653
+
654
+ // token: 'M'
655
+ // padded: ['MM', 2]
656
+ // ordinal: 'Mo'
657
+ // callback: function () { this.month() + 1 }
658
+ function addFormatToken (token, padded, ordinal, callback) {
659
+ var func = callback;
660
+ if (typeof callback === 'string') {
661
+ func = function () {
662
+ return this[callback]();
663
+ };
664
+ }
665
+ if (token) {
666
+ formatTokenFunctions[token] = func;
667
+ }
668
+ if (padded) {
669
+ formatTokenFunctions[padded[0]] = function () {
670
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
671
+ };
672
+ }
673
+ if (ordinal) {
674
+ formatTokenFunctions[ordinal] = function () {
675
+ return this.localeData().ordinal(func.apply(this, arguments), token);
676
+ };
677
+ }
678
+ }
679
+
680
+ function removeFormattingTokens(input) {
681
+ if (input.match(/\[[\s\S]/)) {
682
+ return input.replace(/^\[|\]$/g, '');
683
+ }
684
+ return input.replace(/\\/g, '');
685
+ }
686
+
687
+ function makeFormatFunction(format) {
688
+ var array = format.match(formattingTokens), i, length;
689
+
690
+ for (i = 0, length = array.length; i < length; i++) {
691
+ if (formatTokenFunctions[array[i]]) {
692
+ array[i] = formatTokenFunctions[array[i]];
693
+ } else {
694
+ array[i] = removeFormattingTokens(array[i]);
695
+ }
696
+ }
697
+
698
+ return function (mom) {
699
+ var output = '', i;
700
+ for (i = 0; i < length; i++) {
701
+ output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
702
+ }
703
+ return output;
704
+ };
705
+ }
706
+
707
+ // format date using native date object
708
+ function formatMoment(m, format) {
709
+ if (!m.isValid()) {
710
+ return m.localeData().invalidDate();
711
+ }
712
+
713
+ format = expandFormat(format, m.localeData());
714
+ formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
715
+
716
+ return formatFunctions[format](m);
717
+ }
718
+
719
+ function expandFormat(format, locale) {
720
+ var i = 5;
721
+
722
+ function replaceLongDateFormatTokens(input) {
723
+ return locale.longDateFormat(input) || input;
724
+ }
725
+
726
+ localFormattingTokens.lastIndex = 0;
727
+ while (i >= 0 && localFormattingTokens.test(format)) {
728
+ format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
729
+ localFormattingTokens.lastIndex = 0;
730
+ i -= 1;
731
+ }
732
+
733
+ return format;
734
+ }
735
+
736
+ var match1 = /\d/; // 0 - 9
737
+ var match2 = /\d\d/; // 00 - 99
738
+ var match3 = /\d{3}/; // 000 - 999
739
+ var match4 = /\d{4}/; // 0000 - 9999
740
+ var match6 = /[+-]?\d{6}/; // -999999 - 999999
741
+ var match1to2 = /\d\d?/; // 0 - 99
742
+ var match3to4 = /\d\d\d\d?/; // 999 - 9999
743
+ var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
744
+ var match1to3 = /\d{1,3}/; // 0 - 999
745
+ var match1to4 = /\d{1,4}/; // 0 - 9999
746
+ var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
747
+
748
+ var matchUnsigned = /\d+/; // 0 - inf
749
+ var matchSigned = /[+-]?\d+/; // -inf - inf
750
+
751
+ var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
752
+ var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
753
+
754
+ var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
755
+
756
+ // any word (or two) characters or numbers including two/three word month in arabic.
757
+ // includes scottish gaelic two word and hyphenated months
758
+ var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
759
+
760
+ var regexes = {};
761
+
762
+ function addRegexToken (token, regex, strictRegex) {
763
+ regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
764
+ return (isStrict && strictRegex) ? strictRegex : regex;
765
+ };
766
+ }
767
+
768
+ function getParseRegexForToken (token, config) {
769
+ if (!hasOwnProp(regexes, token)) {
770
+ return new RegExp(unescapeFormat(token));
771
+ }
772
+
773
+ return regexes[token](config._strict, config._locale);
774
+ }
775
+
776
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
777
+ function unescapeFormat(s) {
778
+ return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
779
+ return p1 || p2 || p3 || p4;
780
+ }));
781
+ }
782
+
783
+ function regexEscape(s) {
784
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
785
+ }
786
+
787
+ var tokens = {};
788
+
789
+ function addParseToken (token, callback) {
790
+ var i, func = callback;
791
+ if (typeof token === 'string') {
792
+ token = [token];
793
+ }
794
+ if (isNumber(callback)) {
795
+ func = function (input, array) {
796
+ array[callback] = toInt(input);
797
+ };
798
+ }
799
+ for (i = 0; i < token.length; i++) {
800
+ tokens[token[i]] = func;
801
+ }
802
+ }
803
+
804
+ function addWeekParseToken (token, callback) {
805
+ addParseToken(token, function (input, array, config, token) {
806
+ config._w = config._w || {};
807
+ callback(input, config._w, config, token);
808
+ });
809
+ }
810
+
811
+ function addTimeToArrayFromToken(token, input, config) {
812
+ if (input != null && hasOwnProp(tokens, token)) {
813
+ tokens[token](input, config._a, config, token);
814
+ }
815
+ }
816
+
817
+ var YEAR = 0;
818
+ var MONTH = 1;
819
+ var DATE = 2;
820
+ var HOUR = 3;
821
+ var MINUTE = 4;
822
+ var SECOND = 5;
823
+ var MILLISECOND = 6;
824
+ var WEEK = 7;
825
+ var WEEKDAY = 8;
826
+
827
+ // FORMATTING
828
+
829
+ addFormatToken('Y', 0, 0, function () {
830
+ var y = this.year();
831
+ return y <= 9999 ? '' + y : '+' + y;
832
+ });
833
+
834
+ addFormatToken(0, ['YY', 2], 0, function () {
835
+ return this.year() % 100;
836
+ });
837
+
838
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
839
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
840
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
841
+
842
+ // ALIASES
843
+
844
+ addUnitAlias('year', 'y');
845
+
846
+ // PRIORITIES
847
+
848
+ addUnitPriority('year', 1);
849
+
850
+ // PARSING
851
+
852
+ addRegexToken('Y', matchSigned);
853
+ addRegexToken('YY', match1to2, match2);
854
+ addRegexToken('YYYY', match1to4, match4);
855
+ addRegexToken('YYYYY', match1to6, match6);
856
+ addRegexToken('YYYYYY', match1to6, match6);
857
+
858
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
859
+ addParseToken('YYYY', function (input, array) {
860
+ array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
861
+ });
862
+ addParseToken('YY', function (input, array) {
863
+ array[YEAR] = hooks.parseTwoDigitYear(input);
864
+ });
865
+ addParseToken('Y', function (input, array) {
866
+ array[YEAR] = parseInt(input, 10);
867
+ });
868
+
869
+ // HELPERS
870
+
871
+ function daysInYear(year) {
872
+ return isLeapYear(year) ? 366 : 365;
873
+ }
874
+
875
+ function isLeapYear(year) {
876
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
877
+ }
878
+
879
+ // HOOKS
880
+
881
+ hooks.parseTwoDigitYear = function (input) {
882
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
883
+ };
884
+
885
+ // MOMENTS
886
+
887
+ var getSetYear = makeGetSet('FullYear', true);
888
+
889
+ function getIsLeapYear () {
890
+ return isLeapYear(this.year());
891
+ }
892
+
893
+ function makeGetSet (unit, keepTime) {
894
+ return function (value) {
895
+ if (value != null) {
896
+ set$1(this, unit, value);
897
+ hooks.updateOffset(this, keepTime);
898
+ return this;
899
+ } else {
900
+ return get(this, unit);
901
+ }
902
+ };
903
+ }
904
+
905
+ function get (mom, unit) {
906
+ return mom.isValid() ?
907
+ mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
908
+ }
909
+
910
+ function set$1 (mom, unit, value) {
911
+ if (mom.isValid() && !isNaN(value)) {
912
+ if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
913
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
914
+ }
915
+ else {
916
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
917
+ }
918
+ }
919
+ }
920
+
921
+ // MOMENTS
922
+
923
+ function stringGet (units) {
924
+ units = normalizeUnits(units);
925
+ if (isFunction(this[units])) {
926
+ return this[units]();
927
+ }
928
+ return this;
929
+ }
930
+
931
+
932
+ function stringSet (units, value) {
933
+ if (typeof units === 'object') {
934
+ units = normalizeObjectUnits(units);
935
+ var prioritized = getPrioritizedUnits(units);
936
+ for (var i = 0; i < prioritized.length; i++) {
937
+ this[prioritized[i].unit](units[prioritized[i].unit]);
938
+ }
939
+ } else {
940
+ units = normalizeUnits(units);
941
+ if (isFunction(this[units])) {
942
+ return this[units](value);
943
+ }
944
+ }
945
+ return this;
946
+ }
947
+
948
+ function mod(n, x) {
949
+ return ((n % x) + x) % x;
950
+ }
951
+
952
+ var indexOf;
953
+
954
+ if (Array.prototype.indexOf) {
955
+ indexOf = Array.prototype.indexOf;
956
+ } else {
957
+ indexOf = function (o) {
958
+ // I know
959
+ var i;
960
+ for (i = 0; i < this.length; ++i) {
961
+ if (this[i] === o) {
962
+ return i;
963
+ }
964
+ }
965
+ return -1;
966
+ };
967
+ }
968
+
969
+ function daysInMonth(year, month) {
970
+ if (isNaN(year) || isNaN(month)) {
971
+ return NaN;
972
+ }
973
+ var modMonth = mod(month, 12);
974
+ year += (month - modMonth) / 12;
975
+ return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
976
+ }
977
+
978
+ // FORMATTING
979
+
980
+ addFormatToken('M', ['MM', 2], 'Mo', function () {
981
+ return this.month() + 1;
982
+ });
983
+
984
+ addFormatToken('MMM', 0, 0, function (format) {
985
+ return this.localeData().monthsShort(this, format);
986
+ });
987
+
988
+ addFormatToken('MMMM', 0, 0, function (format) {
989
+ return this.localeData().months(this, format);
990
+ });
991
+
992
+ // ALIASES
993
+
994
+ addUnitAlias('month', 'M');
995
+
996
+ // PRIORITY
997
+
998
+ addUnitPriority('month', 8);
999
+
1000
+ // PARSING
1001
+
1002
+ addRegexToken('M', match1to2);
1003
+ addRegexToken('MM', match1to2, match2);
1004
+ addRegexToken('MMM', function (isStrict, locale) {
1005
+ return locale.monthsShortRegex(isStrict);
1006
+ });
1007
+ addRegexToken('MMMM', function (isStrict, locale) {
1008
+ return locale.monthsRegex(isStrict);
1009
+ });
1010
+
1011
+ addParseToken(['M', 'MM'], function (input, array) {
1012
+ array[MONTH] = toInt(input) - 1;
1013
+ });
1014
+
1015
+ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
1016
+ var month = config._locale.monthsParse(input, token, config._strict);
1017
+ // if we didn't find a month name, mark the date as invalid.
1018
+ if (month != null) {
1019
+ array[MONTH] = month;
1020
+ } else {
1021
+ getParsingFlags(config).invalidMonth = input;
1022
+ }
1023
+ });
1024
+
1025
+ // LOCALES
1026
+
1027
+ var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
1028
+ var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
1029
+ function localeMonths (m, format) {
1030
+ if (!m) {
1031
+ return isArray(this._months) ? this._months :
1032
+ this._months['standalone'];
1033
+ }
1034
+ return isArray(this._months) ? this._months[m.month()] :
1035
+ this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
1036
+ }
1037
+
1038
+ var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
1039
+ function localeMonthsShort (m, format) {
1040
+ if (!m) {
1041
+ return isArray(this._monthsShort) ? this._monthsShort :
1042
+ this._monthsShort['standalone'];
1043
+ }
1044
+ return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
1045
+ this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
1046
+ }
1047
+
1048
+ function handleStrictParse(monthName, format, strict) {
1049
+ var i, ii, mom, llc = monthName.toLocaleLowerCase();
1050
+ if (!this._monthsParse) {
1051
+ // this is not used
1052
+ this._monthsParse = [];
1053
+ this._longMonthsParse = [];
1054
+ this._shortMonthsParse = [];
1055
+ for (i = 0; i < 12; ++i) {
1056
+ mom = createUTC([2000, i]);
1057
+ this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
1058
+ this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
1059
+ }
1060
+ }
1061
+
1062
+ if (strict) {
1063
+ if (format === 'MMM') {
1064
+ ii = indexOf.call(this._shortMonthsParse, llc);
1065
+ return ii !== -1 ? ii : null;
1066
+ } else {
1067
+ ii = indexOf.call(this._longMonthsParse, llc);
1068
+ return ii !== -1 ? ii : null;
1069
+ }
1070
+ } else {
1071
+ if (format === 'MMM') {
1072
+ ii = indexOf.call(this._shortMonthsParse, llc);
1073
+ if (ii !== -1) {
1074
+ return ii;
1075
+ }
1076
+ ii = indexOf.call(this._longMonthsParse, llc);
1077
+ return ii !== -1 ? ii : null;
1078
+ } else {
1079
+ ii = indexOf.call(this._longMonthsParse, llc);
1080
+ if (ii !== -1) {
1081
+ return ii;
1082
+ }
1083
+ ii = indexOf.call(this._shortMonthsParse, llc);
1084
+ return ii !== -1 ? ii : null;
1085
+ }
1086
+ }
1087
+ }
1088
+
1089
+ function localeMonthsParse (monthName, format, strict) {
1090
+ var i, mom, regex;
1091
+
1092
+ if (this._monthsParseExact) {
1093
+ return handleStrictParse.call(this, monthName, format, strict);
1094
+ }
1095
+
1096
+ if (!this._monthsParse) {
1097
+ this._monthsParse = [];
1098
+ this._longMonthsParse = [];
1099
+ this._shortMonthsParse = [];
1100
+ }
1101
+
1102
+ // TODO: add sorting
1103
+ // Sorting makes sure if one month (or abbr) is a prefix of another
1104
+ // see sorting in computeMonthsParse
1105
+ for (i = 0; i < 12; i++) {
1106
+ // make the regex if we don't have it already
1107
+ mom = createUTC([2000, i]);
1108
+ if (strict && !this._longMonthsParse[i]) {
1109
+ this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
1110
+ this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
1111
+ }
1112
+ if (!strict && !this._monthsParse[i]) {
1113
+ regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
1114
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
1115
+ }
1116
+ // test the regex
1117
+ if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
1118
+ return i;
1119
+ } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
1120
+ return i;
1121
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
1122
+ return i;
1123
+ }
1124
+ }
1125
+ }
1126
+
1127
+ // MOMENTS
1128
+
1129
+ function setMonth (mom, value) {
1130
+ var dayOfMonth;
1131
+
1132
+ if (!mom.isValid()) {
1133
+ // No op
1134
+ return mom;
1135
+ }
1136
+
1137
+ if (typeof value === 'string') {
1138
+ if (/^\d+$/.test(value)) {
1139
+ value = toInt(value);
1140
+ } else {
1141
+ value = mom.localeData().monthsParse(value);
1142
+ // TODO: Another silent failure?
1143
+ if (!isNumber(value)) {
1144
+ return mom;
1145
+ }
1146
+ }
1147
+ }
1148
+
1149
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1150
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1151
+ return mom;
1152
+ }
1153
+
1154
+ function getSetMonth (value) {
1155
+ if (value != null) {
1156
+ setMonth(this, value);
1157
+ hooks.updateOffset(this, true);
1158
+ return this;
1159
+ } else {
1160
+ return get(this, 'Month');
1161
+ }
1162
+ }
1163
+
1164
+ function getDaysInMonth () {
1165
+ return daysInMonth(this.year(), this.month());
1166
+ }
1167
+
1168
+ var defaultMonthsShortRegex = matchWord;
1169
+ function monthsShortRegex (isStrict) {
1170
+ if (this._monthsParseExact) {
1171
+ if (!hasOwnProp(this, '_monthsRegex')) {
1172
+ computeMonthsParse.call(this);
1173
+ }
1174
+ if (isStrict) {
1175
+ return this._monthsShortStrictRegex;
1176
+ } else {
1177
+ return this._monthsShortRegex;
1178
+ }
1179
+ } else {
1180
+ if (!hasOwnProp(this, '_monthsShortRegex')) {
1181
+ this._monthsShortRegex = defaultMonthsShortRegex;
1182
+ }
1183
+ return this._monthsShortStrictRegex && isStrict ?
1184
+ this._monthsShortStrictRegex : this._monthsShortRegex;
1185
+ }
1186
+ }
1187
+
1188
+ var defaultMonthsRegex = matchWord;
1189
+ function monthsRegex (isStrict) {
1190
+ if (this._monthsParseExact) {
1191
+ if (!hasOwnProp(this, '_monthsRegex')) {
1192
+ computeMonthsParse.call(this);
1193
+ }
1194
+ if (isStrict) {
1195
+ return this._monthsStrictRegex;
1196
+ } else {
1197
+ return this._monthsRegex;
1198
+ }
1199
+ } else {
1200
+ if (!hasOwnProp(this, '_monthsRegex')) {
1201
+ this._monthsRegex = defaultMonthsRegex;
1202
+ }
1203
+ return this._monthsStrictRegex && isStrict ?
1204
+ this._monthsStrictRegex : this._monthsRegex;
1205
+ }
1206
+ }
1207
+
1208
+ function computeMonthsParse () {
1209
+ function cmpLenRev(a, b) {
1210
+ return b.length - a.length;
1211
+ }
1212
+
1213
+ var shortPieces = [], longPieces = [], mixedPieces = [],
1214
+ i, mom;
1215
+ for (i = 0; i < 12; i++) {
1216
+ // make the regex if we don't have it already
1217
+ mom = createUTC([2000, i]);
1218
+ shortPieces.push(this.monthsShort(mom, ''));
1219
+ longPieces.push(this.months(mom, ''));
1220
+ mixedPieces.push(this.months(mom, ''));
1221
+ mixedPieces.push(this.monthsShort(mom, ''));
1222
+ }
1223
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
1224
+ // will match the longer piece.
1225
+ shortPieces.sort(cmpLenRev);
1226
+ longPieces.sort(cmpLenRev);
1227
+ mixedPieces.sort(cmpLenRev);
1228
+ for (i = 0; i < 12; i++) {
1229
+ shortPieces[i] = regexEscape(shortPieces[i]);
1230
+ longPieces[i] = regexEscape(longPieces[i]);
1231
+ }
1232
+ for (i = 0; i < 24; i++) {
1233
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
1234
+ }
1235
+
1236
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1237
+ this._monthsShortRegex = this._monthsRegex;
1238
+ this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1239
+ this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1240
+ }
1241
+
1242
+ function createDate (y, m, d, h, M, s, ms) {
1243
+ // can't just apply() to create a date:
1244
+ // https://stackoverflow.com/q/181348
1245
+ var date = new Date(y, m, d, h, M, s, ms);
1246
+
1247
+ // the date constructor remaps years 0-99 to 1900-1999
1248
+ if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
1249
+ date.setFullYear(y);
1250
+ }
1251
+ return date;
1252
+ }
1253
+
1254
+ function createUTCDate (y) {
1255
+ var date = new Date(Date.UTC.apply(null, arguments));
1256
+
1257
+ // the Date.UTC function remaps years 0-99 to 1900-1999
1258
+ if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
1259
+ date.setUTCFullYear(y);
1260
+ }
1261
+ return date;
1262
+ }
1263
+
1264
+ // start-of-first-week - start-of-year
1265
+ function firstWeekOffset(year, dow, doy) {
1266
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1267
+ fwd = 7 + dow - doy,
1268
+ // first-week day local weekday -- which local weekday is fwd
1269
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1270
+
1271
+ return -fwdlw + fwd - 1;
1272
+ }
1273
+
1274
+ // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1275
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1276
+ var localWeekday = (7 + weekday - dow) % 7,
1277
+ weekOffset = firstWeekOffset(year, dow, doy),
1278
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1279
+ resYear, resDayOfYear;
1280
+
1281
+ if (dayOfYear <= 0) {
1282
+ resYear = year - 1;
1283
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
1284
+ } else if (dayOfYear > daysInYear(year)) {
1285
+ resYear = year + 1;
1286
+ resDayOfYear = dayOfYear - daysInYear(year);
1287
+ } else {
1288
+ resYear = year;
1289
+ resDayOfYear = dayOfYear;
1290
+ }
1291
+
1292
+ return {
1293
+ year: resYear,
1294
+ dayOfYear: resDayOfYear
1295
+ };
1296
+ }
1297
+
1298
+ function weekOfYear(mom, dow, doy) {
1299
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1300
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1301
+ resWeek, resYear;
1302
+
1303
+ if (week < 1) {
1304
+ resYear = mom.year() - 1;
1305
+ resWeek = week + weeksInYear(resYear, dow, doy);
1306
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
1307
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
1308
+ resYear = mom.year() + 1;
1309
+ } else {
1310
+ resYear = mom.year();
1311
+ resWeek = week;
1312
+ }
1313
+
1314
+ return {
1315
+ week: resWeek,
1316
+ year: resYear
1317
+ };
1318
+ }
1319
+
1320
+ function weeksInYear(year, dow, doy) {
1321
+ var weekOffset = firstWeekOffset(year, dow, doy),
1322
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
1323
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
1324
+ }
1325
+
1326
+ // FORMATTING
1327
+
1328
+ addFormatToken('w', ['ww', 2], 'wo', 'week');
1329
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1330
+
1331
+ // ALIASES
1332
+
1333
+ addUnitAlias('week', 'w');
1334
+ addUnitAlias('isoWeek', 'W');
1335
+
1336
+ // PRIORITIES
1337
+
1338
+ addUnitPriority('week', 5);
1339
+ addUnitPriority('isoWeek', 5);
1340
+
1341
+ // PARSING
1342
+
1343
+ addRegexToken('w', match1to2);
1344
+ addRegexToken('ww', match1to2, match2);
1345
+ addRegexToken('W', match1to2);
1346
+ addRegexToken('WW', match1to2, match2);
1347
+
1348
+ addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
1349
+ week[token.substr(0, 1)] = toInt(input);
1350
+ });
1351
+
1352
+ // HELPERS
1353
+
1354
+ // LOCALES
1355
+
1356
+ function localeWeek (mom) {
1357
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
1358
+ }
1359
+
1360
+ var defaultLocaleWeek = {
1361
+ dow : 0, // Sunday is the first day of the week.
1362
+ doy : 6 // The week that contains Jan 6th is the first week of the year.
1363
+ };
1364
+
1365
+ function localeFirstDayOfWeek () {
1366
+ return this._week.dow;
1367
+ }
1368
+
1369
+ function localeFirstDayOfYear () {
1370
+ return this._week.doy;
1371
+ }
1372
+
1373
+ // MOMENTS
1374
+
1375
+ function getSetWeek (input) {
1376
+ var week = this.localeData().week(this);
1377
+ return input == null ? week : this.add((input - week) * 7, 'd');
1378
+ }
1379
+
1380
+ function getSetISOWeek (input) {
1381
+ var week = weekOfYear(this, 1, 4).week;
1382
+ return input == null ? week : this.add((input - week) * 7, 'd');
1383
+ }
1384
+
1385
+ // FORMATTING
1386
+
1387
+ addFormatToken('d', 0, 'do', 'day');
1388
+
1389
+ addFormatToken('dd', 0, 0, function (format) {
1390
+ return this.localeData().weekdaysMin(this, format);
1391
+ });
1392
+
1393
+ addFormatToken('ddd', 0, 0, function (format) {
1394
+ return this.localeData().weekdaysShort(this, format);
1395
+ });
1396
+
1397
+ addFormatToken('dddd', 0, 0, function (format) {
1398
+ return this.localeData().weekdays(this, format);
1399
+ });
1400
+
1401
+ addFormatToken('e', 0, 0, 'weekday');
1402
+ addFormatToken('E', 0, 0, 'isoWeekday');
1403
+
1404
+ // ALIASES
1405
+
1406
+ addUnitAlias('day', 'd');
1407
+ addUnitAlias('weekday', 'e');
1408
+ addUnitAlias('isoWeekday', 'E');
1409
+
1410
+ // PRIORITY
1411
+ addUnitPriority('day', 11);
1412
+ addUnitPriority('weekday', 11);
1413
+ addUnitPriority('isoWeekday', 11);
1414
+
1415
+ // PARSING
1416
+
1417
+ addRegexToken('d', match1to2);
1418
+ addRegexToken('e', match1to2);
1419
+ addRegexToken('E', match1to2);
1420
+ addRegexToken('dd', function (isStrict, locale) {
1421
+ return locale.weekdaysMinRegex(isStrict);
1422
+ });
1423
+ addRegexToken('ddd', function (isStrict, locale) {
1424
+ return locale.weekdaysShortRegex(isStrict);
1425
+ });
1426
+ addRegexToken('dddd', function (isStrict, locale) {
1427
+ return locale.weekdaysRegex(isStrict);
1428
+ });
1429
+
1430
+ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
1431
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
1432
+ // if we didn't get a weekday name, mark the date as invalid
1433
+ if (weekday != null) {
1434
+ week.d = weekday;
1435
+ } else {
1436
+ getParsingFlags(config).invalidWeekday = input;
1437
+ }
1438
+ });
1439
+
1440
+ addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
1441
+ week[token] = toInt(input);
1442
+ });
1443
+
1444
+ // HELPERS
1445
+
1446
+ function parseWeekday(input, locale) {
1447
+ if (typeof input !== 'string') {
1448
+ return input;
1449
+ }
1450
+
1451
+ if (!isNaN(input)) {
1452
+ return parseInt(input, 10);
1453
+ }
1454
+
1455
+ input = locale.weekdaysParse(input);
1456
+ if (typeof input === 'number') {
1457
+ return input;
1458
+ }
1459
+
1460
+ return null;
1461
+ }
1462
+
1463
+ function parseIsoWeekday(input, locale) {
1464
+ if (typeof input === 'string') {
1465
+ return locale.weekdaysParse(input) % 7 || 7;
1466
+ }
1467
+ return isNaN(input) ? null : input;
1468
+ }
1469
+
1470
+ // LOCALES
1471
+
1472
+ var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
1473
+ function localeWeekdays (m, format) {
1474
+ if (!m) {
1475
+ return isArray(this._weekdays) ? this._weekdays :
1476
+ this._weekdays['standalone'];
1477
+ }
1478
+ return isArray(this._weekdays) ? this._weekdays[m.day()] :
1479
+ this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
1480
+ }
1481
+
1482
+ var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
1483
+ function localeWeekdaysShort (m) {
1484
+ return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
1485
+ }
1486
+
1487
+ var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
1488
+ function localeWeekdaysMin (m) {
1489
+ return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
1490
+ }
1491
+
1492
+ function handleStrictParse$1(weekdayName, format, strict) {
1493
+ var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
1494
+ if (!this._weekdaysParse) {
1495
+ this._weekdaysParse = [];
1496
+ this._shortWeekdaysParse = [];
1497
+ this._minWeekdaysParse = [];
1498
+
1499
+ for (i = 0; i < 7; ++i) {
1500
+ mom = createUTC([2000, 1]).day(i);
1501
+ this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
1502
+ this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
1503
+ this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
1504
+ }
1505
+ }
1506
+
1507
+ if (strict) {
1508
+ if (format === 'dddd') {
1509
+ ii = indexOf.call(this._weekdaysParse, llc);
1510
+ return ii !== -1 ? ii : null;
1511
+ } else if (format === 'ddd') {
1512
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
1513
+ return ii !== -1 ? ii : null;
1514
+ } else {
1515
+ ii = indexOf.call(this._minWeekdaysParse, llc);
1516
+ return ii !== -1 ? ii : null;
1517
+ }
1518
+ } else {
1519
+ if (format === 'dddd') {
1520
+ ii = indexOf.call(this._weekdaysParse, llc);
1521
+ if (ii !== -1) {
1522
+ return ii;
1523
+ }
1524
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
1525
+ if (ii !== -1) {
1526
+ return ii;
1527
+ }
1528
+ ii = indexOf.call(this._minWeekdaysParse, llc);
1529
+ return ii !== -1 ? ii : null;
1530
+ } else if (format === 'ddd') {
1531
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
1532
+ if (ii !== -1) {
1533
+ return ii;
1534
+ }
1535
+ ii = indexOf.call(this._weekdaysParse, llc);
1536
+ if (ii !== -1) {
1537
+ return ii;
1538
+ }
1539
+ ii = indexOf.call(this._minWeekdaysParse, llc);
1540
+ return ii !== -1 ? ii : null;
1541
+ } else {
1542
+ ii = indexOf.call(this._minWeekdaysParse, llc);
1543
+ if (ii !== -1) {
1544
+ return ii;
1545
+ }
1546
+ ii = indexOf.call(this._weekdaysParse, llc);
1547
+ if (ii !== -1) {
1548
+ return ii;
1549
+ }
1550
+ ii = indexOf.call(this._shortWeekdaysParse, llc);
1551
+ return ii !== -1 ? ii : null;
1552
+ }
1553
+ }
1554
+ }
1555
+
1556
+ function localeWeekdaysParse (weekdayName, format, strict) {
1557
+ var i, mom, regex;
1558
+
1559
+ if (this._weekdaysParseExact) {
1560
+ return handleStrictParse$1.call(this, weekdayName, format, strict);
1561
+ }
1562
+
1563
+ if (!this._weekdaysParse) {
1564
+ this._weekdaysParse = [];
1565
+ this._minWeekdaysParse = [];
1566
+ this._shortWeekdaysParse = [];
1567
+ this._fullWeekdaysParse = [];
1568
+ }
1569
+
1570
+ for (i = 0; i < 7; i++) {
1571
+ // make the regex if we don't have it already
1572
+
1573
+ mom = createUTC([2000, 1]).day(i);
1574
+ if (strict && !this._fullWeekdaysParse[i]) {
1575
+ this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
1576
+ this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
1577
+ this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
1578
+ }
1579
+ if (!this._weekdaysParse[i]) {
1580
+ regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
1581
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
1582
+ }
1583
+ // test the regex
1584
+ if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
1585
+ return i;
1586
+ } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
1587
+ return i;
1588
+ } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
1589
+ return i;
1590
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
1591
+ return i;
1592
+ }
1593
+ }
1594
+ }
1595
+
1596
+ // MOMENTS
1597
+
1598
+ function getSetDayOfWeek (input) {
1599
+ if (!this.isValid()) {
1600
+ return input != null ? this : NaN;
1601
+ }
1602
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1603
+ if (input != null) {
1604
+ input = parseWeekday(input, this.localeData());
1605
+ return this.add(input - day, 'd');
1606
+ } else {
1607
+ return day;
1608
+ }
1609
+ }
1610
+
1611
+ function getSetLocaleDayOfWeek (input) {
1612
+ if (!this.isValid()) {
1613
+ return input != null ? this : NaN;
1614
+ }
1615
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
1616
+ return input == null ? weekday : this.add(input - weekday, 'd');
1617
+ }
1618
+
1619
+ function getSetISODayOfWeek (input) {
1620
+ if (!this.isValid()) {
1621
+ return input != null ? this : NaN;
1622
+ }
1623
+
1624
+ // behaves the same as moment#day except
1625
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
1626
+ // as a setter, sunday should belong to the previous week.
1627
+
1628
+ if (input != null) {
1629
+ var weekday = parseIsoWeekday(input, this.localeData());
1630
+ return this.day(this.day() % 7 ? weekday : weekday - 7);
1631
+ } else {
1632
+ return this.day() || 7;
1633
+ }
1634
+ }
1635
+
1636
+ var defaultWeekdaysRegex = matchWord;
1637
+ function weekdaysRegex (isStrict) {
1638
+ if (this._weekdaysParseExact) {
1639
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1640
+ computeWeekdaysParse.call(this);
1641
+ }
1642
+ if (isStrict) {
1643
+ return this._weekdaysStrictRegex;
1644
+ } else {
1645
+ return this._weekdaysRegex;
1646
+ }
1647
+ } else {
1648
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1649
+ this._weekdaysRegex = defaultWeekdaysRegex;
1650
+ }
1651
+ return this._weekdaysStrictRegex && isStrict ?
1652
+ this._weekdaysStrictRegex : this._weekdaysRegex;
1653
+ }
1654
+ }
1655
+
1656
+ var defaultWeekdaysShortRegex = matchWord;
1657
+ function weekdaysShortRegex (isStrict) {
1658
+ if (this._weekdaysParseExact) {
1659
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1660
+ computeWeekdaysParse.call(this);
1661
+ }
1662
+ if (isStrict) {
1663
+ return this._weekdaysShortStrictRegex;
1664
+ } else {
1665
+ return this._weekdaysShortRegex;
1666
+ }
1667
+ } else {
1668
+ if (!hasOwnProp(this, '_weekdaysShortRegex')) {
1669
+ this._weekdaysShortRegex = defaultWeekdaysShortRegex;
1670
+ }
1671
+ return this._weekdaysShortStrictRegex && isStrict ?
1672
+ this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
1673
+ }
1674
+ }
1675
+
1676
+ var defaultWeekdaysMinRegex = matchWord;
1677
+ function weekdaysMinRegex (isStrict) {
1678
+ if (this._weekdaysParseExact) {
1679
+ if (!hasOwnProp(this, '_weekdaysRegex')) {
1680
+ computeWeekdaysParse.call(this);
1681
+ }
1682
+ if (isStrict) {
1683
+ return this._weekdaysMinStrictRegex;
1684
+ } else {
1685
+ return this._weekdaysMinRegex;
1686
+ }
1687
+ } else {
1688
+ if (!hasOwnProp(this, '_weekdaysMinRegex')) {
1689
+ this._weekdaysMinRegex = defaultWeekdaysMinRegex;
1690
+ }
1691
+ return this._weekdaysMinStrictRegex && isStrict ?
1692
+ this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
1693
+ }
1694
+ }
1695
+
1696
+
1697
+ function computeWeekdaysParse () {
1698
+ function cmpLenRev(a, b) {
1699
+ return b.length - a.length;
1700
+ }
1701
+
1702
+ var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
1703
+ i, mom, minp, shortp, longp;
1704
+ for (i = 0; i < 7; i++) {
1705
+ // make the regex if we don't have it already
1706
+ mom = createUTC([2000, 1]).day(i);
1707
+ minp = this.weekdaysMin(mom, '');
1708
+ shortp = this.weekdaysShort(mom, '');
1709
+ longp = this.weekdays(mom, '');
1710
+ minPieces.push(minp);
1711
+ shortPieces.push(shortp);
1712
+ longPieces.push(longp);
1713
+ mixedPieces.push(minp);
1714
+ mixedPieces.push(shortp);
1715
+ mixedPieces.push(longp);
1716
+ }
1717
+ // Sorting makes sure if one weekday (or abbr) is a prefix of another it
1718
+ // will match the longer piece.
1719
+ minPieces.sort(cmpLenRev);
1720
+ shortPieces.sort(cmpLenRev);
1721
+ longPieces.sort(cmpLenRev);
1722
+ mixedPieces.sort(cmpLenRev);
1723
+ for (i = 0; i < 7; i++) {
1724
+ shortPieces[i] = regexEscape(shortPieces[i]);
1725
+ longPieces[i] = regexEscape(longPieces[i]);
1726
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
1727
+ }
1728
+
1729
+ this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1730
+ this._weekdaysShortRegex = this._weekdaysRegex;
1731
+ this._weekdaysMinRegex = this._weekdaysRegex;
1732
+
1733
+ this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1734
+ this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1735
+ this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
1736
+ }
1737
+
1738
+ // FORMATTING
1739
+
1740
+ function hFormat() {
1741
+ return this.hours() % 12 || 12;
1742
+ }
1743
+
1744
+ function kFormat() {
1745
+ return this.hours() || 24;
1746
+ }
1747
+
1748
+ addFormatToken('H', ['HH', 2], 0, 'hour');
1749
+ addFormatToken('h', ['hh', 2], 0, hFormat);
1750
+ addFormatToken('k', ['kk', 2], 0, kFormat);
1751
+
1752
+ addFormatToken('hmm', 0, 0, function () {
1753
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
1754
+ });
1755
+
1756
+ addFormatToken('hmmss', 0, 0, function () {
1757
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
1758
+ zeroFill(this.seconds(), 2);
1759
+ });
1760
+
1761
+ addFormatToken('Hmm', 0, 0, function () {
1762
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
1763
+ });
1764
+
1765
+ addFormatToken('Hmmss', 0, 0, function () {
1766
+ return '' + this.hours() + zeroFill(this.minutes(), 2) +
1767
+ zeroFill(this.seconds(), 2);
1768
+ });
1769
+
1770
+ function meridiem (token, lowercase) {
1771
+ addFormatToken(token, 0, 0, function () {
1772
+ return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
1773
+ });
1774
+ }
1775
+
1776
+ meridiem('a', true);
1777
+ meridiem('A', false);
1778
+
1779
+ // ALIASES
1780
+
1781
+ addUnitAlias('hour', 'h');
1782
+
1783
+ // PRIORITY
1784
+ addUnitPriority('hour', 13);
1785
+
1786
+ // PARSING
1787
+
1788
+ function matchMeridiem (isStrict, locale) {
1789
+ return locale._meridiemParse;
1790
+ }
1791
+
1792
+ addRegexToken('a', matchMeridiem);
1793
+ addRegexToken('A', matchMeridiem);
1794
+ addRegexToken('H', match1to2);
1795
+ addRegexToken('h', match1to2);
1796
+ addRegexToken('k', match1to2);
1797
+ addRegexToken('HH', match1to2, match2);
1798
+ addRegexToken('hh', match1to2, match2);
1799
+ addRegexToken('kk', match1to2, match2);
1800
+
1801
+ addRegexToken('hmm', match3to4);
1802
+ addRegexToken('hmmss', match5to6);
1803
+ addRegexToken('Hmm', match3to4);
1804
+ addRegexToken('Hmmss', match5to6);
1805
+
1806
+ addParseToken(['H', 'HH'], HOUR);
1807
+ addParseToken(['k', 'kk'], function (input, array, config) {
1808
+ var kInput = toInt(input);
1809
+ array[HOUR] = kInput === 24 ? 0 : kInput;
1810
+ });
1811
+ addParseToken(['a', 'A'], function (input, array, config) {
1812
+ config._isPm = config._locale.isPM(input);
1813
+ config._meridiem = input;
1814
+ });
1815
+ addParseToken(['h', 'hh'], function (input, array, config) {
1816
+ array[HOUR] = toInt(input);
1817
+ getParsingFlags(config).bigHour = true;
1818
+ });
1819
+ addParseToken('hmm', function (input, array, config) {
1820
+ var pos = input.length - 2;
1821
+ array[HOUR] = toInt(input.substr(0, pos));
1822
+ array[MINUTE] = toInt(input.substr(pos));
1823
+ getParsingFlags(config).bigHour = true;
1824
+ });
1825
+ addParseToken('hmmss', function (input, array, config) {
1826
+ var pos1 = input.length - 4;
1827
+ var pos2 = input.length - 2;
1828
+ array[HOUR] = toInt(input.substr(0, pos1));
1829
+ array[MINUTE] = toInt(input.substr(pos1, 2));
1830
+ array[SECOND] = toInt(input.substr(pos2));
1831
+ getParsingFlags(config).bigHour = true;
1832
+ });
1833
+ addParseToken('Hmm', function (input, array, config) {
1834
+ var pos = input.length - 2;
1835
+ array[HOUR] = toInt(input.substr(0, pos));
1836
+ array[MINUTE] = toInt(input.substr(pos));
1837
+ });
1838
+ addParseToken('Hmmss', function (input, array, config) {
1839
+ var pos1 = input.length - 4;
1840
+ var pos2 = input.length - 2;
1841
+ array[HOUR] = toInt(input.substr(0, pos1));
1842
+ array[MINUTE] = toInt(input.substr(pos1, 2));
1843
+ array[SECOND] = toInt(input.substr(pos2));
1844
+ });
1845
+
1846
+ // LOCALES
1847
+
1848
+ function localeIsPM (input) {
1849
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
1850
+ // Using charAt should be more compatible.
1851
+ return ((input + '').toLowerCase().charAt(0) === 'p');
1852
+ }
1853
+
1854
+ var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
1855
+ function localeMeridiem (hours, minutes, isLower) {
1856
+ if (hours > 11) {
1857
+ return isLower ? 'pm' : 'PM';
1858
+ } else {
1859
+ return isLower ? 'am' : 'AM';
1860
+ }
1861
+ }
1862
+
1863
+
1864
+ // MOMENTS
1865
+
1866
+ // Setting the hour should keep the time, because the user explicitly
1867
+ // specified which hour they want. So trying to maintain the same hour (in
1868
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
1869
+ // this rule.
1870
+ var getSetHour = makeGetSet('Hours', true);
1871
+
1872
+ var baseConfig = {
1873
+ calendar: defaultCalendar,
1874
+ longDateFormat: defaultLongDateFormat,
1875
+ invalidDate: defaultInvalidDate,
1876
+ ordinal: defaultOrdinal,
1877
+ dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
1878
+ relativeTime: defaultRelativeTime,
1879
+
1880
+ months: defaultLocaleMonths,
1881
+ monthsShort: defaultLocaleMonthsShort,
1882
+
1883
+ week: defaultLocaleWeek,
1884
+
1885
+ weekdays: defaultLocaleWeekdays,
1886
+ weekdaysMin: defaultLocaleWeekdaysMin,
1887
+ weekdaysShort: defaultLocaleWeekdaysShort,
1888
+
1889
+ meridiemParse: defaultLocaleMeridiemParse
1890
+ };
1891
+
1892
+ // internal storage for locale config files
1893
+ var locales = {};
1894
+ var localeFamilies = {};
1895
+ var globalLocale;
1896
+
1897
+ function normalizeLocale(key) {
1898
+ return key ? key.toLowerCase().replace('_', '-') : key;
1899
+ }
1900
+
1901
+ // pick the locale from the array
1902
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
1903
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
1904
+ function chooseLocale(names) {
1905
+ var i = 0, j, next, locale, split;
1906
+
1907
+ while (i < names.length) {
1908
+ split = normalizeLocale(names[i]).split('-');
1909
+ j = split.length;
1910
+ next = normalizeLocale(names[i + 1]);
1911
+ next = next ? next.split('-') : null;
1912
+ while (j > 0) {
1913
+ locale = loadLocale(split.slice(0, j).join('-'));
1914
+ if (locale) {
1915
+ return locale;
1916
+ }
1917
+ if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
1918
+ //the next array item is better than a shallower substring of this one
1919
+ break;
1920
+ }
1921
+ j--;
1922
+ }
1923
+ i++;
1924
+ }
1925
+ return globalLocale;
1926
+ }
1927
+
1928
+ function loadLocale(name) {
1929
+ var oldLocale = null;
1930
+ // TODO: Find a better way to register and load all the locales in Node
1931
+ if (!locales[name] && (typeof module !== 'undefined') &&
1932
+ module && module.exports) {
1933
+ try {
1934
+ oldLocale = globalLocale._abbr;
1935
+ var aliasedRequire = require;
1936
+ __webpack_require__(502)("./" + name);
1937
+ getSetGlobalLocale(oldLocale);
1938
+ } catch (e) {}
1939
+ }
1940
+ return locales[name];
1941
+ }
1942
+
1943
+ // This function will load locale and then set the global locale. If
1944
+ // no arguments are passed in, it will simply return the current global
1945
+ // locale key.
1946
+ function getSetGlobalLocale (key, values) {
1947
+ var data;
1948
+ if (key) {
1949
+ if (isUndefined(values)) {
1950
+ data = getLocale(key);
1951
+ }
1952
+ else {
1953
+ data = defineLocale(key, values);
1954
+ }
1955
+
1956
+ if (data) {
1957
+ // moment.duration._locale = moment._locale = data;
1958
+ globalLocale = data;
1959
+ }
1960
+ else {
1961
+ if ((typeof console !== 'undefined') && console.warn) {
1962
+ //warn user if arguments are passed but the locale could not be set
1963
+ console.warn('Locale ' + key + ' not found. Did you forget to load it?');
1964
+ }
1965
+ }
1966
+ }
1967
+
1968
+ return globalLocale._abbr;
1969
+ }
1970
+
1971
+ function defineLocale (name, config) {
1972
+ if (config !== null) {
1973
+ var locale, parentConfig = baseConfig;
1974
+ config.abbr = name;
1975
+ if (locales[name] != null) {
1976
+ deprecateSimple('defineLocaleOverride',
1977
+ 'use moment.updateLocale(localeName, config) to change ' +
1978
+ 'an existing locale. moment.defineLocale(localeName, ' +
1979
+ 'config) should only be used for creating a new locale ' +
1980
+ 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
1981
+ parentConfig = locales[name]._config;
1982
+ } else if (config.parentLocale != null) {
1983
+ if (locales[config.parentLocale] != null) {
1984
+ parentConfig = locales[config.parentLocale]._config;
1985
+ } else {
1986
+ locale = loadLocale(config.parentLocale);
1987
+ if (locale != null) {
1988
+ parentConfig = locale._config;
1989
+ } else {
1990
+ if (!localeFamilies[config.parentLocale]) {
1991
+ localeFamilies[config.parentLocale] = [];
1992
+ }
1993
+ localeFamilies[config.parentLocale].push({
1994
+ name: name,
1995
+ config: config
1996
+ });
1997
+ return null;
1998
+ }
1999
+ }
2000
+ }
2001
+ locales[name] = new Locale(mergeConfigs(parentConfig, config));
2002
+
2003
+ if (localeFamilies[name]) {
2004
+ localeFamilies[name].forEach(function (x) {
2005
+ defineLocale(x.name, x.config);
2006
+ });
2007
+ }
2008
+
2009
+ // backwards compat for now: also set the locale
2010
+ // make sure we set the locale AFTER all child locales have been
2011
+ // created, so we won't end up with the child locale set.
2012
+ getSetGlobalLocale(name);
2013
+
2014
+
2015
+ return locales[name];
2016
+ } else {
2017
+ // useful for testing
2018
+ delete locales[name];
2019
+ return null;
2020
+ }
2021
+ }
2022
+
2023
+ function updateLocale(name, config) {
2024
+ if (config != null) {
2025
+ var locale, tmpLocale, parentConfig = baseConfig;
2026
+ // MERGE
2027
+ tmpLocale = loadLocale(name);
2028
+ if (tmpLocale != null) {
2029
+ parentConfig = tmpLocale._config;
2030
+ }
2031
+ config = mergeConfigs(parentConfig, config);
2032
+ locale = new Locale(config);
2033
+ locale.parentLocale = locales[name];
2034
+ locales[name] = locale;
2035
+
2036
+ // backwards compat for now: also set the locale
2037
+ getSetGlobalLocale(name);
2038
+ } else {
2039
+ // pass null for config to unupdate, useful for tests
2040
+ if (locales[name] != null) {
2041
+ if (locales[name].parentLocale != null) {
2042
+ locales[name] = locales[name].parentLocale;
2043
+ } else if (locales[name] != null) {
2044
+ delete locales[name];
2045
+ }
2046
+ }
2047
+ }
2048
+ return locales[name];
2049
+ }
2050
+
2051
+ // returns locale data
2052
+ function getLocale (key) {
2053
+ var locale;
2054
+
2055
+ if (key && key._locale && key._locale._abbr) {
2056
+ key = key._locale._abbr;
2057
+ }
2058
+
2059
+ if (!key) {
2060
+ return globalLocale;
2061
+ }
2062
+
2063
+ if (!isArray(key)) {
2064
+ //short-circuit everything else
2065
+ locale = loadLocale(key);
2066
+ if (locale) {
2067
+ return locale;
2068
+ }
2069
+ key = [key];
2070
+ }
2071
+
2072
+ return chooseLocale(key);
2073
+ }
2074
+
2075
+ function listLocales() {
2076
+ return keys(locales);
2077
+ }
2078
+
2079
+ function checkOverflow (m) {
2080
+ var overflow;
2081
+ var a = m._a;
2082
+
2083
+ if (a && getParsingFlags(m).overflow === -2) {
2084
+ overflow =
2085
+ a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
2086
+ a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
2087
+ a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
2088
+ a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
2089
+ a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
2090
+ a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
2091
+ -1;
2092
+
2093
+ if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
2094
+ overflow = DATE;
2095
+ }
2096
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
2097
+ overflow = WEEK;
2098
+ }
2099
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
2100
+ overflow = WEEKDAY;
2101
+ }
2102
+
2103
+ getParsingFlags(m).overflow = overflow;
2104
+ }
2105
+
2106
+ return m;
2107
+ }
2108
+
2109
+ // Pick the first defined of two or three arguments.
2110
+ function defaults(a, b, c) {
2111
+ if (a != null) {
2112
+ return a;
2113
+ }
2114
+ if (b != null) {
2115
+ return b;
2116
+ }
2117
+ return c;
2118
+ }
2119
+
2120
+ function currentDateArray(config) {
2121
+ // hooks is actually the exported moment object
2122
+ var nowValue = new Date(hooks.now());
2123
+ if (config._useUTC) {
2124
+ return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
2125
+ }
2126
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
2127
+ }
2128
+
2129
+ // convert an array to a date.
2130
+ // the array should mirror the parameters below
2131
+ // note: all values past the year are optional and will default to the lowest possible value.
2132
+ // [year, month, day , hour, minute, second, millisecond]
2133
+ function configFromArray (config) {
2134
+ var i, date, input = [], currentDate, expectedWeekday, yearToUse;
2135
+
2136
+ if (config._d) {
2137
+ return;
2138
+ }
2139
+
2140
+ currentDate = currentDateArray(config);
2141
+
2142
+ //compute day of the year from weeks and weekdays
2143
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
2144
+ dayOfYearFromWeekInfo(config);
2145
+ }
2146
+
2147
+ //if the day of the year is set, figure out what it is
2148
+ if (config._dayOfYear != null) {
2149
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
2150
+
2151
+ if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
2152
+ getParsingFlags(config)._overflowDayOfYear = true;
2153
+ }
2154
+
2155
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
2156
+ config._a[MONTH] = date.getUTCMonth();
2157
+ config._a[DATE] = date.getUTCDate();
2158
+ }
2159
+
2160
+ // Default to current date.
2161
+ // * if no year, month, day of month are given, default to today
2162
+ // * if day of month is given, default month and year
2163
+ // * if month is given, default only year
2164
+ // * if year is given, don't default anything
2165
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
2166
+ config._a[i] = input[i] = currentDate[i];
2167
+ }
2168
+
2169
+ // Zero out whatever was not defaulted, including time
2170
+ for (; i < 7; i++) {
2171
+ config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
2172
+ }
2173
+
2174
+ // Check for 24:00:00.000
2175
+ if (config._a[HOUR] === 24 &&
2176
+ config._a[MINUTE] === 0 &&
2177
+ config._a[SECOND] === 0 &&
2178
+ config._a[MILLISECOND] === 0) {
2179
+ config._nextDay = true;
2180
+ config._a[HOUR] = 0;
2181
+ }
2182
+
2183
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
2184
+ expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
2185
+
2186
+ // Apply timezone offset from input. The actual utcOffset can be changed
2187
+ // with parseZone.
2188
+ if (config._tzm != null) {
2189
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
2190
+ }
2191
+
2192
+ if (config._nextDay) {
2193
+ config._a[HOUR] = 24;
2194
+ }
2195
+
2196
+ // check for mismatching day of week
2197
+ if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
2198
+ getParsingFlags(config).weekdayMismatch = true;
2199
+ }
2200
+ }
2201
+
2202
+ function dayOfYearFromWeekInfo(config) {
2203
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
2204
+
2205
+ w = config._w;
2206
+ if (w.GG != null || w.W != null || w.E != null) {
2207
+ dow = 1;
2208
+ doy = 4;
2209
+
2210
+ // TODO: We need to take the current isoWeekYear, but that depends on
2211
+ // how we interpret now (local, utc, fixed offset). So create
2212
+ // a now version of current config (take local/utc/offset flags, and
2213
+ // create now).
2214
+ weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
2215
+ week = defaults(w.W, 1);
2216
+ weekday = defaults(w.E, 1);
2217
+ if (weekday < 1 || weekday > 7) {
2218
+ weekdayOverflow = true;
2219
+ }
2220
+ } else {
2221
+ dow = config._locale._week.dow;
2222
+ doy = config._locale._week.doy;
2223
+
2224
+ var curWeek = weekOfYear(createLocal(), dow, doy);
2225
+
2226
+ weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
2227
+
2228
+ // Default to current week.
2229
+ week = defaults(w.w, curWeek.week);
2230
+
2231
+ if (w.d != null) {
2232
+ // weekday -- low day numbers are considered next week
2233
+ weekday = w.d;
2234
+ if (weekday < 0 || weekday > 6) {
2235
+ weekdayOverflow = true;
2236
+ }
2237
+ } else if (w.e != null) {
2238
+ // local weekday -- counting starts from beginning of week
2239
+ weekday = w.e + dow;
2240
+ if (w.e < 0 || w.e > 6) {
2241
+ weekdayOverflow = true;
2242
+ }
2243
+ } else {
2244
+ // default to beginning of week
2245
+ weekday = dow;
2246
+ }
2247
+ }
2248
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
2249
+ getParsingFlags(config)._overflowWeeks = true;
2250
+ } else if (weekdayOverflow != null) {
2251
+ getParsingFlags(config)._overflowWeekday = true;
2252
+ } else {
2253
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
2254
+ config._a[YEAR] = temp.year;
2255
+ config._dayOfYear = temp.dayOfYear;
2256
+ }
2257
+ }
2258
+
2259
+ // iso 8601 regex
2260
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
2261
+ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
2262
+ var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
2263
+
2264
+ var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
2265
+
2266
+ var isoDates = [
2267
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
2268
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
2269
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
2270
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
2271
+ ['YYYY-DDD', /\d{4}-\d{3}/],
2272
+ ['YYYY-MM', /\d{4}-\d\d/, false],
2273
+ ['YYYYYYMMDD', /[+-]\d{10}/],
2274
+ ['YYYYMMDD', /\d{8}/],
2275
+ // YYYYMM is NOT allowed by the standard
2276
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
2277
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
2278
+ ['YYYYDDD', /\d{7}/]
2279
+ ];
2280
+
2281
+ // iso time formats and regexes
2282
+ var isoTimes = [
2283
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
2284
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
2285
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
2286
+ ['HH:mm', /\d\d:\d\d/],
2287
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
2288
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
2289
+ ['HHmmss', /\d\d\d\d\d\d/],
2290
+ ['HHmm', /\d\d\d\d/],
2291
+ ['HH', /\d\d/]
2292
+ ];
2293
+
2294
+ var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
2295
+
2296
+ // date from iso format
2297
+ function configFromISO(config) {
2298
+ var i, l,
2299
+ string = config._i,
2300
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
2301
+ allowTime, dateFormat, timeFormat, tzFormat;
2302
+
2303
+ if (match) {
2304
+ getParsingFlags(config).iso = true;
2305
+
2306
+ for (i = 0, l = isoDates.length; i < l; i++) {
2307
+ if (isoDates[i][1].exec(match[1])) {
2308
+ dateFormat = isoDates[i][0];
2309
+ allowTime = isoDates[i][2] !== false;
2310
+ break;
2311
+ }
2312
+ }
2313
+ if (dateFormat == null) {
2314
+ config._isValid = false;
2315
+ return;
2316
+ }
2317
+ if (match[3]) {
2318
+ for (i = 0, l = isoTimes.length; i < l; i++) {
2319
+ if (isoTimes[i][1].exec(match[3])) {
2320
+ // match[2] should be 'T' or space
2321
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
2322
+ break;
2323
+ }
2324
+ }
2325
+ if (timeFormat == null) {
2326
+ config._isValid = false;
2327
+ return;
2328
+ }
2329
+ }
2330
+ if (!allowTime && timeFormat != null) {
2331
+ config._isValid = false;
2332
+ return;
2333
+ }
2334
+ if (match[4]) {
2335
+ if (tzRegex.exec(match[4])) {
2336
+ tzFormat = 'Z';
2337
+ } else {
2338
+ config._isValid = false;
2339
+ return;
2340
+ }
2341
+ }
2342
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
2343
+ configFromStringAndFormat(config);
2344
+ } else {
2345
+ config._isValid = false;
2346
+ }
2347
+ }
2348
+
2349
+ // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
2350
+ var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
2351
+
2352
+ function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
2353
+ var result = [
2354
+ untruncateYear(yearStr),
2355
+ defaultLocaleMonthsShort.indexOf(monthStr),
2356
+ parseInt(dayStr, 10),
2357
+ parseInt(hourStr, 10),
2358
+ parseInt(minuteStr, 10)
2359
+ ];
2360
+
2361
+ if (secondStr) {
2362
+ result.push(parseInt(secondStr, 10));
2363
+ }
2364
+
2365
+ return result;
2366
+ }
2367
+
2368
+ function untruncateYear(yearStr) {
2369
+ var year = parseInt(yearStr, 10);
2370
+ if (year <= 49) {
2371
+ return 2000 + year;
2372
+ } else if (year <= 999) {
2373
+ return 1900 + year;
2374
+ }
2375
+ return year;
2376
+ }
2377
+
2378
+ function preprocessRFC2822(s) {
2379
+ // Remove comments and folding whitespace and replace multiple-spaces with a single space
2380
+ return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, '');
2381
+ }
2382
+
2383
+ function checkWeekday(weekdayStr, parsedInput, config) {
2384
+ if (weekdayStr) {
2385
+ // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
2386
+ var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
2387
+ weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
2388
+ if (weekdayProvided !== weekdayActual) {
2389
+ getParsingFlags(config).weekdayMismatch = true;
2390
+ config._isValid = false;
2391
+ return false;
2392
+ }
2393
+ }
2394
+ return true;
2395
+ }
2396
+
2397
+ var obsOffsets = {
2398
+ UT: 0,
2399
+ GMT: 0,
2400
+ EDT: -4 * 60,
2401
+ EST: -5 * 60,
2402
+ CDT: -5 * 60,
2403
+ CST: -6 * 60,
2404
+ MDT: -6 * 60,
2405
+ MST: -7 * 60,
2406
+ PDT: -7 * 60,
2407
+ PST: -8 * 60
2408
+ };
2409
+
2410
+ function calculateOffset(obsOffset, militaryOffset, numOffset) {
2411
+ if (obsOffset) {
2412
+ return obsOffsets[obsOffset];
2413
+ } else if (militaryOffset) {
2414
+ // the only allowed military tz is Z
2415
+ return 0;
2416
+ } else {
2417
+ var hm = parseInt(numOffset, 10);
2418
+ var m = hm % 100, h = (hm - m) / 100;
2419
+ return h * 60 + m;
2420
+ }
2421
+ }
2422
+
2423
+ // date and time from ref 2822 format
2424
+ function configFromRFC2822(config) {
2425
+ var match = rfc2822.exec(preprocessRFC2822(config._i));
2426
+ if (match) {
2427
+ var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
2428
+ if (!checkWeekday(match[1], parsedArray, config)) {
2429
+ return;
2430
+ }
2431
+
2432
+ config._a = parsedArray;
2433
+ config._tzm = calculateOffset(match[8], match[9], match[10]);
2434
+
2435
+ config._d = createUTCDate.apply(null, config._a);
2436
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
2437
+
2438
+ getParsingFlags(config).rfc2822 = true;
2439
+ } else {
2440
+ config._isValid = false;
2441
+ }
2442
+ }
2443
+
2444
+ // date from iso format or fallback
2445
+ function configFromString(config) {
2446
+ var matched = aspNetJsonRegex.exec(config._i);
2447
+
2448
+ if (matched !== null) {
2449
+ config._d = new Date(+matched[1]);
2450
+ return;
2451
+ }
2452
+
2453
+ configFromISO(config);
2454
+ if (config._isValid === false) {
2455
+ delete config._isValid;
2456
+ } else {
2457
+ return;
2458
+ }
2459
+
2460
+ configFromRFC2822(config);
2461
+ if (config._isValid === false) {
2462
+ delete config._isValid;
2463
+ } else {
2464
+ return;
2465
+ }
2466
+
2467
+ // Final attempt, use Input Fallback
2468
+ hooks.createFromInputFallback(config);
2469
+ }
2470
+
2471
+ hooks.createFromInputFallback = deprecate(
2472
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
2473
+ 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
2474
+ 'discouraged and will be removed in an upcoming major release. Please refer to ' +
2475
+ 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
2476
+ function (config) {
2477
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
2478
+ }
2479
+ );
2480
+
2481
+ // constant that refers to the ISO standard
2482
+ hooks.ISO_8601 = function () {};
2483
+
2484
+ // constant that refers to the RFC 2822 form
2485
+ hooks.RFC_2822 = function () {};
2486
+
2487
+ // date from string and format string
2488
+ function configFromStringAndFormat(config) {
2489
+ // TODO: Move this to another part of the creation flow to prevent circular deps
2490
+ if (config._f === hooks.ISO_8601) {
2491
+ configFromISO(config);
2492
+ return;
2493
+ }
2494
+ if (config._f === hooks.RFC_2822) {
2495
+ configFromRFC2822(config);
2496
+ return;
2497
+ }
2498
+ config._a = [];
2499
+ getParsingFlags(config).empty = true;
2500
+
2501
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
2502
+ var string = '' + config._i,
2503
+ i, parsedInput, tokens, token, skipped,
2504
+ stringLength = string.length,
2505
+ totalParsedInputLength = 0;
2506
+
2507
+ tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
2508
+
2509
+ for (i = 0; i < tokens.length; i++) {
2510
+ token = tokens[i];
2511
+ parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
2512
+ // console.log('token', token, 'parsedInput', parsedInput,
2513
+ // 'regex', getParseRegexForToken(token, config));
2514
+ if (parsedInput) {
2515
+ skipped = string.substr(0, string.indexOf(parsedInput));
2516
+ if (skipped.length > 0) {
2517
+ getParsingFlags(config).unusedInput.push(skipped);
2518
+ }
2519
+ string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
2520
+ totalParsedInputLength += parsedInput.length;
2521
+ }
2522
+ // don't parse if it's not a known token
2523
+ if (formatTokenFunctions[token]) {
2524
+ if (parsedInput) {
2525
+ getParsingFlags(config).empty = false;
2526
+ }
2527
+ else {
2528
+ getParsingFlags(config).unusedTokens.push(token);
2529
+ }
2530
+ addTimeToArrayFromToken(token, parsedInput, config);
2531
+ }
2532
+ else if (config._strict && !parsedInput) {
2533
+ getParsingFlags(config).unusedTokens.push(token);
2534
+ }
2535
+ }
2536
+
2537
+ // add remaining unparsed input length to the string
2538
+ getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
2539
+ if (string.length > 0) {
2540
+ getParsingFlags(config).unusedInput.push(string);
2541
+ }
2542
+
2543
+ // clear _12h flag if hour is <= 12
2544
+ if (config._a[HOUR] <= 12 &&
2545
+ getParsingFlags(config).bigHour === true &&
2546
+ config._a[HOUR] > 0) {
2547
+ getParsingFlags(config).bigHour = undefined;
2548
+ }
2549
+
2550
+ getParsingFlags(config).parsedDateParts = config._a.slice(0);
2551
+ getParsingFlags(config).meridiem = config._meridiem;
2552
+ // handle meridiem
2553
+ config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
2554
+
2555
+ configFromArray(config);
2556
+ checkOverflow(config);
2557
+ }
2558
+
2559
+
2560
+ function meridiemFixWrap (locale, hour, meridiem) {
2561
+ var isPm;
2562
+
2563
+ if (meridiem == null) {
2564
+ // nothing to do
2565
+ return hour;
2566
+ }
2567
+ if (locale.meridiemHour != null) {
2568
+ return locale.meridiemHour(hour, meridiem);
2569
+ } else if (locale.isPM != null) {
2570
+ // Fallback
2571
+ isPm = locale.isPM(meridiem);
2572
+ if (isPm && hour < 12) {
2573
+ hour += 12;
2574
+ }
2575
+ if (!isPm && hour === 12) {
2576
+ hour = 0;
2577
+ }
2578
+ return hour;
2579
+ } else {
2580
+ // this is not supposed to happen
2581
+ return hour;
2582
+ }
2583
+ }
2584
+
2585
+ // date from string and array of format strings
2586
+ function configFromStringAndArray(config) {
2587
+ var tempConfig,
2588
+ bestMoment,
2589
+
2590
+ scoreToBeat,
2591
+ i,
2592
+ currentScore;
2593
+
2594
+ if (config._f.length === 0) {
2595
+ getParsingFlags(config).invalidFormat = true;
2596
+ config._d = new Date(NaN);
2597
+ return;
2598
+ }
2599
+
2600
+ for (i = 0; i < config._f.length; i++) {
2601
+ currentScore = 0;
2602
+ tempConfig = copyConfig({}, config);
2603
+ if (config._useUTC != null) {
2604
+ tempConfig._useUTC = config._useUTC;
2605
+ }
2606
+ tempConfig._f = config._f[i];
2607
+ configFromStringAndFormat(tempConfig);
2608
+
2609
+ if (!isValid(tempConfig)) {
2610
+ continue;
2611
+ }
2612
+
2613
+ // if there is any input that was not parsed add a penalty for that format
2614
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
2615
+
2616
+ //or tokens
2617
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
2618
+
2619
+ getParsingFlags(tempConfig).score = currentScore;
2620
+
2621
+ if (scoreToBeat == null || currentScore < scoreToBeat) {
2622
+ scoreToBeat = currentScore;
2623
+ bestMoment = tempConfig;
2624
+ }
2625
+ }
2626
+
2627
+ extend(config, bestMoment || tempConfig);
2628
+ }
2629
+
2630
+ function configFromObject(config) {
2631
+ if (config._d) {
2632
+ return;
2633
+ }
2634
+
2635
+ var i = normalizeObjectUnits(config._i);
2636
+ config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
2637
+ return obj && parseInt(obj, 10);
2638
+ });
2639
+
2640
+ configFromArray(config);
2641
+ }
2642
+
2643
+ function createFromConfig (config) {
2644
+ var res = new Moment(checkOverflow(prepareConfig(config)));
2645
+ if (res._nextDay) {
2646
+ // Adding is smart enough around DST
2647
+ res.add(1, 'd');
2648
+ res._nextDay = undefined;
2649
+ }
2650
+
2651
+ return res;
2652
+ }
2653
+
2654
+ function prepareConfig (config) {
2655
+ var input = config._i,
2656
+ format = config._f;
2657
+
2658
+ config._locale = config._locale || getLocale(config._l);
2659
+
2660
+ if (input === null || (format === undefined && input === '')) {
2661
+ return createInvalid({nullInput: true});
2662
+ }
2663
+
2664
+ if (typeof input === 'string') {
2665
+ config._i = input = config._locale.preparse(input);
2666
+ }
2667
+
2668
+ if (isMoment(input)) {
2669
+ return new Moment(checkOverflow(input));
2670
+ } else if (isDate(input)) {
2671
+ config._d = input;
2672
+ } else if (isArray(format)) {
2673
+ configFromStringAndArray(config);
2674
+ } else if (format) {
2675
+ configFromStringAndFormat(config);
2676
+ } else {
2677
+ configFromInput(config);
2678
+ }
2679
+
2680
+ if (!isValid(config)) {
2681
+ config._d = null;
2682
+ }
2683
+
2684
+ return config;
2685
+ }
2686
+
2687
+ function configFromInput(config) {
2688
+ var input = config._i;
2689
+ if (isUndefined(input)) {
2690
+ config._d = new Date(hooks.now());
2691
+ } else if (isDate(input)) {
2692
+ config._d = new Date(input.valueOf());
2693
+ } else if (typeof input === 'string') {
2694
+ configFromString(config);
2695
+ } else if (isArray(input)) {
2696
+ config._a = map(input.slice(0), function (obj) {
2697
+ return parseInt(obj, 10);
2698
+ });
2699
+ configFromArray(config);
2700
+ } else if (isObject(input)) {
2701
+ configFromObject(config);
2702
+ } else if (isNumber(input)) {
2703
+ // from milliseconds
2704
+ config._d = new Date(input);
2705
+ } else {
2706
+ hooks.createFromInputFallback(config);
2707
+ }
2708
+ }
2709
+
2710
+ function createLocalOrUTC (input, format, locale, strict, isUTC) {
2711
+ var c = {};
2712
+
2713
+ if (locale === true || locale === false) {
2714
+ strict = locale;
2715
+ locale = undefined;
2716
+ }
2717
+
2718
+ if ((isObject(input) && isObjectEmpty(input)) ||
2719
+ (isArray(input) && input.length === 0)) {
2720
+ input = undefined;
2721
+ }
2722
+ // object construction must be done this way.
2723
+ // https://github.com/moment/moment/issues/1423
2724
+ c._isAMomentObject = true;
2725
+ c._useUTC = c._isUTC = isUTC;
2726
+ c._l = locale;
2727
+ c._i = input;
2728
+ c._f = format;
2729
+ c._strict = strict;
2730
+
2731
+ return createFromConfig(c);
2732
+ }
2733
+
2734
+ function createLocal (input, format, locale, strict) {
2735
+ return createLocalOrUTC(input, format, locale, strict, false);
2736
+ }
2737
+
2738
+ var prototypeMin = deprecate(
2739
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
2740
+ function () {
2741
+ var other = createLocal.apply(null, arguments);
2742
+ if (this.isValid() && other.isValid()) {
2743
+ return other < this ? this : other;
2744
+ } else {
2745
+ return createInvalid();
2746
+ }
2747
+ }
2748
+ );
2749
+
2750
+ var prototypeMax = deprecate(
2751
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
2752
+ function () {
2753
+ var other = createLocal.apply(null, arguments);
2754
+ if (this.isValid() && other.isValid()) {
2755
+ return other > this ? this : other;
2756
+ } else {
2757
+ return createInvalid();
2758
+ }
2759
+ }
2760
+ );
2761
+
2762
+ // Pick a moment m from moments so that m[fn](other) is true for all
2763
+ // other. This relies on the function fn to be transitive.
2764
+ //
2765
+ // moments should either be an array of moment objects or an array, whose
2766
+ // first element is an array of moment objects.
2767
+ function pickBy(fn, moments) {
2768
+ var res, i;
2769
+ if (moments.length === 1 && isArray(moments[0])) {
2770
+ moments = moments[0];
2771
+ }
2772
+ if (!moments.length) {
2773
+ return createLocal();
2774
+ }
2775
+ res = moments[0];
2776
+ for (i = 1; i < moments.length; ++i) {
2777
+ if (!moments[i].isValid() || moments[i][fn](res)) {
2778
+ res = moments[i];
2779
+ }
2780
+ }
2781
+ return res;
2782
+ }
2783
+
2784
+ // TODO: Use [].sort instead?
2785
+ function min () {
2786
+ var args = [].slice.call(arguments, 0);
2787
+
2788
+ return pickBy('isBefore', args);
2789
+ }
2790
+
2791
+ function max () {
2792
+ var args = [].slice.call(arguments, 0);
2793
+
2794
+ return pickBy('isAfter', args);
2795
+ }
2796
+
2797
+ var now = function () {
2798
+ return Date.now ? Date.now() : +(new Date());
2799
+ };
2800
+
2801
+ var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
2802
+
2803
+ function isDurationValid(m) {
2804
+ for (var key in m) {
2805
+ if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
2806
+ return false;
2807
+ }
2808
+ }
2809
+
2810
+ var unitHasDecimal = false;
2811
+ for (var i = 0; i < ordering.length; ++i) {
2812
+ if (m[ordering[i]]) {
2813
+ if (unitHasDecimal) {
2814
+ return false; // only allow non-integers for smallest unit
2815
+ }
2816
+ if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
2817
+ unitHasDecimal = true;
2818
+ }
2819
+ }
2820
+ }
2821
+
2822
+ return true;
2823
+ }
2824
+
2825
+ function isValid$1() {
2826
+ return this._isValid;
2827
+ }
2828
+
2829
+ function createInvalid$1() {
2830
+ return createDuration(NaN);
2831
+ }
2832
+
2833
+ function Duration (duration) {
2834
+ var normalizedInput = normalizeObjectUnits(duration),
2835
+ years = normalizedInput.year || 0,
2836
+ quarters = normalizedInput.quarter || 0,
2837
+ months = normalizedInput.month || 0,
2838
+ weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
2839
+ days = normalizedInput.day || 0,
2840
+ hours = normalizedInput.hour || 0,
2841
+ minutes = normalizedInput.minute || 0,
2842
+ seconds = normalizedInput.second || 0,
2843
+ milliseconds = normalizedInput.millisecond || 0;
2844
+
2845
+ this._isValid = isDurationValid(normalizedInput);
2846
+
2847
+ // representation for dateAddRemove
2848
+ this._milliseconds = +milliseconds +
2849
+ seconds * 1e3 + // 1000
2850
+ minutes * 6e4 + // 1000 * 60
2851
+ hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
2852
+ // Because of dateAddRemove treats 24 hours as different from a
2853
+ // day when working around DST, we need to store them separately
2854
+ this._days = +days +
2855
+ weeks * 7;
2856
+ // It is impossible to translate months into days without knowing
2857
+ // which months you are are talking about, so we have to store
2858
+ // it separately.
2859
+ this._months = +months +
2860
+ quarters * 3 +
2861
+ years * 12;
2862
+
2863
+ this._data = {};
2864
+
2865
+ this._locale = getLocale();
2866
+
2867
+ this._bubble();
2868
+ }
2869
+
2870
+ function isDuration (obj) {
2871
+ return obj instanceof Duration;
2872
+ }
2873
+
2874
+ function absRound (number) {
2875
+ if (number < 0) {
2876
+ return Math.round(-1 * number) * -1;
2877
+ } else {
2878
+ return Math.round(number);
2879
+ }
2880
+ }
2881
+
2882
+ // FORMATTING
2883
+
2884
+ function offset (token, separator) {
2885
+ addFormatToken(token, 0, 0, function () {
2886
+ var offset = this.utcOffset();
2887
+ var sign = '+';
2888
+ if (offset < 0) {
2889
+ offset = -offset;
2890
+ sign = '-';
2891
+ }
2892
+ return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
2893
+ });
2894
+ }
2895
+
2896
+ offset('Z', ':');
2897
+ offset('ZZ', '');
2898
+
2899
+ // PARSING
2900
+
2901
+ addRegexToken('Z', matchShortOffset);
2902
+ addRegexToken('ZZ', matchShortOffset);
2903
+ addParseToken(['Z', 'ZZ'], function (input, array, config) {
2904
+ config._useUTC = true;
2905
+ config._tzm = offsetFromString(matchShortOffset, input);
2906
+ });
2907
+
2908
+ // HELPERS
2909
+
2910
+ // timezone chunker
2911
+ // '+10:00' > ['10', '00']
2912
+ // '-1530' > ['-15', '30']
2913
+ var chunkOffset = /([\+\-]|\d\d)/gi;
2914
+
2915
+ function offsetFromString(matcher, string) {
2916
+ var matches = (string || '').match(matcher);
2917
+
2918
+ if (matches === null) {
2919
+ return null;
2920
+ }
2921
+
2922
+ var chunk = matches[matches.length - 1] || [];
2923
+ var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
2924
+ var minutes = +(parts[1] * 60) + toInt(parts[2]);
2925
+
2926
+ return minutes === 0 ?
2927
+ 0 :
2928
+ parts[0] === '+' ? minutes : -minutes;
2929
+ }
2930
+
2931
+ // Return a moment from input, that is local/utc/zone equivalent to model.
2932
+ function cloneWithOffset(input, model) {
2933
+ var res, diff;
2934
+ if (model._isUTC) {
2935
+ res = model.clone();
2936
+ diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
2937
+ // Use low-level api, because this fn is low-level api.
2938
+ res._d.setTime(res._d.valueOf() + diff);
2939
+ hooks.updateOffset(res, false);
2940
+ return res;
2941
+ } else {
2942
+ return createLocal(input).local();
2943
+ }
2944
+ }
2945
+
2946
+ function getDateOffset (m) {
2947
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
2948
+ // https://github.com/moment/moment/pull/1871
2949
+ return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
2950
+ }
2951
+
2952
+ // HOOKS
2953
+
2954
+ // This function will be called whenever a moment is mutated.
2955
+ // It is intended to keep the offset in sync with the timezone.
2956
+ hooks.updateOffset = function () {};
2957
+
2958
+ // MOMENTS
2959
+
2960
+ // keepLocalTime = true means only change the timezone, without
2961
+ // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
2962
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
2963
+ // +0200, so we adjust the time as needed, to be valid.
2964
+ //
2965
+ // Keeping the time actually adds/subtracts (one hour)
2966
+ // from the actual represented time. That is why we call updateOffset
2967
+ // a second time. In case it wants us to change the offset again
2968
+ // _changeInProgress == true case, then we have to adjust, because
2969
+ // there is no such time in the given timezone.
2970
+ function getSetOffset (input, keepLocalTime, keepMinutes) {
2971
+ var offset = this._offset || 0,
2972
+ localAdjust;
2973
+ if (!this.isValid()) {
2974
+ return input != null ? this : NaN;
2975
+ }
2976
+ if (input != null) {
2977
+ if (typeof input === 'string') {
2978
+ input = offsetFromString(matchShortOffset, input);
2979
+ if (input === null) {
2980
+ return this;
2981
+ }
2982
+ } else if (Math.abs(input) < 16 && !keepMinutes) {
2983
+ input = input * 60;
2984
+ }
2985
+ if (!this._isUTC && keepLocalTime) {
2986
+ localAdjust = getDateOffset(this);
2987
+ }
2988
+ this._offset = input;
2989
+ this._isUTC = true;
2990
+ if (localAdjust != null) {
2991
+ this.add(localAdjust, 'm');
2992
+ }
2993
+ if (offset !== input) {
2994
+ if (!keepLocalTime || this._changeInProgress) {
2995
+ addSubtract(this, createDuration(input - offset, 'm'), 1, false);
2996
+ } else if (!this._changeInProgress) {
2997
+ this._changeInProgress = true;
2998
+ hooks.updateOffset(this, true);
2999
+ this._changeInProgress = null;
3000
+ }
3001
+ }
3002
+ return this;
3003
+ } else {
3004
+ return this._isUTC ? offset : getDateOffset(this);
3005
+ }
3006
+ }
3007
+
3008
+ function getSetZone (input, keepLocalTime) {
3009
+ if (input != null) {
3010
+ if (typeof input !== 'string') {
3011
+ input = -input;
3012
+ }
3013
+
3014
+ this.utcOffset(input, keepLocalTime);
3015
+
3016
+ return this;
3017
+ } else {
3018
+ return -this.utcOffset();
3019
+ }
3020
+ }
3021
+
3022
+ function setOffsetToUTC (keepLocalTime) {
3023
+ return this.utcOffset(0, keepLocalTime);
3024
+ }
3025
+
3026
+ function setOffsetToLocal (keepLocalTime) {
3027
+ if (this._isUTC) {
3028
+ this.utcOffset(0, keepLocalTime);
3029
+ this._isUTC = false;
3030
+
3031
+ if (keepLocalTime) {
3032
+ this.subtract(getDateOffset(this), 'm');
3033
+ }
3034
+ }
3035
+ return this;
3036
+ }
3037
+
3038
+ function setOffsetToParsedOffset () {
3039
+ if (this._tzm != null) {
3040
+ this.utcOffset(this._tzm, false, true);
3041
+ } else if (typeof this._i === 'string') {
3042
+ var tZone = offsetFromString(matchOffset, this._i);
3043
+ if (tZone != null) {
3044
+ this.utcOffset(tZone);
3045
+ }
3046
+ else {
3047
+ this.utcOffset(0, true);
3048
+ }
3049
+ }
3050
+ return this;
3051
+ }
3052
+
3053
+ function hasAlignedHourOffset (input) {
3054
+ if (!this.isValid()) {
3055
+ return false;
3056
+ }
3057
+ input = input ? createLocal(input).utcOffset() : 0;
3058
+
3059
+ return (this.utcOffset() - input) % 60 === 0;
3060
+ }
3061
+
3062
+ function isDaylightSavingTime () {
3063
+ return (
3064
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
3065
+ this.utcOffset() > this.clone().month(5).utcOffset()
3066
+ );
3067
+ }
3068
+
3069
+ function isDaylightSavingTimeShifted () {
3070
+ if (!isUndefined(this._isDSTShifted)) {
3071
+ return this._isDSTShifted;
3072
+ }
3073
+
3074
+ var c = {};
3075
+
3076
+ copyConfig(c, this);
3077
+ c = prepareConfig(c);
3078
+
3079
+ if (c._a) {
3080
+ var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
3081
+ this._isDSTShifted = this.isValid() &&
3082
+ compareArrays(c._a, other.toArray()) > 0;
3083
+ } else {
3084
+ this._isDSTShifted = false;
3085
+ }
3086
+
3087
+ return this._isDSTShifted;
3088
+ }
3089
+
3090
+ function isLocal () {
3091
+ return this.isValid() ? !this._isUTC : false;
3092
+ }
3093
+
3094
+ function isUtcOffset () {
3095
+ return this.isValid() ? this._isUTC : false;
3096
+ }
3097
+
3098
+ function isUtc () {
3099
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
3100
+ }
3101
+
3102
+ // ASP.NET json date format regex
3103
+ var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
3104
+
3105
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
3106
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
3107
+ // and further modified to allow for strings containing both week and day
3108
+ var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
3109
+
3110
+ function createDuration (input, key) {
3111
+ var duration = input,
3112
+ // matching against regexp is expensive, do it on demand
3113
+ match = null,
3114
+ sign,
3115
+ ret,
3116
+ diffRes;
3117
+
3118
+ if (isDuration(input)) {
3119
+ duration = {
3120
+ ms : input._milliseconds,
3121
+ d : input._days,
3122
+ M : input._months
3123
+ };
3124
+ } else if (isNumber(input)) {
3125
+ duration = {};
3126
+ if (key) {
3127
+ duration[key] = input;
3128
+ } else {
3129
+ duration.milliseconds = input;
3130
+ }
3131
+ } else if (!!(match = aspNetRegex.exec(input))) {
3132
+ sign = (match[1] === '-') ? -1 : 1;
3133
+ duration = {
3134
+ y : 0,
3135
+ d : toInt(match[DATE]) * sign,
3136
+ h : toInt(match[HOUR]) * sign,
3137
+ m : toInt(match[MINUTE]) * sign,
3138
+ s : toInt(match[SECOND]) * sign,
3139
+ ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
3140
+ };
3141
+ } else if (!!(match = isoRegex.exec(input))) {
3142
+ sign = (match[1] === '-') ? -1 : 1;
3143
+ duration = {
3144
+ y : parseIso(match[2], sign),
3145
+ M : parseIso(match[3], sign),
3146
+ w : parseIso(match[4], sign),
3147
+ d : parseIso(match[5], sign),
3148
+ h : parseIso(match[6], sign),
3149
+ m : parseIso(match[7], sign),
3150
+ s : parseIso(match[8], sign)
3151
+ };
3152
+ } else if (duration == null) {// checks for null or undefined
3153
+ duration = {};
3154
+ } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
3155
+ diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
3156
+
3157
+ duration = {};
3158
+ duration.ms = diffRes.milliseconds;
3159
+ duration.M = diffRes.months;
3160
+ }
3161
+
3162
+ ret = new Duration(duration);
3163
+
3164
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
3165
+ ret._locale = input._locale;
3166
+ }
3167
+
3168
+ return ret;
3169
+ }
3170
+
3171
+ createDuration.fn = Duration.prototype;
3172
+ createDuration.invalid = createInvalid$1;
3173
+
3174
+ function parseIso (inp, sign) {
3175
+ // We'd normally use ~~inp for this, but unfortunately it also
3176
+ // converts floats to ints.
3177
+ // inp may be undefined, so careful calling replace on it.
3178
+ var res = inp && parseFloat(inp.replace(',', '.'));
3179
+ // apply sign while we're at it
3180
+ return (isNaN(res) ? 0 : res) * sign;
3181
+ }
3182
+
3183
+ function positiveMomentsDifference(base, other) {
3184
+ var res = {milliseconds: 0, months: 0};
3185
+
3186
+ res.months = other.month() - base.month() +
3187
+ (other.year() - base.year()) * 12;
3188
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
3189
+ --res.months;
3190
+ }
3191
+
3192
+ res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
3193
+
3194
+ return res;
3195
+ }
3196
+
3197
+ function momentsDifference(base, other) {
3198
+ var res;
3199
+ if (!(base.isValid() && other.isValid())) {
3200
+ return {milliseconds: 0, months: 0};
3201
+ }
3202
+
3203
+ other = cloneWithOffset(other, base);
3204
+ if (base.isBefore(other)) {
3205
+ res = positiveMomentsDifference(base, other);
3206
+ } else {
3207
+ res = positiveMomentsDifference(other, base);
3208
+ res.milliseconds = -res.milliseconds;
3209
+ res.months = -res.months;
3210
+ }
3211
+
3212
+ return res;
3213
+ }
3214
+
3215
+ // TODO: remove 'name' arg after deprecation is removed
3216
+ function createAdder(direction, name) {
3217
+ return function (val, period) {
3218
+ var dur, tmp;
3219
+ //invert the arguments, but complain about it
3220
+ if (period !== null && !isNaN(+period)) {
3221
+ deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
3222
+ 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
3223
+ tmp = val; val = period; period = tmp;
3224
+ }
3225
+
3226
+ val = typeof val === 'string' ? +val : val;
3227
+ dur = createDuration(val, period);
3228
+ addSubtract(this, dur, direction);
3229
+ return this;
3230
+ };
3231
+ }
3232
+
3233
+ function addSubtract (mom, duration, isAdding, updateOffset) {
3234
+ var milliseconds = duration._milliseconds,
3235
+ days = absRound(duration._days),
3236
+ months = absRound(duration._months);
3237
+
3238
+ if (!mom.isValid()) {
3239
+ // No op
3240
+ return;
3241
+ }
3242
+
3243
+ updateOffset = updateOffset == null ? true : updateOffset;
3244
+
3245
+ if (months) {
3246
+ setMonth(mom, get(mom, 'Month') + months * isAdding);
3247
+ }
3248
+ if (days) {
3249
+ set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
3250
+ }
3251
+ if (milliseconds) {
3252
+ mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
3253
+ }
3254
+ if (updateOffset) {
3255
+ hooks.updateOffset(mom, days || months);
3256
+ }
3257
+ }
3258
+
3259
+ var add = createAdder(1, 'add');
3260
+ var subtract = createAdder(-1, 'subtract');
3261
+
3262
+ function getCalendarFormat(myMoment, now) {
3263
+ var diff = myMoment.diff(now, 'days', true);
3264
+ return diff < -6 ? 'sameElse' :
3265
+ diff < -1 ? 'lastWeek' :
3266
+ diff < 0 ? 'lastDay' :
3267
+ diff < 1 ? 'sameDay' :
3268
+ diff < 2 ? 'nextDay' :
3269
+ diff < 7 ? 'nextWeek' : 'sameElse';
3270
+ }
3271
+
3272
+ function calendar$1 (time, formats) {
3273
+ // We want to compare the start of today, vs this.
3274
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
3275
+ var now = time || createLocal(),
3276
+ sod = cloneWithOffset(now, this).startOf('day'),
3277
+ format = hooks.calendarFormat(this, sod) || 'sameElse';
3278
+
3279
+ var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
3280
+
3281
+ return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
3282
+ }
3283
+
3284
+ function clone () {
3285
+ return new Moment(this);
3286
+ }
3287
+
3288
+ function isAfter (input, units) {
3289
+ var localInput = isMoment(input) ? input : createLocal(input);
3290
+ if (!(this.isValid() && localInput.isValid())) {
3291
+ return false;
3292
+ }
3293
+ units = normalizeUnits(units) || 'millisecond';
3294
+ if (units === 'millisecond') {
3295
+ return this.valueOf() > localInput.valueOf();
3296
+ } else {
3297
+ return localInput.valueOf() < this.clone().startOf(units).valueOf();
3298
+ }
3299
+ }
3300
+
3301
+ function isBefore (input, units) {
3302
+ var localInput = isMoment(input) ? input : createLocal(input);
3303
+ if (!(this.isValid() && localInput.isValid())) {
3304
+ return false;
3305
+ }
3306
+ units = normalizeUnits(units) || 'millisecond';
3307
+ if (units === 'millisecond') {
3308
+ return this.valueOf() < localInput.valueOf();
3309
+ } else {
3310
+ return this.clone().endOf(units).valueOf() < localInput.valueOf();
3311
+ }
3312
+ }
3313
+
3314
+ function isBetween (from, to, units, inclusivity) {
3315
+ var localFrom = isMoment(from) ? from : createLocal(from),
3316
+ localTo = isMoment(to) ? to : createLocal(to);
3317
+ if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
3318
+ return false;
3319
+ }
3320
+ inclusivity = inclusivity || '()';
3321
+ return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) &&
3322
+ (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
3323
+ }
3324
+
3325
+ function isSame (input, units) {
3326
+ var localInput = isMoment(input) ? input : createLocal(input),
3327
+ inputMs;
3328
+ if (!(this.isValid() && localInput.isValid())) {
3329
+ return false;
3330
+ }
3331
+ units = normalizeUnits(units) || 'millisecond';
3332
+ if (units === 'millisecond') {
3333
+ return this.valueOf() === localInput.valueOf();
3334
+ } else {
3335
+ inputMs = localInput.valueOf();
3336
+ return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
3337
+ }
3338
+ }
3339
+
3340
+ function isSameOrAfter (input, units) {
3341
+ return this.isSame(input, units) || this.isAfter(input, units);
3342
+ }
3343
+
3344
+ function isSameOrBefore (input, units) {
3345
+ return this.isSame(input, units) || this.isBefore(input, units);
3346
+ }
3347
+
3348
+ function diff (input, units, asFloat) {
3349
+ var that,
3350
+ zoneDelta,
3351
+ output;
3352
+
3353
+ if (!this.isValid()) {
3354
+ return NaN;
3355
+ }
3356
+
3357
+ that = cloneWithOffset(input, this);
3358
+
3359
+ if (!that.isValid()) {
3360
+ return NaN;
3361
+ }
3362
+
3363
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
3364
+
3365
+ units = normalizeUnits(units);
3366
+
3367
+ switch (units) {
3368
+ case 'year': output = monthDiff(this, that) / 12; break;
3369
+ case 'month': output = monthDiff(this, that); break;
3370
+ case 'quarter': output = monthDiff(this, that) / 3; break;
3371
+ case 'second': output = (this - that) / 1e3; break; // 1000
3372
+ case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
3373
+ case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
3374
+ case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
3375
+ case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
3376
+ default: output = this - that;
3377
+ }
3378
+
3379
+ return asFloat ? output : absFloor(output);
3380
+ }
3381
+
3382
+ function monthDiff (a, b) {
3383
+ // difference in months
3384
+ var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
3385
+ // b is in (anchor - 1 month, anchor + 1 month)
3386
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
3387
+ anchor2, adjust;
3388
+
3389
+ if (b - anchor < 0) {
3390
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
3391
+ // linear across the month
3392
+ adjust = (b - anchor) / (anchor - anchor2);
3393
+ } else {
3394
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
3395
+ // linear across the month
3396
+ adjust = (b - anchor) / (anchor2 - anchor);
3397
+ }
3398
+
3399
+ //check for negative zero, return zero if negative zero
3400
+ return -(wholeMonthDiff + adjust) || 0;
3401
+ }
3402
+
3403
+ hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
3404
+ hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
3405
+
3406
+ function toString () {
3407
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
3408
+ }
3409
+
3410
+ function toISOString(keepOffset) {
3411
+ if (!this.isValid()) {
3412
+ return null;
3413
+ }
3414
+ var utc = keepOffset !== true;
3415
+ var m = utc ? this.clone().utc() : this;
3416
+ if (m.year() < 0 || m.year() > 9999) {
3417
+ return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
3418
+ }
3419
+ if (isFunction(Date.prototype.toISOString)) {
3420
+ // native implementation is ~50x faster, use it when we can
3421
+ if (utc) {
3422
+ return this.toDate().toISOString();
3423
+ } else {
3424
+ return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z'));
3425
+ }
3426
+ }
3427
+ return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
3428
+ }
3429
+
3430
+ /**
3431
+ * Return a human readable representation of a moment that can
3432
+ * also be evaluated to get a new moment which is the same
3433
+ *
3434
+ * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
3435
+ */
3436
+ function inspect () {
3437
+ if (!this.isValid()) {
3438
+ return 'moment.invalid(/* ' + this._i + ' */)';
3439
+ }
3440
+ var func = 'moment';
3441
+ var zone = '';
3442
+ if (!this.isLocal()) {
3443
+ func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
3444
+ zone = 'Z';
3445
+ }
3446
+ var prefix = '[' + func + '("]';
3447
+ var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
3448
+ var datetime = '-MM-DD[T]HH:mm:ss.SSS';
3449
+ var suffix = zone + '[")]';
3450
+
3451
+ return this.format(prefix + year + datetime + suffix);
3452
+ }
3453
+
3454
+ function format (inputString) {
3455
+ if (!inputString) {
3456
+ inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
3457
+ }
3458
+ var output = formatMoment(this, inputString);
3459
+ return this.localeData().postformat(output);
3460
+ }
3461
+
3462
+ function from (time, withoutSuffix) {
3463
+ if (this.isValid() &&
3464
+ ((isMoment(time) && time.isValid()) ||
3465
+ createLocal(time).isValid())) {
3466
+ return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
3467
+ } else {
3468
+ return this.localeData().invalidDate();
3469
+ }
3470
+ }
3471
+
3472
+ function fromNow (withoutSuffix) {
3473
+ return this.from(createLocal(), withoutSuffix);
3474
+ }
3475
+
3476
+ function to (time, withoutSuffix) {
3477
+ if (this.isValid() &&
3478
+ ((isMoment(time) && time.isValid()) ||
3479
+ createLocal(time).isValid())) {
3480
+ return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
3481
+ } else {
3482
+ return this.localeData().invalidDate();
3483
+ }
3484
+ }
3485
+
3486
+ function toNow (withoutSuffix) {
3487
+ return this.to(createLocal(), withoutSuffix);
3488
+ }
3489
+
3490
+ // If passed a locale key, it will set the locale for this
3491
+ // instance. Otherwise, it will return the locale configuration
3492
+ // variables for this instance.
3493
+ function locale (key) {
3494
+ var newLocaleData;
3495
+
3496
+ if (key === undefined) {
3497
+ return this._locale._abbr;
3498
+ } else {
3499
+ newLocaleData = getLocale(key);
3500
+ if (newLocaleData != null) {
3501
+ this._locale = newLocaleData;
3502
+ }
3503
+ return this;
3504
+ }
3505
+ }
3506
+
3507
+ var lang = deprecate(
3508
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
3509
+ function (key) {
3510
+ if (key === undefined) {
3511
+ return this.localeData();
3512
+ } else {
3513
+ return this.locale(key);
3514
+ }
3515
+ }
3516
+ );
3517
+
3518
+ function localeData () {
3519
+ return this._locale;
3520
+ }
3521
+
3522
+ function startOf (units) {
3523
+ units = normalizeUnits(units);
3524
+ // the following switch intentionally omits break keywords
3525
+ // to utilize falling through the cases.
3526
+ switch (units) {
3527
+ case 'year':
3528
+ this.month(0);
3529
+ /* falls through */
3530
+ case 'quarter':
3531
+ case 'month':
3532
+ this.date(1);
3533
+ /* falls through */
3534
+ case 'week':
3535
+ case 'isoWeek':
3536
+ case 'day':
3537
+ case 'date':
3538
+ this.hours(0);
3539
+ /* falls through */
3540
+ case 'hour':
3541
+ this.minutes(0);
3542
+ /* falls through */
3543
+ case 'minute':
3544
+ this.seconds(0);
3545
+ /* falls through */
3546
+ case 'second':
3547
+ this.milliseconds(0);
3548
+ }
3549
+
3550
+ // weeks are a special case
3551
+ if (units === 'week') {
3552
+ this.weekday(0);
3553
+ }
3554
+ if (units === 'isoWeek') {
3555
+ this.isoWeekday(1);
3556
+ }
3557
+
3558
+ // quarters are also special
3559
+ if (units === 'quarter') {
3560
+ this.month(Math.floor(this.month() / 3) * 3);
3561
+ }
3562
+
3563
+ return this;
3564
+ }
3565
+
3566
+ function endOf (units) {
3567
+ units = normalizeUnits(units);
3568
+ if (units === undefined || units === 'millisecond') {
3569
+ return this;
3570
+ }
3571
+
3572
+ // 'date' is an alias for 'day', so it should be considered as such.
3573
+ if (units === 'date') {
3574
+ units = 'day';
3575
+ }
3576
+
3577
+ return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
3578
+ }
3579
+
3580
+ function valueOf () {
3581
+ return this._d.valueOf() - ((this._offset || 0) * 60000);
3582
+ }
3583
+
3584
+ function unix () {
3585
+ return Math.floor(this.valueOf() / 1000);
3586
+ }
3587
+
3588
+ function toDate () {
3589
+ return new Date(this.valueOf());
3590
+ }
3591
+
3592
+ function toArray () {
3593
+ var m = this;
3594
+ return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
3595
+ }
3596
+
3597
+ function toObject () {
3598
+ var m = this;
3599
+ return {
3600
+ years: m.year(),
3601
+ months: m.month(),
3602
+ date: m.date(),
3603
+ hours: m.hours(),
3604
+ minutes: m.minutes(),
3605
+ seconds: m.seconds(),
3606
+ milliseconds: m.milliseconds()
3607
+ };
3608
+ }
3609
+
3610
+ function toJSON () {
3611
+ // new Date(NaN).toJSON() === null
3612
+ return this.isValid() ? this.toISOString() : null;
3613
+ }
3614
+
3615
+ function isValid$2 () {
3616
+ return isValid(this);
3617
+ }
3618
+
3619
+ function parsingFlags () {
3620
+ return extend({}, getParsingFlags(this));
3621
+ }
3622
+
3623
+ function invalidAt () {
3624
+ return getParsingFlags(this).overflow;
3625
+ }
3626
+
3627
+ function creationData() {
3628
+ return {
3629
+ input: this._i,
3630
+ format: this._f,
3631
+ locale: this._locale,
3632
+ isUTC: this._isUTC,
3633
+ strict: this._strict
3634
+ };
3635
+ }
3636
+
3637
+ // FORMATTING
3638
+
3639
+ addFormatToken(0, ['gg', 2], 0, function () {
3640
+ return this.weekYear() % 100;
3641
+ });
3642
+
3643
+ addFormatToken(0, ['GG', 2], 0, function () {
3644
+ return this.isoWeekYear() % 100;
3645
+ });
3646
+
3647
+ function addWeekYearFormatToken (token, getter) {
3648
+ addFormatToken(0, [token, token.length], 0, getter);
3649
+ }
3650
+
3651
+ addWeekYearFormatToken('gggg', 'weekYear');
3652
+ addWeekYearFormatToken('ggggg', 'weekYear');
3653
+ addWeekYearFormatToken('GGGG', 'isoWeekYear');
3654
+ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
3655
+
3656
+ // ALIASES
3657
+
3658
+ addUnitAlias('weekYear', 'gg');
3659
+ addUnitAlias('isoWeekYear', 'GG');
3660
+
3661
+ // PRIORITY
3662
+
3663
+ addUnitPriority('weekYear', 1);
3664
+ addUnitPriority('isoWeekYear', 1);
3665
+
3666
+
3667
+ // PARSING
3668
+
3669
+ addRegexToken('G', matchSigned);
3670
+ addRegexToken('g', matchSigned);
3671
+ addRegexToken('GG', match1to2, match2);
3672
+ addRegexToken('gg', match1to2, match2);
3673
+ addRegexToken('GGGG', match1to4, match4);
3674
+ addRegexToken('gggg', match1to4, match4);
3675
+ addRegexToken('GGGGG', match1to6, match6);
3676
+ addRegexToken('ggggg', match1to6, match6);
3677
+
3678
+ addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
3679
+ week[token.substr(0, 2)] = toInt(input);
3680
+ });
3681
+
3682
+ addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
3683
+ week[token] = hooks.parseTwoDigitYear(input);
3684
+ });
3685
+
3686
+ // MOMENTS
3687
+
3688
+ function getSetWeekYear (input) {
3689
+ return getSetWeekYearHelper.call(this,
3690
+ input,
3691
+ this.week(),
3692
+ this.weekday(),
3693
+ this.localeData()._week.dow,
3694
+ this.localeData()._week.doy);
3695
+ }
3696
+
3697
+ function getSetISOWeekYear (input) {
3698
+ return getSetWeekYearHelper.call(this,
3699
+ input, this.isoWeek(), this.isoWeekday(), 1, 4);
3700
+ }
3701
+
3702
+ function getISOWeeksInYear () {
3703
+ return weeksInYear(this.year(), 1, 4);
3704
+ }
3705
+
3706
+ function getWeeksInYear () {
3707
+ var weekInfo = this.localeData()._week;
3708
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
3709
+ }
3710
+
3711
+ function getSetWeekYearHelper(input, week, weekday, dow, doy) {
3712
+ var weeksTarget;
3713
+ if (input == null) {
3714
+ return weekOfYear(this, dow, doy).year;
3715
+ } else {
3716
+ weeksTarget = weeksInYear(input, dow, doy);
3717
+ if (week > weeksTarget) {
3718
+ week = weeksTarget;
3719
+ }
3720
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
3721
+ }
3722
+ }
3723
+
3724
+ function setWeekAll(weekYear, week, weekday, dow, doy) {
3725
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
3726
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
3727
+
3728
+ this.year(date.getUTCFullYear());
3729
+ this.month(date.getUTCMonth());
3730
+ this.date(date.getUTCDate());
3731
+ return this;
3732
+ }
3733
+
3734
+ // FORMATTING
3735
+
3736
+ addFormatToken('Q', 0, 'Qo', 'quarter');
3737
+
3738
+ // ALIASES
3739
+
3740
+ addUnitAlias('quarter', 'Q');
3741
+
3742
+ // PRIORITY
3743
+
3744
+ addUnitPriority('quarter', 7);
3745
+
3746
+ // PARSING
3747
+
3748
+ addRegexToken('Q', match1);
3749
+ addParseToken('Q', function (input, array) {
3750
+ array[MONTH] = (toInt(input) - 1) * 3;
3751
+ });
3752
+
3753
+ // MOMENTS
3754
+
3755
+ function getSetQuarter (input) {
3756
+ return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
3757
+ }
3758
+
3759
+ // FORMATTING
3760
+
3761
+ addFormatToken('D', ['DD', 2], 'Do', 'date');
3762
+
3763
+ // ALIASES
3764
+
3765
+ addUnitAlias('date', 'D');
3766
+
3767
+ // PRIORITY
3768
+ addUnitPriority('date', 9);
3769
+
3770
+ // PARSING
3771
+
3772
+ addRegexToken('D', match1to2);
3773
+ addRegexToken('DD', match1to2, match2);
3774
+ addRegexToken('Do', function (isStrict, locale) {
3775
+ // TODO: Remove "ordinalParse" fallback in next major release.
3776
+ return isStrict ?
3777
+ (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
3778
+ locale._dayOfMonthOrdinalParseLenient;
3779
+ });
3780
+
3781
+ addParseToken(['D', 'DD'], DATE);
3782
+ addParseToken('Do', function (input, array) {
3783
+ array[DATE] = toInt(input.match(match1to2)[0]);
3784
+ });
3785
+
3786
+ // MOMENTS
3787
+
3788
+ var getSetDayOfMonth = makeGetSet('Date', true);
3789
+
3790
+ // FORMATTING
3791
+
3792
+ addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
3793
+
3794
+ // ALIASES
3795
+
3796
+ addUnitAlias('dayOfYear', 'DDD');
3797
+
3798
+ // PRIORITY
3799
+ addUnitPriority('dayOfYear', 4);
3800
+
3801
+ // PARSING
3802
+
3803
+ addRegexToken('DDD', match1to3);
3804
+ addRegexToken('DDDD', match3);
3805
+ addParseToken(['DDD', 'DDDD'], function (input, array, config) {
3806
+ config._dayOfYear = toInt(input);
3807
+ });
3808
+
3809
+ // HELPERS
3810
+
3811
+ // MOMENTS
3812
+
3813
+ function getSetDayOfYear (input) {
3814
+ var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
3815
+ return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
3816
+ }
3817
+
3818
+ // FORMATTING
3819
+
3820
+ addFormatToken('m', ['mm', 2], 0, 'minute');
3821
+
3822
+ // ALIASES
3823
+
3824
+ addUnitAlias('minute', 'm');
3825
+
3826
+ // PRIORITY
3827
+
3828
+ addUnitPriority('minute', 14);
3829
+
3830
+ // PARSING
3831
+
3832
+ addRegexToken('m', match1to2);
3833
+ addRegexToken('mm', match1to2, match2);
3834
+ addParseToken(['m', 'mm'], MINUTE);
3835
+
3836
+ // MOMENTS
3837
+
3838
+ var getSetMinute = makeGetSet('Minutes', false);
3839
+
3840
+ // FORMATTING
3841
+
3842
+ addFormatToken('s', ['ss', 2], 0, 'second');
3843
+
3844
+ // ALIASES
3845
+
3846
+ addUnitAlias('second', 's');
3847
+
3848
+ // PRIORITY
3849
+
3850
+ addUnitPriority('second', 15);
3851
+
3852
+ // PARSING
3853
+
3854
+ addRegexToken('s', match1to2);
3855
+ addRegexToken('ss', match1to2, match2);
3856
+ addParseToken(['s', 'ss'], SECOND);
3857
+
3858
+ // MOMENTS
3859
+
3860
+ var getSetSecond = makeGetSet('Seconds', false);
3861
+
3862
+ // FORMATTING
3863
+
3864
+ addFormatToken('S', 0, 0, function () {
3865
+ return ~~(this.millisecond() / 100);
3866
+ });
3867
+
3868
+ addFormatToken(0, ['SS', 2], 0, function () {
3869
+ return ~~(this.millisecond() / 10);
3870
+ });
3871
+
3872
+ addFormatToken(0, ['SSS', 3], 0, 'millisecond');
3873
+ addFormatToken(0, ['SSSS', 4], 0, function () {
3874
+ return this.millisecond() * 10;
3875
+ });
3876
+ addFormatToken(0, ['SSSSS', 5], 0, function () {
3877
+ return this.millisecond() * 100;
3878
+ });
3879
+ addFormatToken(0, ['SSSSSS', 6], 0, function () {
3880
+ return this.millisecond() * 1000;
3881
+ });
3882
+ addFormatToken(0, ['SSSSSSS', 7], 0, function () {
3883
+ return this.millisecond() * 10000;
3884
+ });
3885
+ addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
3886
+ return this.millisecond() * 100000;
3887
+ });
3888
+ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
3889
+ return this.millisecond() * 1000000;
3890
+ });
3891
+
3892
+
3893
+ // ALIASES
3894
+
3895
+ addUnitAlias('millisecond', 'ms');
3896
+
3897
+ // PRIORITY
3898
+
3899
+ addUnitPriority('millisecond', 16);
3900
+
3901
+ // PARSING
3902
+
3903
+ addRegexToken('S', match1to3, match1);
3904
+ addRegexToken('SS', match1to3, match2);
3905
+ addRegexToken('SSS', match1to3, match3);
3906
+
3907
+ var token;
3908
+ for (token = 'SSSS'; token.length <= 9; token += 'S') {
3909
+ addRegexToken(token, matchUnsigned);
3910
+ }
3911
+
3912
+ function parseMs(input, array) {
3913
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
3914
+ }
3915
+
3916
+ for (token = 'S'; token.length <= 9; token += 'S') {
3917
+ addParseToken(token, parseMs);
3918
+ }
3919
+ // MOMENTS
3920
+
3921
+ var getSetMillisecond = makeGetSet('Milliseconds', false);
3922
+
3923
+ // FORMATTING
3924
+
3925
+ addFormatToken('z', 0, 0, 'zoneAbbr');
3926
+ addFormatToken('zz', 0, 0, 'zoneName');
3927
+
3928
+ // MOMENTS
3929
+
3930
+ function getZoneAbbr () {
3931
+ return this._isUTC ? 'UTC' : '';
3932
+ }
3933
+
3934
+ function getZoneName () {
3935
+ return this._isUTC ? 'Coordinated Universal Time' : '';
3936
+ }
3937
+
3938
+ var proto = Moment.prototype;
3939
+
3940
+ proto.add = add;
3941
+ proto.calendar = calendar$1;
3942
+ proto.clone = clone;
3943
+ proto.diff = diff;
3944
+ proto.endOf = endOf;
3945
+ proto.format = format;
3946
+ proto.from = from;
3947
+ proto.fromNow = fromNow;
3948
+ proto.to = to;
3949
+ proto.toNow = toNow;
3950
+ proto.get = stringGet;
3951
+ proto.invalidAt = invalidAt;
3952
+ proto.isAfter = isAfter;
3953
+ proto.isBefore = isBefore;
3954
+ proto.isBetween = isBetween;
3955
+ proto.isSame = isSame;
3956
+ proto.isSameOrAfter = isSameOrAfter;
3957
+ proto.isSameOrBefore = isSameOrBefore;
3958
+ proto.isValid = isValid$2;
3959
+ proto.lang = lang;
3960
+ proto.locale = locale;
3961
+ proto.localeData = localeData;
3962
+ proto.max = prototypeMax;
3963
+ proto.min = prototypeMin;
3964
+ proto.parsingFlags = parsingFlags;
3965
+ proto.set = stringSet;
3966
+ proto.startOf = startOf;
3967
+ proto.subtract = subtract;
3968
+ proto.toArray = toArray;
3969
+ proto.toObject = toObject;
3970
+ proto.toDate = toDate;
3971
+ proto.toISOString = toISOString;
3972
+ proto.inspect = inspect;
3973
+ proto.toJSON = toJSON;
3974
+ proto.toString = toString;
3975
+ proto.unix = unix;
3976
+ proto.valueOf = valueOf;
3977
+ proto.creationData = creationData;
3978
+ proto.year = getSetYear;
3979
+ proto.isLeapYear = getIsLeapYear;
3980
+ proto.weekYear = getSetWeekYear;
3981
+ proto.isoWeekYear = getSetISOWeekYear;
3982
+ proto.quarter = proto.quarters = getSetQuarter;
3983
+ proto.month = getSetMonth;
3984
+ proto.daysInMonth = getDaysInMonth;
3985
+ proto.week = proto.weeks = getSetWeek;
3986
+ proto.isoWeek = proto.isoWeeks = getSetISOWeek;
3987
+ proto.weeksInYear = getWeeksInYear;
3988
+ proto.isoWeeksInYear = getISOWeeksInYear;
3989
+ proto.date = getSetDayOfMonth;
3990
+ proto.day = proto.days = getSetDayOfWeek;
3991
+ proto.weekday = getSetLocaleDayOfWeek;
3992
+ proto.isoWeekday = getSetISODayOfWeek;
3993
+ proto.dayOfYear = getSetDayOfYear;
3994
+ proto.hour = proto.hours = getSetHour;
3995
+ proto.minute = proto.minutes = getSetMinute;
3996
+ proto.second = proto.seconds = getSetSecond;
3997
+ proto.millisecond = proto.milliseconds = getSetMillisecond;
3998
+ proto.utcOffset = getSetOffset;
3999
+ proto.utc = setOffsetToUTC;
4000
+ proto.local = setOffsetToLocal;
4001
+ proto.parseZone = setOffsetToParsedOffset;
4002
+ proto.hasAlignedHourOffset = hasAlignedHourOffset;
4003
+ proto.isDST = isDaylightSavingTime;
4004
+ proto.isLocal = isLocal;
4005
+ proto.isUtcOffset = isUtcOffset;
4006
+ proto.isUtc = isUtc;
4007
+ proto.isUTC = isUtc;
4008
+ proto.zoneAbbr = getZoneAbbr;
4009
+ proto.zoneName = getZoneName;
4010
+ proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
4011
+ proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
4012
+ proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
4013
+ proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
4014
+ proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
4015
+
4016
+ function createUnix (input) {
4017
+ return createLocal(input * 1000);
4018
+ }
4019
+
4020
+ function createInZone () {
4021
+ return createLocal.apply(null, arguments).parseZone();
4022
+ }
4023
+
4024
+ function preParsePostFormat (string) {
4025
+ return string;
4026
+ }
4027
+
4028
+ var proto$1 = Locale.prototype;
4029
+
4030
+ proto$1.calendar = calendar;
4031
+ proto$1.longDateFormat = longDateFormat;
4032
+ proto$1.invalidDate = invalidDate;
4033
+ proto$1.ordinal = ordinal;
4034
+ proto$1.preparse = preParsePostFormat;
4035
+ proto$1.postformat = preParsePostFormat;
4036
+ proto$1.relativeTime = relativeTime;
4037
+ proto$1.pastFuture = pastFuture;
4038
+ proto$1.set = set;
4039
+
4040
+ proto$1.months = localeMonths;
4041
+ proto$1.monthsShort = localeMonthsShort;
4042
+ proto$1.monthsParse = localeMonthsParse;
4043
+ proto$1.monthsRegex = monthsRegex;
4044
+ proto$1.monthsShortRegex = monthsShortRegex;
4045
+ proto$1.week = localeWeek;
4046
+ proto$1.firstDayOfYear = localeFirstDayOfYear;
4047
+ proto$1.firstDayOfWeek = localeFirstDayOfWeek;
4048
+
4049
+ proto$1.weekdays = localeWeekdays;
4050
+ proto$1.weekdaysMin = localeWeekdaysMin;
4051
+ proto$1.weekdaysShort = localeWeekdaysShort;
4052
+ proto$1.weekdaysParse = localeWeekdaysParse;
4053
+
4054
+ proto$1.weekdaysRegex = weekdaysRegex;
4055
+ proto$1.weekdaysShortRegex = weekdaysShortRegex;
4056
+ proto$1.weekdaysMinRegex = weekdaysMinRegex;
4057
+
4058
+ proto$1.isPM = localeIsPM;
4059
+ proto$1.meridiem = localeMeridiem;
4060
+
4061
+ function get$1 (format, index, field, setter) {
4062
+ var locale = getLocale();
4063
+ var utc = createUTC().set(setter, index);
4064
+ return locale[field](utc, format);
4065
+ }
4066
+
4067
+ function listMonthsImpl (format, index, field) {
4068
+ if (isNumber(format)) {
4069
+ index = format;
4070
+ format = undefined;
4071
+ }
4072
+
4073
+ format = format || '';
4074
+
4075
+ if (index != null) {
4076
+ return get$1(format, index, field, 'month');
4077
+ }
4078
+
4079
+ var i;
4080
+ var out = [];
4081
+ for (i = 0; i < 12; i++) {
4082
+ out[i] = get$1(format, i, field, 'month');
4083
+ }
4084
+ return out;
4085
+ }
4086
+
4087
+ // ()
4088
+ // (5)
4089
+ // (fmt, 5)
4090
+ // (fmt)
4091
+ // (true)
4092
+ // (true, 5)
4093
+ // (true, fmt, 5)
4094
+ // (true, fmt)
4095
+ function listWeekdaysImpl (localeSorted, format, index, field) {
4096
+ if (typeof localeSorted === 'boolean') {
4097
+ if (isNumber(format)) {
4098
+ index = format;
4099
+ format = undefined;
4100
+ }
4101
+
4102
+ format = format || '';
4103
+ } else {
4104
+ format = localeSorted;
4105
+ index = format;
4106
+ localeSorted = false;
4107
+
4108
+ if (isNumber(format)) {
4109
+ index = format;
4110
+ format = undefined;
4111
+ }
4112
+
4113
+ format = format || '';
4114
+ }
4115
+
4116
+ var locale = getLocale(),
4117
+ shift = localeSorted ? locale._week.dow : 0;
4118
+
4119
+ if (index != null) {
4120
+ return get$1(format, (index + shift) % 7, field, 'day');
4121
+ }
4122
+
4123
+ var i;
4124
+ var out = [];
4125
+ for (i = 0; i < 7; i++) {
4126
+ out[i] = get$1(format, (i + shift) % 7, field, 'day');
4127
+ }
4128
+ return out;
4129
+ }
4130
+
4131
+ function listMonths (format, index) {
4132
+ return listMonthsImpl(format, index, 'months');
4133
+ }
4134
+
4135
+ function listMonthsShort (format, index) {
4136
+ return listMonthsImpl(format, index, 'monthsShort');
4137
+ }
4138
+
4139
+ function listWeekdays (localeSorted, format, index) {
4140
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
4141
+ }
4142
+
4143
+ function listWeekdaysShort (localeSorted, format, index) {
4144
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
4145
+ }
4146
+
4147
+ function listWeekdaysMin (localeSorted, format, index) {
4148
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
4149
+ }
4150
+
4151
+ getSetGlobalLocale('en', {
4152
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
4153
+ ordinal : function (number) {
4154
+ var b = number % 10,
4155
+ output = (toInt(number % 100 / 10) === 1) ? 'th' :
4156
+ (b === 1) ? 'st' :
4157
+ (b === 2) ? 'nd' :
4158
+ (b === 3) ? 'rd' : 'th';
4159
+ return number + output;
4160
+ }
4161
+ });
4162
+
4163
+ // Side effect imports
4164
+
4165
+ hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
4166
+ hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
4167
+
4168
+ var mathAbs = Math.abs;
4169
+
4170
+ function abs () {
4171
+ var data = this._data;
4172
+
4173
+ this._milliseconds = mathAbs(this._milliseconds);
4174
+ this._days = mathAbs(this._days);
4175
+ this._months = mathAbs(this._months);
4176
+
4177
+ data.milliseconds = mathAbs(data.milliseconds);
4178
+ data.seconds = mathAbs(data.seconds);
4179
+ data.minutes = mathAbs(data.minutes);
4180
+ data.hours = mathAbs(data.hours);
4181
+ data.months = mathAbs(data.months);
4182
+ data.years = mathAbs(data.years);
4183
+
4184
+ return this;
4185
+ }
4186
+
4187
+ function addSubtract$1 (duration, input, value, direction) {
4188
+ var other = createDuration(input, value);
4189
+
4190
+ duration._milliseconds += direction * other._milliseconds;
4191
+ duration._days += direction * other._days;
4192
+ duration._months += direction * other._months;
4193
+
4194
+ return duration._bubble();
4195
+ }
4196
+
4197
+ // supports only 2.0-style add(1, 's') or add(duration)
4198
+ function add$1 (input, value) {
4199
+ return addSubtract$1(this, input, value, 1);
4200
+ }
4201
+
4202
+ // supports only 2.0-style subtract(1, 's') or subtract(duration)
4203
+ function subtract$1 (input, value) {
4204
+ return addSubtract$1(this, input, value, -1);
4205
+ }
4206
+
4207
+ function absCeil (number) {
4208
+ if (number < 0) {
4209
+ return Math.floor(number);
4210
+ } else {
4211
+ return Math.ceil(number);
4212
+ }
4213
+ }
4214
+
4215
+ function bubble () {
4216
+ var milliseconds = this._milliseconds;
4217
+ var days = this._days;
4218
+ var months = this._months;
4219
+ var data = this._data;
4220
+ var seconds, minutes, hours, years, monthsFromDays;
4221
+
4222
+ // if we have a mix of positive and negative values, bubble down first
4223
+ // check: https://github.com/moment/moment/issues/2166
4224
+ if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
4225
+ (milliseconds <= 0 && days <= 0 && months <= 0))) {
4226
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
4227
+ days = 0;
4228
+ months = 0;
4229
+ }
4230
+
4231
+ // The following code bubbles up values, see the tests for
4232
+ // examples of what that means.
4233
+ data.milliseconds = milliseconds % 1000;
4234
+
4235
+ seconds = absFloor(milliseconds / 1000);
4236
+ data.seconds = seconds % 60;
4237
+
4238
+ minutes = absFloor(seconds / 60);
4239
+ data.minutes = minutes % 60;
4240
+
4241
+ hours = absFloor(minutes / 60);
4242
+ data.hours = hours % 24;
4243
+
4244
+ days += absFloor(hours / 24);
4245
+
4246
+ // convert days to months
4247
+ monthsFromDays = absFloor(daysToMonths(days));
4248
+ months += monthsFromDays;
4249
+ days -= absCeil(monthsToDays(monthsFromDays));
4250
+
4251
+ // 12 months -> 1 year
4252
+ years = absFloor(months / 12);
4253
+ months %= 12;
4254
+
4255
+ data.days = days;
4256
+ data.months = months;
4257
+ data.years = years;
4258
+
4259
+ return this;
4260
+ }
4261
+
4262
+ function daysToMonths (days) {
4263
+ // 400 years have 146097 days (taking into account leap year rules)
4264
+ // 400 years have 12 months === 4800
4265
+ return days * 4800 / 146097;
4266
+ }
4267
+
4268
+ function monthsToDays (months) {
4269
+ // the reverse of daysToMonths
4270
+ return months * 146097 / 4800;
4271
+ }
4272
+
4273
+ function as (units) {
4274
+ if (!this.isValid()) {
4275
+ return NaN;
4276
+ }
4277
+ var days;
4278
+ var months;
4279
+ var milliseconds = this._milliseconds;
4280
+
4281
+ units = normalizeUnits(units);
4282
+
4283
+ if (units === 'month' || units === 'year') {
4284
+ days = this._days + milliseconds / 864e5;
4285
+ months = this._months + daysToMonths(days);
4286
+ return units === 'month' ? months : months / 12;
4287
+ } else {
4288
+ // handle milliseconds separately because of floating point math errors (issue #1867)
4289
+ days = this._days + Math.round(monthsToDays(this._months));
4290
+ switch (units) {
4291
+ case 'week' : return days / 7 + milliseconds / 6048e5;
4292
+ case 'day' : return days + milliseconds / 864e5;
4293
+ case 'hour' : return days * 24 + milliseconds / 36e5;
4294
+ case 'minute' : return days * 1440 + milliseconds / 6e4;
4295
+ case 'second' : return days * 86400 + milliseconds / 1000;
4296
+ // Math.floor prevents floating point math errors here
4297
+ case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
4298
+ default: throw new Error('Unknown unit ' + units);
4299
+ }
4300
+ }
4301
+ }
4302
+
4303
+ // TODO: Use this.as('ms')?
4304
+ function valueOf$1 () {
4305
+ if (!this.isValid()) {
4306
+ return NaN;
4307
+ }
4308
+ return (
4309
+ this._milliseconds +
4310
+ this._days * 864e5 +
4311
+ (this._months % 12) * 2592e6 +
4312
+ toInt(this._months / 12) * 31536e6
4313
+ );
4314
+ }
4315
+
4316
+ function makeAs (alias) {
4317
+ return function () {
4318
+ return this.as(alias);
4319
+ };
4320
+ }
4321
+
4322
+ var asMilliseconds = makeAs('ms');
4323
+ var asSeconds = makeAs('s');
4324
+ var asMinutes = makeAs('m');
4325
+ var asHours = makeAs('h');
4326
+ var asDays = makeAs('d');
4327
+ var asWeeks = makeAs('w');
4328
+ var asMonths = makeAs('M');
4329
+ var asYears = makeAs('y');
4330
+
4331
+ function clone$1 () {
4332
+ return createDuration(this);
4333
+ }
4334
+
4335
+ function get$2 (units) {
4336
+ units = normalizeUnits(units);
4337
+ return this.isValid() ? this[units + 's']() : NaN;
4338
+ }
4339
+
4340
+ function makeGetter(name) {
4341
+ return function () {
4342
+ return this.isValid() ? this._data[name] : NaN;
4343
+ };
4344
+ }
4345
+
4346
+ var milliseconds = makeGetter('milliseconds');
4347
+ var seconds = makeGetter('seconds');
4348
+ var minutes = makeGetter('minutes');
4349
+ var hours = makeGetter('hours');
4350
+ var days = makeGetter('days');
4351
+ var months = makeGetter('months');
4352
+ var years = makeGetter('years');
4353
+
4354
+ function weeks () {
4355
+ return absFloor(this.days() / 7);
4356
+ }
4357
+
4358
+ var round = Math.round;
4359
+ var thresholds = {
4360
+ ss: 44, // a few seconds to seconds
4361
+ s : 45, // seconds to minute
4362
+ m : 45, // minutes to hour
4363
+ h : 22, // hours to day
4364
+ d : 26, // days to month
4365
+ M : 11 // months to year
4366
+ };
4367
+
4368
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
4369
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
4370
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
4371
+ }
4372
+
4373
+ function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
4374
+ var duration = createDuration(posNegDuration).abs();
4375
+ var seconds = round(duration.as('s'));
4376
+ var minutes = round(duration.as('m'));
4377
+ var hours = round(duration.as('h'));
4378
+ var days = round(duration.as('d'));
4379
+ var months = round(duration.as('M'));
4380
+ var years = round(duration.as('y'));
4381
+
4382
+ var a = seconds <= thresholds.ss && ['s', seconds] ||
4383
+ seconds < thresholds.s && ['ss', seconds] ||
4384
+ minutes <= 1 && ['m'] ||
4385
+ minutes < thresholds.m && ['mm', minutes] ||
4386
+ hours <= 1 && ['h'] ||
4387
+ hours < thresholds.h && ['hh', hours] ||
4388
+ days <= 1 && ['d'] ||
4389
+ days < thresholds.d && ['dd', days] ||
4390
+ months <= 1 && ['M'] ||
4391
+ months < thresholds.M && ['MM', months] ||
4392
+ years <= 1 && ['y'] || ['yy', years];
4393
+
4394
+ a[2] = withoutSuffix;
4395
+ a[3] = +posNegDuration > 0;
4396
+ a[4] = locale;
4397
+ return substituteTimeAgo.apply(null, a);
4398
+ }
4399
+
4400
+ // This function allows you to set the rounding function for relative time strings
4401
+ function getSetRelativeTimeRounding (roundingFunction) {
4402
+ if (roundingFunction === undefined) {
4403
+ return round;
4404
+ }
4405
+ if (typeof(roundingFunction) === 'function') {
4406
+ round = roundingFunction;
4407
+ return true;
4408
+ }
4409
+ return false;
4410
+ }
4411
+
4412
+ // This function allows you to set a threshold for relative time strings
4413
+ function getSetRelativeTimeThreshold (threshold, limit) {
4414
+ if (thresholds[threshold] === undefined) {
4415
+ return false;
4416
+ }
4417
+ if (limit === undefined) {
4418
+ return thresholds[threshold];
4419
+ }
4420
+ thresholds[threshold] = limit;
4421
+ if (threshold === 's') {
4422
+ thresholds.ss = limit - 1;
4423
+ }
4424
+ return true;
4425
+ }
4426
+
4427
+ function humanize (withSuffix) {
4428
+ if (!this.isValid()) {
4429
+ return this.localeData().invalidDate();
4430
+ }
4431
+
4432
+ var locale = this.localeData();
4433
+ var output = relativeTime$1(this, !withSuffix, locale);
4434
+
4435
+ if (withSuffix) {
4436
+ output = locale.pastFuture(+this, output);
4437
+ }
4438
+
4439
+ return locale.postformat(output);
4440
+ }
4441
+
4442
+ var abs$1 = Math.abs;
4443
+
4444
+ function sign(x) {
4445
+ return ((x > 0) - (x < 0)) || +x;
4446
+ }
4447
+
4448
+ function toISOString$1() {
4449
+ // for ISO strings we do not use the normal bubbling rules:
4450
+ // * milliseconds bubble up until they become hours
4451
+ // * days do not bubble at all
4452
+ // * months bubble up until they become years
4453
+ // This is because there is no context-free conversion between hours and days
4454
+ // (think of clock changes)
4455
+ // and also not between days and months (28-31 days per month)
4456
+ if (!this.isValid()) {
4457
+ return this.localeData().invalidDate();
4458
+ }
4459
+
4460
+ var seconds = abs$1(this._milliseconds) / 1000;
4461
+ var days = abs$1(this._days);
4462
+ var months = abs$1(this._months);
4463
+ var minutes, hours, years;
4464
+
4465
+ // 3600 seconds -> 60 minutes -> 1 hour
4466
+ minutes = absFloor(seconds / 60);
4467
+ hours = absFloor(minutes / 60);
4468
+ seconds %= 60;
4469
+ minutes %= 60;
4470
+
4471
+ // 12 months -> 1 year
4472
+ years = absFloor(months / 12);
4473
+ months %= 12;
4474
+
4475
+
4476
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
4477
+ var Y = years;
4478
+ var M = months;
4479
+ var D = days;
4480
+ var h = hours;
4481
+ var m = minutes;
4482
+ var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
4483
+ var total = this.asSeconds();
4484
+
4485
+ if (!total) {
4486
+ // this is the same as C#'s (Noda) and python (isodate)...
4487
+ // but not other JS (goog.date)
4488
+ return 'P0D';
4489
+ }
4490
+
4491
+ var totalSign = total < 0 ? '-' : '';
4492
+ var ymSign = sign(this._months) !== sign(total) ? '-' : '';
4493
+ var daysSign = sign(this._days) !== sign(total) ? '-' : '';
4494
+ var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
4495
+
4496
+ return totalSign + 'P' +
4497
+ (Y ? ymSign + Y + 'Y' : '') +
4498
+ (M ? ymSign + M + 'M' : '') +
4499
+ (D ? daysSign + D + 'D' : '') +
4500
+ ((h || m || s) ? 'T' : '') +
4501
+ (h ? hmsSign + h + 'H' : '') +
4502
+ (m ? hmsSign + m + 'M' : '') +
4503
+ (s ? hmsSign + s + 'S' : '');
4504
+ }
4505
+
4506
+ var proto$2 = Duration.prototype;
4507
+
4508
+ proto$2.isValid = isValid$1;
4509
+ proto$2.abs = abs;
4510
+ proto$2.add = add$1;
4511
+ proto$2.subtract = subtract$1;
4512
+ proto$2.as = as;
4513
+ proto$2.asMilliseconds = asMilliseconds;
4514
+ proto$2.asSeconds = asSeconds;
4515
+ proto$2.asMinutes = asMinutes;
4516
+ proto$2.asHours = asHours;
4517
+ proto$2.asDays = asDays;
4518
+ proto$2.asWeeks = asWeeks;
4519
+ proto$2.asMonths = asMonths;
4520
+ proto$2.asYears = asYears;
4521
+ proto$2.valueOf = valueOf$1;
4522
+ proto$2._bubble = bubble;
4523
+ proto$2.clone = clone$1;
4524
+ proto$2.get = get$2;
4525
+ proto$2.milliseconds = milliseconds;
4526
+ proto$2.seconds = seconds;
4527
+ proto$2.minutes = minutes;
4528
+ proto$2.hours = hours;
4529
+ proto$2.days = days;
4530
+ proto$2.weeks = weeks;
4531
+ proto$2.months = months;
4532
+ proto$2.years = years;
4533
+ proto$2.humanize = humanize;
4534
+ proto$2.toISOString = toISOString$1;
4535
+ proto$2.toString = toISOString$1;
4536
+ proto$2.toJSON = toISOString$1;
4537
+ proto$2.locale = locale;
4538
+ proto$2.localeData = localeData;
4539
+
4540
+ proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
4541
+ proto$2.lang = lang;
4542
+
4543
+ // Side effect imports
4544
+
4545
+ // FORMATTING
4546
+
4547
+ addFormatToken('X', 0, 0, 'unix');
4548
+ addFormatToken('x', 0, 0, 'valueOf');
4549
+
4550
+ // PARSING
4551
+
4552
+ addRegexToken('x', matchSigned);
4553
+ addRegexToken('X', matchTimestamp);
4554
+ addParseToken('X', function (input, array, config) {
4555
+ config._d = new Date(parseFloat(input, 10) * 1000);
4556
+ });
4557
+ addParseToken('x', function (input, array, config) {
4558
+ config._d = new Date(toInt(input));
4559
+ });
4560
+
4561
+ // Side effect imports
4562
+
4563
+
4564
+ hooks.version = '2.23.0';
4565
+
4566
+ setHookCallback(createLocal);
4567
+
4568
+ hooks.fn = proto;
4569
+ hooks.min = min;
4570
+ hooks.max = max;
4571
+ hooks.now = now;
4572
+ hooks.utc = createUTC;
4573
+ hooks.unix = createUnix;
4574
+ hooks.months = listMonths;
4575
+ hooks.isDate = isDate;
4576
+ hooks.locale = getSetGlobalLocale;
4577
+ hooks.invalid = createInvalid;
4578
+ hooks.duration = createDuration;
4579
+ hooks.isMoment = isMoment;
4580
+ hooks.weekdays = listWeekdays;
4581
+ hooks.parseZone = createInZone;
4582
+ hooks.localeData = getLocale;
4583
+ hooks.isDuration = isDuration;
4584
+ hooks.monthsShort = listMonthsShort;
4585
+ hooks.weekdaysMin = listWeekdaysMin;
4586
+ hooks.defineLocale = defineLocale;
4587
+ hooks.updateLocale = updateLocale;
4588
+ hooks.locales = listLocales;
4589
+ hooks.weekdaysShort = listWeekdaysShort;
4590
+ hooks.normalizeUnits = normalizeUnits;
4591
+ hooks.relativeTimeRounding = getSetRelativeTimeRounding;
4592
+ hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
4593
+ hooks.calendarFormat = getCalendarFormat;
4594
+ hooks.prototype = proto;
4595
+
4596
+ // currently HTML5 input type only supports 24-hour formats
4597
+ hooks.HTML5_FMT = {
4598
+ DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
4599
+ DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
4600
+ DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
4601
+ DATE: 'YYYY-MM-DD', // <input type="date" />
4602
+ TIME: 'HH:mm', // <input type="time" />
4603
+ TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
4604
+ TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
4605
+ WEEK: 'GGGG-[W]WW', // <input type="week" />
4606
+ MONTH: 'YYYY-MM' // <input type="month" />
4607
+ };
4608
+
4609
+ return hooks;
4610
+
4611
+ })));
4612
+
4613
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(106)(module)))
4614
+
4615
+ /***/ }),
4616
+ /* 2 */
4617
+ /***/ (function(module, exports, __webpack_require__) {
4618
+
4619
+ /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
4620
+ * @license
4621
+ * Lodash <https://lodash.com/>
4622
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
4623
+ * Released under MIT license <https://lodash.com/license>
4624
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
4625
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4626
+ */
4627
+ ;(function() {
4628
+
4629
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
4630
+ var undefined;
4631
+
4632
+ /** Used as the semantic version number. */
4633
+ var VERSION = '4.17.11';
4634
+
4635
+ /** Used as the size to enable large array optimizations. */
4636
+ var LARGE_ARRAY_SIZE = 200;
4637
+
4638
+ /** Error message constants. */
4639
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
4640
+ FUNC_ERROR_TEXT = 'Expected a function';
4641
+
4642
+ /** Used to stand-in for `undefined` hash values. */
4643
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
4644
+
4645
+ /** Used as the maximum memoize cache size. */
4646
+ var MAX_MEMOIZE_SIZE = 500;
4647
+
4648
+ /** Used as the internal argument placeholder. */
4649
+ var PLACEHOLDER = '__lodash_placeholder__';
4650
+
4651
+ /** Used to compose bitmasks for cloning. */
4652
+ var CLONE_DEEP_FLAG = 1,
4653
+ CLONE_FLAT_FLAG = 2,
4654
+ CLONE_SYMBOLS_FLAG = 4;
4655
+
4656
+ /** Used to compose bitmasks for value comparisons. */
4657
+ var COMPARE_PARTIAL_FLAG = 1,
4658
+ COMPARE_UNORDERED_FLAG = 2;
4659
+
4660
+ /** Used to compose bitmasks for function metadata. */
4661
+ var WRAP_BIND_FLAG = 1,
4662
+ WRAP_BIND_KEY_FLAG = 2,
4663
+ WRAP_CURRY_BOUND_FLAG = 4,
4664
+ WRAP_CURRY_FLAG = 8,
4665
+ WRAP_CURRY_RIGHT_FLAG = 16,
4666
+ WRAP_PARTIAL_FLAG = 32,
4667
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
4668
+ WRAP_ARY_FLAG = 128,
4669
+ WRAP_REARG_FLAG = 256,
4670
+ WRAP_FLIP_FLAG = 512;
4671
+
4672
+ /** Used as default options for `_.truncate`. */
4673
+ var DEFAULT_TRUNC_LENGTH = 30,
4674
+ DEFAULT_TRUNC_OMISSION = '...';
4675
+
4676
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
4677
+ var HOT_COUNT = 800,
4678
+ HOT_SPAN = 16;
4679
+
4680
+ /** Used to indicate the type of lazy iteratees. */
4681
+ var LAZY_FILTER_FLAG = 1,
4682
+ LAZY_MAP_FLAG = 2,
4683
+ LAZY_WHILE_FLAG = 3;
4684
+
4685
+ /** Used as references for various `Number` constants. */
4686
+ var INFINITY = 1 / 0,
4687
+ MAX_SAFE_INTEGER = 9007199254740991,
4688
+ MAX_INTEGER = 1.7976931348623157e+308,
4689
+ NAN = 0 / 0;
4690
+
4691
+ /** Used as references for the maximum length and index of an array. */
4692
+ var MAX_ARRAY_LENGTH = 4294967295,
4693
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
4694
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
4695
+
4696
+ /** Used to associate wrap methods with their bit flags. */
4697
+ var wrapFlags = [
4698
+ ['ary', WRAP_ARY_FLAG],
4699
+ ['bind', WRAP_BIND_FLAG],
4700
+ ['bindKey', WRAP_BIND_KEY_FLAG],
4701
+ ['curry', WRAP_CURRY_FLAG],
4702
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
4703
+ ['flip', WRAP_FLIP_FLAG],
4704
+ ['partial', WRAP_PARTIAL_FLAG],
4705
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
4706
+ ['rearg', WRAP_REARG_FLAG]
4707
+ ];
4708
+
4709
+ /** `Object#toString` result references. */
4710
+ var argsTag = '[object Arguments]',
4711
+ arrayTag = '[object Array]',
4712
+ asyncTag = '[object AsyncFunction]',
4713
+ boolTag = '[object Boolean]',
4714
+ dateTag = '[object Date]',
4715
+ domExcTag = '[object DOMException]',
4716
+ errorTag = '[object Error]',
4717
+ funcTag = '[object Function]',
4718
+ genTag = '[object GeneratorFunction]',
4719
+ mapTag = '[object Map]',
4720
+ numberTag = '[object Number]',
4721
+ nullTag = '[object Null]',
4722
+ objectTag = '[object Object]',
4723
+ promiseTag = '[object Promise]',
4724
+ proxyTag = '[object Proxy]',
4725
+ regexpTag = '[object RegExp]',
4726
+ setTag = '[object Set]',
4727
+ stringTag = '[object String]',
4728
+ symbolTag = '[object Symbol]',
4729
+ undefinedTag = '[object Undefined]',
4730
+ weakMapTag = '[object WeakMap]',
4731
+ weakSetTag = '[object WeakSet]';
4732
+
4733
+ var arrayBufferTag = '[object ArrayBuffer]',
4734
+ dataViewTag = '[object DataView]',
4735
+ float32Tag = '[object Float32Array]',
4736
+ float64Tag = '[object Float64Array]',
4737
+ int8Tag = '[object Int8Array]',
4738
+ int16Tag = '[object Int16Array]',
4739
+ int32Tag = '[object Int32Array]',
4740
+ uint8Tag = '[object Uint8Array]',
4741
+ uint8ClampedTag = '[object Uint8ClampedArray]',
4742
+ uint16Tag = '[object Uint16Array]',
4743
+ uint32Tag = '[object Uint32Array]';
4744
+
4745
+ /** Used to match empty string literals in compiled template source. */
4746
+ var reEmptyStringLeading = /\b__p \+= '';/g,
4747
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
4748
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
4749
+
4750
+ /** Used to match HTML entities and HTML characters. */
4751
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
4752
+ reUnescapedHtml = /[&<>"']/g,
4753
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
4754
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
4755
+
4756
+ /** Used to match template delimiters. */
4757
+ var reEscape = /<%-([\s\S]+?)%>/g,
4758
+ reEvaluate = /<%([\s\S]+?)%>/g,
4759
+ reInterpolate = /<%=([\s\S]+?)%>/g;
4760
+
4761
+ /** Used to match property names within property paths. */
4762
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
4763
+ reIsPlainProp = /^\w*$/,
4764
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
4765
+
4766
+ /**
4767
+ * Used to match `RegExp`
4768
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
4769
+ */
4770
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
4771
+ reHasRegExpChar = RegExp(reRegExpChar.source);
4772
+
4773
+ /** Used to match leading and trailing whitespace. */
4774
+ var reTrim = /^\s+|\s+$/g,
4775
+ reTrimStart = /^\s+/,
4776
+ reTrimEnd = /\s+$/;
4777
+
4778
+ /** Used to match wrap detail comments. */
4779
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
4780
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
4781
+ reSplitDetails = /,? & /;
4782
+
4783
+ /** Used to match words composed of alphanumeric characters. */
4784
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
4785
+
4786
+ /** Used to match backslashes in property paths. */
4787
+ var reEscapeChar = /\\(\\)?/g;
4788
+
4789
+ /**
4790
+ * Used to match
4791
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
4792
+ */
4793
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
4794
+
4795
+ /** Used to match `RegExp` flags from their coerced string values. */
4796
+ var reFlags = /\w*$/;
4797
+
4798
+ /** Used to detect bad signed hexadecimal string values. */
4799
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4800
+
4801
+ /** Used to detect binary string values. */
4802
+ var reIsBinary = /^0b[01]+$/i;
4803
+
4804
+ /** Used to detect host constructors (Safari). */
4805
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
4806
+
4807
+ /** Used to detect octal string values. */
4808
+ var reIsOctal = /^0o[0-7]+$/i;
4809
+
4810
+ /** Used to detect unsigned integer values. */
4811
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
4812
+
4813
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
4814
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
4815
+
4816
+ /** Used to ensure capturing order of template delimiters. */
4817
+ var reNoMatch = /($^)/;
4818
+
4819
+ /** Used to match unescaped characters in compiled string literals. */
4820
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
4821
+
4822
+ /** Used to compose unicode character classes. */
4823
+ var rsAstralRange = '\\ud800-\\udfff',
4824
+ rsComboMarksRange = '\\u0300-\\u036f',
4825
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
4826
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
4827
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
4828
+ rsDingbatRange = '\\u2700-\\u27bf',
4829
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
4830
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
4831
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
4832
+ rsPunctuationRange = '\\u2000-\\u206f',
4833
+ 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',
4834
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
4835
+ rsVarRange = '\\ufe0e\\ufe0f',
4836
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
4837
+
4838
+ /** Used to compose unicode capture groups. */
4839
+ var rsApos = "['\u2019]",
4840
+ rsAstral = '[' + rsAstralRange + ']',
4841
+ rsBreak = '[' + rsBreakRange + ']',
4842
+ rsCombo = '[' + rsComboRange + ']',
4843
+ rsDigits = '\\d+',
4844
+ rsDingbat = '[' + rsDingbatRange + ']',
4845
+ rsLower = '[' + rsLowerRange + ']',
4846
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
4847
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
4848
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
4849
+ rsNonAstral = '[^' + rsAstralRange + ']',
4850
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
4851
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
4852
+ rsUpper = '[' + rsUpperRange + ']',
4853
+ rsZWJ = '\\u200d';
4854
+
4855
+ /** Used to compose unicode regexes. */
4856
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
4857
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
4858
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
4859
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
4860
+ reOptMod = rsModifier + '?',
4861
+ rsOptVar = '[' + rsVarRange + ']?',
4862
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
4863
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
4864
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
4865
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
4866
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
4867
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
4868
+
4869
+ /** Used to match apostrophes. */
4870
+ var reApos = RegExp(rsApos, 'g');
4871
+
4872
+ /**
4873
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
4874
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
4875
+ */
4876
+ var reComboMark = RegExp(rsCombo, 'g');
4877
+
4878
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
4879
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
4880
+
4881
+ /** Used to match complex or compound words. */
4882
+ var reUnicodeWord = RegExp([
4883
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
4884
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
4885
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
4886
+ rsUpper + '+' + rsOptContrUpper,
4887
+ rsOrdUpper,
4888
+ rsOrdLower,
4889
+ rsDigits,
4890
+ rsEmoji
4891
+ ].join('|'), 'g');
4892
+
4893
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
4894
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
4895
+
4896
+ /** Used to detect strings that need a more robust regexp to match words. */
4897
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
4898
+
4899
+ /** Used to assign default `context` object properties. */
4900
+ var contextProps = [
4901
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
4902
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
4903
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
4904
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
4905
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
4906
+ ];
4907
+
4908
+ /** Used to make template sourceURLs easier to identify. */
4909
+ var templateCounter = -1;
4910
+
4911
+ /** Used to identify `toStringTag` values of typed arrays. */
4912
+ var typedArrayTags = {};
4913
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
4914
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
4915
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
4916
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
4917
+ typedArrayTags[uint32Tag] = true;
4918
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
4919
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
4920
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
4921
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
4922
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
4923
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
4924
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
4925
+ typedArrayTags[weakMapTag] = false;
4926
+
4927
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
4928
+ var cloneableTags = {};
4929
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
4930
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
4931
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
4932
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
4933
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
4934
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
4935
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
4936
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
4937
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
4938
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
4939
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
4940
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
4941
+ cloneableTags[weakMapTag] = false;
4942
+
4943
+ /** Used to map Latin Unicode letters to basic Latin letters. */
4944
+ var deburredLetters = {
4945
+ // Latin-1 Supplement block.
4946
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
4947
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
4948
+ '\xc7': 'C', '\xe7': 'c',
4949
+ '\xd0': 'D', '\xf0': 'd',
4950
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
4951
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
4952
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
4953
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
4954
+ '\xd1': 'N', '\xf1': 'n',
4955
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
4956
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
4957
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
4958
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
4959
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
4960
+ '\xc6': 'Ae', '\xe6': 'ae',
4961
+ '\xde': 'Th', '\xfe': 'th',
4962
+ '\xdf': 'ss',
4963
+ // Latin Extended-A block.
4964
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
4965
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
4966
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
4967
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
4968
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
4969
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
4970
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
4971
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
4972
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
4973
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
4974
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
4975
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
4976
+ '\u0134': 'J', '\u0135': 'j',
4977
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
4978
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
4979
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
4980
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
4981
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
4982
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
4983
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
4984
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
4985
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
4986
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
4987
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
4988
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
4989
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
4990
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
4991
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
4992
+ '\u0174': 'W', '\u0175': 'w',
4993
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
4994
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
4995
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
4996
+ '\u0132': 'IJ', '\u0133': 'ij',
4997
+ '\u0152': 'Oe', '\u0153': 'oe',
4998
+ '\u0149': "'n", '\u017f': 's'
4999
+ };
5000
+
5001
+ /** Used to map characters to HTML entities. */
5002
+ var htmlEscapes = {
5003
+ '&': '&amp;',
5004
+ '<': '&lt;',
5005
+ '>': '&gt;',
5006
+ '"': '&quot;',
5007
+ "'": '&#39;'
5008
+ };
5009
+
5010
+ /** Used to map HTML entities to characters. */
5011
+ var htmlUnescapes = {
5012
+ '&amp;': '&',
5013
+ '&lt;': '<',
5014
+ '&gt;': '>',
5015
+ '&quot;': '"',
5016
+ '&#39;': "'"
5017
+ };
5018
+
5019
+ /** Used to escape characters for inclusion in compiled string literals. */
5020
+ var stringEscapes = {
5021
+ '\\': '\\',
5022
+ "'": "'",
5023
+ '\n': 'n',
5024
+ '\r': 'r',
5025
+ '\u2028': 'u2028',
5026
+ '\u2029': 'u2029'
5027
+ };
5028
+
5029
+ /** Built-in method references without a dependency on `root`. */
5030
+ var freeParseFloat = parseFloat,
5031
+ freeParseInt = parseInt;
5032
+
5033
+ /** Detect free variable `global` from Node.js. */
5034
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5035
+
5036
+ /** Detect free variable `self`. */
5037
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
5038
+
5039
+ /** Used as a reference to the global object. */
5040
+ var root = freeGlobal || freeSelf || Function('return this')();
5041
+
5042
+ /** Detect free variable `exports`. */
5043
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
5044
+
5045
+ /** Detect free variable `module`. */
5046
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
5047
+
5048
+ /** Detect the popular CommonJS extension `module.exports`. */
5049
+ var moduleExports = freeModule && freeModule.exports === freeExports;
5050
+
5051
+ /** Detect free variable `process` from Node.js. */
5052
+ var freeProcess = moduleExports && freeGlobal.process;
5053
+
5054
+ /** Used to access faster Node.js helpers. */
5055
+ var nodeUtil = (function() {
5056
+ try {
5057
+ // Use `util.types` for Node.js 10+.
5058
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
5059
+
5060
+ if (types) {
5061
+ return types;
5062
+ }
5063
+
5064
+ // Legacy `process.binding('util')` for Node.js < 10.
5065
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
5066
+ } catch (e) {}
5067
+ }());
5068
+
5069
+ /* Node.js helper references. */
5070
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
5071
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
5072
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
5073
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
5074
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
5075
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
5076
+
5077
+ /*--------------------------------------------------------------------------*/
5078
+
5079
+ /**
5080
+ * A faster alternative to `Function#apply`, this function invokes `func`
5081
+ * with the `this` binding of `thisArg` and the arguments of `args`.
5082
+ *
5083
+ * @private
5084
+ * @param {Function} func The function to invoke.
5085
+ * @param {*} thisArg The `this` binding of `func`.
5086
+ * @param {Array} args The arguments to invoke `func` with.
5087
+ * @returns {*} Returns the result of `func`.
5088
+ */
5089
+ function apply(func, thisArg, args) {
5090
+ switch (args.length) {
5091
+ case 0: return func.call(thisArg);
5092
+ case 1: return func.call(thisArg, args[0]);
5093
+ case 2: return func.call(thisArg, args[0], args[1]);
5094
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
5095
+ }
5096
+ return func.apply(thisArg, args);
5097
+ }
5098
+
5099
+ /**
5100
+ * A specialized version of `baseAggregator` for arrays.
5101
+ *
5102
+ * @private
5103
+ * @param {Array} [array] The array to iterate over.
5104
+ * @param {Function} setter The function to set `accumulator` values.
5105
+ * @param {Function} iteratee The iteratee to transform keys.
5106
+ * @param {Object} accumulator The initial aggregated object.
5107
+ * @returns {Function} Returns `accumulator`.
5108
+ */
5109
+ function arrayAggregator(array, setter, iteratee, accumulator) {
5110
+ var index = -1,
5111
+ length = array == null ? 0 : array.length;
5112
+
5113
+ while (++index < length) {
5114
+ var value = array[index];
5115
+ setter(accumulator, value, iteratee(value), array);
5116
+ }
5117
+ return accumulator;
5118
+ }
5119
+
5120
+ /**
5121
+ * A specialized version of `_.forEach` for arrays without support for
5122
+ * iteratee shorthands.
5123
+ *
5124
+ * @private
5125
+ * @param {Array} [array] The array to iterate over.
5126
+ * @param {Function} iteratee The function invoked per iteration.
5127
+ * @returns {Array} Returns `array`.
5128
+ */
5129
+ function arrayEach(array, iteratee) {
5130
+ var index = -1,
5131
+ length = array == null ? 0 : array.length;
5132
+
5133
+ while (++index < length) {
5134
+ if (iteratee(array[index], index, array) === false) {
5135
+ break;
5136
+ }
5137
+ }
5138
+ return array;
5139
+ }
5140
+
5141
+ /**
5142
+ * A specialized version of `_.forEachRight` for arrays without support for
5143
+ * iteratee shorthands.
5144
+ *
5145
+ * @private
5146
+ * @param {Array} [array] The array to iterate over.
5147
+ * @param {Function} iteratee The function invoked per iteration.
5148
+ * @returns {Array} Returns `array`.
5149
+ */
5150
+ function arrayEachRight(array, iteratee) {
5151
+ var length = array == null ? 0 : array.length;
5152
+
5153
+ while (length--) {
5154
+ if (iteratee(array[length], length, array) === false) {
5155
+ break;
5156
+ }
5157
+ }
5158
+ return array;
5159
+ }
5160
+
5161
+ /**
5162
+ * A specialized version of `_.every` for arrays without support for
5163
+ * iteratee shorthands.
5164
+ *
5165
+ * @private
5166
+ * @param {Array} [array] The array to iterate over.
5167
+ * @param {Function} predicate The function invoked per iteration.
5168
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
5169
+ * else `false`.
5170
+ */
5171
+ function arrayEvery(array, predicate) {
5172
+ var index = -1,
5173
+ length = array == null ? 0 : array.length;
5174
+
5175
+ while (++index < length) {
5176
+ if (!predicate(array[index], index, array)) {
5177
+ return false;
5178
+ }
5179
+ }
5180
+ return true;
5181
+ }
5182
+
5183
+ /**
5184
+ * A specialized version of `_.filter` for arrays without support for
5185
+ * iteratee shorthands.
5186
+ *
5187
+ * @private
5188
+ * @param {Array} [array] The array to iterate over.
5189
+ * @param {Function} predicate The function invoked per iteration.
5190
+ * @returns {Array} Returns the new filtered array.
5191
+ */
5192
+ function arrayFilter(array, predicate) {
5193
+ var index = -1,
5194
+ length = array == null ? 0 : array.length,
5195
+ resIndex = 0,
5196
+ result = [];
5197
+
5198
+ while (++index < length) {
5199
+ var value = array[index];
5200
+ if (predicate(value, index, array)) {
5201
+ result[resIndex++] = value;
5202
+ }
5203
+ }
5204
+ return result;
5205
+ }
5206
+
5207
+ /**
5208
+ * A specialized version of `_.includes` for arrays without support for
5209
+ * specifying an index to search from.
5210
+ *
5211
+ * @private
5212
+ * @param {Array} [array] The array to inspect.
5213
+ * @param {*} target The value to search for.
5214
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
5215
+ */
5216
+ function arrayIncludes(array, value) {
5217
+ var length = array == null ? 0 : array.length;
5218
+ return !!length && baseIndexOf(array, value, 0) > -1;
5219
+ }
5220
+
5221
+ /**
5222
+ * This function is like `arrayIncludes` except that it accepts a comparator.
5223
+ *
5224
+ * @private
5225
+ * @param {Array} [array] The array to inspect.
5226
+ * @param {*} target The value to search for.
5227
+ * @param {Function} comparator The comparator invoked per element.
5228
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
5229
+ */
5230
+ function arrayIncludesWith(array, value, comparator) {
5231
+ var index = -1,
5232
+ length = array == null ? 0 : array.length;
5233
+
5234
+ while (++index < length) {
5235
+ if (comparator(value, array[index])) {
5236
+ return true;
5237
+ }
5238
+ }
5239
+ return false;
5240
+ }
5241
+
5242
+ /**
5243
+ * A specialized version of `_.map` for arrays without support for iteratee
5244
+ * shorthands.
5245
+ *
5246
+ * @private
5247
+ * @param {Array} [array] The array to iterate over.
5248
+ * @param {Function} iteratee The function invoked per iteration.
5249
+ * @returns {Array} Returns the new mapped array.
5250
+ */
5251
+ function arrayMap(array, iteratee) {
5252
+ var index = -1,
5253
+ length = array == null ? 0 : array.length,
5254
+ result = Array(length);
5255
+
5256
+ while (++index < length) {
5257
+ result[index] = iteratee(array[index], index, array);
5258
+ }
5259
+ return result;
5260
+ }
5261
+
5262
+ /**
5263
+ * Appends the elements of `values` to `array`.
5264
+ *
5265
+ * @private
5266
+ * @param {Array} array The array to modify.
5267
+ * @param {Array} values The values to append.
5268
+ * @returns {Array} Returns `array`.
5269
+ */
5270
+ function arrayPush(array, values) {
5271
+ var index = -1,
5272
+ length = values.length,
5273
+ offset = array.length;
5274
+
5275
+ while (++index < length) {
5276
+ array[offset + index] = values[index];
5277
+ }
5278
+ return array;
5279
+ }
5280
+
5281
+ /**
5282
+ * A specialized version of `_.reduce` for arrays without support for
5283
+ * iteratee shorthands.
5284
+ *
5285
+ * @private
5286
+ * @param {Array} [array] The array to iterate over.
5287
+ * @param {Function} iteratee The function invoked per iteration.
5288
+ * @param {*} [accumulator] The initial value.
5289
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
5290
+ * the initial value.
5291
+ * @returns {*} Returns the accumulated value.
5292
+ */
5293
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
5294
+ var index = -1,
5295
+ length = array == null ? 0 : array.length;
5296
+
5297
+ if (initAccum && length) {
5298
+ accumulator = array[++index];
5299
+ }
5300
+ while (++index < length) {
5301
+ accumulator = iteratee(accumulator, array[index], index, array);
5302
+ }
5303
+ return accumulator;
5304
+ }
5305
+
5306
+ /**
5307
+ * A specialized version of `_.reduceRight` for arrays without support for
5308
+ * iteratee shorthands.
5309
+ *
5310
+ * @private
5311
+ * @param {Array} [array] The array to iterate over.
5312
+ * @param {Function} iteratee The function invoked per iteration.
5313
+ * @param {*} [accumulator] The initial value.
5314
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
5315
+ * the initial value.
5316
+ * @returns {*} Returns the accumulated value.
5317
+ */
5318
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
5319
+ var length = array == null ? 0 : array.length;
5320
+ if (initAccum && length) {
5321
+ accumulator = array[--length];
5322
+ }
5323
+ while (length--) {
5324
+ accumulator = iteratee(accumulator, array[length], length, array);
5325
+ }
5326
+ return accumulator;
5327
+ }
5328
+
5329
+ /**
5330
+ * A specialized version of `_.some` for arrays without support for iteratee
5331
+ * shorthands.
5332
+ *
5333
+ * @private
5334
+ * @param {Array} [array] The array to iterate over.
5335
+ * @param {Function} predicate The function invoked per iteration.
5336
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
5337
+ * else `false`.
5338
+ */
5339
+ function arraySome(array, predicate) {
5340
+ var index = -1,
5341
+ length = array == null ? 0 : array.length;
5342
+
5343
+ while (++index < length) {
5344
+ if (predicate(array[index], index, array)) {
5345
+ return true;
5346
+ }
5347
+ }
5348
+ return false;
5349
+ }
5350
+
5351
+ /**
5352
+ * Gets the size of an ASCII `string`.
5353
+ *
5354
+ * @private
5355
+ * @param {string} string The string inspect.
5356
+ * @returns {number} Returns the string size.
5357
+ */
5358
+ var asciiSize = baseProperty('length');
5359
+
5360
+ /**
5361
+ * Converts an ASCII `string` to an array.
5362
+ *
5363
+ * @private
5364
+ * @param {string} string The string to convert.
5365
+ * @returns {Array} Returns the converted array.
5366
+ */
5367
+ function asciiToArray(string) {
5368
+ return string.split('');
5369
+ }
5370
+
5371
+ /**
5372
+ * Splits an ASCII `string` into an array of its words.
5373
+ *
5374
+ * @private
5375
+ * @param {string} The string to inspect.
5376
+ * @returns {Array} Returns the words of `string`.
5377
+ */
5378
+ function asciiWords(string) {
5379
+ return string.match(reAsciiWord) || [];
5380
+ }
5381
+
5382
+ /**
5383
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
5384
+ * without support for iteratee shorthands, which iterates over `collection`
5385
+ * using `eachFunc`.
5386
+ *
5387
+ * @private
5388
+ * @param {Array|Object} collection The collection to inspect.
5389
+ * @param {Function} predicate The function invoked per iteration.
5390
+ * @param {Function} eachFunc The function to iterate over `collection`.
5391
+ * @returns {*} Returns the found element or its key, else `undefined`.
5392
+ */
5393
+ function baseFindKey(collection, predicate, eachFunc) {
5394
+ var result;
5395
+ eachFunc(collection, function(value, key, collection) {
5396
+ if (predicate(value, key, collection)) {
5397
+ result = key;
5398
+ return false;
5399
+ }
5400
+ });
5401
+ return result;
5402
+ }
5403
+
5404
+ /**
5405
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
5406
+ * support for iteratee shorthands.
5407
+ *
5408
+ * @private
5409
+ * @param {Array} array The array to inspect.
5410
+ * @param {Function} predicate The function invoked per iteration.
5411
+ * @param {number} fromIndex The index to search from.
5412
+ * @param {boolean} [fromRight] Specify iterating from right to left.
5413
+ * @returns {number} Returns the index of the matched value, else `-1`.
5414
+ */
5415
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
5416
+ var length = array.length,
5417
+ index = fromIndex + (fromRight ? 1 : -1);
5418
+
5419
+ while ((fromRight ? index-- : ++index < length)) {
5420
+ if (predicate(array[index], index, array)) {
5421
+ return index;
5422
+ }
5423
+ }
5424
+ return -1;
5425
+ }
5426
+
5427
+ /**
5428
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
5429
+ *
5430
+ * @private
5431
+ * @param {Array} array The array to inspect.
5432
+ * @param {*} value The value to search for.
5433
+ * @param {number} fromIndex The index to search from.
5434
+ * @returns {number} Returns the index of the matched value, else `-1`.
5435
+ */
5436
+ function baseIndexOf(array, value, fromIndex) {
5437
+ return value === value
5438
+ ? strictIndexOf(array, value, fromIndex)
5439
+ : baseFindIndex(array, baseIsNaN, fromIndex);
5440
+ }
5441
+
5442
+ /**
5443
+ * This function is like `baseIndexOf` except that it accepts a comparator.
5444
+ *
5445
+ * @private
5446
+ * @param {Array} array The array to inspect.
5447
+ * @param {*} value The value to search for.
5448
+ * @param {number} fromIndex The index to search from.
5449
+ * @param {Function} comparator The comparator invoked per element.
5450
+ * @returns {number} Returns the index of the matched value, else `-1`.
5451
+ */
5452
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
5453
+ var index = fromIndex - 1,
5454
+ length = array.length;
5455
+
5456
+ while (++index < length) {
5457
+ if (comparator(array[index], value)) {
5458
+ return index;
5459
+ }
5460
+ }
5461
+ return -1;
5462
+ }
5463
+
5464
+ /**
5465
+ * The base implementation of `_.isNaN` without support for number objects.
5466
+ *
5467
+ * @private
5468
+ * @param {*} value The value to check.
5469
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
5470
+ */
5471
+ function baseIsNaN(value) {
5472
+ return value !== value;
5473
+ }
5474
+
5475
+ /**
5476
+ * The base implementation of `_.mean` and `_.meanBy` without support for
5477
+ * iteratee shorthands.
5478
+ *
5479
+ * @private
5480
+ * @param {Array} array The array to iterate over.
5481
+ * @param {Function} iteratee The function invoked per iteration.
5482
+ * @returns {number} Returns the mean.
5483
+ */
5484
+ function baseMean(array, iteratee) {
5485
+ var length = array == null ? 0 : array.length;
5486
+ return length ? (baseSum(array, iteratee) / length) : NAN;
5487
+ }
5488
+
5489
+ /**
5490
+ * The base implementation of `_.property` without support for deep paths.
5491
+ *
5492
+ * @private
5493
+ * @param {string} key The key of the property to get.
5494
+ * @returns {Function} Returns the new accessor function.
5495
+ */
5496
+ function baseProperty(key) {
5497
+ return function(object) {
5498
+ return object == null ? undefined : object[key];
5499
+ };
5500
+ }
5501
+
5502
+ /**
5503
+ * The base implementation of `_.propertyOf` without support for deep paths.
5504
+ *
5505
+ * @private
5506
+ * @param {Object} object The object to query.
5507
+ * @returns {Function} Returns the new accessor function.
5508
+ */
5509
+ function basePropertyOf(object) {
5510
+ return function(key) {
5511
+ return object == null ? undefined : object[key];
5512
+ };
5513
+ }
5514
+
5515
+ /**
5516
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
5517
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
5518
+ *
5519
+ * @private
5520
+ * @param {Array|Object} collection The collection to iterate over.
5521
+ * @param {Function} iteratee The function invoked per iteration.
5522
+ * @param {*} accumulator The initial value.
5523
+ * @param {boolean} initAccum Specify using the first or last element of
5524
+ * `collection` as the initial value.
5525
+ * @param {Function} eachFunc The function to iterate over `collection`.
5526
+ * @returns {*} Returns the accumulated value.
5527
+ */
5528
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
5529
+ eachFunc(collection, function(value, index, collection) {
5530
+ accumulator = initAccum
5531
+ ? (initAccum = false, value)
5532
+ : iteratee(accumulator, value, index, collection);
5533
+ });
5534
+ return accumulator;
5535
+ }
5536
+
5537
+ /**
5538
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
5539
+ * sort order of `array` and replaces criteria objects with their corresponding
5540
+ * values.
5541
+ *
5542
+ * @private
5543
+ * @param {Array} array The array to sort.
5544
+ * @param {Function} comparer The function to define sort order.
5545
+ * @returns {Array} Returns `array`.
5546
+ */
5547
+ function baseSortBy(array, comparer) {
5548
+ var length = array.length;
5549
+
5550
+ array.sort(comparer);
5551
+ while (length--) {
5552
+ array[length] = array[length].value;
5553
+ }
5554
+ return array;
5555
+ }
5556
+
5557
+ /**
5558
+ * The base implementation of `_.sum` and `_.sumBy` without support for
5559
+ * iteratee shorthands.
5560
+ *
5561
+ * @private
5562
+ * @param {Array} array The array to iterate over.
5563
+ * @param {Function} iteratee The function invoked per iteration.
5564
+ * @returns {number} Returns the sum.
5565
+ */
5566
+ function baseSum(array, iteratee) {
5567
+ var result,
5568
+ index = -1,
5569
+ length = array.length;
5570
+
5571
+ while (++index < length) {
5572
+ var current = iteratee(array[index]);
5573
+ if (current !== undefined) {
5574
+ result = result === undefined ? current : (result + current);
5575
+ }
5576
+ }
5577
+ return result;
5578
+ }
5579
+
5580
+ /**
5581
+ * The base implementation of `_.times` without support for iteratee shorthands
5582
+ * or max array length checks.
5583
+ *
5584
+ * @private
5585
+ * @param {number} n The number of times to invoke `iteratee`.
5586
+ * @param {Function} iteratee The function invoked per iteration.
5587
+ * @returns {Array} Returns the array of results.
5588
+ */
5589
+ function baseTimes(n, iteratee) {
5590
+ var index = -1,
5591
+ result = Array(n);
5592
+
5593
+ while (++index < n) {
5594
+ result[index] = iteratee(index);
5595
+ }
5596
+ return result;
5597
+ }
5598
+
5599
+ /**
5600
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
5601
+ * of key-value pairs for `object` corresponding to the property names of `props`.
5602
+ *
5603
+ * @private
5604
+ * @param {Object} object The object to query.
5605
+ * @param {Array} props The property names to get values for.
5606
+ * @returns {Object} Returns the key-value pairs.
5607
+ */
5608
+ function baseToPairs(object, props) {
5609
+ return arrayMap(props, function(key) {
5610
+ return [key, object[key]];
5611
+ });
5612
+ }
5613
+
5614
+ /**
5615
+ * The base implementation of `_.unary` without support for storing metadata.
5616
+ *
5617
+ * @private
5618
+ * @param {Function} func The function to cap arguments for.
5619
+ * @returns {Function} Returns the new capped function.
5620
+ */
5621
+ function baseUnary(func) {
5622
+ return function(value) {
5623
+ return func(value);
5624
+ };
5625
+ }
5626
+
5627
+ /**
5628
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
5629
+ * array of `object` property values corresponding to the property names
5630
+ * of `props`.
5631
+ *
5632
+ * @private
5633
+ * @param {Object} object The object to query.
5634
+ * @param {Array} props The property names to get values for.
5635
+ * @returns {Object} Returns the array of property values.
5636
+ */
5637
+ function baseValues(object, props) {
5638
+ return arrayMap(props, function(key) {
5639
+ return object[key];
5640
+ });
5641
+ }
5642
+
5643
+ /**
5644
+ * Checks if a `cache` value for `key` exists.
5645
+ *
5646
+ * @private
5647
+ * @param {Object} cache The cache to query.
5648
+ * @param {string} key The key of the entry to check.
5649
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
5650
+ */
5651
+ function cacheHas(cache, key) {
5652
+ return cache.has(key);
5653
+ }
5654
+
5655
+ /**
5656
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
5657
+ * that is not found in the character symbols.
5658
+ *
5659
+ * @private
5660
+ * @param {Array} strSymbols The string symbols to inspect.
5661
+ * @param {Array} chrSymbols The character symbols to find.
5662
+ * @returns {number} Returns the index of the first unmatched string symbol.
5663
+ */
5664
+ function charsStartIndex(strSymbols, chrSymbols) {
5665
+ var index = -1,
5666
+ length = strSymbols.length;
5667
+
5668
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
5669
+ return index;
5670
+ }
5671
+
5672
+ /**
5673
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
5674
+ * that is not found in the character symbols.
5675
+ *
5676
+ * @private
5677
+ * @param {Array} strSymbols The string symbols to inspect.
5678
+ * @param {Array} chrSymbols The character symbols to find.
5679
+ * @returns {number} Returns the index of the last unmatched string symbol.
5680
+ */
5681
+ function charsEndIndex(strSymbols, chrSymbols) {
5682
+ var index = strSymbols.length;
5683
+
5684
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
5685
+ return index;
5686
+ }
5687
+
5688
+ /**
5689
+ * Gets the number of `placeholder` occurrences in `array`.
5690
+ *
5691
+ * @private
5692
+ * @param {Array} array The array to inspect.
5693
+ * @param {*} placeholder The placeholder to search for.
5694
+ * @returns {number} Returns the placeholder count.
5695
+ */
5696
+ function countHolders(array, placeholder) {
5697
+ var length = array.length,
5698
+ result = 0;
5699
+
5700
+ while (length--) {
5701
+ if (array[length] === placeholder) {
5702
+ ++result;
5703
+ }
5704
+ }
5705
+ return result;
5706
+ }
5707
+
5708
+ /**
5709
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
5710
+ * letters to basic Latin letters.
5711
+ *
5712
+ * @private
5713
+ * @param {string} letter The matched letter to deburr.
5714
+ * @returns {string} Returns the deburred letter.
5715
+ */
5716
+ var deburrLetter = basePropertyOf(deburredLetters);
5717
+
5718
+ /**
5719
+ * Used by `_.escape` to convert characters to HTML entities.
5720
+ *
5721
+ * @private
5722
+ * @param {string} chr The matched character to escape.
5723
+ * @returns {string} Returns the escaped character.
5724
+ */
5725
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
5726
+
5727
+ /**
5728
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
5729
+ *
5730
+ * @private
5731
+ * @param {string} chr The matched character to escape.
5732
+ * @returns {string} Returns the escaped character.
5733
+ */
5734
+ function escapeStringChar(chr) {
5735
+ return '\\' + stringEscapes[chr];
5736
+ }
5737
+
5738
+ /**
5739
+ * Gets the value at `key` of `object`.
5740
+ *
5741
+ * @private
5742
+ * @param {Object} [object] The object to query.
5743
+ * @param {string} key The key of the property to get.
5744
+ * @returns {*} Returns the property value.
5745
+ */
5746
+ function getValue(object, key) {
5747
+ return object == null ? undefined : object[key];
5748
+ }
5749
+
5750
+ /**
5751
+ * Checks if `string` contains Unicode symbols.
5752
+ *
5753
+ * @private
5754
+ * @param {string} string The string to inspect.
5755
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
5756
+ */
5757
+ function hasUnicode(string) {
5758
+ return reHasUnicode.test(string);
5759
+ }
5760
+
5761
+ /**
5762
+ * Checks if `string` contains a word composed of Unicode symbols.
5763
+ *
5764
+ * @private
5765
+ * @param {string} string The string to inspect.
5766
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
5767
+ */
5768
+ function hasUnicodeWord(string) {
5769
+ return reHasUnicodeWord.test(string);
5770
+ }
5771
+
5772
+ /**
5773
+ * Converts `iterator` to an array.
5774
+ *
5775
+ * @private
5776
+ * @param {Object} iterator The iterator to convert.
5777
+ * @returns {Array} Returns the converted array.
5778
+ */
5779
+ function iteratorToArray(iterator) {
5780
+ var data,
5781
+ result = [];
5782
+
5783
+ while (!(data = iterator.next()).done) {
5784
+ result.push(data.value);
5785
+ }
5786
+ return result;
5787
+ }
5788
+
5789
+ /**
5790
+ * Converts `map` to its key-value pairs.
5791
+ *
5792
+ * @private
5793
+ * @param {Object} map The map to convert.
5794
+ * @returns {Array} Returns the key-value pairs.
5795
+ */
5796
+ function mapToArray(map) {
5797
+ var index = -1,
5798
+ result = Array(map.size);
5799
+
5800
+ map.forEach(function(value, key) {
5801
+ result[++index] = [key, value];
5802
+ });
5803
+ return result;
5804
+ }
5805
+
5806
+ /**
5807
+ * Creates a unary function that invokes `func` with its argument transformed.
5808
+ *
5809
+ * @private
5810
+ * @param {Function} func The function to wrap.
5811
+ * @param {Function} transform The argument transform.
5812
+ * @returns {Function} Returns the new function.
5813
+ */
5814
+ function overArg(func, transform) {
5815
+ return function(arg) {
5816
+ return func(transform(arg));
5817
+ };
5818
+ }
5819
+
5820
+ /**
5821
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
5822
+ * and returns an array of their indexes.
5823
+ *
5824
+ * @private
5825
+ * @param {Array} array The array to modify.
5826
+ * @param {*} placeholder The placeholder to replace.
5827
+ * @returns {Array} Returns the new array of placeholder indexes.
5828
+ */
5829
+ function replaceHolders(array, placeholder) {
5830
+ var index = -1,
5831
+ length = array.length,
5832
+ resIndex = 0,
5833
+ result = [];
5834
+
5835
+ while (++index < length) {
5836
+ var value = array[index];
5837
+ if (value === placeholder || value === PLACEHOLDER) {
5838
+ array[index] = PLACEHOLDER;
5839
+ result[resIndex++] = index;
5840
+ }
5841
+ }
5842
+ return result;
5843
+ }
5844
+
5845
+ /**
5846
+ * Converts `set` to an array of its values.
5847
+ *
5848
+ * @private
5849
+ * @param {Object} set The set to convert.
5850
+ * @returns {Array} Returns the values.
5851
+ */
5852
+ function setToArray(set) {
5853
+ var index = -1,
5854
+ result = Array(set.size);
5855
+
5856
+ set.forEach(function(value) {
5857
+ result[++index] = value;
5858
+ });
5859
+ return result;
5860
+ }
5861
+
5862
+ /**
5863
+ * Converts `set` to its value-value pairs.
5864
+ *
5865
+ * @private
5866
+ * @param {Object} set The set to convert.
5867
+ * @returns {Array} Returns the value-value pairs.
5868
+ */
5869
+ function setToPairs(set) {
5870
+ var index = -1,
5871
+ result = Array(set.size);
5872
+
5873
+ set.forEach(function(value) {
5874
+ result[++index] = [value, value];
5875
+ });
5876
+ return result;
5877
+ }
5878
+
5879
+ /**
5880
+ * A specialized version of `_.indexOf` which performs strict equality
5881
+ * comparisons of values, i.e. `===`.
5882
+ *
5883
+ * @private
5884
+ * @param {Array} array The array to inspect.
5885
+ * @param {*} value The value to search for.
5886
+ * @param {number} fromIndex The index to search from.
5887
+ * @returns {number} Returns the index of the matched value, else `-1`.
5888
+ */
5889
+ function strictIndexOf(array, value, fromIndex) {
5890
+ var index = fromIndex - 1,
5891
+ length = array.length;
5892
+
5893
+ while (++index < length) {
5894
+ if (array[index] === value) {
5895
+ return index;
5896
+ }
5897
+ }
5898
+ return -1;
5899
+ }
5900
+
5901
+ /**
5902
+ * A specialized version of `_.lastIndexOf` which performs strict equality
5903
+ * comparisons of values, i.e. `===`.
5904
+ *
5905
+ * @private
5906
+ * @param {Array} array The array to inspect.
5907
+ * @param {*} value The value to search for.
5908
+ * @param {number} fromIndex The index to search from.
5909
+ * @returns {number} Returns the index of the matched value, else `-1`.
5910
+ */
5911
+ function strictLastIndexOf(array, value, fromIndex) {
5912
+ var index = fromIndex + 1;
5913
+ while (index--) {
5914
+ if (array[index] === value) {
5915
+ return index;
5916
+ }
5917
+ }
5918
+ return index;
5919
+ }
5920
+
5921
+ /**
5922
+ * Gets the number of symbols in `string`.
5923
+ *
5924
+ * @private
5925
+ * @param {string} string The string to inspect.
5926
+ * @returns {number} Returns the string size.
5927
+ */
5928
+ function stringSize(string) {
5929
+ return hasUnicode(string)
5930
+ ? unicodeSize(string)
5931
+ : asciiSize(string);
5932
+ }
5933
+
5934
+ /**
5935
+ * Converts `string` to an array.
5936
+ *
5937
+ * @private
5938
+ * @param {string} string The string to convert.
5939
+ * @returns {Array} Returns the converted array.
5940
+ */
5941
+ function stringToArray(string) {
5942
+ return hasUnicode(string)
5943
+ ? unicodeToArray(string)
5944
+ : asciiToArray(string);
5945
+ }
5946
+
5947
+ /**
5948
+ * Used by `_.unescape` to convert HTML entities to characters.
5949
+ *
5950
+ * @private
5951
+ * @param {string} chr The matched character to unescape.
5952
+ * @returns {string} Returns the unescaped character.
5953
+ */
5954
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
5955
+
5956
+ /**
5957
+ * Gets the size of a Unicode `string`.
5958
+ *
5959
+ * @private
5960
+ * @param {string} string The string inspect.
5961
+ * @returns {number} Returns the string size.
5962
+ */
5963
+ function unicodeSize(string) {
5964
+ var result = reUnicode.lastIndex = 0;
5965
+ while (reUnicode.test(string)) {
5966
+ ++result;
5967
+ }
5968
+ return result;
5969
+ }
5970
+
5971
+ /**
5972
+ * Converts a Unicode `string` to an array.
5973
+ *
5974
+ * @private
5975
+ * @param {string} string The string to convert.
5976
+ * @returns {Array} Returns the converted array.
5977
+ */
5978
+ function unicodeToArray(string) {
5979
+ return string.match(reUnicode) || [];
5980
+ }
5981
+
5982
+ /**
5983
+ * Splits a Unicode `string` into an array of its words.
5984
+ *
5985
+ * @private
5986
+ * @param {string} The string to inspect.
5987
+ * @returns {Array} Returns the words of `string`.
5988
+ */
5989
+ function unicodeWords(string) {
5990
+ return string.match(reUnicodeWord) || [];
5991
+ }
5992
+
5993
+ /*--------------------------------------------------------------------------*/
5994
+
5995
+ /**
5996
+ * Create a new pristine `lodash` function using the `context` object.
5997
+ *
5998
+ * @static
5999
+ * @memberOf _
6000
+ * @since 1.1.0
6001
+ * @category Util
6002
+ * @param {Object} [context=root] The context object.
6003
+ * @returns {Function} Returns a new `lodash` function.
6004
+ * @example
6005
+ *
6006
+ * _.mixin({ 'foo': _.constant('foo') });
6007
+ *
6008
+ * var lodash = _.runInContext();
6009
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
6010
+ *
6011
+ * _.isFunction(_.foo);
6012
+ * // => true
6013
+ * _.isFunction(_.bar);
6014
+ * // => false
6015
+ *
6016
+ * lodash.isFunction(lodash.foo);
6017
+ * // => false
6018
+ * lodash.isFunction(lodash.bar);
6019
+ * // => true
6020
+ *
6021
+ * // Create a suped-up `defer` in Node.js.
6022
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
6023
+ */
6024
+ var runInContext = (function runInContext(context) {
6025
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
6026
+
6027
+ /** Built-in constructor references. */
6028
+ var Array = context.Array,
6029
+ Date = context.Date,
6030
+ Error = context.Error,
6031
+ Function = context.Function,
6032
+ Math = context.Math,
6033
+ Object = context.Object,
6034
+ RegExp = context.RegExp,
6035
+ String = context.String,
6036
+ TypeError = context.TypeError;
6037
+
6038
+ /** Used for built-in method references. */
6039
+ var arrayProto = Array.prototype,
6040
+ funcProto = Function.prototype,
6041
+ objectProto = Object.prototype;
6042
+
6043
+ /** Used to detect overreaching core-js shims. */
6044
+ var coreJsData = context['__core-js_shared__'];
6045
+
6046
+ /** Used to resolve the decompiled source of functions. */
6047
+ var funcToString = funcProto.toString;
6048
+
6049
+ /** Used to check objects for own properties. */
6050
+ var hasOwnProperty = objectProto.hasOwnProperty;
6051
+
6052
+ /** Used to generate unique IDs. */
6053
+ var idCounter = 0;
6054
+
6055
+ /** Used to detect methods masquerading as native. */
6056
+ var maskSrcKey = (function() {
6057
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
6058
+ return uid ? ('Symbol(src)_1.' + uid) : '';
6059
+ }());
6060
+
6061
+ /**
6062
+ * Used to resolve the
6063
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
6064
+ * of values.
6065
+ */
6066
+ var nativeObjectToString = objectProto.toString;
6067
+
6068
+ /** Used to infer the `Object` constructor. */
6069
+ var objectCtorString = funcToString.call(Object);
6070
+
6071
+ /** Used to restore the original `_` reference in `_.noConflict`. */
6072
+ var oldDash = root._;
6073
+
6074
+ /** Used to detect if a method is native. */
6075
+ var reIsNative = RegExp('^' +
6076
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
6077
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
6078
+ );
6079
+
6080
+ /** Built-in value references. */
6081
+ var Buffer = moduleExports ? context.Buffer : undefined,
6082
+ Symbol = context.Symbol,
6083
+ Uint8Array = context.Uint8Array,
6084
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
6085
+ getPrototype = overArg(Object.getPrototypeOf, Object),
6086
+ objectCreate = Object.create,
6087
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
6088
+ splice = arrayProto.splice,
6089
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
6090
+ symIterator = Symbol ? Symbol.iterator : undefined,
6091
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
6092
+
6093
+ var defineProperty = (function() {
6094
+ try {
6095
+ var func = getNative(Object, 'defineProperty');
6096
+ func({}, '', {});
6097
+ return func;
6098
+ } catch (e) {}
6099
+ }());
6100
+
6101
+ /** Mocked built-ins. */
6102
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
6103
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
6104
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
6105
+
6106
+ /* Built-in method references for those with the same name as other `lodash` methods. */
6107
+ var nativeCeil = Math.ceil,
6108
+ nativeFloor = Math.floor,
6109
+ nativeGetSymbols = Object.getOwnPropertySymbols,
6110
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
6111
+ nativeIsFinite = context.isFinite,
6112
+ nativeJoin = arrayProto.join,
6113
+ nativeKeys = overArg(Object.keys, Object),
6114
+ nativeMax = Math.max,
6115
+ nativeMin = Math.min,
6116
+ nativeNow = Date.now,
6117
+ nativeParseInt = context.parseInt,
6118
+ nativeRandom = Math.random,
6119
+ nativeReverse = arrayProto.reverse;
6120
+
6121
+ /* Built-in method references that are verified to be native. */
6122
+ var DataView = getNative(context, 'DataView'),
6123
+ Map = getNative(context, 'Map'),
6124
+ Promise = getNative(context, 'Promise'),
6125
+ Set = getNative(context, 'Set'),
6126
+ WeakMap = getNative(context, 'WeakMap'),
6127
+ nativeCreate = getNative(Object, 'create');
6128
+
6129
+ /** Used to store function metadata. */
6130
+ var metaMap = WeakMap && new WeakMap;
6131
+
6132
+ /** Used to lookup unminified function names. */
6133
+ var realNames = {};
6134
+
6135
+ /** Used to detect maps, sets, and weakmaps. */
6136
+ var dataViewCtorString = toSource(DataView),
6137
+ mapCtorString = toSource(Map),
6138
+ promiseCtorString = toSource(Promise),
6139
+ setCtorString = toSource(Set),
6140
+ weakMapCtorString = toSource(WeakMap);
6141
+
6142
+ /** Used to convert symbols to primitives and strings. */
6143
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
6144
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
6145
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
6146
+
6147
+ /*------------------------------------------------------------------------*/
6148
+
6149
+ /**
6150
+ * Creates a `lodash` object which wraps `value` to enable implicit method
6151
+ * chain sequences. Methods that operate on and return arrays, collections,
6152
+ * and functions can be chained together. Methods that retrieve a single value
6153
+ * or may return a primitive value will automatically end the chain sequence
6154
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
6155
+ * with `_#value`.
6156
+ *
6157
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
6158
+ * enabled using `_.chain`.
6159
+ *
6160
+ * The execution of chained methods is lazy, that is, it's deferred until
6161
+ * `_#value` is implicitly or explicitly called.
6162
+ *
6163
+ * Lazy evaluation allows several methods to support shortcut fusion.
6164
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
6165
+ * the creation of intermediate arrays and can greatly reduce the number of
6166
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
6167
+ * fusion if the section is applied to an array and iteratees accept only
6168
+ * one argument. The heuristic for whether a section qualifies for shortcut
6169
+ * fusion is subject to change.
6170
+ *
6171
+ * Chaining is supported in custom builds as long as the `_#value` method is
6172
+ * directly or indirectly included in the build.
6173
+ *
6174
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
6175
+ *
6176
+ * The wrapper `Array` methods are:
6177
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
6178
+ *
6179
+ * The wrapper `String` methods are:
6180
+ * `replace` and `split`
6181
+ *
6182
+ * The wrapper methods that support shortcut fusion are:
6183
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
6184
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
6185
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
6186
+ *
6187
+ * The chainable wrapper methods are:
6188
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
6189
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
6190
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
6191
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
6192
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
6193
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
6194
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
6195
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
6196
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
6197
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
6198
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
6199
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
6200
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
6201
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
6202
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
6203
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
6204
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
6205
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
6206
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
6207
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
6208
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
6209
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
6210
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
6211
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
6212
+ *
6213
+ * The wrapper methods that are **not** chainable by default are:
6214
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
6215
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
6216
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
6217
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
6218
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
6219
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
6220
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
6221
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
6222
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
6223
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
6224
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
6225
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
6226
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
6227
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
6228
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
6229
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
6230
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
6231
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
6232
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
6233
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
6234
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
6235
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
6236
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
6237
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
6238
+ * `upperFirst`, `value`, and `words`
6239
+ *
6240
+ * @name _
6241
+ * @constructor
6242
+ * @category Seq
6243
+ * @param {*} value The value to wrap in a `lodash` instance.
6244
+ * @returns {Object} Returns the new `lodash` wrapper instance.
6245
+ * @example
6246
+ *
6247
+ * function square(n) {
6248
+ * return n * n;
6249
+ * }
6250
+ *
6251
+ * var wrapped = _([1, 2, 3]);
6252
+ *
6253
+ * // Returns an unwrapped value.
6254
+ * wrapped.reduce(_.add);
6255
+ * // => 6
6256
+ *
6257
+ * // Returns a wrapped value.
6258
+ * var squares = wrapped.map(square);
6259
+ *
6260
+ * _.isArray(squares);
6261
+ * // => false
6262
+ *
6263
+ * _.isArray(squares.value());
6264
+ * // => true
6265
+ */
6266
+ function lodash(value) {
6267
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
6268
+ if (value instanceof LodashWrapper) {
6269
+ return value;
6270
+ }
6271
+ if (hasOwnProperty.call(value, '__wrapped__')) {
6272
+ return wrapperClone(value);
6273
+ }
6274
+ }
6275
+ return new LodashWrapper(value);
6276
+ }
6277
+
6278
+ /**
6279
+ * The base implementation of `_.create` without support for assigning
6280
+ * properties to the created object.
6281
+ *
6282
+ * @private
6283
+ * @param {Object} proto The object to inherit from.
6284
+ * @returns {Object} Returns the new object.
6285
+ */
6286
+ var baseCreate = (function() {
6287
+ function object() {}
6288
+ return function(proto) {
6289
+ if (!isObject(proto)) {
6290
+ return {};
6291
+ }
6292
+ if (objectCreate) {
6293
+ return objectCreate(proto);
6294
+ }
6295
+ object.prototype = proto;
6296
+ var result = new object;
6297
+ object.prototype = undefined;
6298
+ return result;
6299
+ };
6300
+ }());
6301
+
6302
+ /**
6303
+ * The function whose prototype chain sequence wrappers inherit from.
6304
+ *
6305
+ * @private
6306
+ */
6307
+ function baseLodash() {
6308
+ // No operation performed.
6309
+ }
6310
+
6311
+ /**
6312
+ * The base constructor for creating `lodash` wrapper objects.
6313
+ *
6314
+ * @private
6315
+ * @param {*} value The value to wrap.
6316
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
6317
+ */
6318
+ function LodashWrapper(value, chainAll) {
6319
+ this.__wrapped__ = value;
6320
+ this.__actions__ = [];
6321
+ this.__chain__ = !!chainAll;
6322
+ this.__index__ = 0;
6323
+ this.__values__ = undefined;
6324
+ }
6325
+
6326
+ /**
6327
+ * By default, the template delimiters used by lodash are like those in
6328
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
6329
+ * following template settings to use alternative delimiters.
6330
+ *
6331
+ * @static
6332
+ * @memberOf _
6333
+ * @type {Object}
6334
+ */
6335
+ lodash.templateSettings = {
6336
+
6337
+ /**
6338
+ * Used to detect `data` property values to be HTML-escaped.
6339
+ *
6340
+ * @memberOf _.templateSettings
6341
+ * @type {RegExp}
6342
+ */
6343
+ 'escape': reEscape,
6344
+
6345
+ /**
6346
+ * Used to detect code to be evaluated.
6347
+ *
6348
+ * @memberOf _.templateSettings
6349
+ * @type {RegExp}
6350
+ */
6351
+ 'evaluate': reEvaluate,
6352
+
6353
+ /**
6354
+ * Used to detect `data` property values to inject.
6355
+ *
6356
+ * @memberOf _.templateSettings
6357
+ * @type {RegExp}
6358
+ */
6359
+ 'interpolate': reInterpolate,
6360
+
6361
+ /**
6362
+ * Used to reference the data object in the template text.
6363
+ *
6364
+ * @memberOf _.templateSettings
6365
+ * @type {string}
6366
+ */
6367
+ 'variable': '',
6368
+
6369
+ /**
6370
+ * Used to import variables into the compiled template.
6371
+ *
6372
+ * @memberOf _.templateSettings
6373
+ * @type {Object}
6374
+ */
6375
+ 'imports': {
6376
+
6377
+ /**
6378
+ * A reference to the `lodash` function.
6379
+ *
6380
+ * @memberOf _.templateSettings.imports
6381
+ * @type {Function}
6382
+ */
6383
+ '_': lodash
6384
+ }
6385
+ };
6386
+
6387
+ // Ensure wrappers are instances of `baseLodash`.
6388
+ lodash.prototype = baseLodash.prototype;
6389
+ lodash.prototype.constructor = lodash;
6390
+
6391
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
6392
+ LodashWrapper.prototype.constructor = LodashWrapper;
6393
+
6394
+ /*------------------------------------------------------------------------*/
6395
+
6396
+ /**
6397
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
6398
+ *
6399
+ * @private
6400
+ * @constructor
6401
+ * @param {*} value The value to wrap.
6402
+ */
6403
+ function LazyWrapper(value) {
6404
+ this.__wrapped__ = value;
6405
+ this.__actions__ = [];
6406
+ this.__dir__ = 1;
6407
+ this.__filtered__ = false;
6408
+ this.__iteratees__ = [];
6409
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
6410
+ this.__views__ = [];
6411
+ }
6412
+
6413
+ /**
6414
+ * Creates a clone of the lazy wrapper object.
6415
+ *
6416
+ * @private
6417
+ * @name clone
6418
+ * @memberOf LazyWrapper
6419
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
6420
+ */
6421
+ function lazyClone() {
6422
+ var result = new LazyWrapper(this.__wrapped__);
6423
+ result.__actions__ = copyArray(this.__actions__);
6424
+ result.__dir__ = this.__dir__;
6425
+ result.__filtered__ = this.__filtered__;
6426
+ result.__iteratees__ = copyArray(this.__iteratees__);
6427
+ result.__takeCount__ = this.__takeCount__;
6428
+ result.__views__ = copyArray(this.__views__);
6429
+ return result;
6430
+ }
6431
+
6432
+ /**
6433
+ * Reverses the direction of lazy iteration.
6434
+ *
6435
+ * @private
6436
+ * @name reverse
6437
+ * @memberOf LazyWrapper
6438
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
6439
+ */
6440
+ function lazyReverse() {
6441
+ if (this.__filtered__) {
6442
+ var result = new LazyWrapper(this);
6443
+ result.__dir__ = -1;
6444
+ result.__filtered__ = true;
6445
+ } else {
6446
+ result = this.clone();
6447
+ result.__dir__ *= -1;
6448
+ }
6449
+ return result;
6450
+ }
6451
+
6452
+ /**
6453
+ * Extracts the unwrapped value from its lazy wrapper.
6454
+ *
6455
+ * @private
6456
+ * @name value
6457
+ * @memberOf LazyWrapper
6458
+ * @returns {*} Returns the unwrapped value.
6459
+ */
6460
+ function lazyValue() {
6461
+ var array = this.__wrapped__.value(),
6462
+ dir = this.__dir__,
6463
+ isArr = isArray(array),
6464
+ isRight = dir < 0,
6465
+ arrLength = isArr ? array.length : 0,
6466
+ view = getView(0, arrLength, this.__views__),
6467
+ start = view.start,
6468
+ end = view.end,
6469
+ length = end - start,
6470
+ index = isRight ? end : (start - 1),
6471
+ iteratees = this.__iteratees__,
6472
+ iterLength = iteratees.length,
6473
+ resIndex = 0,
6474
+ takeCount = nativeMin(length, this.__takeCount__);
6475
+
6476
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
6477
+ return baseWrapperValue(array, this.__actions__);
6478
+ }
6479
+ var result = [];
6480
+
6481
+ outer:
6482
+ while (length-- && resIndex < takeCount) {
6483
+ index += dir;
6484
+
6485
+ var iterIndex = -1,
6486
+ value = array[index];
6487
+
6488
+ while (++iterIndex < iterLength) {
6489
+ var data = iteratees[iterIndex],
6490
+ iteratee = data.iteratee,
6491
+ type = data.type,
6492
+ computed = iteratee(value);
6493
+
6494
+ if (type == LAZY_MAP_FLAG) {
6495
+ value = computed;
6496
+ } else if (!computed) {
6497
+ if (type == LAZY_FILTER_FLAG) {
6498
+ continue outer;
6499
+ } else {
6500
+ break outer;
6501
+ }
6502
+ }
6503
+ }
6504
+ result[resIndex++] = value;
6505
+ }
6506
+ return result;
6507
+ }
6508
+
6509
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
6510
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
6511
+ LazyWrapper.prototype.constructor = LazyWrapper;
6512
+
6513
+ /*------------------------------------------------------------------------*/
6514
+
6515
+ /**
6516
+ * Creates a hash object.
6517
+ *
6518
+ * @private
6519
+ * @constructor
6520
+ * @param {Array} [entries] The key-value pairs to cache.
6521
+ */
6522
+ function Hash(entries) {
6523
+ var index = -1,
6524
+ length = entries == null ? 0 : entries.length;
6525
+
6526
+ this.clear();
6527
+ while (++index < length) {
6528
+ var entry = entries[index];
6529
+ this.set(entry[0], entry[1]);
6530
+ }
6531
+ }
6532
+
6533
+ /**
6534
+ * Removes all key-value entries from the hash.
6535
+ *
6536
+ * @private
6537
+ * @name clear
6538
+ * @memberOf Hash
6539
+ */
6540
+ function hashClear() {
6541
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
6542
+ this.size = 0;
6543
+ }
6544
+
6545
+ /**
6546
+ * Removes `key` and its value from the hash.
6547
+ *
6548
+ * @private
6549
+ * @name delete
6550
+ * @memberOf Hash
6551
+ * @param {Object} hash The hash to modify.
6552
+ * @param {string} key The key of the value to remove.
6553
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6554
+ */
6555
+ function hashDelete(key) {
6556
+ var result = this.has(key) && delete this.__data__[key];
6557
+ this.size -= result ? 1 : 0;
6558
+ return result;
6559
+ }
6560
+
6561
+ /**
6562
+ * Gets the hash value for `key`.
6563
+ *
6564
+ * @private
6565
+ * @name get
6566
+ * @memberOf Hash
6567
+ * @param {string} key The key of the value to get.
6568
+ * @returns {*} Returns the entry value.
6569
+ */
6570
+ function hashGet(key) {
6571
+ var data = this.__data__;
6572
+ if (nativeCreate) {
6573
+ var result = data[key];
6574
+ return result === HASH_UNDEFINED ? undefined : result;
6575
+ }
6576
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
6577
+ }
6578
+
6579
+ /**
6580
+ * Checks if a hash value for `key` exists.
6581
+ *
6582
+ * @private
6583
+ * @name has
6584
+ * @memberOf Hash
6585
+ * @param {string} key The key of the entry to check.
6586
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6587
+ */
6588
+ function hashHas(key) {
6589
+ var data = this.__data__;
6590
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
6591
+ }
6592
+
6593
+ /**
6594
+ * Sets the hash `key` to `value`.
6595
+ *
6596
+ * @private
6597
+ * @name set
6598
+ * @memberOf Hash
6599
+ * @param {string} key The key of the value to set.
6600
+ * @param {*} value The value to set.
6601
+ * @returns {Object} Returns the hash instance.
6602
+ */
6603
+ function hashSet(key, value) {
6604
+ var data = this.__data__;
6605
+ this.size += this.has(key) ? 0 : 1;
6606
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
6607
+ return this;
6608
+ }
6609
+
6610
+ // Add methods to `Hash`.
6611
+ Hash.prototype.clear = hashClear;
6612
+ Hash.prototype['delete'] = hashDelete;
6613
+ Hash.prototype.get = hashGet;
6614
+ Hash.prototype.has = hashHas;
6615
+ Hash.prototype.set = hashSet;
6616
+
6617
+ /*------------------------------------------------------------------------*/
6618
+
6619
+ /**
6620
+ * Creates an list cache object.
6621
+ *
6622
+ * @private
6623
+ * @constructor
6624
+ * @param {Array} [entries] The key-value pairs to cache.
6625
+ */
6626
+ function ListCache(entries) {
6627
+ var index = -1,
6628
+ length = entries == null ? 0 : entries.length;
6629
+
6630
+ this.clear();
6631
+ while (++index < length) {
6632
+ var entry = entries[index];
6633
+ this.set(entry[0], entry[1]);
6634
+ }
6635
+ }
6636
+
6637
+ /**
6638
+ * Removes all key-value entries from the list cache.
6639
+ *
6640
+ * @private
6641
+ * @name clear
6642
+ * @memberOf ListCache
6643
+ */
6644
+ function listCacheClear() {
6645
+ this.__data__ = [];
6646
+ this.size = 0;
6647
+ }
6648
+
6649
+ /**
6650
+ * Removes `key` and its value from the list cache.
6651
+ *
6652
+ * @private
6653
+ * @name delete
6654
+ * @memberOf ListCache
6655
+ * @param {string} key The key of the value to remove.
6656
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6657
+ */
6658
+ function listCacheDelete(key) {
6659
+ var data = this.__data__,
6660
+ index = assocIndexOf(data, key);
6661
+
6662
+ if (index < 0) {
6663
+ return false;
6664
+ }
6665
+ var lastIndex = data.length - 1;
6666
+ if (index == lastIndex) {
6667
+ data.pop();
6668
+ } else {
6669
+ splice.call(data, index, 1);
6670
+ }
6671
+ --this.size;
6672
+ return true;
6673
+ }
6674
+
6675
+ /**
6676
+ * Gets the list cache value for `key`.
6677
+ *
6678
+ * @private
6679
+ * @name get
6680
+ * @memberOf ListCache
6681
+ * @param {string} key The key of the value to get.
6682
+ * @returns {*} Returns the entry value.
6683
+ */
6684
+ function listCacheGet(key) {
6685
+ var data = this.__data__,
6686
+ index = assocIndexOf(data, key);
6687
+
6688
+ return index < 0 ? undefined : data[index][1];
6689
+ }
6690
+
6691
+ /**
6692
+ * Checks if a list cache value for `key` exists.
6693
+ *
6694
+ * @private
6695
+ * @name has
6696
+ * @memberOf ListCache
6697
+ * @param {string} key The key of the entry to check.
6698
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6699
+ */
6700
+ function listCacheHas(key) {
6701
+ return assocIndexOf(this.__data__, key) > -1;
6702
+ }
6703
+
6704
+ /**
6705
+ * Sets the list cache `key` to `value`.
6706
+ *
6707
+ * @private
6708
+ * @name set
6709
+ * @memberOf ListCache
6710
+ * @param {string} key The key of the value to set.
6711
+ * @param {*} value The value to set.
6712
+ * @returns {Object} Returns the list cache instance.
6713
+ */
6714
+ function listCacheSet(key, value) {
6715
+ var data = this.__data__,
6716
+ index = assocIndexOf(data, key);
6717
+
6718
+ if (index < 0) {
6719
+ ++this.size;
6720
+ data.push([key, value]);
6721
+ } else {
6722
+ data[index][1] = value;
6723
+ }
6724
+ return this;
6725
+ }
6726
+
6727
+ // Add methods to `ListCache`.
6728
+ ListCache.prototype.clear = listCacheClear;
6729
+ ListCache.prototype['delete'] = listCacheDelete;
6730
+ ListCache.prototype.get = listCacheGet;
6731
+ ListCache.prototype.has = listCacheHas;
6732
+ ListCache.prototype.set = listCacheSet;
6733
+
6734
+ /*------------------------------------------------------------------------*/
6735
+
6736
+ /**
6737
+ * Creates a map cache object to store key-value pairs.
6738
+ *
6739
+ * @private
6740
+ * @constructor
6741
+ * @param {Array} [entries] The key-value pairs to cache.
6742
+ */
6743
+ function MapCache(entries) {
6744
+ var index = -1,
6745
+ length = entries == null ? 0 : entries.length;
6746
+
6747
+ this.clear();
6748
+ while (++index < length) {
6749
+ var entry = entries[index];
6750
+ this.set(entry[0], entry[1]);
6751
+ }
6752
+ }
6753
+
6754
+ /**
6755
+ * Removes all key-value entries from the map.
6756
+ *
6757
+ * @private
6758
+ * @name clear
6759
+ * @memberOf MapCache
6760
+ */
6761
+ function mapCacheClear() {
6762
+ this.size = 0;
6763
+ this.__data__ = {
6764
+ 'hash': new Hash,
6765
+ 'map': new (Map || ListCache),
6766
+ 'string': new Hash
6767
+ };
6768
+ }
6769
+
6770
+ /**
6771
+ * Removes `key` and its value from the map.
6772
+ *
6773
+ * @private
6774
+ * @name delete
6775
+ * @memberOf MapCache
6776
+ * @param {string} key The key of the value to remove.
6777
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6778
+ */
6779
+ function mapCacheDelete(key) {
6780
+ var result = getMapData(this, key)['delete'](key);
6781
+ this.size -= result ? 1 : 0;
6782
+ return result;
6783
+ }
6784
+
6785
+ /**
6786
+ * Gets the map value for `key`.
6787
+ *
6788
+ * @private
6789
+ * @name get
6790
+ * @memberOf MapCache
6791
+ * @param {string} key The key of the value to get.
6792
+ * @returns {*} Returns the entry value.
6793
+ */
6794
+ function mapCacheGet(key) {
6795
+ return getMapData(this, key).get(key);
6796
+ }
6797
+
6798
+ /**
6799
+ * Checks if a map value for `key` exists.
6800
+ *
6801
+ * @private
6802
+ * @name has
6803
+ * @memberOf MapCache
6804
+ * @param {string} key The key of the entry to check.
6805
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6806
+ */
6807
+ function mapCacheHas(key) {
6808
+ return getMapData(this, key).has(key);
6809
+ }
6810
+
6811
+ /**
6812
+ * Sets the map `key` to `value`.
6813
+ *
6814
+ * @private
6815
+ * @name set
6816
+ * @memberOf MapCache
6817
+ * @param {string} key The key of the value to set.
6818
+ * @param {*} value The value to set.
6819
+ * @returns {Object} Returns the map cache instance.
6820
+ */
6821
+ function mapCacheSet(key, value) {
6822
+ var data = getMapData(this, key),
6823
+ size = data.size;
6824
+
6825
+ data.set(key, value);
6826
+ this.size += data.size == size ? 0 : 1;
6827
+ return this;
6828
+ }
6829
+
6830
+ // Add methods to `MapCache`.
6831
+ MapCache.prototype.clear = mapCacheClear;
6832
+ MapCache.prototype['delete'] = mapCacheDelete;
6833
+ MapCache.prototype.get = mapCacheGet;
6834
+ MapCache.prototype.has = mapCacheHas;
6835
+ MapCache.prototype.set = mapCacheSet;
6836
+
6837
+ /*------------------------------------------------------------------------*/
6838
+
6839
+ /**
6840
+ *
6841
+ * Creates an array cache object to store unique values.
6842
+ *
6843
+ * @private
6844
+ * @constructor
6845
+ * @param {Array} [values] The values to cache.
6846
+ */
6847
+ function SetCache(values) {
6848
+ var index = -1,
6849
+ length = values == null ? 0 : values.length;
6850
+
6851
+ this.__data__ = new MapCache;
6852
+ while (++index < length) {
6853
+ this.add(values[index]);
6854
+ }
6855
+ }
6856
+
6857
+ /**
6858
+ * Adds `value` to the array cache.
6859
+ *
6860
+ * @private
6861
+ * @name add
6862
+ * @memberOf SetCache
6863
+ * @alias push
6864
+ * @param {*} value The value to cache.
6865
+ * @returns {Object} Returns the cache instance.
6866
+ */
6867
+ function setCacheAdd(value) {
6868
+ this.__data__.set(value, HASH_UNDEFINED);
6869
+ return this;
6870
+ }
6871
+
6872
+ /**
6873
+ * Checks if `value` is in the array cache.
6874
+ *
6875
+ * @private
6876
+ * @name has
6877
+ * @memberOf SetCache
6878
+ * @param {*} value The value to search for.
6879
+ * @returns {number} Returns `true` if `value` is found, else `false`.
6880
+ */
6881
+ function setCacheHas(value) {
6882
+ return this.__data__.has(value);
6883
+ }
6884
+
6885
+ // Add methods to `SetCache`.
6886
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
6887
+ SetCache.prototype.has = setCacheHas;
6888
+
6889
+ /*------------------------------------------------------------------------*/
6890
+
6891
+ /**
6892
+ * Creates a stack cache object to store key-value pairs.
6893
+ *
6894
+ * @private
6895
+ * @constructor
6896
+ * @param {Array} [entries] The key-value pairs to cache.
6897
+ */
6898
+ function Stack(entries) {
6899
+ var data = this.__data__ = new ListCache(entries);
6900
+ this.size = data.size;
6901
+ }
6902
+
6903
+ /**
6904
+ * Removes all key-value entries from the stack.
6905
+ *
6906
+ * @private
6907
+ * @name clear
6908
+ * @memberOf Stack
6909
+ */
6910
+ function stackClear() {
6911
+ this.__data__ = new ListCache;
6912
+ this.size = 0;
6913
+ }
6914
+
6915
+ /**
6916
+ * Removes `key` and its value from the stack.
6917
+ *
6918
+ * @private
6919
+ * @name delete
6920
+ * @memberOf Stack
6921
+ * @param {string} key The key of the value to remove.
6922
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
6923
+ */
6924
+ function stackDelete(key) {
6925
+ var data = this.__data__,
6926
+ result = data['delete'](key);
6927
+
6928
+ this.size = data.size;
6929
+ return result;
6930
+ }
6931
+
6932
+ /**
6933
+ * Gets the stack value for `key`.
6934
+ *
6935
+ * @private
6936
+ * @name get
6937
+ * @memberOf Stack
6938
+ * @param {string} key The key of the value to get.
6939
+ * @returns {*} Returns the entry value.
6940
+ */
6941
+ function stackGet(key) {
6942
+ return this.__data__.get(key);
6943
+ }
6944
+
6945
+ /**
6946
+ * Checks if a stack value for `key` exists.
6947
+ *
6948
+ * @private
6949
+ * @name has
6950
+ * @memberOf Stack
6951
+ * @param {string} key The key of the entry to check.
6952
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
6953
+ */
6954
+ function stackHas(key) {
6955
+ return this.__data__.has(key);
6956
+ }
6957
+
6958
+ /**
6959
+ * Sets the stack `key` to `value`.
6960
+ *
6961
+ * @private
6962
+ * @name set
6963
+ * @memberOf Stack
6964
+ * @param {string} key The key of the value to set.
6965
+ * @param {*} value The value to set.
6966
+ * @returns {Object} Returns the stack cache instance.
6967
+ */
6968
+ function stackSet(key, value) {
6969
+ var data = this.__data__;
6970
+ if (data instanceof ListCache) {
6971
+ var pairs = data.__data__;
6972
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
6973
+ pairs.push([key, value]);
6974
+ this.size = ++data.size;
6975
+ return this;
6976
+ }
6977
+ data = this.__data__ = new MapCache(pairs);
6978
+ }
6979
+ data.set(key, value);
6980
+ this.size = data.size;
6981
+ return this;
6982
+ }
6983
+
6984
+ // Add methods to `Stack`.
6985
+ Stack.prototype.clear = stackClear;
6986
+ Stack.prototype['delete'] = stackDelete;
6987
+ Stack.prototype.get = stackGet;
6988
+ Stack.prototype.has = stackHas;
6989
+ Stack.prototype.set = stackSet;
6990
+
6991
+ /*------------------------------------------------------------------------*/
6992
+
6993
+ /**
6994
+ * Creates an array of the enumerable property names of the array-like `value`.
6995
+ *
6996
+ * @private
6997
+ * @param {*} value The value to query.
6998
+ * @param {boolean} inherited Specify returning inherited property names.
6999
+ * @returns {Array} Returns the array of property names.
7000
+ */
7001
+ function arrayLikeKeys(value, inherited) {
7002
+ var isArr = isArray(value),
7003
+ isArg = !isArr && isArguments(value),
7004
+ isBuff = !isArr && !isArg && isBuffer(value),
7005
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
7006
+ skipIndexes = isArr || isArg || isBuff || isType,
7007
+ result = skipIndexes ? baseTimes(value.length, String) : [],
7008
+ length = result.length;
7009
+
7010
+ for (var key in value) {
7011
+ if ((inherited || hasOwnProperty.call(value, key)) &&
7012
+ !(skipIndexes && (
7013
+ // Safari 9 has enumerable `arguments.length` in strict mode.
7014
+ key == 'length' ||
7015
+ // Node.js 0.10 has enumerable non-index properties on buffers.
7016
+ (isBuff && (key == 'offset' || key == 'parent')) ||
7017
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
7018
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
7019
+ // Skip index properties.
7020
+ isIndex(key, length)
7021
+ ))) {
7022
+ result.push(key);
7023
+ }
7024
+ }
7025
+ return result;
7026
+ }
7027
+
7028
+ /**
7029
+ * A specialized version of `_.sample` for arrays.
7030
+ *
7031
+ * @private
7032
+ * @param {Array} array The array to sample.
7033
+ * @returns {*} Returns the random element.
7034
+ */
7035
+ function arraySample(array) {
7036
+ var length = array.length;
7037
+ return length ? array[baseRandom(0, length - 1)] : undefined;
7038
+ }
7039
+
7040
+ /**
7041
+ * A specialized version of `_.sampleSize` for arrays.
7042
+ *
7043
+ * @private
7044
+ * @param {Array} array The array to sample.
7045
+ * @param {number} n The number of elements to sample.
7046
+ * @returns {Array} Returns the random elements.
7047
+ */
7048
+ function arraySampleSize(array, n) {
7049
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
7050
+ }
7051
+
7052
+ /**
7053
+ * A specialized version of `_.shuffle` for arrays.
7054
+ *
7055
+ * @private
7056
+ * @param {Array} array The array to shuffle.
7057
+ * @returns {Array} Returns the new shuffled array.
7058
+ */
7059
+ function arrayShuffle(array) {
7060
+ return shuffleSelf(copyArray(array));
7061
+ }
7062
+
7063
+ /**
7064
+ * This function is like `assignValue` except that it doesn't assign
7065
+ * `undefined` values.
7066
+ *
7067
+ * @private
7068
+ * @param {Object} object The object to modify.
7069
+ * @param {string} key The key of the property to assign.
7070
+ * @param {*} value The value to assign.
7071
+ */
7072
+ function assignMergeValue(object, key, value) {
7073
+ if ((value !== undefined && !eq(object[key], value)) ||
7074
+ (value === undefined && !(key in object))) {
7075
+ baseAssignValue(object, key, value);
7076
+ }
7077
+ }
7078
+
7079
+ /**
7080
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
7081
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
7082
+ * for equality comparisons.
7083
+ *
7084
+ * @private
7085
+ * @param {Object} object The object to modify.
7086
+ * @param {string} key The key of the property to assign.
7087
+ * @param {*} value The value to assign.
7088
+ */
7089
+ function assignValue(object, key, value) {
7090
+ var objValue = object[key];
7091
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
7092
+ (value === undefined && !(key in object))) {
7093
+ baseAssignValue(object, key, value);
7094
+ }
7095
+ }
7096
+
7097
+ /**
7098
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
7099
+ *
7100
+ * @private
7101
+ * @param {Array} array The array to inspect.
7102
+ * @param {*} key The key to search for.
7103
+ * @returns {number} Returns the index of the matched value, else `-1`.
7104
+ */
7105
+ function assocIndexOf(array, key) {
7106
+ var length = array.length;
7107
+ while (length--) {
7108
+ if (eq(array[length][0], key)) {
7109
+ return length;
7110
+ }
7111
+ }
7112
+ return -1;
7113
+ }
7114
+
7115
+ /**
7116
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
7117
+ * by `iteratee` and values set by `setter`.
7118
+ *
7119
+ * @private
7120
+ * @param {Array|Object} collection The collection to iterate over.
7121
+ * @param {Function} setter The function to set `accumulator` values.
7122
+ * @param {Function} iteratee The iteratee to transform keys.
7123
+ * @param {Object} accumulator The initial aggregated object.
7124
+ * @returns {Function} Returns `accumulator`.
7125
+ */
7126
+ function baseAggregator(collection, setter, iteratee, accumulator) {
7127
+ baseEach(collection, function(value, key, collection) {
7128
+ setter(accumulator, value, iteratee(value), collection);
7129
+ });
7130
+ return accumulator;
7131
+ }
7132
+
7133
+ /**
7134
+ * The base implementation of `_.assign` without support for multiple sources
7135
+ * or `customizer` functions.
7136
+ *
7137
+ * @private
7138
+ * @param {Object} object The destination object.
7139
+ * @param {Object} source The source object.
7140
+ * @returns {Object} Returns `object`.
7141
+ */
7142
+ function baseAssign(object, source) {
7143
+ return object && copyObject(source, keys(source), object);
7144
+ }
7145
+
7146
+ /**
7147
+ * The base implementation of `_.assignIn` without support for multiple sources
7148
+ * or `customizer` functions.
7149
+ *
7150
+ * @private
7151
+ * @param {Object} object The destination object.
7152
+ * @param {Object} source The source object.
7153
+ * @returns {Object} Returns `object`.
7154
+ */
7155
+ function baseAssignIn(object, source) {
7156
+ return object && copyObject(source, keysIn(source), object);
7157
+ }
7158
+
7159
+ /**
7160
+ * The base implementation of `assignValue` and `assignMergeValue` without
7161
+ * value checks.
7162
+ *
7163
+ * @private
7164
+ * @param {Object} object The object to modify.
7165
+ * @param {string} key The key of the property to assign.
7166
+ * @param {*} value The value to assign.
7167
+ */
7168
+ function baseAssignValue(object, key, value) {
7169
+ if (key == '__proto__' && defineProperty) {
7170
+ defineProperty(object, key, {
7171
+ 'configurable': true,
7172
+ 'enumerable': true,
7173
+ 'value': value,
7174
+ 'writable': true
7175
+ });
7176
+ } else {
7177
+ object[key] = value;
7178
+ }
7179
+ }
7180
+
7181
+ /**
7182
+ * The base implementation of `_.at` without support for individual paths.
7183
+ *
7184
+ * @private
7185
+ * @param {Object} object The object to iterate over.
7186
+ * @param {string[]} paths The property paths to pick.
7187
+ * @returns {Array} Returns the picked elements.
7188
+ */
7189
+ function baseAt(object, paths) {
7190
+ var index = -1,
7191
+ length = paths.length,
7192
+ result = Array(length),
7193
+ skip = object == null;
7194
+
7195
+ while (++index < length) {
7196
+ result[index] = skip ? undefined : get(object, paths[index]);
7197
+ }
7198
+ return result;
7199
+ }
7200
+
7201
+ /**
7202
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
7203
+ *
7204
+ * @private
7205
+ * @param {number} number The number to clamp.
7206
+ * @param {number} [lower] The lower bound.
7207
+ * @param {number} upper The upper bound.
7208
+ * @returns {number} Returns the clamped number.
7209
+ */
7210
+ function baseClamp(number, lower, upper) {
7211
+ if (number === number) {
7212
+ if (upper !== undefined) {
7213
+ number = number <= upper ? number : upper;
7214
+ }
7215
+ if (lower !== undefined) {
7216
+ number = number >= lower ? number : lower;
7217
+ }
7218
+ }
7219
+ return number;
7220
+ }
7221
+
7222
+ /**
7223
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
7224
+ * traversed objects.
7225
+ *
7226
+ * @private
7227
+ * @param {*} value The value to clone.
7228
+ * @param {boolean} bitmask The bitmask flags.
7229
+ * 1 - Deep clone
7230
+ * 2 - Flatten inherited properties
7231
+ * 4 - Clone symbols
7232
+ * @param {Function} [customizer] The function to customize cloning.
7233
+ * @param {string} [key] The key of `value`.
7234
+ * @param {Object} [object] The parent object of `value`.
7235
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
7236
+ * @returns {*} Returns the cloned value.
7237
+ */
7238
+ function baseClone(value, bitmask, customizer, key, object, stack) {
7239
+ var result,
7240
+ isDeep = bitmask & CLONE_DEEP_FLAG,
7241
+ isFlat = bitmask & CLONE_FLAT_FLAG,
7242
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
7243
+
7244
+ if (customizer) {
7245
+ result = object ? customizer(value, key, object, stack) : customizer(value);
7246
+ }
7247
+ if (result !== undefined) {
7248
+ return result;
7249
+ }
7250
+ if (!isObject(value)) {
7251
+ return value;
7252
+ }
7253
+ var isArr = isArray(value);
7254
+ if (isArr) {
7255
+ result = initCloneArray(value);
7256
+ if (!isDeep) {
7257
+ return copyArray(value, result);
7258
+ }
7259
+ } else {
7260
+ var tag = getTag(value),
7261
+ isFunc = tag == funcTag || tag == genTag;
7262
+
7263
+ if (isBuffer(value)) {
7264
+ return cloneBuffer(value, isDeep);
7265
+ }
7266
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
7267
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
7268
+ if (!isDeep) {
7269
+ return isFlat
7270
+ ? copySymbolsIn(value, baseAssignIn(result, value))
7271
+ : copySymbols(value, baseAssign(result, value));
7272
+ }
7273
+ } else {
7274
+ if (!cloneableTags[tag]) {
7275
+ return object ? value : {};
7276
+ }
7277
+ result = initCloneByTag(value, tag, isDeep);
7278
+ }
7279
+ }
7280
+ // Check for circular references and return its corresponding clone.
7281
+ stack || (stack = new Stack);
7282
+ var stacked = stack.get(value);
7283
+ if (stacked) {
7284
+ return stacked;
7285
+ }
7286
+ stack.set(value, result);
7287
+
7288
+ if (isSet(value)) {
7289
+ value.forEach(function(subValue) {
7290
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
7291
+ });
7292
+
7293
+ return result;
7294
+ }
7295
+
7296
+ if (isMap(value)) {
7297
+ value.forEach(function(subValue, key) {
7298
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
7299
+ });
7300
+
7301
+ return result;
7302
+ }
7303
+
7304
+ var keysFunc = isFull
7305
+ ? (isFlat ? getAllKeysIn : getAllKeys)
7306
+ : (isFlat ? keysIn : keys);
7307
+
7308
+ var props = isArr ? undefined : keysFunc(value);
7309
+ arrayEach(props || value, function(subValue, key) {
7310
+ if (props) {
7311
+ key = subValue;
7312
+ subValue = value[key];
7313
+ }
7314
+ // Recursively populate clone (susceptible to call stack limits).
7315
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
7316
+ });
7317
+ return result;
7318
+ }
7319
+
7320
+ /**
7321
+ * The base implementation of `_.conforms` which doesn't clone `source`.
7322
+ *
7323
+ * @private
7324
+ * @param {Object} source The object of property predicates to conform to.
7325
+ * @returns {Function} Returns the new spec function.
7326
+ */
7327
+ function baseConforms(source) {
7328
+ var props = keys(source);
7329
+ return function(object) {
7330
+ return baseConformsTo(object, source, props);
7331
+ };
7332
+ }
7333
+
7334
+ /**
7335
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
7336
+ *
7337
+ * @private
7338
+ * @param {Object} object The object to inspect.
7339
+ * @param {Object} source The object of property predicates to conform to.
7340
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
7341
+ */
7342
+ function baseConformsTo(object, source, props) {
7343
+ var length = props.length;
7344
+ if (object == null) {
7345
+ return !length;
7346
+ }
7347
+ object = Object(object);
7348
+ while (length--) {
7349
+ var key = props[length],
7350
+ predicate = source[key],
7351
+ value = object[key];
7352
+
7353
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
7354
+ return false;
7355
+ }
7356
+ }
7357
+ return true;
7358
+ }
7359
+
7360
+ /**
7361
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
7362
+ * to provide to `func`.
7363
+ *
7364
+ * @private
7365
+ * @param {Function} func The function to delay.
7366
+ * @param {number} wait The number of milliseconds to delay invocation.
7367
+ * @param {Array} args The arguments to provide to `func`.
7368
+ * @returns {number|Object} Returns the timer id or timeout object.
7369
+ */
7370
+ function baseDelay(func, wait, args) {
7371
+ if (typeof func != 'function') {
7372
+ throw new TypeError(FUNC_ERROR_TEXT);
7373
+ }
7374
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
7375
+ }
7376
+
7377
+ /**
7378
+ * The base implementation of methods like `_.difference` without support
7379
+ * for excluding multiple arrays or iteratee shorthands.
7380
+ *
7381
+ * @private
7382
+ * @param {Array} array The array to inspect.
7383
+ * @param {Array} values The values to exclude.
7384
+ * @param {Function} [iteratee] The iteratee invoked per element.
7385
+ * @param {Function} [comparator] The comparator invoked per element.
7386
+ * @returns {Array} Returns the new array of filtered values.
7387
+ */
7388
+ function baseDifference(array, values, iteratee, comparator) {
7389
+ var index = -1,
7390
+ includes = arrayIncludes,
7391
+ isCommon = true,
7392
+ length = array.length,
7393
+ result = [],
7394
+ valuesLength = values.length;
7395
+
7396
+ if (!length) {
7397
+ return result;
7398
+ }
7399
+ if (iteratee) {
7400
+ values = arrayMap(values, baseUnary(iteratee));
7401
+ }
7402
+ if (comparator) {
7403
+ includes = arrayIncludesWith;
7404
+ isCommon = false;
7405
+ }
7406
+ else if (values.length >= LARGE_ARRAY_SIZE) {
7407
+ includes = cacheHas;
7408
+ isCommon = false;
7409
+ values = new SetCache(values);
7410
+ }
7411
+ outer:
7412
+ while (++index < length) {
7413
+ var value = array[index],
7414
+ computed = iteratee == null ? value : iteratee(value);
7415
+
7416
+ value = (comparator || value !== 0) ? value : 0;
7417
+ if (isCommon && computed === computed) {
7418
+ var valuesIndex = valuesLength;
7419
+ while (valuesIndex--) {
7420
+ if (values[valuesIndex] === computed) {
7421
+ continue outer;
7422
+ }
7423
+ }
7424
+ result.push(value);
7425
+ }
7426
+ else if (!includes(values, computed, comparator)) {
7427
+ result.push(value);
7428
+ }
7429
+ }
7430
+ return result;
7431
+ }
7432
+
7433
+ /**
7434
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
7435
+ *
7436
+ * @private
7437
+ * @param {Array|Object} collection The collection to iterate over.
7438
+ * @param {Function} iteratee The function invoked per iteration.
7439
+ * @returns {Array|Object} Returns `collection`.
7440
+ */
7441
+ var baseEach = createBaseEach(baseForOwn);
7442
+
7443
+ /**
7444
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
7445
+ *
7446
+ * @private
7447
+ * @param {Array|Object} collection The collection to iterate over.
7448
+ * @param {Function} iteratee The function invoked per iteration.
7449
+ * @returns {Array|Object} Returns `collection`.
7450
+ */
7451
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
7452
+
7453
+ /**
7454
+ * The base implementation of `_.every` without support for iteratee shorthands.
7455
+ *
7456
+ * @private
7457
+ * @param {Array|Object} collection The collection to iterate over.
7458
+ * @param {Function} predicate The function invoked per iteration.
7459
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
7460
+ * else `false`
7461
+ */
7462
+ function baseEvery(collection, predicate) {
7463
+ var result = true;
7464
+ baseEach(collection, function(value, index, collection) {
7465
+ result = !!predicate(value, index, collection);
7466
+ return result;
7467
+ });
7468
+ return result;
7469
+ }
7470
+
7471
+ /**
7472
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
7473
+ * `comparator` to determine the extremum value.
7474
+ *
7475
+ * @private
7476
+ * @param {Array} array The array to iterate over.
7477
+ * @param {Function} iteratee The iteratee invoked per iteration.
7478
+ * @param {Function} comparator The comparator used to compare values.
7479
+ * @returns {*} Returns the extremum value.
7480
+ */
7481
+ function baseExtremum(array, iteratee, comparator) {
7482
+ var index = -1,
7483
+ length = array.length;
7484
+
7485
+ while (++index < length) {
7486
+ var value = array[index],
7487
+ current = iteratee(value);
7488
+
7489
+ if (current != null && (computed === undefined
7490
+ ? (current === current && !isSymbol(current))
7491
+ : comparator(current, computed)
7492
+ )) {
7493
+ var computed = current,
7494
+ result = value;
7495
+ }
7496
+ }
7497
+ return result;
7498
+ }
7499
+
7500
+ /**
7501
+ * The base implementation of `_.fill` without an iteratee call guard.
7502
+ *
7503
+ * @private
7504
+ * @param {Array} array The array to fill.
7505
+ * @param {*} value The value to fill `array` with.
7506
+ * @param {number} [start=0] The start position.
7507
+ * @param {number} [end=array.length] The end position.
7508
+ * @returns {Array} Returns `array`.
7509
+ */
7510
+ function baseFill(array, value, start, end) {
7511
+ var length = array.length;
7512
+
7513
+ start = toInteger(start);
7514
+ if (start < 0) {
7515
+ start = -start > length ? 0 : (length + start);
7516
+ }
7517
+ end = (end === undefined || end > length) ? length : toInteger(end);
7518
+ if (end < 0) {
7519
+ end += length;
7520
+ }
7521
+ end = start > end ? 0 : toLength(end);
7522
+ while (start < end) {
7523
+ array[start++] = value;
7524
+ }
7525
+ return array;
7526
+ }
7527
+
7528
+ /**
7529
+ * The base implementation of `_.filter` without support for iteratee shorthands.
7530
+ *
7531
+ * @private
7532
+ * @param {Array|Object} collection The collection to iterate over.
7533
+ * @param {Function} predicate The function invoked per iteration.
7534
+ * @returns {Array} Returns the new filtered array.
7535
+ */
7536
+ function baseFilter(collection, predicate) {
7537
+ var result = [];
7538
+ baseEach(collection, function(value, index, collection) {
7539
+ if (predicate(value, index, collection)) {
7540
+ result.push(value);
7541
+ }
7542
+ });
7543
+ return result;
7544
+ }
7545
+
7546
+ /**
7547
+ * The base implementation of `_.flatten` with support for restricting flattening.
7548
+ *
7549
+ * @private
7550
+ * @param {Array} array The array to flatten.
7551
+ * @param {number} depth The maximum recursion depth.
7552
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
7553
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
7554
+ * @param {Array} [result=[]] The initial result value.
7555
+ * @returns {Array} Returns the new flattened array.
7556
+ */
7557
+ function baseFlatten(array, depth, predicate, isStrict, result) {
7558
+ var index = -1,
7559
+ length = array.length;
7560
+
7561
+ predicate || (predicate = isFlattenable);
7562
+ result || (result = []);
7563
+
7564
+ while (++index < length) {
7565
+ var value = array[index];
7566
+ if (depth > 0 && predicate(value)) {
7567
+ if (depth > 1) {
7568
+ // Recursively flatten arrays (susceptible to call stack limits).
7569
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
7570
+ } else {
7571
+ arrayPush(result, value);
7572
+ }
7573
+ } else if (!isStrict) {
7574
+ result[result.length] = value;
7575
+ }
7576
+ }
7577
+ return result;
7578
+ }
7579
+
7580
+ /**
7581
+ * The base implementation of `baseForOwn` which iterates over `object`
7582
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
7583
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
7584
+ *
7585
+ * @private
7586
+ * @param {Object} object The object to iterate over.
7587
+ * @param {Function} iteratee The function invoked per iteration.
7588
+ * @param {Function} keysFunc The function to get the keys of `object`.
7589
+ * @returns {Object} Returns `object`.
7590
+ */
7591
+ var baseFor = createBaseFor();
7592
+
7593
+ /**
7594
+ * This function is like `baseFor` except that it iterates over properties
7595
+ * in the opposite order.
7596
+ *
7597
+ * @private
7598
+ * @param {Object} object The object to iterate over.
7599
+ * @param {Function} iteratee The function invoked per iteration.
7600
+ * @param {Function} keysFunc The function to get the keys of `object`.
7601
+ * @returns {Object} Returns `object`.
7602
+ */
7603
+ var baseForRight = createBaseFor(true);
7604
+
7605
+ /**
7606
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
7607
+ *
7608
+ * @private
7609
+ * @param {Object} object The object to iterate over.
7610
+ * @param {Function} iteratee The function invoked per iteration.
7611
+ * @returns {Object} Returns `object`.
7612
+ */
7613
+ function baseForOwn(object, iteratee) {
7614
+ return object && baseFor(object, iteratee, keys);
7615
+ }
7616
+
7617
+ /**
7618
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
7619
+ *
7620
+ * @private
7621
+ * @param {Object} object The object to iterate over.
7622
+ * @param {Function} iteratee The function invoked per iteration.
7623
+ * @returns {Object} Returns `object`.
7624
+ */
7625
+ function baseForOwnRight(object, iteratee) {
7626
+ return object && baseForRight(object, iteratee, keys);
7627
+ }
7628
+
7629
+ /**
7630
+ * The base implementation of `_.functions` which creates an array of
7631
+ * `object` function property names filtered from `props`.
7632
+ *
7633
+ * @private
7634
+ * @param {Object} object The object to inspect.
7635
+ * @param {Array} props The property names to filter.
7636
+ * @returns {Array} Returns the function names.
7637
+ */
7638
+ function baseFunctions(object, props) {
7639
+ return arrayFilter(props, function(key) {
7640
+ return isFunction(object[key]);
7641
+ });
7642
+ }
7643
+
7644
+ /**
7645
+ * The base implementation of `_.get` without support for default values.
7646
+ *
7647
+ * @private
7648
+ * @param {Object} object The object to query.
7649
+ * @param {Array|string} path The path of the property to get.
7650
+ * @returns {*} Returns the resolved value.
7651
+ */
7652
+ function baseGet(object, path) {
7653
+ path = castPath(path, object);
7654
+
7655
+ var index = 0,
7656
+ length = path.length;
7657
+
7658
+ while (object != null && index < length) {
7659
+ object = object[toKey(path[index++])];
7660
+ }
7661
+ return (index && index == length) ? object : undefined;
7662
+ }
7663
+
7664
+ /**
7665
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
7666
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
7667
+ * symbols of `object`.
7668
+ *
7669
+ * @private
7670
+ * @param {Object} object The object to query.
7671
+ * @param {Function} keysFunc The function to get the keys of `object`.
7672
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
7673
+ * @returns {Array} Returns the array of property names and symbols.
7674
+ */
7675
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
7676
+ var result = keysFunc(object);
7677
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
7678
+ }
7679
+
7680
+ /**
7681
+ * The base implementation of `getTag` without fallbacks for buggy environments.
7682
+ *
7683
+ * @private
7684
+ * @param {*} value The value to query.
7685
+ * @returns {string} Returns the `toStringTag`.
7686
+ */
7687
+ function baseGetTag(value) {
7688
+ if (value == null) {
7689
+ return value === undefined ? undefinedTag : nullTag;
7690
+ }
7691
+ return (symToStringTag && symToStringTag in Object(value))
7692
+ ? getRawTag(value)
7693
+ : objectToString(value);
7694
+ }
7695
+
7696
+ /**
7697
+ * The base implementation of `_.gt` which doesn't coerce arguments.
7698
+ *
7699
+ * @private
7700
+ * @param {*} value The value to compare.
7701
+ * @param {*} other The other value to compare.
7702
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
7703
+ * else `false`.
7704
+ */
7705
+ function baseGt(value, other) {
7706
+ return value > other;
7707
+ }
7708
+
7709
+ /**
7710
+ * The base implementation of `_.has` without support for deep paths.
7711
+ *
7712
+ * @private
7713
+ * @param {Object} [object] The object to query.
7714
+ * @param {Array|string} key The key to check.
7715
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
7716
+ */
7717
+ function baseHas(object, key) {
7718
+ return object != null && hasOwnProperty.call(object, key);
7719
+ }
7720
+
7721
+ /**
7722
+ * The base implementation of `_.hasIn` without support for deep paths.
7723
+ *
7724
+ * @private
7725
+ * @param {Object} [object] The object to query.
7726
+ * @param {Array|string} key The key to check.
7727
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
7728
+ */
7729
+ function baseHasIn(object, key) {
7730
+ return object != null && key in Object(object);
7731
+ }
7732
+
7733
+ /**
7734
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
7735
+ *
7736
+ * @private
7737
+ * @param {number} number The number to check.
7738
+ * @param {number} start The start of the range.
7739
+ * @param {number} end The end of the range.
7740
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
7741
+ */
7742
+ function baseInRange(number, start, end) {
7743
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
7744
+ }
7745
+
7746
+ /**
7747
+ * The base implementation of methods like `_.intersection`, without support
7748
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
7749
+ *
7750
+ * @private
7751
+ * @param {Array} arrays The arrays to inspect.
7752
+ * @param {Function} [iteratee] The iteratee invoked per element.
7753
+ * @param {Function} [comparator] The comparator invoked per element.
7754
+ * @returns {Array} Returns the new array of shared values.
7755
+ */
7756
+ function baseIntersection(arrays, iteratee, comparator) {
7757
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
7758
+ length = arrays[0].length,
7759
+ othLength = arrays.length,
7760
+ othIndex = othLength,
7761
+ caches = Array(othLength),
7762
+ maxLength = Infinity,
7763
+ result = [];
7764
+
7765
+ while (othIndex--) {
7766
+ var array = arrays[othIndex];
7767
+ if (othIndex && iteratee) {
7768
+ array = arrayMap(array, baseUnary(iteratee));
7769
+ }
7770
+ maxLength = nativeMin(array.length, maxLength);
7771
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
7772
+ ? new SetCache(othIndex && array)
7773
+ : undefined;
7774
+ }
7775
+ array = arrays[0];
7776
+
7777
+ var index = -1,
7778
+ seen = caches[0];
7779
+
7780
+ outer:
7781
+ while (++index < length && result.length < maxLength) {
7782
+ var value = array[index],
7783
+ computed = iteratee ? iteratee(value) : value;
7784
+
7785
+ value = (comparator || value !== 0) ? value : 0;
7786
+ if (!(seen
7787
+ ? cacheHas(seen, computed)
7788
+ : includes(result, computed, comparator)
7789
+ )) {
7790
+ othIndex = othLength;
7791
+ while (--othIndex) {
7792
+ var cache = caches[othIndex];
7793
+ if (!(cache
7794
+ ? cacheHas(cache, computed)
7795
+ : includes(arrays[othIndex], computed, comparator))
7796
+ ) {
7797
+ continue outer;
7798
+ }
7799
+ }
7800
+ if (seen) {
7801
+ seen.push(computed);
7802
+ }
7803
+ result.push(value);
7804
+ }
7805
+ }
7806
+ return result;
7807
+ }
7808
+
7809
+ /**
7810
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
7811
+ * `object` with values transformed by `iteratee` and set by `setter`.
7812
+ *
7813
+ * @private
7814
+ * @param {Object} object The object to iterate over.
7815
+ * @param {Function} setter The function to set `accumulator` values.
7816
+ * @param {Function} iteratee The iteratee to transform values.
7817
+ * @param {Object} accumulator The initial inverted object.
7818
+ * @returns {Function} Returns `accumulator`.
7819
+ */
7820
+ function baseInverter(object, setter, iteratee, accumulator) {
7821
+ baseForOwn(object, function(value, key, object) {
7822
+ setter(accumulator, iteratee(value), key, object);
7823
+ });
7824
+ return accumulator;
7825
+ }
7826
+
7827
+ /**
7828
+ * The base implementation of `_.invoke` without support for individual
7829
+ * method arguments.
7830
+ *
7831
+ * @private
7832
+ * @param {Object} object The object to query.
7833
+ * @param {Array|string} path The path of the method to invoke.
7834
+ * @param {Array} args The arguments to invoke the method with.
7835
+ * @returns {*} Returns the result of the invoked method.
7836
+ */
7837
+ function baseInvoke(object, path, args) {
7838
+ path = castPath(path, object);
7839
+ object = parent(object, path);
7840
+ var func = object == null ? object : object[toKey(last(path))];
7841
+ return func == null ? undefined : apply(func, object, args);
7842
+ }
7843
+
7844
+ /**
7845
+ * The base implementation of `_.isArguments`.
7846
+ *
7847
+ * @private
7848
+ * @param {*} value The value to check.
7849
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
7850
+ */
7851
+ function baseIsArguments(value) {
7852
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
7853
+ }
7854
+
7855
+ /**
7856
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
7857
+ *
7858
+ * @private
7859
+ * @param {*} value The value to check.
7860
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
7861
+ */
7862
+ function baseIsArrayBuffer(value) {
7863
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
7864
+ }
7865
+
7866
+ /**
7867
+ * The base implementation of `_.isDate` without Node.js optimizations.
7868
+ *
7869
+ * @private
7870
+ * @param {*} value The value to check.
7871
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
7872
+ */
7873
+ function baseIsDate(value) {
7874
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
7875
+ }
7876
+
7877
+ /**
7878
+ * The base implementation of `_.isEqual` which supports partial comparisons
7879
+ * and tracks traversed objects.
7880
+ *
7881
+ * @private
7882
+ * @param {*} value The value to compare.
7883
+ * @param {*} other The other value to compare.
7884
+ * @param {boolean} bitmask The bitmask flags.
7885
+ * 1 - Unordered comparison
7886
+ * 2 - Partial comparison
7887
+ * @param {Function} [customizer] The function to customize comparisons.
7888
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
7889
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
7890
+ */
7891
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
7892
+ if (value === other) {
7893
+ return true;
7894
+ }
7895
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
7896
+ return value !== value && other !== other;
7897
+ }
7898
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
7899
+ }
7900
+
7901
+ /**
7902
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
7903
+ * deep comparisons and tracks traversed objects enabling objects with circular
7904
+ * references to be compared.
7905
+ *
7906
+ * @private
7907
+ * @param {Object} object The object to compare.
7908
+ * @param {Object} other The other object to compare.
7909
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7910
+ * @param {Function} customizer The function to customize comparisons.
7911
+ * @param {Function} equalFunc The function to determine equivalents of values.
7912
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
7913
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7914
+ */
7915
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
7916
+ var objIsArr = isArray(object),
7917
+ othIsArr = isArray(other),
7918
+ objTag = objIsArr ? arrayTag : getTag(object),
7919
+ othTag = othIsArr ? arrayTag : getTag(other);
7920
+
7921
+ objTag = objTag == argsTag ? objectTag : objTag;
7922
+ othTag = othTag == argsTag ? objectTag : othTag;
7923
+
7924
+ var objIsObj = objTag == objectTag,
7925
+ othIsObj = othTag == objectTag,
7926
+ isSameTag = objTag == othTag;
7927
+
7928
+ if (isSameTag && isBuffer(object)) {
7929
+ if (!isBuffer(other)) {
7930
+ return false;
7931
+ }
7932
+ objIsArr = true;
7933
+ objIsObj = false;
7934
+ }
7935
+ if (isSameTag && !objIsObj) {
7936
+ stack || (stack = new Stack);
7937
+ return (objIsArr || isTypedArray(object))
7938
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
7939
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
7940
+ }
7941
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
7942
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
7943
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
7944
+
7945
+ if (objIsWrapped || othIsWrapped) {
7946
+ var objUnwrapped = objIsWrapped ? object.value() : object,
7947
+ othUnwrapped = othIsWrapped ? other.value() : other;
7948
+
7949
+ stack || (stack = new Stack);
7950
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
7951
+ }
7952
+ }
7953
+ if (!isSameTag) {
7954
+ return false;
7955
+ }
7956
+ stack || (stack = new Stack);
7957
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
7958
+ }
7959
+
7960
+ /**
7961
+ * The base implementation of `_.isMap` without Node.js optimizations.
7962
+ *
7963
+ * @private
7964
+ * @param {*} value The value to check.
7965
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
7966
+ */
7967
+ function baseIsMap(value) {
7968
+ return isObjectLike(value) && getTag(value) == mapTag;
7969
+ }
7970
+
7971
+ /**
7972
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
7973
+ *
7974
+ * @private
7975
+ * @param {Object} object The object to inspect.
7976
+ * @param {Object} source The object of property values to match.
7977
+ * @param {Array} matchData The property names, values, and compare flags to match.
7978
+ * @param {Function} [customizer] The function to customize comparisons.
7979
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
7980
+ */
7981
+ function baseIsMatch(object, source, matchData, customizer) {
7982
+ var index = matchData.length,
7983
+ length = index,
7984
+ noCustomizer = !customizer;
7985
+
7986
+ if (object == null) {
7987
+ return !length;
7988
+ }
7989
+ object = Object(object);
7990
+ while (index--) {
7991
+ var data = matchData[index];
7992
+ if ((noCustomizer && data[2])
7993
+ ? data[1] !== object[data[0]]
7994
+ : !(data[0] in object)
7995
+ ) {
7996
+ return false;
7997
+ }
7998
+ }
7999
+ while (++index < length) {
8000
+ data = matchData[index];
8001
+ var key = data[0],
8002
+ objValue = object[key],
8003
+ srcValue = data[1];
8004
+
8005
+ if (noCustomizer && data[2]) {
8006
+ if (objValue === undefined && !(key in object)) {
8007
+ return false;
8008
+ }
8009
+ } else {
8010
+ var stack = new Stack;
8011
+ if (customizer) {
8012
+ var result = customizer(objValue, srcValue, key, object, source, stack);
8013
+ }
8014
+ if (!(result === undefined
8015
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
8016
+ : result
8017
+ )) {
8018
+ return false;
8019
+ }
8020
+ }
8021
+ }
8022
+ return true;
8023
+ }
8024
+
8025
+ /**
8026
+ * The base implementation of `_.isNative` without bad shim checks.
8027
+ *
8028
+ * @private
8029
+ * @param {*} value The value to check.
8030
+ * @returns {boolean} Returns `true` if `value` is a native function,
8031
+ * else `false`.
8032
+ */
8033
+ function baseIsNative(value) {
8034
+ if (!isObject(value) || isMasked(value)) {
8035
+ return false;
8036
+ }
8037
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
8038
+ return pattern.test(toSource(value));
8039
+ }
8040
+
8041
+ /**
8042
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
8043
+ *
8044
+ * @private
8045
+ * @param {*} value The value to check.
8046
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
8047
+ */
8048
+ function baseIsRegExp(value) {
8049
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
8050
+ }
8051
+
8052
+ /**
8053
+ * The base implementation of `_.isSet` without Node.js optimizations.
8054
+ *
8055
+ * @private
8056
+ * @param {*} value The value to check.
8057
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
8058
+ */
8059
+ function baseIsSet(value) {
8060
+ return isObjectLike(value) && getTag(value) == setTag;
8061
+ }
8062
+
8063
+ /**
8064
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
8065
+ *
8066
+ * @private
8067
+ * @param {*} value The value to check.
8068
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
8069
+ */
8070
+ function baseIsTypedArray(value) {
8071
+ return isObjectLike(value) &&
8072
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
8073
+ }
8074
+
8075
+ /**
8076
+ * The base implementation of `_.iteratee`.
8077
+ *
8078
+ * @private
8079
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
8080
+ * @returns {Function} Returns the iteratee.
8081
+ */
8082
+ function baseIteratee(value) {
8083
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
8084
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
8085
+ if (typeof value == 'function') {
8086
+ return value;
8087
+ }
8088
+ if (value == null) {
8089
+ return identity;
8090
+ }
8091
+ if (typeof value == 'object') {
8092
+ return isArray(value)
8093
+ ? baseMatchesProperty(value[0], value[1])
8094
+ : baseMatches(value);
8095
+ }
8096
+ return property(value);
8097
+ }
8098
+
8099
+ /**
8100
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
8101
+ *
8102
+ * @private
8103
+ * @param {Object} object The object to query.
8104
+ * @returns {Array} Returns the array of property names.
8105
+ */
8106
+ function baseKeys(object) {
8107
+ if (!isPrototype(object)) {
8108
+ return nativeKeys(object);
8109
+ }
8110
+ var result = [];
8111
+ for (var key in Object(object)) {
8112
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
8113
+ result.push(key);
8114
+ }
8115
+ }
8116
+ return result;
8117
+ }
8118
+
8119
+ /**
8120
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
8121
+ *
8122
+ * @private
8123
+ * @param {Object} object The object to query.
8124
+ * @returns {Array} Returns the array of property names.
8125
+ */
8126
+ function baseKeysIn(object) {
8127
+ if (!isObject(object)) {
8128
+ return nativeKeysIn(object);
8129
+ }
8130
+ var isProto = isPrototype(object),
8131
+ result = [];
8132
+
8133
+ for (var key in object) {
8134
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
8135
+ result.push(key);
8136
+ }
8137
+ }
8138
+ return result;
8139
+ }
8140
+
8141
+ /**
8142
+ * The base implementation of `_.lt` which doesn't coerce arguments.
8143
+ *
8144
+ * @private
8145
+ * @param {*} value The value to compare.
8146
+ * @param {*} other The other value to compare.
8147
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
8148
+ * else `false`.
8149
+ */
8150
+ function baseLt(value, other) {
8151
+ return value < other;
8152
+ }
8153
+
8154
+ /**
8155
+ * The base implementation of `_.map` without support for iteratee shorthands.
8156
+ *
8157
+ * @private
8158
+ * @param {Array|Object} collection The collection to iterate over.
8159
+ * @param {Function} iteratee The function invoked per iteration.
8160
+ * @returns {Array} Returns the new mapped array.
8161
+ */
8162
+ function baseMap(collection, iteratee) {
8163
+ var index = -1,
8164
+ result = isArrayLike(collection) ? Array(collection.length) : [];
8165
+
8166
+ baseEach(collection, function(value, key, collection) {
8167
+ result[++index] = iteratee(value, key, collection);
8168
+ });
8169
+ return result;
8170
+ }
8171
+
8172
+ /**
8173
+ * The base implementation of `_.matches` which doesn't clone `source`.
8174
+ *
8175
+ * @private
8176
+ * @param {Object} source The object of property values to match.
8177
+ * @returns {Function} Returns the new spec function.
8178
+ */
8179
+ function baseMatches(source) {
8180
+ var matchData = getMatchData(source);
8181
+ if (matchData.length == 1 && matchData[0][2]) {
8182
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
8183
+ }
8184
+ return function(object) {
8185
+ return object === source || baseIsMatch(object, source, matchData);
8186
+ };
8187
+ }
8188
+
8189
+ /**
8190
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
8191
+ *
8192
+ * @private
8193
+ * @param {string} path The path of the property to get.
8194
+ * @param {*} srcValue The value to match.
8195
+ * @returns {Function} Returns the new spec function.
8196
+ */
8197
+ function baseMatchesProperty(path, srcValue) {
8198
+ if (isKey(path) && isStrictComparable(srcValue)) {
8199
+ return matchesStrictComparable(toKey(path), srcValue);
8200
+ }
8201
+ return function(object) {
8202
+ var objValue = get(object, path);
8203
+ return (objValue === undefined && objValue === srcValue)
8204
+ ? hasIn(object, path)
8205
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
8206
+ };
8207
+ }
8208
+
8209
+ /**
8210
+ * The base implementation of `_.merge` without support for multiple sources.
8211
+ *
8212
+ * @private
8213
+ * @param {Object} object The destination object.
8214
+ * @param {Object} source The source object.
8215
+ * @param {number} srcIndex The index of `source`.
8216
+ * @param {Function} [customizer] The function to customize merged values.
8217
+ * @param {Object} [stack] Tracks traversed source values and their merged
8218
+ * counterparts.
8219
+ */
8220
+ function baseMerge(object, source, srcIndex, customizer, stack) {
8221
+ if (object === source) {
8222
+ return;
8223
+ }
8224
+ baseFor(source, function(srcValue, key) {
8225
+ if (isObject(srcValue)) {
8226
+ stack || (stack = new Stack);
8227
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
8228
+ }
8229
+ else {
8230
+ var newValue = customizer
8231
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
8232
+ : undefined;
8233
+
8234
+ if (newValue === undefined) {
8235
+ newValue = srcValue;
8236
+ }
8237
+ assignMergeValue(object, key, newValue);
8238
+ }
8239
+ }, keysIn);
8240
+ }
8241
+
8242
+ /**
8243
+ * A specialized version of `baseMerge` for arrays and objects which performs
8244
+ * deep merges and tracks traversed objects enabling objects with circular
8245
+ * references to be merged.
8246
+ *
8247
+ * @private
8248
+ * @param {Object} object The destination object.
8249
+ * @param {Object} source The source object.
8250
+ * @param {string} key The key of the value to merge.
8251
+ * @param {number} srcIndex The index of `source`.
8252
+ * @param {Function} mergeFunc The function to merge values.
8253
+ * @param {Function} [customizer] The function to customize assigned values.
8254
+ * @param {Object} [stack] Tracks traversed source values and their merged
8255
+ * counterparts.
8256
+ */
8257
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
8258
+ var objValue = safeGet(object, key),
8259
+ srcValue = safeGet(source, key),
8260
+ stacked = stack.get(srcValue);
8261
+
8262
+ if (stacked) {
8263
+ assignMergeValue(object, key, stacked);
8264
+ return;
8265
+ }
8266
+ var newValue = customizer
8267
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
8268
+ : undefined;
8269
+
8270
+ var isCommon = newValue === undefined;
8271
+
8272
+ if (isCommon) {
8273
+ var isArr = isArray(srcValue),
8274
+ isBuff = !isArr && isBuffer(srcValue),
8275
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
8276
+
8277
+ newValue = srcValue;
8278
+ if (isArr || isBuff || isTyped) {
8279
+ if (isArray(objValue)) {
8280
+ newValue = objValue;
8281
+ }
8282
+ else if (isArrayLikeObject(objValue)) {
8283
+ newValue = copyArray(objValue);
8284
+ }
8285
+ else if (isBuff) {
8286
+ isCommon = false;
8287
+ newValue = cloneBuffer(srcValue, true);
8288
+ }
8289
+ else if (isTyped) {
8290
+ isCommon = false;
8291
+ newValue = cloneTypedArray(srcValue, true);
8292
+ }
8293
+ else {
8294
+ newValue = [];
8295
+ }
8296
+ }
8297
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
8298
+ newValue = objValue;
8299
+ if (isArguments(objValue)) {
8300
+ newValue = toPlainObject(objValue);
8301
+ }
8302
+ else if (!isObject(objValue) || isFunction(objValue)) {
8303
+ newValue = initCloneObject(srcValue);
8304
+ }
8305
+ }
8306
+ else {
8307
+ isCommon = false;
8308
+ }
8309
+ }
8310
+ if (isCommon) {
8311
+ // Recursively merge objects and arrays (susceptible to call stack limits).
8312
+ stack.set(srcValue, newValue);
8313
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
8314
+ stack['delete'](srcValue);
8315
+ }
8316
+ assignMergeValue(object, key, newValue);
8317
+ }
8318
+
8319
+ /**
8320
+ * The base implementation of `_.nth` which doesn't coerce arguments.
8321
+ *
8322
+ * @private
8323
+ * @param {Array} array The array to query.
8324
+ * @param {number} n The index of the element to return.
8325
+ * @returns {*} Returns the nth element of `array`.
8326
+ */
8327
+ function baseNth(array, n) {
8328
+ var length = array.length;
8329
+ if (!length) {
8330
+ return;
8331
+ }
8332
+ n += n < 0 ? length : 0;
8333
+ return isIndex(n, length) ? array[n] : undefined;
8334
+ }
8335
+
8336
+ /**
8337
+ * The base implementation of `_.orderBy` without param guards.
8338
+ *
8339
+ * @private
8340
+ * @param {Array|Object} collection The collection to iterate over.
8341
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
8342
+ * @param {string[]} orders The sort orders of `iteratees`.
8343
+ * @returns {Array} Returns the new sorted array.
8344
+ */
8345
+ function baseOrderBy(collection, iteratees, orders) {
8346
+ var index = -1;
8347
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
8348
+
8349
+ var result = baseMap(collection, function(value, key, collection) {
8350
+ var criteria = arrayMap(iteratees, function(iteratee) {
8351
+ return iteratee(value);
8352
+ });
8353
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
8354
+ });
8355
+
8356
+ return baseSortBy(result, function(object, other) {
8357
+ return compareMultiple(object, other, orders);
8358
+ });
8359
+ }
8360
+
8361
+ /**
8362
+ * The base implementation of `_.pick` without support for individual
8363
+ * property identifiers.
8364
+ *
8365
+ * @private
8366
+ * @param {Object} object The source object.
8367
+ * @param {string[]} paths The property paths to pick.
8368
+ * @returns {Object} Returns the new object.
8369
+ */
8370
+ function basePick(object, paths) {
8371
+ return basePickBy(object, paths, function(value, path) {
8372
+ return hasIn(object, path);
8373
+ });
8374
+ }
8375
+
8376
+ /**
8377
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
8378
+ *
8379
+ * @private
8380
+ * @param {Object} object The source object.
8381
+ * @param {string[]} paths The property paths to pick.
8382
+ * @param {Function} predicate The function invoked per property.
8383
+ * @returns {Object} Returns the new object.
8384
+ */
8385
+ function basePickBy(object, paths, predicate) {
8386
+ var index = -1,
8387
+ length = paths.length,
8388
+ result = {};
8389
+
8390
+ while (++index < length) {
8391
+ var path = paths[index],
8392
+ value = baseGet(object, path);
8393
+
8394
+ if (predicate(value, path)) {
8395
+ baseSet(result, castPath(path, object), value);
8396
+ }
8397
+ }
8398
+ return result;
8399
+ }
8400
+
8401
+ /**
8402
+ * A specialized version of `baseProperty` which supports deep paths.
8403
+ *
8404
+ * @private
8405
+ * @param {Array|string} path The path of the property to get.
8406
+ * @returns {Function} Returns the new accessor function.
8407
+ */
8408
+ function basePropertyDeep(path) {
8409
+ return function(object) {
8410
+ return baseGet(object, path);
8411
+ };
8412
+ }
8413
+
8414
+ /**
8415
+ * The base implementation of `_.pullAllBy` without support for iteratee
8416
+ * shorthands.
8417
+ *
8418
+ * @private
8419
+ * @param {Array} array The array to modify.
8420
+ * @param {Array} values The values to remove.
8421
+ * @param {Function} [iteratee] The iteratee invoked per element.
8422
+ * @param {Function} [comparator] The comparator invoked per element.
8423
+ * @returns {Array} Returns `array`.
8424
+ */
8425
+ function basePullAll(array, values, iteratee, comparator) {
8426
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
8427
+ index = -1,
8428
+ length = values.length,
8429
+ seen = array;
8430
+
8431
+ if (array === values) {
8432
+ values = copyArray(values);
8433
+ }
8434
+ if (iteratee) {
8435
+ seen = arrayMap(array, baseUnary(iteratee));
8436
+ }
8437
+ while (++index < length) {
8438
+ var fromIndex = 0,
8439
+ value = values[index],
8440
+ computed = iteratee ? iteratee(value) : value;
8441
+
8442
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
8443
+ if (seen !== array) {
8444
+ splice.call(seen, fromIndex, 1);
8445
+ }
8446
+ splice.call(array, fromIndex, 1);
8447
+ }
8448
+ }
8449
+ return array;
8450
+ }
8451
+
8452
+ /**
8453
+ * The base implementation of `_.pullAt` without support for individual
8454
+ * indexes or capturing the removed elements.
8455
+ *
8456
+ * @private
8457
+ * @param {Array} array The array to modify.
8458
+ * @param {number[]} indexes The indexes of elements to remove.
8459
+ * @returns {Array} Returns `array`.
8460
+ */
8461
+ function basePullAt(array, indexes) {
8462
+ var length = array ? indexes.length : 0,
8463
+ lastIndex = length - 1;
8464
+
8465
+ while (length--) {
8466
+ var index = indexes[length];
8467
+ if (length == lastIndex || index !== previous) {
8468
+ var previous = index;
8469
+ if (isIndex(index)) {
8470
+ splice.call(array, index, 1);
8471
+ } else {
8472
+ baseUnset(array, index);
8473
+ }
8474
+ }
8475
+ }
8476
+ return array;
8477
+ }
8478
+
8479
+ /**
8480
+ * The base implementation of `_.random` without support for returning
8481
+ * floating-point numbers.
8482
+ *
8483
+ * @private
8484
+ * @param {number} lower The lower bound.
8485
+ * @param {number} upper The upper bound.
8486
+ * @returns {number} Returns the random number.
8487
+ */
8488
+ function baseRandom(lower, upper) {
8489
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
8490
+ }
8491
+
8492
+ /**
8493
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
8494
+ * coerce arguments.
8495
+ *
8496
+ * @private
8497
+ * @param {number} start The start of the range.
8498
+ * @param {number} end The end of the range.
8499
+ * @param {number} step The value to increment or decrement by.
8500
+ * @param {boolean} [fromRight] Specify iterating from right to left.
8501
+ * @returns {Array} Returns the range of numbers.
8502
+ */
8503
+ function baseRange(start, end, step, fromRight) {
8504
+ var index = -1,
8505
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
8506
+ result = Array(length);
8507
+
8508
+ while (length--) {
8509
+ result[fromRight ? length : ++index] = start;
8510
+ start += step;
8511
+ }
8512
+ return result;
8513
+ }
8514
+
8515
+ /**
8516
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
8517
+ *
8518
+ * @private
8519
+ * @param {string} string The string to repeat.
8520
+ * @param {number} n The number of times to repeat the string.
8521
+ * @returns {string} Returns the repeated string.
8522
+ */
8523
+ function baseRepeat(string, n) {
8524
+ var result = '';
8525
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
8526
+ return result;
8527
+ }
8528
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
8529
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
8530
+ do {
8531
+ if (n % 2) {
8532
+ result += string;
8533
+ }
8534
+ n = nativeFloor(n / 2);
8535
+ if (n) {
8536
+ string += string;
8537
+ }
8538
+ } while (n);
8539
+
8540
+ return result;
8541
+ }
8542
+
8543
+ /**
8544
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
8545
+ *
8546
+ * @private
8547
+ * @param {Function} func The function to apply a rest parameter to.
8548
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
8549
+ * @returns {Function} Returns the new function.
8550
+ */
8551
+ function baseRest(func, start) {
8552
+ return setToString(overRest(func, start, identity), func + '');
8553
+ }
8554
+
8555
+ /**
8556
+ * The base implementation of `_.sample`.
8557
+ *
8558
+ * @private
8559
+ * @param {Array|Object} collection The collection to sample.
8560
+ * @returns {*} Returns the random element.
8561
+ */
8562
+ function baseSample(collection) {
8563
+ return arraySample(values(collection));
8564
+ }
8565
+
8566
+ /**
8567
+ * The base implementation of `_.sampleSize` without param guards.
8568
+ *
8569
+ * @private
8570
+ * @param {Array|Object} collection The collection to sample.
8571
+ * @param {number} n The number of elements to sample.
8572
+ * @returns {Array} Returns the random elements.
8573
+ */
8574
+ function baseSampleSize(collection, n) {
8575
+ var array = values(collection);
8576
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
8577
+ }
8578
+
8579
+ /**
8580
+ * The base implementation of `_.set`.
8581
+ *
8582
+ * @private
8583
+ * @param {Object} object The object to modify.
8584
+ * @param {Array|string} path The path of the property to set.
8585
+ * @param {*} value The value to set.
8586
+ * @param {Function} [customizer] The function to customize path creation.
8587
+ * @returns {Object} Returns `object`.
8588
+ */
8589
+ function baseSet(object, path, value, customizer) {
8590
+ if (!isObject(object)) {
8591
+ return object;
8592
+ }
8593
+ path = castPath(path, object);
8594
+
8595
+ var index = -1,
8596
+ length = path.length,
8597
+ lastIndex = length - 1,
8598
+ nested = object;
8599
+
8600
+ while (nested != null && ++index < length) {
8601
+ var key = toKey(path[index]),
8602
+ newValue = value;
8603
+
8604
+ if (index != lastIndex) {
8605
+ var objValue = nested[key];
8606
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
8607
+ if (newValue === undefined) {
8608
+ newValue = isObject(objValue)
8609
+ ? objValue
8610
+ : (isIndex(path[index + 1]) ? [] : {});
8611
+ }
8612
+ }
8613
+ assignValue(nested, key, newValue);
8614
+ nested = nested[key];
8615
+ }
8616
+ return object;
8617
+ }
8618
+
8619
+ /**
8620
+ * The base implementation of `setData` without support for hot loop shorting.
8621
+ *
8622
+ * @private
8623
+ * @param {Function} func The function to associate metadata with.
8624
+ * @param {*} data The metadata.
8625
+ * @returns {Function} Returns `func`.
8626
+ */
8627
+ var baseSetData = !metaMap ? identity : function(func, data) {
8628
+ metaMap.set(func, data);
8629
+ return func;
8630
+ };
8631
+
8632
+ /**
8633
+ * The base implementation of `setToString` without support for hot loop shorting.
8634
+ *
8635
+ * @private
8636
+ * @param {Function} func The function to modify.
8637
+ * @param {Function} string The `toString` result.
8638
+ * @returns {Function} Returns `func`.
8639
+ */
8640
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
8641
+ return defineProperty(func, 'toString', {
8642
+ 'configurable': true,
8643
+ 'enumerable': false,
8644
+ 'value': constant(string),
8645
+ 'writable': true
8646
+ });
8647
+ };
8648
+
8649
+ /**
8650
+ * The base implementation of `_.shuffle`.
8651
+ *
8652
+ * @private
8653
+ * @param {Array|Object} collection The collection to shuffle.
8654
+ * @returns {Array} Returns the new shuffled array.
8655
+ */
8656
+ function baseShuffle(collection) {
8657
+ return shuffleSelf(values(collection));
8658
+ }
8659
+
8660
+ /**
8661
+ * The base implementation of `_.slice` without an iteratee call guard.
8662
+ *
8663
+ * @private
8664
+ * @param {Array} array The array to slice.
8665
+ * @param {number} [start=0] The start position.
8666
+ * @param {number} [end=array.length] The end position.
8667
+ * @returns {Array} Returns the slice of `array`.
8668
+ */
8669
+ function baseSlice(array, start, end) {
8670
+ var index = -1,
8671
+ length = array.length;
8672
+
8673
+ if (start < 0) {
8674
+ start = -start > length ? 0 : (length + start);
8675
+ }
8676
+ end = end > length ? length : end;
8677
+ if (end < 0) {
8678
+ end += length;
8679
+ }
8680
+ length = start > end ? 0 : ((end - start) >>> 0);
8681
+ start >>>= 0;
8682
+
8683
+ var result = Array(length);
8684
+ while (++index < length) {
8685
+ result[index] = array[index + start];
8686
+ }
8687
+ return result;
8688
+ }
8689
+
8690
+ /**
8691
+ * The base implementation of `_.some` without support for iteratee shorthands.
8692
+ *
8693
+ * @private
8694
+ * @param {Array|Object} collection The collection to iterate over.
8695
+ * @param {Function} predicate The function invoked per iteration.
8696
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
8697
+ * else `false`.
8698
+ */
8699
+ function baseSome(collection, predicate) {
8700
+ var result;
8701
+
8702
+ baseEach(collection, function(value, index, collection) {
8703
+ result = predicate(value, index, collection);
8704
+ return !result;
8705
+ });
8706
+ return !!result;
8707
+ }
8708
+
8709
+ /**
8710
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
8711
+ * performs a binary search of `array` to determine the index at which `value`
8712
+ * should be inserted into `array` in order to maintain its sort order.
8713
+ *
8714
+ * @private
8715
+ * @param {Array} array The sorted array to inspect.
8716
+ * @param {*} value The value to evaluate.
8717
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
8718
+ * @returns {number} Returns the index at which `value` should be inserted
8719
+ * into `array`.
8720
+ */
8721
+ function baseSortedIndex(array, value, retHighest) {
8722
+ var low = 0,
8723
+ high = array == null ? low : array.length;
8724
+
8725
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
8726
+ while (low < high) {
8727
+ var mid = (low + high) >>> 1,
8728
+ computed = array[mid];
8729
+
8730
+ if (computed !== null && !isSymbol(computed) &&
8731
+ (retHighest ? (computed <= value) : (computed < value))) {
8732
+ low = mid + 1;
8733
+ } else {
8734
+ high = mid;
8735
+ }
8736
+ }
8737
+ return high;
8738
+ }
8739
+ return baseSortedIndexBy(array, value, identity, retHighest);
8740
+ }
8741
+
8742
+ /**
8743
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
8744
+ * which invokes `iteratee` for `value` and each element of `array` to compute
8745
+ * their sort ranking. The iteratee is invoked with one argument; (value).
8746
+ *
8747
+ * @private
8748
+ * @param {Array} array The sorted array to inspect.
8749
+ * @param {*} value The value to evaluate.
8750
+ * @param {Function} iteratee The iteratee invoked per element.
8751
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
8752
+ * @returns {number} Returns the index at which `value` should be inserted
8753
+ * into `array`.
8754
+ */
8755
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
8756
+ value = iteratee(value);
8757
+
8758
+ var low = 0,
8759
+ high = array == null ? 0 : array.length,
8760
+ valIsNaN = value !== value,
8761
+ valIsNull = value === null,
8762
+ valIsSymbol = isSymbol(value),
8763
+ valIsUndefined = value === undefined;
8764
+
8765
+ while (low < high) {
8766
+ var mid = nativeFloor((low + high) / 2),
8767
+ computed = iteratee(array[mid]),
8768
+ othIsDefined = computed !== undefined,
8769
+ othIsNull = computed === null,
8770
+ othIsReflexive = computed === computed,
8771
+ othIsSymbol = isSymbol(computed);
8772
+
8773
+ if (valIsNaN) {
8774
+ var setLow = retHighest || othIsReflexive;
8775
+ } else if (valIsUndefined) {
8776
+ setLow = othIsReflexive && (retHighest || othIsDefined);
8777
+ } else if (valIsNull) {
8778
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
8779
+ } else if (valIsSymbol) {
8780
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
8781
+ } else if (othIsNull || othIsSymbol) {
8782
+ setLow = false;
8783
+ } else {
8784
+ setLow = retHighest ? (computed <= value) : (computed < value);
8785
+ }
8786
+ if (setLow) {
8787
+ low = mid + 1;
8788
+ } else {
8789
+ high = mid;
8790
+ }
8791
+ }
8792
+ return nativeMin(high, MAX_ARRAY_INDEX);
8793
+ }
8794
+
8795
+ /**
8796
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
8797
+ * support for iteratee shorthands.
8798
+ *
8799
+ * @private
8800
+ * @param {Array} array The array to inspect.
8801
+ * @param {Function} [iteratee] The iteratee invoked per element.
8802
+ * @returns {Array} Returns the new duplicate free array.
8803
+ */
8804
+ function baseSortedUniq(array, iteratee) {
8805
+ var index = -1,
8806
+ length = array.length,
8807
+ resIndex = 0,
8808
+ result = [];
8809
+
8810
+ while (++index < length) {
8811
+ var value = array[index],
8812
+ computed = iteratee ? iteratee(value) : value;
8813
+
8814
+ if (!index || !eq(computed, seen)) {
8815
+ var seen = computed;
8816
+ result[resIndex++] = value === 0 ? 0 : value;
8817
+ }
8818
+ }
8819
+ return result;
8820
+ }
8821
+
8822
+ /**
8823
+ * The base implementation of `_.toNumber` which doesn't ensure correct
8824
+ * conversions of binary, hexadecimal, or octal string values.
8825
+ *
8826
+ * @private
8827
+ * @param {*} value The value to process.
8828
+ * @returns {number} Returns the number.
8829
+ */
8830
+ function baseToNumber(value) {
8831
+ if (typeof value == 'number') {
8832
+ return value;
8833
+ }
8834
+ if (isSymbol(value)) {
8835
+ return NAN;
8836
+ }
8837
+ return +value;
8838
+ }
8839
+
8840
+ /**
8841
+ * The base implementation of `_.toString` which doesn't convert nullish
8842
+ * values to empty strings.
8843
+ *
8844
+ * @private
8845
+ * @param {*} value The value to process.
8846
+ * @returns {string} Returns the string.
8847
+ */
8848
+ function baseToString(value) {
8849
+ // Exit early for strings to avoid a performance hit in some environments.
8850
+ if (typeof value == 'string') {
8851
+ return value;
8852
+ }
8853
+ if (isArray(value)) {
8854
+ // Recursively convert values (susceptible to call stack limits).
8855
+ return arrayMap(value, baseToString) + '';
8856
+ }
8857
+ if (isSymbol(value)) {
8858
+ return symbolToString ? symbolToString.call(value) : '';
8859
+ }
8860
+ var result = (value + '');
8861
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8862
+ }
8863
+
8864
+ /**
8865
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
8866
+ *
8867
+ * @private
8868
+ * @param {Array} array The array to inspect.
8869
+ * @param {Function} [iteratee] The iteratee invoked per element.
8870
+ * @param {Function} [comparator] The comparator invoked per element.
8871
+ * @returns {Array} Returns the new duplicate free array.
8872
+ */
8873
+ function baseUniq(array, iteratee, comparator) {
8874
+ var index = -1,
8875
+ includes = arrayIncludes,
8876
+ length = array.length,
8877
+ isCommon = true,
8878
+ result = [],
8879
+ seen = result;
8880
+
8881
+ if (comparator) {
8882
+ isCommon = false;
8883
+ includes = arrayIncludesWith;
8884
+ }
8885
+ else if (length >= LARGE_ARRAY_SIZE) {
8886
+ var set = iteratee ? null : createSet(array);
8887
+ if (set) {
8888
+ return setToArray(set);
8889
+ }
8890
+ isCommon = false;
8891
+ includes = cacheHas;
8892
+ seen = new SetCache;
8893
+ }
8894
+ else {
8895
+ seen = iteratee ? [] : result;
8896
+ }
8897
+ outer:
8898
+ while (++index < length) {
8899
+ var value = array[index],
8900
+ computed = iteratee ? iteratee(value) : value;
8901
+
8902
+ value = (comparator || value !== 0) ? value : 0;
8903
+ if (isCommon && computed === computed) {
8904
+ var seenIndex = seen.length;
8905
+ while (seenIndex--) {
8906
+ if (seen[seenIndex] === computed) {
8907
+ continue outer;
8908
+ }
8909
+ }
8910
+ if (iteratee) {
8911
+ seen.push(computed);
8912
+ }
8913
+ result.push(value);
8914
+ }
8915
+ else if (!includes(seen, computed, comparator)) {
8916
+ if (seen !== result) {
8917
+ seen.push(computed);
8918
+ }
8919
+ result.push(value);
8920
+ }
8921
+ }
8922
+ return result;
8923
+ }
8924
+
8925
+ /**
8926
+ * The base implementation of `_.unset`.
8927
+ *
8928
+ * @private
8929
+ * @param {Object} object The object to modify.
8930
+ * @param {Array|string} path The property path to unset.
8931
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
8932
+ */
8933
+ function baseUnset(object, path) {
8934
+ path = castPath(path, object);
8935
+ object = parent(object, path);
8936
+ return object == null || delete object[toKey(last(path))];
8937
+ }
8938
+
8939
+ /**
8940
+ * The base implementation of `_.update`.
8941
+ *
8942
+ * @private
8943
+ * @param {Object} object The object to modify.
8944
+ * @param {Array|string} path The path of the property to update.
8945
+ * @param {Function} updater The function to produce the updated value.
8946
+ * @param {Function} [customizer] The function to customize path creation.
8947
+ * @returns {Object} Returns `object`.
8948
+ */
8949
+ function baseUpdate(object, path, updater, customizer) {
8950
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
8951
+ }
8952
+
8953
+ /**
8954
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
8955
+ * without support for iteratee shorthands.
8956
+ *
8957
+ * @private
8958
+ * @param {Array} array The array to query.
8959
+ * @param {Function} predicate The function invoked per iteration.
8960
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
8961
+ * @param {boolean} [fromRight] Specify iterating from right to left.
8962
+ * @returns {Array} Returns the slice of `array`.
8963
+ */
8964
+ function baseWhile(array, predicate, isDrop, fromRight) {
8965
+ var length = array.length,
8966
+ index = fromRight ? length : -1;
8967
+
8968
+ while ((fromRight ? index-- : ++index < length) &&
8969
+ predicate(array[index], index, array)) {}
8970
+
8971
+ return isDrop
8972
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
8973
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
8974
+ }
8975
+
8976
+ /**
8977
+ * The base implementation of `wrapperValue` which returns the result of
8978
+ * performing a sequence of actions on the unwrapped `value`, where each
8979
+ * successive action is supplied the return value of the previous.
8980
+ *
8981
+ * @private
8982
+ * @param {*} value The unwrapped value.
8983
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
8984
+ * @returns {*} Returns the resolved value.
8985
+ */
8986
+ function baseWrapperValue(value, actions) {
8987
+ var result = value;
8988
+ if (result instanceof LazyWrapper) {
8989
+ result = result.value();
8990
+ }
8991
+ return arrayReduce(actions, function(result, action) {
8992
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
8993
+ }, result);
8994
+ }
8995
+
8996
+ /**
8997
+ * The base implementation of methods like `_.xor`, without support for
8998
+ * iteratee shorthands, that accepts an array of arrays to inspect.
8999
+ *
9000
+ * @private
9001
+ * @param {Array} arrays The arrays to inspect.
9002
+ * @param {Function} [iteratee] The iteratee invoked per element.
9003
+ * @param {Function} [comparator] The comparator invoked per element.
9004
+ * @returns {Array} Returns the new array of values.
9005
+ */
9006
+ function baseXor(arrays, iteratee, comparator) {
9007
+ var length = arrays.length;
9008
+ if (length < 2) {
9009
+ return length ? baseUniq(arrays[0]) : [];
9010
+ }
9011
+ var index = -1,
9012
+ result = Array(length);
9013
+
9014
+ while (++index < length) {
9015
+ var array = arrays[index],
9016
+ othIndex = -1;
9017
+
9018
+ while (++othIndex < length) {
9019
+ if (othIndex != index) {
9020
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
9021
+ }
9022
+ }
9023
+ }
9024
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
9025
+ }
9026
+
9027
+ /**
9028
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
9029
+ *
9030
+ * @private
9031
+ * @param {Array} props The property identifiers.
9032
+ * @param {Array} values The property values.
9033
+ * @param {Function} assignFunc The function to assign values.
9034
+ * @returns {Object} Returns the new object.
9035
+ */
9036
+ function baseZipObject(props, values, assignFunc) {
9037
+ var index = -1,
9038
+ length = props.length,
9039
+ valsLength = values.length,
9040
+ result = {};
9041
+
9042
+ while (++index < length) {
9043
+ var value = index < valsLength ? values[index] : undefined;
9044
+ assignFunc(result, props[index], value);
9045
+ }
9046
+ return result;
9047
+ }
9048
+
9049
+ /**
9050
+ * Casts `value` to an empty array if it's not an array like object.
9051
+ *
9052
+ * @private
9053
+ * @param {*} value The value to inspect.
9054
+ * @returns {Array|Object} Returns the cast array-like object.
9055
+ */
9056
+ function castArrayLikeObject(value) {
9057
+ return isArrayLikeObject(value) ? value : [];
9058
+ }
9059
+
9060
+ /**
9061
+ * Casts `value` to `identity` if it's not a function.
9062
+ *
9063
+ * @private
9064
+ * @param {*} value The value to inspect.
9065
+ * @returns {Function} Returns cast function.
9066
+ */
9067
+ function castFunction(value) {
9068
+ return typeof value == 'function' ? value : identity;
9069
+ }
9070
+
9071
+ /**
9072
+ * Casts `value` to a path array if it's not one.
9073
+ *
9074
+ * @private
9075
+ * @param {*} value The value to inspect.
9076
+ * @param {Object} [object] The object to query keys on.
9077
+ * @returns {Array} Returns the cast property path array.
9078
+ */
9079
+ function castPath(value, object) {
9080
+ if (isArray(value)) {
9081
+ return value;
9082
+ }
9083
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
9084
+ }
9085
+
9086
+ /**
9087
+ * A `baseRest` alias which can be replaced with `identity` by module
9088
+ * replacement plugins.
9089
+ *
9090
+ * @private
9091
+ * @type {Function}
9092
+ * @param {Function} func The function to apply a rest parameter to.
9093
+ * @returns {Function} Returns the new function.
9094
+ */
9095
+ var castRest = baseRest;
9096
+
9097
+ /**
9098
+ * Casts `array` to a slice if it's needed.
9099
+ *
9100
+ * @private
9101
+ * @param {Array} array The array to inspect.
9102
+ * @param {number} start The start position.
9103
+ * @param {number} [end=array.length] The end position.
9104
+ * @returns {Array} Returns the cast slice.
9105
+ */
9106
+ function castSlice(array, start, end) {
9107
+ var length = array.length;
9108
+ end = end === undefined ? length : end;
9109
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
9110
+ }
9111
+
9112
+ /**
9113
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
9114
+ *
9115
+ * @private
9116
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
9117
+ */
9118
+ var clearTimeout = ctxClearTimeout || function(id) {
9119
+ return root.clearTimeout(id);
9120
+ };
9121
+
9122
+ /**
9123
+ * Creates a clone of `buffer`.
9124
+ *
9125
+ * @private
9126
+ * @param {Buffer} buffer The buffer to clone.
9127
+ * @param {boolean} [isDeep] Specify a deep clone.
9128
+ * @returns {Buffer} Returns the cloned buffer.
9129
+ */
9130
+ function cloneBuffer(buffer, isDeep) {
9131
+ if (isDeep) {
9132
+ return buffer.slice();
9133
+ }
9134
+ var length = buffer.length,
9135
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
9136
+
9137
+ buffer.copy(result);
9138
+ return result;
9139
+ }
9140
+
9141
+ /**
9142
+ * Creates a clone of `arrayBuffer`.
9143
+ *
9144
+ * @private
9145
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
9146
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
9147
+ */
9148
+ function cloneArrayBuffer(arrayBuffer) {
9149
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
9150
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
9151
+ return result;
9152
+ }
9153
+
9154
+ /**
9155
+ * Creates a clone of `dataView`.
9156
+ *
9157
+ * @private
9158
+ * @param {Object} dataView The data view to clone.
9159
+ * @param {boolean} [isDeep] Specify a deep clone.
9160
+ * @returns {Object} Returns the cloned data view.
9161
+ */
9162
+ function cloneDataView(dataView, isDeep) {
9163
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
9164
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
9165
+ }
9166
+
9167
+ /**
9168
+ * Creates a clone of `regexp`.
9169
+ *
9170
+ * @private
9171
+ * @param {Object} regexp The regexp to clone.
9172
+ * @returns {Object} Returns the cloned regexp.
9173
+ */
9174
+ function cloneRegExp(regexp) {
9175
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
9176
+ result.lastIndex = regexp.lastIndex;
9177
+ return result;
9178
+ }
9179
+
9180
+ /**
9181
+ * Creates a clone of the `symbol` object.
9182
+ *
9183
+ * @private
9184
+ * @param {Object} symbol The symbol object to clone.
9185
+ * @returns {Object} Returns the cloned symbol object.
9186
+ */
9187
+ function cloneSymbol(symbol) {
9188
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
9189
+ }
9190
+
9191
+ /**
9192
+ * Creates a clone of `typedArray`.
9193
+ *
9194
+ * @private
9195
+ * @param {Object} typedArray The typed array to clone.
9196
+ * @param {boolean} [isDeep] Specify a deep clone.
9197
+ * @returns {Object} Returns the cloned typed array.
9198
+ */
9199
+ function cloneTypedArray(typedArray, isDeep) {
9200
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
9201
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
9202
+ }
9203
+
9204
+ /**
9205
+ * Compares values to sort them in ascending order.
9206
+ *
9207
+ * @private
9208
+ * @param {*} value The value to compare.
9209
+ * @param {*} other The other value to compare.
9210
+ * @returns {number} Returns the sort order indicator for `value`.
9211
+ */
9212
+ function compareAscending(value, other) {
9213
+ if (value !== other) {
9214
+ var valIsDefined = value !== undefined,
9215
+ valIsNull = value === null,
9216
+ valIsReflexive = value === value,
9217
+ valIsSymbol = isSymbol(value);
9218
+
9219
+ var othIsDefined = other !== undefined,
9220
+ othIsNull = other === null,
9221
+ othIsReflexive = other === other,
9222
+ othIsSymbol = isSymbol(other);
9223
+
9224
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
9225
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
9226
+ (valIsNull && othIsDefined && othIsReflexive) ||
9227
+ (!valIsDefined && othIsReflexive) ||
9228
+ !valIsReflexive) {
9229
+ return 1;
9230
+ }
9231
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
9232
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
9233
+ (othIsNull && valIsDefined && valIsReflexive) ||
9234
+ (!othIsDefined && valIsReflexive) ||
9235
+ !othIsReflexive) {
9236
+ return -1;
9237
+ }
9238
+ }
9239
+ return 0;
9240
+ }
9241
+
9242
+ /**
9243
+ * Used by `_.orderBy` to compare multiple properties of a value to another
9244
+ * and stable sort them.
9245
+ *
9246
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
9247
+ * specify an order of "desc" for descending or "asc" for ascending sort order
9248
+ * of corresponding values.
9249
+ *
9250
+ * @private
9251
+ * @param {Object} object The object to compare.
9252
+ * @param {Object} other The other object to compare.
9253
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
9254
+ * @returns {number} Returns the sort order indicator for `object`.
9255
+ */
9256
+ function compareMultiple(object, other, orders) {
9257
+ var index = -1,
9258
+ objCriteria = object.criteria,
9259
+ othCriteria = other.criteria,
9260
+ length = objCriteria.length,
9261
+ ordersLength = orders.length;
9262
+
9263
+ while (++index < length) {
9264
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
9265
+ if (result) {
9266
+ if (index >= ordersLength) {
9267
+ return result;
9268
+ }
9269
+ var order = orders[index];
9270
+ return result * (order == 'desc' ? -1 : 1);
9271
+ }
9272
+ }
9273
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
9274
+ // that causes it, under certain circumstances, to provide the same value for
9275
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
9276
+ // for more details.
9277
+ //
9278
+ // This also ensures a stable sort in V8 and other engines.
9279
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
9280
+ return object.index - other.index;
9281
+ }
9282
+
9283
+ /**
9284
+ * Creates an array that is the composition of partially applied arguments,
9285
+ * placeholders, and provided arguments into a single array of arguments.
9286
+ *
9287
+ * @private
9288
+ * @param {Array} args The provided arguments.
9289
+ * @param {Array} partials The arguments to prepend to those provided.
9290
+ * @param {Array} holders The `partials` placeholder indexes.
9291
+ * @params {boolean} [isCurried] Specify composing for a curried function.
9292
+ * @returns {Array} Returns the new array of composed arguments.
9293
+ */
9294
+ function composeArgs(args, partials, holders, isCurried) {
9295
+ var argsIndex = -1,
9296
+ argsLength = args.length,
9297
+ holdersLength = holders.length,
9298
+ leftIndex = -1,
9299
+ leftLength = partials.length,
9300
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
9301
+ result = Array(leftLength + rangeLength),
9302
+ isUncurried = !isCurried;
9303
+
9304
+ while (++leftIndex < leftLength) {
9305
+ result[leftIndex] = partials[leftIndex];
9306
+ }
9307
+ while (++argsIndex < holdersLength) {
9308
+ if (isUncurried || argsIndex < argsLength) {
9309
+ result[holders[argsIndex]] = args[argsIndex];
9310
+ }
9311
+ }
9312
+ while (rangeLength--) {
9313
+ result[leftIndex++] = args[argsIndex++];
9314
+ }
9315
+ return result;
9316
+ }
9317
+
9318
+ /**
9319
+ * This function is like `composeArgs` except that the arguments composition
9320
+ * is tailored for `_.partialRight`.
9321
+ *
9322
+ * @private
9323
+ * @param {Array} args The provided arguments.
9324
+ * @param {Array} partials The arguments to append to those provided.
9325
+ * @param {Array} holders The `partials` placeholder indexes.
9326
+ * @params {boolean} [isCurried] Specify composing for a curried function.
9327
+ * @returns {Array} Returns the new array of composed arguments.
9328
+ */
9329
+ function composeArgsRight(args, partials, holders, isCurried) {
9330
+ var argsIndex = -1,
9331
+ argsLength = args.length,
9332
+ holdersIndex = -1,
9333
+ holdersLength = holders.length,
9334
+ rightIndex = -1,
9335
+ rightLength = partials.length,
9336
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
9337
+ result = Array(rangeLength + rightLength),
9338
+ isUncurried = !isCurried;
9339
+
9340
+ while (++argsIndex < rangeLength) {
9341
+ result[argsIndex] = args[argsIndex];
9342
+ }
9343
+ var offset = argsIndex;
9344
+ while (++rightIndex < rightLength) {
9345
+ result[offset + rightIndex] = partials[rightIndex];
9346
+ }
9347
+ while (++holdersIndex < holdersLength) {
9348
+ if (isUncurried || argsIndex < argsLength) {
9349
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
9350
+ }
9351
+ }
9352
+ return result;
9353
+ }
9354
+
9355
+ /**
9356
+ * Copies the values of `source` to `array`.
9357
+ *
9358
+ * @private
9359
+ * @param {Array} source The array to copy values from.
9360
+ * @param {Array} [array=[]] The array to copy values to.
9361
+ * @returns {Array} Returns `array`.
9362
+ */
9363
+ function copyArray(source, array) {
9364
+ var index = -1,
9365
+ length = source.length;
9366
+
9367
+ array || (array = Array(length));
9368
+ while (++index < length) {
9369
+ array[index] = source[index];
9370
+ }
9371
+ return array;
9372
+ }
9373
+
9374
+ /**
9375
+ * Copies properties of `source` to `object`.
9376
+ *
9377
+ * @private
9378
+ * @param {Object} source The object to copy properties from.
9379
+ * @param {Array} props The property identifiers to copy.
9380
+ * @param {Object} [object={}] The object to copy properties to.
9381
+ * @param {Function} [customizer] The function to customize copied values.
9382
+ * @returns {Object} Returns `object`.
9383
+ */
9384
+ function copyObject(source, props, object, customizer) {
9385
+ var isNew = !object;
9386
+ object || (object = {});
9387
+
9388
+ var index = -1,
9389
+ length = props.length;
9390
+
9391
+ while (++index < length) {
9392
+ var key = props[index];
9393
+
9394
+ var newValue = customizer
9395
+ ? customizer(object[key], source[key], key, object, source)
9396
+ : undefined;
9397
+
9398
+ if (newValue === undefined) {
9399
+ newValue = source[key];
9400
+ }
9401
+ if (isNew) {
9402
+ baseAssignValue(object, key, newValue);
9403
+ } else {
9404
+ assignValue(object, key, newValue);
9405
+ }
9406
+ }
9407
+ return object;
9408
+ }
9409
+
9410
+ /**
9411
+ * Copies own symbols of `source` to `object`.
9412
+ *
9413
+ * @private
9414
+ * @param {Object} source The object to copy symbols from.
9415
+ * @param {Object} [object={}] The object to copy symbols to.
9416
+ * @returns {Object} Returns `object`.
9417
+ */
9418
+ function copySymbols(source, object) {
9419
+ return copyObject(source, getSymbols(source), object);
9420
+ }
9421
+
9422
+ /**
9423
+ * Copies own and inherited symbols of `source` to `object`.
9424
+ *
9425
+ * @private
9426
+ * @param {Object} source The object to copy symbols from.
9427
+ * @param {Object} [object={}] The object to copy symbols to.
9428
+ * @returns {Object} Returns `object`.
9429
+ */
9430
+ function copySymbolsIn(source, object) {
9431
+ return copyObject(source, getSymbolsIn(source), object);
9432
+ }
9433
+
9434
+ /**
9435
+ * Creates a function like `_.groupBy`.
9436
+ *
9437
+ * @private
9438
+ * @param {Function} setter The function to set accumulator values.
9439
+ * @param {Function} [initializer] The accumulator object initializer.
9440
+ * @returns {Function} Returns the new aggregator function.
9441
+ */
9442
+ function createAggregator(setter, initializer) {
9443
+ return function(collection, iteratee) {
9444
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
9445
+ accumulator = initializer ? initializer() : {};
9446
+
9447
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
9448
+ };
9449
+ }
9450
+
9451
+ /**
9452
+ * Creates a function like `_.assign`.
9453
+ *
9454
+ * @private
9455
+ * @param {Function} assigner The function to assign values.
9456
+ * @returns {Function} Returns the new assigner function.
9457
+ */
9458
+ function createAssigner(assigner) {
9459
+ return baseRest(function(object, sources) {
9460
+ var index = -1,
9461
+ length = sources.length,
9462
+ customizer = length > 1 ? sources[length - 1] : undefined,
9463
+ guard = length > 2 ? sources[2] : undefined;
9464
+
9465
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
9466
+ ? (length--, customizer)
9467
+ : undefined;
9468
+
9469
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
9470
+ customizer = length < 3 ? undefined : customizer;
9471
+ length = 1;
9472
+ }
9473
+ object = Object(object);
9474
+ while (++index < length) {
9475
+ var source = sources[index];
9476
+ if (source) {
9477
+ assigner(object, source, index, customizer);
9478
+ }
9479
+ }
9480
+ return object;
9481
+ });
9482
+ }
9483
+
9484
+ /**
9485
+ * Creates a `baseEach` or `baseEachRight` function.
9486
+ *
9487
+ * @private
9488
+ * @param {Function} eachFunc The function to iterate over a collection.
9489
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9490
+ * @returns {Function} Returns the new base function.
9491
+ */
9492
+ function createBaseEach(eachFunc, fromRight) {
9493
+ return function(collection, iteratee) {
9494
+ if (collection == null) {
9495
+ return collection;
9496
+ }
9497
+ if (!isArrayLike(collection)) {
9498
+ return eachFunc(collection, iteratee);
9499
+ }
9500
+ var length = collection.length,
9501
+ index = fromRight ? length : -1,
9502
+ iterable = Object(collection);
9503
+
9504
+ while ((fromRight ? index-- : ++index < length)) {
9505
+ if (iteratee(iterable[index], index, iterable) === false) {
9506
+ break;
9507
+ }
9508
+ }
9509
+ return collection;
9510
+ };
9511
+ }
9512
+
9513
+ /**
9514
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
9515
+ *
9516
+ * @private
9517
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9518
+ * @returns {Function} Returns the new base function.
9519
+ */
9520
+ function createBaseFor(fromRight) {
9521
+ return function(object, iteratee, keysFunc) {
9522
+ var index = -1,
9523
+ iterable = Object(object),
9524
+ props = keysFunc(object),
9525
+ length = props.length;
9526
+
9527
+ while (length--) {
9528
+ var key = props[fromRight ? length : ++index];
9529
+ if (iteratee(iterable[key], key, iterable) === false) {
9530
+ break;
9531
+ }
9532
+ }
9533
+ return object;
9534
+ };
9535
+ }
9536
+
9537
+ /**
9538
+ * Creates a function that wraps `func` to invoke it with the optional `this`
9539
+ * binding of `thisArg`.
9540
+ *
9541
+ * @private
9542
+ * @param {Function} func The function to wrap.
9543
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
9544
+ * @param {*} [thisArg] The `this` binding of `func`.
9545
+ * @returns {Function} Returns the new wrapped function.
9546
+ */
9547
+ function createBind(func, bitmask, thisArg) {
9548
+ var isBind = bitmask & WRAP_BIND_FLAG,
9549
+ Ctor = createCtor(func);
9550
+
9551
+ function wrapper() {
9552
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
9553
+ return fn.apply(isBind ? thisArg : this, arguments);
9554
+ }
9555
+ return wrapper;
9556
+ }
9557
+
9558
+ /**
9559
+ * Creates a function like `_.lowerFirst`.
9560
+ *
9561
+ * @private
9562
+ * @param {string} methodName The name of the `String` case method to use.
9563
+ * @returns {Function} Returns the new case function.
9564
+ */
9565
+ function createCaseFirst(methodName) {
9566
+ return function(string) {
9567
+ string = toString(string);
9568
+
9569
+ var strSymbols = hasUnicode(string)
9570
+ ? stringToArray(string)
9571
+ : undefined;
9572
+
9573
+ var chr = strSymbols
9574
+ ? strSymbols[0]
9575
+ : string.charAt(0);
9576
+
9577
+ var trailing = strSymbols
9578
+ ? castSlice(strSymbols, 1).join('')
9579
+ : string.slice(1);
9580
+
9581
+ return chr[methodName]() + trailing;
9582
+ };
9583
+ }
9584
+
9585
+ /**
9586
+ * Creates a function like `_.camelCase`.
9587
+ *
9588
+ * @private
9589
+ * @param {Function} callback The function to combine each word.
9590
+ * @returns {Function} Returns the new compounder function.
9591
+ */
9592
+ function createCompounder(callback) {
9593
+ return function(string) {
9594
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
9595
+ };
9596
+ }
9597
+
9598
+ /**
9599
+ * Creates a function that produces an instance of `Ctor` regardless of
9600
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
9601
+ *
9602
+ * @private
9603
+ * @param {Function} Ctor The constructor to wrap.
9604
+ * @returns {Function} Returns the new wrapped function.
9605
+ */
9606
+ function createCtor(Ctor) {
9607
+ return function() {
9608
+ // Use a `switch` statement to work with class constructors. See
9609
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
9610
+ // for more details.
9611
+ var args = arguments;
9612
+ switch (args.length) {
9613
+ case 0: return new Ctor;
9614
+ case 1: return new Ctor(args[0]);
9615
+ case 2: return new Ctor(args[0], args[1]);
9616
+ case 3: return new Ctor(args[0], args[1], args[2]);
9617
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
9618
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
9619
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
9620
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
9621
+ }
9622
+ var thisBinding = baseCreate(Ctor.prototype),
9623
+ result = Ctor.apply(thisBinding, args);
9624
+
9625
+ // Mimic the constructor's `return` behavior.
9626
+ // See https://es5.github.io/#x13.2.2 for more details.
9627
+ return isObject(result) ? result : thisBinding;
9628
+ };
9629
+ }
9630
+
9631
+ /**
9632
+ * Creates a function that wraps `func` to enable currying.
9633
+ *
9634
+ * @private
9635
+ * @param {Function} func The function to wrap.
9636
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
9637
+ * @param {number} arity The arity of `func`.
9638
+ * @returns {Function} Returns the new wrapped function.
9639
+ */
9640
+ function createCurry(func, bitmask, arity) {
9641
+ var Ctor = createCtor(func);
9642
+
9643
+ function wrapper() {
9644
+ var length = arguments.length,
9645
+ args = Array(length),
9646
+ index = length,
9647
+ placeholder = getHolder(wrapper);
9648
+
9649
+ while (index--) {
9650
+ args[index] = arguments[index];
9651
+ }
9652
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
9653
+ ? []
9654
+ : replaceHolders(args, placeholder);
9655
+
9656
+ length -= holders.length;
9657
+ if (length < arity) {
9658
+ return createRecurry(
9659
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
9660
+ args, holders, undefined, undefined, arity - length);
9661
+ }
9662
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
9663
+ return apply(fn, this, args);
9664
+ }
9665
+ return wrapper;
9666
+ }
9667
+
9668
+ /**
9669
+ * Creates a `_.find` or `_.findLast` function.
9670
+ *
9671
+ * @private
9672
+ * @param {Function} findIndexFunc The function to find the collection index.
9673
+ * @returns {Function} Returns the new find function.
9674
+ */
9675
+ function createFind(findIndexFunc) {
9676
+ return function(collection, predicate, fromIndex) {
9677
+ var iterable = Object(collection);
9678
+ if (!isArrayLike(collection)) {
9679
+ var iteratee = getIteratee(predicate, 3);
9680
+ collection = keys(collection);
9681
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
9682
+ }
9683
+ var index = findIndexFunc(collection, predicate, fromIndex);
9684
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
9685
+ };
9686
+ }
9687
+
9688
+ /**
9689
+ * Creates a `_.flow` or `_.flowRight` function.
9690
+ *
9691
+ * @private
9692
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9693
+ * @returns {Function} Returns the new flow function.
9694
+ */
9695
+ function createFlow(fromRight) {
9696
+ return flatRest(function(funcs) {
9697
+ var length = funcs.length,
9698
+ index = length,
9699
+ prereq = LodashWrapper.prototype.thru;
9700
+
9701
+ if (fromRight) {
9702
+ funcs.reverse();
9703
+ }
9704
+ while (index--) {
9705
+ var func = funcs[index];
9706
+ if (typeof func != 'function') {
9707
+ throw new TypeError(FUNC_ERROR_TEXT);
9708
+ }
9709
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
9710
+ var wrapper = new LodashWrapper([], true);
9711
+ }
9712
+ }
9713
+ index = wrapper ? index : length;
9714
+ while (++index < length) {
9715
+ func = funcs[index];
9716
+
9717
+ var funcName = getFuncName(func),
9718
+ data = funcName == 'wrapper' ? getData(func) : undefined;
9719
+
9720
+ if (data && isLaziable(data[0]) &&
9721
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
9722
+ !data[4].length && data[9] == 1
9723
+ ) {
9724
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
9725
+ } else {
9726
+ wrapper = (func.length == 1 && isLaziable(func))
9727
+ ? wrapper[funcName]()
9728
+ : wrapper.thru(func);
9729
+ }
9730
+ }
9731
+ return function() {
9732
+ var args = arguments,
9733
+ value = args[0];
9734
+
9735
+ if (wrapper && args.length == 1 && isArray(value)) {
9736
+ return wrapper.plant(value).value();
9737
+ }
9738
+ var index = 0,
9739
+ result = length ? funcs[index].apply(this, args) : value;
9740
+
9741
+ while (++index < length) {
9742
+ result = funcs[index].call(this, result);
9743
+ }
9744
+ return result;
9745
+ };
9746
+ });
9747
+ }
9748
+
9749
+ /**
9750
+ * Creates a function that wraps `func` to invoke it with optional `this`
9751
+ * binding of `thisArg`, partial application, and currying.
9752
+ *
9753
+ * @private
9754
+ * @param {Function|string} func The function or method name to wrap.
9755
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
9756
+ * @param {*} [thisArg] The `this` binding of `func`.
9757
+ * @param {Array} [partials] The arguments to prepend to those provided to
9758
+ * the new function.
9759
+ * @param {Array} [holders] The `partials` placeholder indexes.
9760
+ * @param {Array} [partialsRight] The arguments to append to those provided
9761
+ * to the new function.
9762
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
9763
+ * @param {Array} [argPos] The argument positions of the new function.
9764
+ * @param {number} [ary] The arity cap of `func`.
9765
+ * @param {number} [arity] The arity of `func`.
9766
+ * @returns {Function} Returns the new wrapped function.
9767
+ */
9768
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
9769
+ var isAry = bitmask & WRAP_ARY_FLAG,
9770
+ isBind = bitmask & WRAP_BIND_FLAG,
9771
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
9772
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
9773
+ isFlip = bitmask & WRAP_FLIP_FLAG,
9774
+ Ctor = isBindKey ? undefined : createCtor(func);
9775
+
9776
+ function wrapper() {
9777
+ var length = arguments.length,
9778
+ args = Array(length),
9779
+ index = length;
9780
+
9781
+ while (index--) {
9782
+ args[index] = arguments[index];
9783
+ }
9784
+ if (isCurried) {
9785
+ var placeholder = getHolder(wrapper),
9786
+ holdersCount = countHolders(args, placeholder);
9787
+ }
9788
+ if (partials) {
9789
+ args = composeArgs(args, partials, holders, isCurried);
9790
+ }
9791
+ if (partialsRight) {
9792
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
9793
+ }
9794
+ length -= holdersCount;
9795
+ if (isCurried && length < arity) {
9796
+ var newHolders = replaceHolders(args, placeholder);
9797
+ return createRecurry(
9798
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
9799
+ args, newHolders, argPos, ary, arity - length
9800
+ );
9801
+ }
9802
+ var thisBinding = isBind ? thisArg : this,
9803
+ fn = isBindKey ? thisBinding[func] : func;
9804
+
9805
+ length = args.length;
9806
+ if (argPos) {
9807
+ args = reorder(args, argPos);
9808
+ } else if (isFlip && length > 1) {
9809
+ args.reverse();
9810
+ }
9811
+ if (isAry && ary < length) {
9812
+ args.length = ary;
9813
+ }
9814
+ if (this && this !== root && this instanceof wrapper) {
9815
+ fn = Ctor || createCtor(fn);
9816
+ }
9817
+ return fn.apply(thisBinding, args);
9818
+ }
9819
+ return wrapper;
9820
+ }
9821
+
9822
+ /**
9823
+ * Creates a function like `_.invertBy`.
9824
+ *
9825
+ * @private
9826
+ * @param {Function} setter The function to set accumulator values.
9827
+ * @param {Function} toIteratee The function to resolve iteratees.
9828
+ * @returns {Function} Returns the new inverter function.
9829
+ */
9830
+ function createInverter(setter, toIteratee) {
9831
+ return function(object, iteratee) {
9832
+ return baseInverter(object, setter, toIteratee(iteratee), {});
9833
+ };
9834
+ }
9835
+
9836
+ /**
9837
+ * Creates a function that performs a mathematical operation on two values.
9838
+ *
9839
+ * @private
9840
+ * @param {Function} operator The function to perform the operation.
9841
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
9842
+ * @returns {Function} Returns the new mathematical operation function.
9843
+ */
9844
+ function createMathOperation(operator, defaultValue) {
9845
+ return function(value, other) {
9846
+ var result;
9847
+ if (value === undefined && other === undefined) {
9848
+ return defaultValue;
9849
+ }
9850
+ if (value !== undefined) {
9851
+ result = value;
9852
+ }
9853
+ if (other !== undefined) {
9854
+ if (result === undefined) {
9855
+ return other;
9856
+ }
9857
+ if (typeof value == 'string' || typeof other == 'string') {
9858
+ value = baseToString(value);
9859
+ other = baseToString(other);
9860
+ } else {
9861
+ value = baseToNumber(value);
9862
+ other = baseToNumber(other);
9863
+ }
9864
+ result = operator(value, other);
9865
+ }
9866
+ return result;
9867
+ };
9868
+ }
9869
+
9870
+ /**
9871
+ * Creates a function like `_.over`.
9872
+ *
9873
+ * @private
9874
+ * @param {Function} arrayFunc The function to iterate over iteratees.
9875
+ * @returns {Function} Returns the new over function.
9876
+ */
9877
+ function createOver(arrayFunc) {
9878
+ return flatRest(function(iteratees) {
9879
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
9880
+ return baseRest(function(args) {
9881
+ var thisArg = this;
9882
+ return arrayFunc(iteratees, function(iteratee) {
9883
+ return apply(iteratee, thisArg, args);
9884
+ });
9885
+ });
9886
+ });
9887
+ }
9888
+
9889
+ /**
9890
+ * Creates the padding for `string` based on `length`. The `chars` string
9891
+ * is truncated if the number of characters exceeds `length`.
9892
+ *
9893
+ * @private
9894
+ * @param {number} length The padding length.
9895
+ * @param {string} [chars=' '] The string used as padding.
9896
+ * @returns {string} Returns the padding for `string`.
9897
+ */
9898
+ function createPadding(length, chars) {
9899
+ chars = chars === undefined ? ' ' : baseToString(chars);
9900
+
9901
+ var charsLength = chars.length;
9902
+ if (charsLength < 2) {
9903
+ return charsLength ? baseRepeat(chars, length) : chars;
9904
+ }
9905
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
9906
+ return hasUnicode(chars)
9907
+ ? castSlice(stringToArray(result), 0, length).join('')
9908
+ : result.slice(0, length);
9909
+ }
9910
+
9911
+ /**
9912
+ * Creates a function that wraps `func` to invoke it with the `this` binding
9913
+ * of `thisArg` and `partials` prepended to the arguments it receives.
9914
+ *
9915
+ * @private
9916
+ * @param {Function} func The function to wrap.
9917
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
9918
+ * @param {*} thisArg The `this` binding of `func`.
9919
+ * @param {Array} partials The arguments to prepend to those provided to
9920
+ * the new function.
9921
+ * @returns {Function} Returns the new wrapped function.
9922
+ */
9923
+ function createPartial(func, bitmask, thisArg, partials) {
9924
+ var isBind = bitmask & WRAP_BIND_FLAG,
9925
+ Ctor = createCtor(func);
9926
+
9927
+ function wrapper() {
9928
+ var argsIndex = -1,
9929
+ argsLength = arguments.length,
9930
+ leftIndex = -1,
9931
+ leftLength = partials.length,
9932
+ args = Array(leftLength + argsLength),
9933
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
9934
+
9935
+ while (++leftIndex < leftLength) {
9936
+ args[leftIndex] = partials[leftIndex];
9937
+ }
9938
+ while (argsLength--) {
9939
+ args[leftIndex++] = arguments[++argsIndex];
9940
+ }
9941
+ return apply(fn, isBind ? thisArg : this, args);
9942
+ }
9943
+ return wrapper;
9944
+ }
9945
+
9946
+ /**
9947
+ * Creates a `_.range` or `_.rangeRight` function.
9948
+ *
9949
+ * @private
9950
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9951
+ * @returns {Function} Returns the new range function.
9952
+ */
9953
+ function createRange(fromRight) {
9954
+ return function(start, end, step) {
9955
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
9956
+ end = step = undefined;
9957
+ }
9958
+ // Ensure the sign of `-0` is preserved.
9959
+ start = toFinite(start);
9960
+ if (end === undefined) {
9961
+ end = start;
9962
+ start = 0;
9963
+ } else {
9964
+ end = toFinite(end);
9965
+ }
9966
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
9967
+ return baseRange(start, end, step, fromRight);
9968
+ };
9969
+ }
9970
+
9971
+ /**
9972
+ * Creates a function that performs a relational operation on two values.
9973
+ *
9974
+ * @private
9975
+ * @param {Function} operator The function to perform the operation.
9976
+ * @returns {Function} Returns the new relational operation function.
9977
+ */
9978
+ function createRelationalOperation(operator) {
9979
+ return function(value, other) {
9980
+ if (!(typeof value == 'string' && typeof other == 'string')) {
9981
+ value = toNumber(value);
9982
+ other = toNumber(other);
9983
+ }
9984
+ return operator(value, other);
9985
+ };
9986
+ }
9987
+
9988
+ /**
9989
+ * Creates a function that wraps `func` to continue currying.
9990
+ *
9991
+ * @private
9992
+ * @param {Function} func The function to wrap.
9993
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
9994
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
9995
+ * @param {*} placeholder The placeholder value.
9996
+ * @param {*} [thisArg] The `this` binding of `func`.
9997
+ * @param {Array} [partials] The arguments to prepend to those provided to
9998
+ * the new function.
9999
+ * @param {Array} [holders] The `partials` placeholder indexes.
10000
+ * @param {Array} [argPos] The argument positions of the new function.
10001
+ * @param {number} [ary] The arity cap of `func`.
10002
+ * @param {number} [arity] The arity of `func`.
10003
+ * @returns {Function} Returns the new wrapped function.
10004
+ */
10005
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
10006
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
10007
+ newHolders = isCurry ? holders : undefined,
10008
+ newHoldersRight = isCurry ? undefined : holders,
10009
+ newPartials = isCurry ? partials : undefined,
10010
+ newPartialsRight = isCurry ? undefined : partials;
10011
+
10012
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
10013
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
10014
+
10015
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
10016
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
10017
+ }
10018
+ var newData = [
10019
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
10020
+ newHoldersRight, argPos, ary, arity
10021
+ ];
10022
+
10023
+ var result = wrapFunc.apply(undefined, newData);
10024
+ if (isLaziable(func)) {
10025
+ setData(result, newData);
10026
+ }
10027
+ result.placeholder = placeholder;
10028
+ return setWrapToString(result, func, bitmask);
10029
+ }
10030
+
10031
+ /**
10032
+ * Creates a function like `_.round`.
10033
+ *
10034
+ * @private
10035
+ * @param {string} methodName The name of the `Math` method to use when rounding.
10036
+ * @returns {Function} Returns the new round function.
10037
+ */
10038
+ function createRound(methodName) {
10039
+ var func = Math[methodName];
10040
+ return function(number, precision) {
10041
+ number = toNumber(number);
10042
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
10043
+ if (precision) {
10044
+ // Shift with exponential notation to avoid floating-point issues.
10045
+ // See [MDN](https://mdn.io/round#Examples) for more details.
10046
+ var pair = (toString(number) + 'e').split('e'),
10047
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
10048
+
10049
+ pair = (toString(value) + 'e').split('e');
10050
+ return +(pair[0] + 'e' + (+pair[1] - precision));
10051
+ }
10052
+ return func(number);
10053
+ };
10054
+ }
10055
+
10056
+ /**
10057
+ * Creates a set object of `values`.
10058
+ *
10059
+ * @private
10060
+ * @param {Array} values The values to add to the set.
10061
+ * @returns {Object} Returns the new set.
10062
+ */
10063
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
10064
+ return new Set(values);
10065
+ };
10066
+
10067
+ /**
10068
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
10069
+ *
10070
+ * @private
10071
+ * @param {Function} keysFunc The function to get the keys of a given object.
10072
+ * @returns {Function} Returns the new pairs function.
10073
+ */
10074
+ function createToPairs(keysFunc) {
10075
+ return function(object) {
10076
+ var tag = getTag(object);
10077
+ if (tag == mapTag) {
10078
+ return mapToArray(object);
10079
+ }
10080
+ if (tag == setTag) {
10081
+ return setToPairs(object);
10082
+ }
10083
+ return baseToPairs(object, keysFunc(object));
10084
+ };
10085
+ }
10086
+
10087
+ /**
10088
+ * Creates a function that either curries or invokes `func` with optional
10089
+ * `this` binding and partially applied arguments.
10090
+ *
10091
+ * @private
10092
+ * @param {Function|string} func The function or method name to wrap.
10093
+ * @param {number} bitmask The bitmask flags.
10094
+ * 1 - `_.bind`
10095
+ * 2 - `_.bindKey`
10096
+ * 4 - `_.curry` or `_.curryRight` of a bound function
10097
+ * 8 - `_.curry`
10098
+ * 16 - `_.curryRight`
10099
+ * 32 - `_.partial`
10100
+ * 64 - `_.partialRight`
10101
+ * 128 - `_.rearg`
10102
+ * 256 - `_.ary`
10103
+ * 512 - `_.flip`
10104
+ * @param {*} [thisArg] The `this` binding of `func`.
10105
+ * @param {Array} [partials] The arguments to be partially applied.
10106
+ * @param {Array} [holders] The `partials` placeholder indexes.
10107
+ * @param {Array} [argPos] The argument positions of the new function.
10108
+ * @param {number} [ary] The arity cap of `func`.
10109
+ * @param {number} [arity] The arity of `func`.
10110
+ * @returns {Function} Returns the new wrapped function.
10111
+ */
10112
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
10113
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
10114
+ if (!isBindKey && typeof func != 'function') {
10115
+ throw new TypeError(FUNC_ERROR_TEXT);
10116
+ }
10117
+ var length = partials ? partials.length : 0;
10118
+ if (!length) {
10119
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
10120
+ partials = holders = undefined;
10121
+ }
10122
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
10123
+ arity = arity === undefined ? arity : toInteger(arity);
10124
+ length -= holders ? holders.length : 0;
10125
+
10126
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
10127
+ var partialsRight = partials,
10128
+ holdersRight = holders;
10129
+
10130
+ partials = holders = undefined;
10131
+ }
10132
+ var data = isBindKey ? undefined : getData(func);
10133
+
10134
+ var newData = [
10135
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
10136
+ argPos, ary, arity
10137
+ ];
10138
+
10139
+ if (data) {
10140
+ mergeData(newData, data);
10141
+ }
10142
+ func = newData[0];
10143
+ bitmask = newData[1];
10144
+ thisArg = newData[2];
10145
+ partials = newData[3];
10146
+ holders = newData[4];
10147
+ arity = newData[9] = newData[9] === undefined
10148
+ ? (isBindKey ? 0 : func.length)
10149
+ : nativeMax(newData[9] - length, 0);
10150
+
10151
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
10152
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
10153
+ }
10154
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
10155
+ var result = createBind(func, bitmask, thisArg);
10156
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
10157
+ result = createCurry(func, bitmask, arity);
10158
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
10159
+ result = createPartial(func, bitmask, thisArg, partials);
10160
+ } else {
10161
+ result = createHybrid.apply(undefined, newData);
10162
+ }
10163
+ var setter = data ? baseSetData : setData;
10164
+ return setWrapToString(setter(result, newData), func, bitmask);
10165
+ }
10166
+
10167
+ /**
10168
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
10169
+ * of source objects to the destination object for all destination properties
10170
+ * that resolve to `undefined`.
10171
+ *
10172
+ * @private
10173
+ * @param {*} objValue The destination value.
10174
+ * @param {*} srcValue The source value.
10175
+ * @param {string} key The key of the property to assign.
10176
+ * @param {Object} object The parent object of `objValue`.
10177
+ * @returns {*} Returns the value to assign.
10178
+ */
10179
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
10180
+ if (objValue === undefined ||
10181
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
10182
+ return srcValue;
10183
+ }
10184
+ return objValue;
10185
+ }
10186
+
10187
+ /**
10188
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
10189
+ * objects into destination objects that are passed thru.
10190
+ *
10191
+ * @private
10192
+ * @param {*} objValue The destination value.
10193
+ * @param {*} srcValue The source value.
10194
+ * @param {string} key The key of the property to merge.
10195
+ * @param {Object} object The parent object of `objValue`.
10196
+ * @param {Object} source The parent object of `srcValue`.
10197
+ * @param {Object} [stack] Tracks traversed source values and their merged
10198
+ * counterparts.
10199
+ * @returns {*} Returns the value to assign.
10200
+ */
10201
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
10202
+ if (isObject(objValue) && isObject(srcValue)) {
10203
+ // Recursively merge objects and arrays (susceptible to call stack limits).
10204
+ stack.set(srcValue, objValue);
10205
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
10206
+ stack['delete'](srcValue);
10207
+ }
10208
+ return objValue;
10209
+ }
10210
+
10211
+ /**
10212
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
10213
+ * objects.
10214
+ *
10215
+ * @private
10216
+ * @param {*} value The value to inspect.
10217
+ * @param {string} key The key of the property to inspect.
10218
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
10219
+ */
10220
+ function customOmitClone(value) {
10221
+ return isPlainObject(value) ? undefined : value;
10222
+ }
10223
+
10224
+ /**
10225
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
10226
+ * partial deep comparisons.
10227
+ *
10228
+ * @private
10229
+ * @param {Array} array The array to compare.
10230
+ * @param {Array} other The other array to compare.
10231
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10232
+ * @param {Function} customizer The function to customize comparisons.
10233
+ * @param {Function} equalFunc The function to determine equivalents of values.
10234
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
10235
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
10236
+ */
10237
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
10238
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
10239
+ arrLength = array.length,
10240
+ othLength = other.length;
10241
+
10242
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
10243
+ return false;
10244
+ }
10245
+ // Assume cyclic values are equal.
10246
+ var stacked = stack.get(array);
10247
+ if (stacked && stack.get(other)) {
10248
+ return stacked == other;
10249
+ }
10250
+ var index = -1,
10251
+ result = true,
10252
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
10253
+
10254
+ stack.set(array, other);
10255
+ stack.set(other, array);
10256
+
10257
+ // Ignore non-index properties.
10258
+ while (++index < arrLength) {
10259
+ var arrValue = array[index],
10260
+ othValue = other[index];
10261
+
10262
+ if (customizer) {
10263
+ var compared = isPartial
10264
+ ? customizer(othValue, arrValue, index, other, array, stack)
10265
+ : customizer(arrValue, othValue, index, array, other, stack);
10266
+ }
10267
+ if (compared !== undefined) {
10268
+ if (compared) {
10269
+ continue;
10270
+ }
10271
+ result = false;
10272
+ break;
10273
+ }
10274
+ // Recursively compare arrays (susceptible to call stack limits).
10275
+ if (seen) {
10276
+ if (!arraySome(other, function(othValue, othIndex) {
10277
+ if (!cacheHas(seen, othIndex) &&
10278
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
10279
+ return seen.push(othIndex);
10280
+ }
10281
+ })) {
10282
+ result = false;
10283
+ break;
10284
+ }
10285
+ } else if (!(
10286
+ arrValue === othValue ||
10287
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
10288
+ )) {
10289
+ result = false;
10290
+ break;
10291
+ }
10292
+ }
10293
+ stack['delete'](array);
10294
+ stack['delete'](other);
10295
+ return result;
10296
+ }
10297
+
10298
+ /**
10299
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
10300
+ * the same `toStringTag`.
10301
+ *
10302
+ * **Note:** This function only supports comparing values with tags of
10303
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
10304
+ *
10305
+ * @private
10306
+ * @param {Object} object The object to compare.
10307
+ * @param {Object} other The other object to compare.
10308
+ * @param {string} tag The `toStringTag` of the objects to compare.
10309
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10310
+ * @param {Function} customizer The function to customize comparisons.
10311
+ * @param {Function} equalFunc The function to determine equivalents of values.
10312
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
10313
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
10314
+ */
10315
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
10316
+ switch (tag) {
10317
+ case dataViewTag:
10318
+ if ((object.byteLength != other.byteLength) ||
10319
+ (object.byteOffset != other.byteOffset)) {
10320
+ return false;
10321
+ }
10322
+ object = object.buffer;
10323
+ other = other.buffer;
10324
+
10325
+ case arrayBufferTag:
10326
+ if ((object.byteLength != other.byteLength) ||
10327
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
10328
+ return false;
10329
+ }
10330
+ return true;
10331
+
10332
+ case boolTag:
10333
+ case dateTag:
10334
+ case numberTag:
10335
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
10336
+ // Invalid dates are coerced to `NaN`.
10337
+ return eq(+object, +other);
10338
+
10339
+ case errorTag:
10340
+ return object.name == other.name && object.message == other.message;
10341
+
10342
+ case regexpTag:
10343
+ case stringTag:
10344
+ // Coerce regexes to strings and treat strings, primitives and objects,
10345
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
10346
+ // for more details.
10347
+ return object == (other + '');
10348
+
10349
+ case mapTag:
10350
+ var convert = mapToArray;
10351
+
10352
+ case setTag:
10353
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
10354
+ convert || (convert = setToArray);
10355
+
10356
+ if (object.size != other.size && !isPartial) {
10357
+ return false;
10358
+ }
10359
+ // Assume cyclic values are equal.
10360
+ var stacked = stack.get(object);
10361
+ if (stacked) {
10362
+ return stacked == other;
10363
+ }
10364
+ bitmask |= COMPARE_UNORDERED_FLAG;
10365
+
10366
+ // Recursively compare objects (susceptible to call stack limits).
10367
+ stack.set(object, other);
10368
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
10369
+ stack['delete'](object);
10370
+ return result;
10371
+
10372
+ case symbolTag:
10373
+ if (symbolValueOf) {
10374
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
10375
+ }
10376
+ }
10377
+ return false;
10378
+ }
10379
+
10380
+ /**
10381
+ * A specialized version of `baseIsEqualDeep` for objects with support for
10382
+ * partial deep comparisons.
10383
+ *
10384
+ * @private
10385
+ * @param {Object} object The object to compare.
10386
+ * @param {Object} other The other object to compare.
10387
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10388
+ * @param {Function} customizer The function to customize comparisons.
10389
+ * @param {Function} equalFunc The function to determine equivalents of values.
10390
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
10391
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
10392
+ */
10393
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
10394
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
10395
+ objProps = getAllKeys(object),
10396
+ objLength = objProps.length,
10397
+ othProps = getAllKeys(other),
10398
+ othLength = othProps.length;
10399
+
10400
+ if (objLength != othLength && !isPartial) {
10401
+ return false;
10402
+ }
10403
+ var index = objLength;
10404
+ while (index--) {
10405
+ var key = objProps[index];
10406
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
10407
+ return false;
10408
+ }
10409
+ }
10410
+ // Assume cyclic values are equal.
10411
+ var stacked = stack.get(object);
10412
+ if (stacked && stack.get(other)) {
10413
+ return stacked == other;
10414
+ }
10415
+ var result = true;
10416
+ stack.set(object, other);
10417
+ stack.set(other, object);
10418
+
10419
+ var skipCtor = isPartial;
10420
+ while (++index < objLength) {
10421
+ key = objProps[index];
10422
+ var objValue = object[key],
10423
+ othValue = other[key];
10424
+
10425
+ if (customizer) {
10426
+ var compared = isPartial
10427
+ ? customizer(othValue, objValue, key, other, object, stack)
10428
+ : customizer(objValue, othValue, key, object, other, stack);
10429
+ }
10430
+ // Recursively compare objects (susceptible to call stack limits).
10431
+ if (!(compared === undefined
10432
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
10433
+ : compared
10434
+ )) {
10435
+ result = false;
10436
+ break;
10437
+ }
10438
+ skipCtor || (skipCtor = key == 'constructor');
10439
+ }
10440
+ if (result && !skipCtor) {
10441
+ var objCtor = object.constructor,
10442
+ othCtor = other.constructor;
10443
+
10444
+ // Non `Object` object instances with different constructors are not equal.
10445
+ if (objCtor != othCtor &&
10446
+ ('constructor' in object && 'constructor' in other) &&
10447
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
10448
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
10449
+ result = false;
10450
+ }
10451
+ }
10452
+ stack['delete'](object);
10453
+ stack['delete'](other);
10454
+ return result;
10455
+ }
10456
+
10457
+ /**
10458
+ * A specialized version of `baseRest` which flattens the rest array.
10459
+ *
10460
+ * @private
10461
+ * @param {Function} func The function to apply a rest parameter to.
10462
+ * @returns {Function} Returns the new function.
10463
+ */
10464
+ function flatRest(func) {
10465
+ return setToString(overRest(func, undefined, flatten), func + '');
10466
+ }
10467
+
10468
+ /**
10469
+ * Creates an array of own enumerable property names and symbols of `object`.
10470
+ *
10471
+ * @private
10472
+ * @param {Object} object The object to query.
10473
+ * @returns {Array} Returns the array of property names and symbols.
10474
+ */
10475
+ function getAllKeys(object) {
10476
+ return baseGetAllKeys(object, keys, getSymbols);
10477
+ }
10478
+
10479
+ /**
10480
+ * Creates an array of own and inherited enumerable property names and
10481
+ * symbols of `object`.
10482
+ *
10483
+ * @private
10484
+ * @param {Object} object The object to query.
10485
+ * @returns {Array} Returns the array of property names and symbols.
10486
+ */
10487
+ function getAllKeysIn(object) {
10488
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
10489
+ }
10490
+
10491
+ /**
10492
+ * Gets metadata for `func`.
10493
+ *
10494
+ * @private
10495
+ * @param {Function} func The function to query.
10496
+ * @returns {*} Returns the metadata for `func`.
10497
+ */
10498
+ var getData = !metaMap ? noop : function(func) {
10499
+ return metaMap.get(func);
10500
+ };
10501
+
10502
+ /**
10503
+ * Gets the name of `func`.
10504
+ *
10505
+ * @private
10506
+ * @param {Function} func The function to query.
10507
+ * @returns {string} Returns the function name.
10508
+ */
10509
+ function getFuncName(func) {
10510
+ var result = (func.name + ''),
10511
+ array = realNames[result],
10512
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
10513
+
10514
+ while (length--) {
10515
+ var data = array[length],
10516
+ otherFunc = data.func;
10517
+ if (otherFunc == null || otherFunc == func) {
10518
+ return data.name;
10519
+ }
10520
+ }
10521
+ return result;
10522
+ }
10523
+
10524
+ /**
10525
+ * Gets the argument placeholder value for `func`.
10526
+ *
10527
+ * @private
10528
+ * @param {Function} func The function to inspect.
10529
+ * @returns {*} Returns the placeholder value.
10530
+ */
10531
+ function getHolder(func) {
10532
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
10533
+ return object.placeholder;
10534
+ }
10535
+
10536
+ /**
10537
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
10538
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
10539
+ * If arguments are provided, the chosen function is invoked with them and
10540
+ * its result is returned.
10541
+ *
10542
+ * @private
10543
+ * @param {*} [value] The value to convert to an iteratee.
10544
+ * @param {number} [arity] The arity of the created iteratee.
10545
+ * @returns {Function} Returns the chosen function or its result.
10546
+ */
10547
+ function getIteratee() {
10548
+ var result = lodash.iteratee || iteratee;
10549
+ result = result === iteratee ? baseIteratee : result;
10550
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
10551
+ }
10552
+
10553
+ /**
10554
+ * Gets the data for `map`.
10555
+ *
10556
+ * @private
10557
+ * @param {Object} map The map to query.
10558
+ * @param {string} key The reference key.
10559
+ * @returns {*} Returns the map data.
10560
+ */
10561
+ function getMapData(map, key) {
10562
+ var data = map.__data__;
10563
+ return isKeyable(key)
10564
+ ? data[typeof key == 'string' ? 'string' : 'hash']
10565
+ : data.map;
10566
+ }
10567
+
10568
+ /**
10569
+ * Gets the property names, values, and compare flags of `object`.
10570
+ *
10571
+ * @private
10572
+ * @param {Object} object The object to query.
10573
+ * @returns {Array} Returns the match data of `object`.
10574
+ */
10575
+ function getMatchData(object) {
10576
+ var result = keys(object),
10577
+ length = result.length;
10578
+
10579
+ while (length--) {
10580
+ var key = result[length],
10581
+ value = object[key];
10582
+
10583
+ result[length] = [key, value, isStrictComparable(value)];
10584
+ }
10585
+ return result;
10586
+ }
10587
+
10588
+ /**
10589
+ * Gets the native function at `key` of `object`.
10590
+ *
10591
+ * @private
10592
+ * @param {Object} object The object to query.
10593
+ * @param {string} key The key of the method to get.
10594
+ * @returns {*} Returns the function if it's native, else `undefined`.
10595
+ */
10596
+ function getNative(object, key) {
10597
+ var value = getValue(object, key);
10598
+ return baseIsNative(value) ? value : undefined;
10599
+ }
10600
+
10601
+ /**
10602
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
10603
+ *
10604
+ * @private
10605
+ * @param {*} value The value to query.
10606
+ * @returns {string} Returns the raw `toStringTag`.
10607
+ */
10608
+ function getRawTag(value) {
10609
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
10610
+ tag = value[symToStringTag];
10611
+
10612
+ try {
10613
+ value[symToStringTag] = undefined;
10614
+ var unmasked = true;
10615
+ } catch (e) {}
10616
+
10617
+ var result = nativeObjectToString.call(value);
10618
+ if (unmasked) {
10619
+ if (isOwn) {
10620
+ value[symToStringTag] = tag;
10621
+ } else {
10622
+ delete value[symToStringTag];
10623
+ }
10624
+ }
10625
+ return result;
10626
+ }
10627
+
10628
+ /**
10629
+ * Creates an array of the own enumerable symbols of `object`.
10630
+ *
10631
+ * @private
10632
+ * @param {Object} object The object to query.
10633
+ * @returns {Array} Returns the array of symbols.
10634
+ */
10635
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
10636
+ if (object == null) {
10637
+ return [];
10638
+ }
10639
+ object = Object(object);
10640
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
10641
+ return propertyIsEnumerable.call(object, symbol);
10642
+ });
10643
+ };
10644
+
10645
+ /**
10646
+ * Creates an array of the own and inherited enumerable symbols of `object`.
10647
+ *
10648
+ * @private
10649
+ * @param {Object} object The object to query.
10650
+ * @returns {Array} Returns the array of symbols.
10651
+ */
10652
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
10653
+ var result = [];
10654
+ while (object) {
10655
+ arrayPush(result, getSymbols(object));
10656
+ object = getPrototype(object);
10657
+ }
10658
+ return result;
10659
+ };
10660
+
10661
+ /**
10662
+ * Gets the `toStringTag` of `value`.
10663
+ *
10664
+ * @private
10665
+ * @param {*} value The value to query.
10666
+ * @returns {string} Returns the `toStringTag`.
10667
+ */
10668
+ var getTag = baseGetTag;
10669
+
10670
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
10671
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
10672
+ (Map && getTag(new Map) != mapTag) ||
10673
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
10674
+ (Set && getTag(new Set) != setTag) ||
10675
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
10676
+ getTag = function(value) {
10677
+ var result = baseGetTag(value),
10678
+ Ctor = result == objectTag ? value.constructor : undefined,
10679
+ ctorString = Ctor ? toSource(Ctor) : '';
10680
+
10681
+ if (ctorString) {
10682
+ switch (ctorString) {
10683
+ case dataViewCtorString: return dataViewTag;
10684
+ case mapCtorString: return mapTag;
10685
+ case promiseCtorString: return promiseTag;
10686
+ case setCtorString: return setTag;
10687
+ case weakMapCtorString: return weakMapTag;
10688
+ }
10689
+ }
10690
+ return result;
10691
+ };
10692
+ }
10693
+
10694
+ /**
10695
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
10696
+ *
10697
+ * @private
10698
+ * @param {number} start The start of the view.
10699
+ * @param {number} end The end of the view.
10700
+ * @param {Array} transforms The transformations to apply to the view.
10701
+ * @returns {Object} Returns an object containing the `start` and `end`
10702
+ * positions of the view.
10703
+ */
10704
+ function getView(start, end, transforms) {
10705
+ var index = -1,
10706
+ length = transforms.length;
10707
+
10708
+ while (++index < length) {
10709
+ var data = transforms[index],
10710
+ size = data.size;
10711
+
10712
+ switch (data.type) {
10713
+ case 'drop': start += size; break;
10714
+ case 'dropRight': end -= size; break;
10715
+ case 'take': end = nativeMin(end, start + size); break;
10716
+ case 'takeRight': start = nativeMax(start, end - size); break;
10717
+ }
10718
+ }
10719
+ return { 'start': start, 'end': end };
10720
+ }
10721
+
10722
+ /**
10723
+ * Extracts wrapper details from the `source` body comment.
10724
+ *
10725
+ * @private
10726
+ * @param {string} source The source to inspect.
10727
+ * @returns {Array} Returns the wrapper details.
10728
+ */
10729
+ function getWrapDetails(source) {
10730
+ var match = source.match(reWrapDetails);
10731
+ return match ? match[1].split(reSplitDetails) : [];
10732
+ }
10733
+
10734
+ /**
10735
+ * Checks if `path` exists on `object`.
10736
+ *
10737
+ * @private
10738
+ * @param {Object} object The object to query.
10739
+ * @param {Array|string} path The path to check.
10740
+ * @param {Function} hasFunc The function to check properties.
10741
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
10742
+ */
10743
+ function hasPath(object, path, hasFunc) {
10744
+ path = castPath(path, object);
10745
+
10746
+ var index = -1,
10747
+ length = path.length,
10748
+ result = false;
10749
+
10750
+ while (++index < length) {
10751
+ var key = toKey(path[index]);
10752
+ if (!(result = object != null && hasFunc(object, key))) {
10753
+ break;
10754
+ }
10755
+ object = object[key];
10756
+ }
10757
+ if (result || ++index != length) {
10758
+ return result;
10759
+ }
10760
+ length = object == null ? 0 : object.length;
10761
+ return !!length && isLength(length) && isIndex(key, length) &&
10762
+ (isArray(object) || isArguments(object));
10763
+ }
10764
+
10765
+ /**
10766
+ * Initializes an array clone.
10767
+ *
10768
+ * @private
10769
+ * @param {Array} array The array to clone.
10770
+ * @returns {Array} Returns the initialized clone.
10771
+ */
10772
+ function initCloneArray(array) {
10773
+ var length = array.length,
10774
+ result = new array.constructor(length);
10775
+
10776
+ // Add properties assigned by `RegExp#exec`.
10777
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
10778
+ result.index = array.index;
10779
+ result.input = array.input;
10780
+ }
10781
+ return result;
10782
+ }
10783
+
10784
+ /**
10785
+ * Initializes an object clone.
10786
+ *
10787
+ * @private
10788
+ * @param {Object} object The object to clone.
10789
+ * @returns {Object} Returns the initialized clone.
10790
+ */
10791
+ function initCloneObject(object) {
10792
+ return (typeof object.constructor == 'function' && !isPrototype(object))
10793
+ ? baseCreate(getPrototype(object))
10794
+ : {};
10795
+ }
10796
+
10797
+ /**
10798
+ * Initializes an object clone based on its `toStringTag`.
10799
+ *
10800
+ * **Note:** This function only supports cloning values with tags of
10801
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
10802
+ *
10803
+ * @private
10804
+ * @param {Object} object The object to clone.
10805
+ * @param {string} tag The `toStringTag` of the object to clone.
10806
+ * @param {boolean} [isDeep] Specify a deep clone.
10807
+ * @returns {Object} Returns the initialized clone.
10808
+ */
10809
+ function initCloneByTag(object, tag, isDeep) {
10810
+ var Ctor = object.constructor;
10811
+ switch (tag) {
10812
+ case arrayBufferTag:
10813
+ return cloneArrayBuffer(object);
10814
+
10815
+ case boolTag:
10816
+ case dateTag:
10817
+ return new Ctor(+object);
10818
+
10819
+ case dataViewTag:
10820
+ return cloneDataView(object, isDeep);
10821
+
10822
+ case float32Tag: case float64Tag:
10823
+ case int8Tag: case int16Tag: case int32Tag:
10824
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
10825
+ return cloneTypedArray(object, isDeep);
10826
+
10827
+ case mapTag:
10828
+ return new Ctor;
10829
+
10830
+ case numberTag:
10831
+ case stringTag:
10832
+ return new Ctor(object);
10833
+
10834
+ case regexpTag:
10835
+ return cloneRegExp(object);
10836
+
10837
+ case setTag:
10838
+ return new Ctor;
10839
+
10840
+ case symbolTag:
10841
+ return cloneSymbol(object);
10842
+ }
10843
+ }
10844
+
10845
+ /**
10846
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
10847
+ *
10848
+ * @private
10849
+ * @param {string} source The source to modify.
10850
+ * @returns {Array} details The details to insert.
10851
+ * @returns {string} Returns the modified source.
10852
+ */
10853
+ function insertWrapDetails(source, details) {
10854
+ var length = details.length;
10855
+ if (!length) {
10856
+ return source;
10857
+ }
10858
+ var lastIndex = length - 1;
10859
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
10860
+ details = details.join(length > 2 ? ', ' : ' ');
10861
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
10862
+ }
10863
+
10864
+ /**
10865
+ * Checks if `value` is a flattenable `arguments` object or array.
10866
+ *
10867
+ * @private
10868
+ * @param {*} value The value to check.
10869
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
10870
+ */
10871
+ function isFlattenable(value) {
10872
+ return isArray(value) || isArguments(value) ||
10873
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
10874
+ }
10875
+
10876
+ /**
10877
+ * Checks if `value` is a valid array-like index.
10878
+ *
10879
+ * @private
10880
+ * @param {*} value The value to check.
10881
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
10882
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
10883
+ */
10884
+ function isIndex(value, length) {
10885
+ var type = typeof value;
10886
+ length = length == null ? MAX_SAFE_INTEGER : length;
10887
+
10888
+ return !!length &&
10889
+ (type == 'number' ||
10890
+ (type != 'symbol' && reIsUint.test(value))) &&
10891
+ (value > -1 && value % 1 == 0 && value < length);
10892
+ }
10893
+
10894
+ /**
10895
+ * Checks if the given arguments are from an iteratee call.
10896
+ *
10897
+ * @private
10898
+ * @param {*} value The potential iteratee value argument.
10899
+ * @param {*} index The potential iteratee index or key argument.
10900
+ * @param {*} object The potential iteratee object argument.
10901
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
10902
+ * else `false`.
10903
+ */
10904
+ function isIterateeCall(value, index, object) {
10905
+ if (!isObject(object)) {
10906
+ return false;
10907
+ }
10908
+ var type = typeof index;
10909
+ if (type == 'number'
10910
+ ? (isArrayLike(object) && isIndex(index, object.length))
10911
+ : (type == 'string' && index in object)
10912
+ ) {
10913
+ return eq(object[index], value);
10914
+ }
10915
+ return false;
10916
+ }
10917
+
10918
+ /**
10919
+ * Checks if `value` is a property name and not a property path.
10920
+ *
10921
+ * @private
10922
+ * @param {*} value The value to check.
10923
+ * @param {Object} [object] The object to query keys on.
10924
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
10925
+ */
10926
+ function isKey(value, object) {
10927
+ if (isArray(value)) {
10928
+ return false;
10929
+ }
10930
+ var type = typeof value;
10931
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
10932
+ value == null || isSymbol(value)) {
10933
+ return true;
10934
+ }
10935
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
10936
+ (object != null && value in Object(object));
10937
+ }
10938
+
10939
+ /**
10940
+ * Checks if `value` is suitable for use as unique object key.
10941
+ *
10942
+ * @private
10943
+ * @param {*} value The value to check.
10944
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
10945
+ */
10946
+ function isKeyable(value) {
10947
+ var type = typeof value;
10948
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
10949
+ ? (value !== '__proto__')
10950
+ : (value === null);
10951
+ }
10952
+
10953
+ /**
10954
+ * Checks if `func` has a lazy counterpart.
10955
+ *
10956
+ * @private
10957
+ * @param {Function} func The function to check.
10958
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
10959
+ * else `false`.
10960
+ */
10961
+ function isLaziable(func) {
10962
+ var funcName = getFuncName(func),
10963
+ other = lodash[funcName];
10964
+
10965
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
10966
+ return false;
10967
+ }
10968
+ if (func === other) {
10969
+ return true;
10970
+ }
10971
+ var data = getData(other);
10972
+ return !!data && func === data[0];
10973
+ }
10974
+
10975
+ /**
10976
+ * Checks if `func` has its source masked.
10977
+ *
10978
+ * @private
10979
+ * @param {Function} func The function to check.
10980
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
10981
+ */
10982
+ function isMasked(func) {
10983
+ return !!maskSrcKey && (maskSrcKey in func);
10984
+ }
10985
+
10986
+ /**
10987
+ * Checks if `func` is capable of being masked.
10988
+ *
10989
+ * @private
10990
+ * @param {*} value The value to check.
10991
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
10992
+ */
10993
+ var isMaskable = coreJsData ? isFunction : stubFalse;
10994
+
10995
+ /**
10996
+ * Checks if `value` is likely a prototype object.
10997
+ *
10998
+ * @private
10999
+ * @param {*} value The value to check.
11000
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
11001
+ */
11002
+ function isPrototype(value) {
11003
+ var Ctor = value && value.constructor,
11004
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
11005
+
11006
+ return value === proto;
11007
+ }
11008
+
11009
+ /**
11010
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
11011
+ *
11012
+ * @private
11013
+ * @param {*} value The value to check.
11014
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
11015
+ * equality comparisons, else `false`.
11016
+ */
11017
+ function isStrictComparable(value) {
11018
+ return value === value && !isObject(value);
11019
+ }
11020
+
11021
+ /**
11022
+ * A specialized version of `matchesProperty` for source values suitable
11023
+ * for strict equality comparisons, i.e. `===`.
11024
+ *
11025
+ * @private
11026
+ * @param {string} key The key of the property to get.
11027
+ * @param {*} srcValue The value to match.
11028
+ * @returns {Function} Returns the new spec function.
11029
+ */
11030
+ function matchesStrictComparable(key, srcValue) {
11031
+ return function(object) {
11032
+ if (object == null) {
11033
+ return false;
11034
+ }
11035
+ return object[key] === srcValue &&
11036
+ (srcValue !== undefined || (key in Object(object)));
11037
+ };
11038
+ }
11039
+
11040
+ /**
11041
+ * A specialized version of `_.memoize` which clears the memoized function's
11042
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
11043
+ *
11044
+ * @private
11045
+ * @param {Function} func The function to have its output memoized.
11046
+ * @returns {Function} Returns the new memoized function.
11047
+ */
11048
+ function memoizeCapped(func) {
11049
+ var result = memoize(func, function(key) {
11050
+ if (cache.size === MAX_MEMOIZE_SIZE) {
11051
+ cache.clear();
11052
+ }
11053
+ return key;
11054
+ });
11055
+
11056
+ var cache = result.cache;
11057
+ return result;
11058
+ }
11059
+
11060
+ /**
11061
+ * Merges the function metadata of `source` into `data`.
11062
+ *
11063
+ * Merging metadata reduces the number of wrappers used to invoke a function.
11064
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
11065
+ * may be applied regardless of execution order. Methods like `_.ary` and
11066
+ * `_.rearg` modify function arguments, making the order in which they are
11067
+ * executed important, preventing the merging of metadata. However, we make
11068
+ * an exception for a safe combined case where curried functions have `_.ary`
11069
+ * and or `_.rearg` applied.
11070
+ *
11071
+ * @private
11072
+ * @param {Array} data The destination metadata.
11073
+ * @param {Array} source The source metadata.
11074
+ * @returns {Array} Returns `data`.
11075
+ */
11076
+ function mergeData(data, source) {
11077
+ var bitmask = data[1],
11078
+ srcBitmask = source[1],
11079
+ newBitmask = bitmask | srcBitmask,
11080
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
11081
+
11082
+ var isCombo =
11083
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
11084
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
11085
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
11086
+
11087
+ // Exit early if metadata can't be merged.
11088
+ if (!(isCommon || isCombo)) {
11089
+ return data;
11090
+ }
11091
+ // Use source `thisArg` if available.
11092
+ if (srcBitmask & WRAP_BIND_FLAG) {
11093
+ data[2] = source[2];
11094
+ // Set when currying a bound function.
11095
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
11096
+ }
11097
+ // Compose partial arguments.
11098
+ var value = source[3];
11099
+ if (value) {
11100
+ var partials = data[3];
11101
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
11102
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
11103
+ }
11104
+ // Compose partial right arguments.
11105
+ value = source[5];
11106
+ if (value) {
11107
+ partials = data[5];
11108
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
11109
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
11110
+ }
11111
+ // Use source `argPos` if available.
11112
+ value = source[7];
11113
+ if (value) {
11114
+ data[7] = value;
11115
+ }
11116
+ // Use source `ary` if it's smaller.
11117
+ if (srcBitmask & WRAP_ARY_FLAG) {
11118
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
11119
+ }
11120
+ // Use source `arity` if one is not provided.
11121
+ if (data[9] == null) {
11122
+ data[9] = source[9];
11123
+ }
11124
+ // Use source `func` and merge bitmasks.
11125
+ data[0] = source[0];
11126
+ data[1] = newBitmask;
11127
+
11128
+ return data;
11129
+ }
11130
+
11131
+ /**
11132
+ * This function is like
11133
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
11134
+ * except that it includes inherited enumerable properties.
11135
+ *
11136
+ * @private
11137
+ * @param {Object} object The object to query.
11138
+ * @returns {Array} Returns the array of property names.
11139
+ */
11140
+ function nativeKeysIn(object) {
11141
+ var result = [];
11142
+ if (object != null) {
11143
+ for (var key in Object(object)) {
11144
+ result.push(key);
11145
+ }
11146
+ }
11147
+ return result;
11148
+ }
11149
+
11150
+ /**
11151
+ * Converts `value` to a string using `Object.prototype.toString`.
11152
+ *
11153
+ * @private
11154
+ * @param {*} value The value to convert.
11155
+ * @returns {string} Returns the converted string.
11156
+ */
11157
+ function objectToString(value) {
11158
+ return nativeObjectToString.call(value);
11159
+ }
11160
+
11161
+ /**
11162
+ * A specialized version of `baseRest` which transforms the rest array.
11163
+ *
11164
+ * @private
11165
+ * @param {Function} func The function to apply a rest parameter to.
11166
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
11167
+ * @param {Function} transform The rest array transform.
11168
+ * @returns {Function} Returns the new function.
11169
+ */
11170
+ function overRest(func, start, transform) {
11171
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
11172
+ return function() {
11173
+ var args = arguments,
11174
+ index = -1,
11175
+ length = nativeMax(args.length - start, 0),
11176
+ array = Array(length);
11177
+
11178
+ while (++index < length) {
11179
+ array[index] = args[start + index];
11180
+ }
11181
+ index = -1;
11182
+ var otherArgs = Array(start + 1);
11183
+ while (++index < start) {
11184
+ otherArgs[index] = args[index];
11185
+ }
11186
+ otherArgs[start] = transform(array);
11187
+ return apply(func, this, otherArgs);
11188
+ };
11189
+ }
11190
+
11191
+ /**
11192
+ * Gets the parent value at `path` of `object`.
11193
+ *
11194
+ * @private
11195
+ * @param {Object} object The object to query.
11196
+ * @param {Array} path The path to get the parent value of.
11197
+ * @returns {*} Returns the parent value.
11198
+ */
11199
+ function parent(object, path) {
11200
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
11201
+ }
11202
+
11203
+ /**
11204
+ * Reorder `array` according to the specified indexes where the element at
11205
+ * the first index is assigned as the first element, the element at
11206
+ * the second index is assigned as the second element, and so on.
11207
+ *
11208
+ * @private
11209
+ * @param {Array} array The array to reorder.
11210
+ * @param {Array} indexes The arranged array indexes.
11211
+ * @returns {Array} Returns `array`.
11212
+ */
11213
+ function reorder(array, indexes) {
11214
+ var arrLength = array.length,
11215
+ length = nativeMin(indexes.length, arrLength),
11216
+ oldArray = copyArray(array);
11217
+
11218
+ while (length--) {
11219
+ var index = indexes[length];
11220
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
11221
+ }
11222
+ return array;
11223
+ }
11224
+
11225
+ /**
11226
+ * Gets the value at `key`, unless `key` is "__proto__".
11227
+ *
11228
+ * @private
11229
+ * @param {Object} object The object to query.
11230
+ * @param {string} key The key of the property to get.
11231
+ * @returns {*} Returns the property value.
11232
+ */
11233
+ function safeGet(object, key) {
11234
+ if (key == '__proto__') {
11235
+ return;
11236
+ }
11237
+
11238
+ return object[key];
11239
+ }
11240
+
11241
+ /**
11242
+ * Sets metadata for `func`.
11243
+ *
11244
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
11245
+ * period of time, it will trip its breaker and transition to an identity
11246
+ * function to avoid garbage collection pauses in V8. See
11247
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
11248
+ * for more details.
11249
+ *
11250
+ * @private
11251
+ * @param {Function} func The function to associate metadata with.
11252
+ * @param {*} data The metadata.
11253
+ * @returns {Function} Returns `func`.
11254
+ */
11255
+ var setData = shortOut(baseSetData);
11256
+
11257
+ /**
11258
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
11259
+ *
11260
+ * @private
11261
+ * @param {Function} func The function to delay.
11262
+ * @param {number} wait The number of milliseconds to delay invocation.
11263
+ * @returns {number|Object} Returns the timer id or timeout object.
11264
+ */
11265
+ var setTimeout = ctxSetTimeout || function(func, wait) {
11266
+ return root.setTimeout(func, wait);
11267
+ };
11268
+
11269
+ /**
11270
+ * Sets the `toString` method of `func` to return `string`.
11271
+ *
11272
+ * @private
11273
+ * @param {Function} func The function to modify.
11274
+ * @param {Function} string The `toString` result.
11275
+ * @returns {Function} Returns `func`.
11276
+ */
11277
+ var setToString = shortOut(baseSetToString);
11278
+
11279
+ /**
11280
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
11281
+ * with wrapper details in a comment at the top of the source body.
11282
+ *
11283
+ * @private
11284
+ * @param {Function} wrapper The function to modify.
11285
+ * @param {Function} reference The reference function.
11286
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
11287
+ * @returns {Function} Returns `wrapper`.
11288
+ */
11289
+ function setWrapToString(wrapper, reference, bitmask) {
11290
+ var source = (reference + '');
11291
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
11292
+ }
11293
+
11294
+ /**
11295
+ * Creates a function that'll short out and invoke `identity` instead
11296
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
11297
+ * milliseconds.
11298
+ *
11299
+ * @private
11300
+ * @param {Function} func The function to restrict.
11301
+ * @returns {Function} Returns the new shortable function.
11302
+ */
11303
+ function shortOut(func) {
11304
+ var count = 0,
11305
+ lastCalled = 0;
11306
+
11307
+ return function() {
11308
+ var stamp = nativeNow(),
11309
+ remaining = HOT_SPAN - (stamp - lastCalled);
11310
+
11311
+ lastCalled = stamp;
11312
+ if (remaining > 0) {
11313
+ if (++count >= HOT_COUNT) {
11314
+ return arguments[0];
11315
+ }
11316
+ } else {
11317
+ count = 0;
11318
+ }
11319
+ return func.apply(undefined, arguments);
11320
+ };
11321
+ }
11322
+
11323
+ /**
11324
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
11325
+ *
11326
+ * @private
11327
+ * @param {Array} array The array to shuffle.
11328
+ * @param {number} [size=array.length] The size of `array`.
11329
+ * @returns {Array} Returns `array`.
11330
+ */
11331
+ function shuffleSelf(array, size) {
11332
+ var index = -1,
11333
+ length = array.length,
11334
+ lastIndex = length - 1;
11335
+
11336
+ size = size === undefined ? length : size;
11337
+ while (++index < size) {
11338
+ var rand = baseRandom(index, lastIndex),
11339
+ value = array[rand];
11340
+
11341
+ array[rand] = array[index];
11342
+ array[index] = value;
11343
+ }
11344
+ array.length = size;
11345
+ return array;
11346
+ }
11347
+
11348
+ /**
11349
+ * Converts `string` to a property path array.
11350
+ *
11351
+ * @private
11352
+ * @param {string} string The string to convert.
11353
+ * @returns {Array} Returns the property path array.
11354
+ */
11355
+ var stringToPath = memoizeCapped(function(string) {
11356
+ var result = [];
11357
+ if (string.charCodeAt(0) === 46 /* . */) {
11358
+ result.push('');
11359
+ }
11360
+ string.replace(rePropName, function(match, number, quote, subString) {
11361
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
11362
+ });
11363
+ return result;
11364
+ });
11365
+
11366
+ /**
11367
+ * Converts `value` to a string key if it's not a string or symbol.
11368
+ *
11369
+ * @private
11370
+ * @param {*} value The value to inspect.
11371
+ * @returns {string|symbol} Returns the key.
11372
+ */
11373
+ function toKey(value) {
11374
+ if (typeof value == 'string' || isSymbol(value)) {
11375
+ return value;
11376
+ }
11377
+ var result = (value + '');
11378
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
11379
+ }
11380
+
11381
+ /**
11382
+ * Converts `func` to its source code.
11383
+ *
11384
+ * @private
11385
+ * @param {Function} func The function to convert.
11386
+ * @returns {string} Returns the source code.
11387
+ */
11388
+ function toSource(func) {
11389
+ if (func != null) {
11390
+ try {
11391
+ return funcToString.call(func);
11392
+ } catch (e) {}
11393
+ try {
11394
+ return (func + '');
11395
+ } catch (e) {}
11396
+ }
11397
+ return '';
11398
+ }
11399
+
11400
+ /**
11401
+ * Updates wrapper `details` based on `bitmask` flags.
11402
+ *
11403
+ * @private
11404
+ * @returns {Array} details The details to modify.
11405
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
11406
+ * @returns {Array} Returns `details`.
11407
+ */
11408
+ function updateWrapDetails(details, bitmask) {
11409
+ arrayEach(wrapFlags, function(pair) {
11410
+ var value = '_.' + pair[0];
11411
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
11412
+ details.push(value);
11413
+ }
11414
+ });
11415
+ return details.sort();
11416
+ }
11417
+
11418
+ /**
11419
+ * Creates a clone of `wrapper`.
11420
+ *
11421
+ * @private
11422
+ * @param {Object} wrapper The wrapper to clone.
11423
+ * @returns {Object} Returns the cloned wrapper.
11424
+ */
11425
+ function wrapperClone(wrapper) {
11426
+ if (wrapper instanceof LazyWrapper) {
11427
+ return wrapper.clone();
11428
+ }
11429
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
11430
+ result.__actions__ = copyArray(wrapper.__actions__);
11431
+ result.__index__ = wrapper.__index__;
11432
+ result.__values__ = wrapper.__values__;
11433
+ return result;
11434
+ }
11435
+
11436
+ /*------------------------------------------------------------------------*/
11437
+
11438
+ /**
11439
+ * Creates an array of elements split into groups the length of `size`.
11440
+ * If `array` can't be split evenly, the final chunk will be the remaining
11441
+ * elements.
11442
+ *
11443
+ * @static
11444
+ * @memberOf _
11445
+ * @since 3.0.0
11446
+ * @category Array
11447
+ * @param {Array} array The array to process.
11448
+ * @param {number} [size=1] The length of each chunk
11449
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11450
+ * @returns {Array} Returns the new array of chunks.
11451
+ * @example
11452
+ *
11453
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
11454
+ * // => [['a', 'b'], ['c', 'd']]
11455
+ *
11456
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
11457
+ * // => [['a', 'b', 'c'], ['d']]
11458
+ */
11459
+ function chunk(array, size, guard) {
11460
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
11461
+ size = 1;
11462
+ } else {
11463
+ size = nativeMax(toInteger(size), 0);
11464
+ }
11465
+ var length = array == null ? 0 : array.length;
11466
+ if (!length || size < 1) {
11467
+ return [];
11468
+ }
11469
+ var index = 0,
11470
+ resIndex = 0,
11471
+ result = Array(nativeCeil(length / size));
11472
+
11473
+ while (index < length) {
11474
+ result[resIndex++] = baseSlice(array, index, (index += size));
11475
+ }
11476
+ return result;
11477
+ }
11478
+
11479
+ /**
11480
+ * Creates an array with all falsey values removed. The values `false`, `null`,
11481
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
11482
+ *
11483
+ * @static
11484
+ * @memberOf _
11485
+ * @since 0.1.0
11486
+ * @category Array
11487
+ * @param {Array} array The array to compact.
11488
+ * @returns {Array} Returns the new array of filtered values.
11489
+ * @example
11490
+ *
11491
+ * _.compact([0, 1, false, 2, '', 3]);
11492
+ * // => [1, 2, 3]
11493
+ */
11494
+ function compact(array) {
11495
+ var index = -1,
11496
+ length = array == null ? 0 : array.length,
11497
+ resIndex = 0,
11498
+ result = [];
11499
+
11500
+ while (++index < length) {
11501
+ var value = array[index];
11502
+ if (value) {
11503
+ result[resIndex++] = value;
11504
+ }
11505
+ }
11506
+ return result;
11507
+ }
11508
+
11509
+ /**
11510
+ * Creates a new array concatenating `array` with any additional arrays
11511
+ * and/or values.
11512
+ *
11513
+ * @static
11514
+ * @memberOf _
11515
+ * @since 4.0.0
11516
+ * @category Array
11517
+ * @param {Array} array The array to concatenate.
11518
+ * @param {...*} [values] The values to concatenate.
11519
+ * @returns {Array} Returns the new concatenated array.
11520
+ * @example
11521
+ *
11522
+ * var array = [1];
11523
+ * var other = _.concat(array, 2, [3], [[4]]);
11524
+ *
11525
+ * console.log(other);
11526
+ * // => [1, 2, 3, [4]]
11527
+ *
11528
+ * console.log(array);
11529
+ * // => [1]
11530
+ */
11531
+ function concat() {
11532
+ var length = arguments.length;
11533
+ if (!length) {
11534
+ return [];
11535
+ }
11536
+ var args = Array(length - 1),
11537
+ array = arguments[0],
11538
+ index = length;
11539
+
11540
+ while (index--) {
11541
+ args[index - 1] = arguments[index];
11542
+ }
11543
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
11544
+ }
11545
+
11546
+ /**
11547
+ * Creates an array of `array` values not included in the other given arrays
11548
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
11549
+ * for equality comparisons. The order and references of result values are
11550
+ * determined by the first array.
11551
+ *
11552
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
11553
+ *
11554
+ * @static
11555
+ * @memberOf _
11556
+ * @since 0.1.0
11557
+ * @category Array
11558
+ * @param {Array} array The array to inspect.
11559
+ * @param {...Array} [values] The values to exclude.
11560
+ * @returns {Array} Returns the new array of filtered values.
11561
+ * @see _.without, _.xor
11562
+ * @example
11563
+ *
11564
+ * _.difference([2, 1], [2, 3]);
11565
+ * // => [1]
11566
+ */
11567
+ var difference = baseRest(function(array, values) {
11568
+ return isArrayLikeObject(array)
11569
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
11570
+ : [];
11571
+ });
11572
+
11573
+ /**
11574
+ * This method is like `_.difference` except that it accepts `iteratee` which
11575
+ * is invoked for each element of `array` and `values` to generate the criterion
11576
+ * by which they're compared. The order and references of result values are
11577
+ * determined by the first array. The iteratee is invoked with one argument:
11578
+ * (value).
11579
+ *
11580
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
11581
+ *
11582
+ * @static
11583
+ * @memberOf _
11584
+ * @since 4.0.0
11585
+ * @category Array
11586
+ * @param {Array} array The array to inspect.
11587
+ * @param {...Array} [values] The values to exclude.
11588
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
11589
+ * @returns {Array} Returns the new array of filtered values.
11590
+ * @example
11591
+ *
11592
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
11593
+ * // => [1.2]
11594
+ *
11595
+ * // The `_.property` iteratee shorthand.
11596
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
11597
+ * // => [{ 'x': 2 }]
11598
+ */
11599
+ var differenceBy = baseRest(function(array, values) {
11600
+ var iteratee = last(values);
11601
+ if (isArrayLikeObject(iteratee)) {
11602
+ iteratee = undefined;
11603
+ }
11604
+ return isArrayLikeObject(array)
11605
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
11606
+ : [];
11607
+ });
11608
+
11609
+ /**
11610
+ * This method is like `_.difference` except that it accepts `comparator`
11611
+ * which is invoked to compare elements of `array` to `values`. The order and
11612
+ * references of result values are determined by the first array. The comparator
11613
+ * is invoked with two arguments: (arrVal, othVal).
11614
+ *
11615
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
11616
+ *
11617
+ * @static
11618
+ * @memberOf _
11619
+ * @since 4.0.0
11620
+ * @category Array
11621
+ * @param {Array} array The array to inspect.
11622
+ * @param {...Array} [values] The values to exclude.
11623
+ * @param {Function} [comparator] The comparator invoked per element.
11624
+ * @returns {Array} Returns the new array of filtered values.
11625
+ * @example
11626
+ *
11627
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
11628
+ *
11629
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
11630
+ * // => [{ 'x': 2, 'y': 1 }]
11631
+ */
11632
+ var differenceWith = baseRest(function(array, values) {
11633
+ var comparator = last(values);
11634
+ if (isArrayLikeObject(comparator)) {
11635
+ comparator = undefined;
11636
+ }
11637
+ return isArrayLikeObject(array)
11638
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
11639
+ : [];
11640
+ });
11641
+
11642
+ /**
11643
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
11644
+ *
11645
+ * @static
11646
+ * @memberOf _
11647
+ * @since 0.5.0
11648
+ * @category Array
11649
+ * @param {Array} array The array to query.
11650
+ * @param {number} [n=1] The number of elements to drop.
11651
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11652
+ * @returns {Array} Returns the slice of `array`.
11653
+ * @example
11654
+ *
11655
+ * _.drop([1, 2, 3]);
11656
+ * // => [2, 3]
11657
+ *
11658
+ * _.drop([1, 2, 3], 2);
11659
+ * // => [3]
11660
+ *
11661
+ * _.drop([1, 2, 3], 5);
11662
+ * // => []
11663
+ *
11664
+ * _.drop([1, 2, 3], 0);
11665
+ * // => [1, 2, 3]
11666
+ */
11667
+ function drop(array, n, guard) {
11668
+ var length = array == null ? 0 : array.length;
11669
+ if (!length) {
11670
+ return [];
11671
+ }
11672
+ n = (guard || n === undefined) ? 1 : toInteger(n);
11673
+ return baseSlice(array, n < 0 ? 0 : n, length);
11674
+ }
11675
+
11676
+ /**
11677
+ * Creates a slice of `array` with `n` elements dropped from the end.
11678
+ *
11679
+ * @static
11680
+ * @memberOf _
11681
+ * @since 3.0.0
11682
+ * @category Array
11683
+ * @param {Array} array The array to query.
11684
+ * @param {number} [n=1] The number of elements to drop.
11685
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11686
+ * @returns {Array} Returns the slice of `array`.
11687
+ * @example
11688
+ *
11689
+ * _.dropRight([1, 2, 3]);
11690
+ * // => [1, 2]
11691
+ *
11692
+ * _.dropRight([1, 2, 3], 2);
11693
+ * // => [1]
11694
+ *
11695
+ * _.dropRight([1, 2, 3], 5);
11696
+ * // => []
11697
+ *
11698
+ * _.dropRight([1, 2, 3], 0);
11699
+ * // => [1, 2, 3]
11700
+ */
11701
+ function dropRight(array, n, guard) {
11702
+ var length = array == null ? 0 : array.length;
11703
+ if (!length) {
11704
+ return [];
11705
+ }
11706
+ n = (guard || n === undefined) ? 1 : toInteger(n);
11707
+ n = length - n;
11708
+ return baseSlice(array, 0, n < 0 ? 0 : n);
11709
+ }
11710
+
11711
+ /**
11712
+ * Creates a slice of `array` excluding elements dropped from the end.
11713
+ * Elements are dropped until `predicate` returns falsey. The predicate is
11714
+ * invoked with three arguments: (value, index, array).
11715
+ *
11716
+ * @static
11717
+ * @memberOf _
11718
+ * @since 3.0.0
11719
+ * @category Array
11720
+ * @param {Array} array The array to query.
11721
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11722
+ * @returns {Array} Returns the slice of `array`.
11723
+ * @example
11724
+ *
11725
+ * var users = [
11726
+ * { 'user': 'barney', 'active': true },
11727
+ * { 'user': 'fred', 'active': false },
11728
+ * { 'user': 'pebbles', 'active': false }
11729
+ * ];
11730
+ *
11731
+ * _.dropRightWhile(users, function(o) { return !o.active; });
11732
+ * // => objects for ['barney']
11733
+ *
11734
+ * // The `_.matches` iteratee shorthand.
11735
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
11736
+ * // => objects for ['barney', 'fred']
11737
+ *
11738
+ * // The `_.matchesProperty` iteratee shorthand.
11739
+ * _.dropRightWhile(users, ['active', false]);
11740
+ * // => objects for ['barney']
11741
+ *
11742
+ * // The `_.property` iteratee shorthand.
11743
+ * _.dropRightWhile(users, 'active');
11744
+ * // => objects for ['barney', 'fred', 'pebbles']
11745
+ */
11746
+ function dropRightWhile(array, predicate) {
11747
+ return (array && array.length)
11748
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
11749
+ : [];
11750
+ }
11751
+
11752
+ /**
11753
+ * Creates a slice of `array` excluding elements dropped from the beginning.
11754
+ * Elements are dropped until `predicate` returns falsey. The predicate is
11755
+ * invoked with three arguments: (value, index, array).
11756
+ *
11757
+ * @static
11758
+ * @memberOf _
11759
+ * @since 3.0.0
11760
+ * @category Array
11761
+ * @param {Array} array The array to query.
11762
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11763
+ * @returns {Array} Returns the slice of `array`.
11764
+ * @example
11765
+ *
11766
+ * var users = [
11767
+ * { 'user': 'barney', 'active': false },
11768
+ * { 'user': 'fred', 'active': false },
11769
+ * { 'user': 'pebbles', 'active': true }
11770
+ * ];
11771
+ *
11772
+ * _.dropWhile(users, function(o) { return !o.active; });
11773
+ * // => objects for ['pebbles']
11774
+ *
11775
+ * // The `_.matches` iteratee shorthand.
11776
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
11777
+ * // => objects for ['fred', 'pebbles']
11778
+ *
11779
+ * // The `_.matchesProperty` iteratee shorthand.
11780
+ * _.dropWhile(users, ['active', false]);
11781
+ * // => objects for ['pebbles']
11782
+ *
11783
+ * // The `_.property` iteratee shorthand.
11784
+ * _.dropWhile(users, 'active');
11785
+ * // => objects for ['barney', 'fred', 'pebbles']
11786
+ */
11787
+ function dropWhile(array, predicate) {
11788
+ return (array && array.length)
11789
+ ? baseWhile(array, getIteratee(predicate, 3), true)
11790
+ : [];
11791
+ }
11792
+
11793
+ /**
11794
+ * Fills elements of `array` with `value` from `start` up to, but not
11795
+ * including, `end`.
11796
+ *
11797
+ * **Note:** This method mutates `array`.
11798
+ *
11799
+ * @static
11800
+ * @memberOf _
11801
+ * @since 3.2.0
11802
+ * @category Array
11803
+ * @param {Array} array The array to fill.
11804
+ * @param {*} value The value to fill `array` with.
11805
+ * @param {number} [start=0] The start position.
11806
+ * @param {number} [end=array.length] The end position.
11807
+ * @returns {Array} Returns `array`.
11808
+ * @example
11809
+ *
11810
+ * var array = [1, 2, 3];
11811
+ *
11812
+ * _.fill(array, 'a');
11813
+ * console.log(array);
11814
+ * // => ['a', 'a', 'a']
11815
+ *
11816
+ * _.fill(Array(3), 2);
11817
+ * // => [2, 2, 2]
11818
+ *
11819
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
11820
+ * // => [4, '*', '*', 10]
11821
+ */
11822
+ function fill(array, value, start, end) {
11823
+ var length = array == null ? 0 : array.length;
11824
+ if (!length) {
11825
+ return [];
11826
+ }
11827
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
11828
+ start = 0;
11829
+ end = length;
11830
+ }
11831
+ return baseFill(array, value, start, end);
11832
+ }
11833
+
11834
+ /**
11835
+ * This method is like `_.find` except that it returns the index of the first
11836
+ * element `predicate` returns truthy for instead of the element itself.
11837
+ *
11838
+ * @static
11839
+ * @memberOf _
11840
+ * @since 1.1.0
11841
+ * @category Array
11842
+ * @param {Array} array The array to inspect.
11843
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11844
+ * @param {number} [fromIndex=0] The index to search from.
11845
+ * @returns {number} Returns the index of the found element, else `-1`.
11846
+ * @example
11847
+ *
11848
+ * var users = [
11849
+ * { 'user': 'barney', 'active': false },
11850
+ * { 'user': 'fred', 'active': false },
11851
+ * { 'user': 'pebbles', 'active': true }
11852
+ * ];
11853
+ *
11854
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
11855
+ * // => 0
11856
+ *
11857
+ * // The `_.matches` iteratee shorthand.
11858
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
11859
+ * // => 1
11860
+ *
11861
+ * // The `_.matchesProperty` iteratee shorthand.
11862
+ * _.findIndex(users, ['active', false]);
11863
+ * // => 0
11864
+ *
11865
+ * // The `_.property` iteratee shorthand.
11866
+ * _.findIndex(users, 'active');
11867
+ * // => 2
11868
+ */
11869
+ function findIndex(array, predicate, fromIndex) {
11870
+ var length = array == null ? 0 : array.length;
11871
+ if (!length) {
11872
+ return -1;
11873
+ }
11874
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
11875
+ if (index < 0) {
11876
+ index = nativeMax(length + index, 0);
11877
+ }
11878
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
11879
+ }
11880
+
11881
+ /**
11882
+ * This method is like `_.findIndex` except that it iterates over elements
11883
+ * of `collection` from right to left.
11884
+ *
11885
+ * @static
11886
+ * @memberOf _
11887
+ * @since 2.0.0
11888
+ * @category Array
11889
+ * @param {Array} array The array to inspect.
11890
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11891
+ * @param {number} [fromIndex=array.length-1] The index to search from.
11892
+ * @returns {number} Returns the index of the found element, else `-1`.
11893
+ * @example
11894
+ *
11895
+ * var users = [
11896
+ * { 'user': 'barney', 'active': true },
11897
+ * { 'user': 'fred', 'active': false },
11898
+ * { 'user': 'pebbles', 'active': false }
11899
+ * ];
11900
+ *
11901
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
11902
+ * // => 2
11903
+ *
11904
+ * // The `_.matches` iteratee shorthand.
11905
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
11906
+ * // => 0
11907
+ *
11908
+ * // The `_.matchesProperty` iteratee shorthand.
11909
+ * _.findLastIndex(users, ['active', false]);
11910
+ * // => 2
11911
+ *
11912
+ * // The `_.property` iteratee shorthand.
11913
+ * _.findLastIndex(users, 'active');
11914
+ * // => 0
11915
+ */
11916
+ function findLastIndex(array, predicate, fromIndex) {
11917
+ var length = array == null ? 0 : array.length;
11918
+ if (!length) {
11919
+ return -1;
11920
+ }
11921
+ var index = length - 1;
11922
+ if (fromIndex !== undefined) {
11923
+ index = toInteger(fromIndex);
11924
+ index = fromIndex < 0
11925
+ ? nativeMax(length + index, 0)
11926
+ : nativeMin(index, length - 1);
11927
+ }
11928
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
11929
+ }
11930
+
11931
+ /**
11932
+ * Flattens `array` a single level deep.
11933
+ *
11934
+ * @static
11935
+ * @memberOf _
11936
+ * @since 0.1.0
11937
+ * @category Array
11938
+ * @param {Array} array The array to flatten.
11939
+ * @returns {Array} Returns the new flattened array.
11940
+ * @example
11941
+ *
11942
+ * _.flatten([1, [2, [3, [4]], 5]]);
11943
+ * // => [1, 2, [3, [4]], 5]
11944
+ */
11945
+ function flatten(array) {
11946
+ var length = array == null ? 0 : array.length;
11947
+ return length ? baseFlatten(array, 1) : [];
11948
+ }
11949
+
11950
+ /**
11951
+ * Recursively flattens `array`.
11952
+ *
11953
+ * @static
11954
+ * @memberOf _
11955
+ * @since 3.0.0
11956
+ * @category Array
11957
+ * @param {Array} array The array to flatten.
11958
+ * @returns {Array} Returns the new flattened array.
11959
+ * @example
11960
+ *
11961
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
11962
+ * // => [1, 2, 3, 4, 5]
11963
+ */
11964
+ function flattenDeep(array) {
11965
+ var length = array == null ? 0 : array.length;
11966
+ return length ? baseFlatten(array, INFINITY) : [];
11967
+ }
11968
+
11969
+ /**
11970
+ * Recursively flatten `array` up to `depth` times.
11971
+ *
11972
+ * @static
11973
+ * @memberOf _
11974
+ * @since 4.4.0
11975
+ * @category Array
11976
+ * @param {Array} array The array to flatten.
11977
+ * @param {number} [depth=1] The maximum recursion depth.
11978
+ * @returns {Array} Returns the new flattened array.
11979
+ * @example
11980
+ *
11981
+ * var array = [1, [2, [3, [4]], 5]];
11982
+ *
11983
+ * _.flattenDepth(array, 1);
11984
+ * // => [1, 2, [3, [4]], 5]
11985
+ *
11986
+ * _.flattenDepth(array, 2);
11987
+ * // => [1, 2, 3, [4], 5]
11988
+ */
11989
+ function flattenDepth(array, depth) {
11990
+ var length = array == null ? 0 : array.length;
11991
+ if (!length) {
11992
+ return [];
11993
+ }
11994
+ depth = depth === undefined ? 1 : toInteger(depth);
11995
+ return baseFlatten(array, depth);
11996
+ }
11997
+
11998
+ /**
11999
+ * The inverse of `_.toPairs`; this method returns an object composed
12000
+ * from key-value `pairs`.
12001
+ *
12002
+ * @static
12003
+ * @memberOf _
12004
+ * @since 4.0.0
12005
+ * @category Array
12006
+ * @param {Array} pairs The key-value pairs.
12007
+ * @returns {Object} Returns the new object.
12008
+ * @example
12009
+ *
12010
+ * _.fromPairs([['a', 1], ['b', 2]]);
12011
+ * // => { 'a': 1, 'b': 2 }
12012
+ */
12013
+ function fromPairs(pairs) {
12014
+ var index = -1,
12015
+ length = pairs == null ? 0 : pairs.length,
12016
+ result = {};
12017
+
12018
+ while (++index < length) {
12019
+ var pair = pairs[index];
12020
+ result[pair[0]] = pair[1];
12021
+ }
12022
+ return result;
12023
+ }
12024
+
12025
+ /**
12026
+ * Gets the first element of `array`.
12027
+ *
12028
+ * @static
12029
+ * @memberOf _
12030
+ * @since 0.1.0
12031
+ * @alias first
12032
+ * @category Array
12033
+ * @param {Array} array The array to query.
12034
+ * @returns {*} Returns the first element of `array`.
12035
+ * @example
12036
+ *
12037
+ * _.head([1, 2, 3]);
12038
+ * // => 1
12039
+ *
12040
+ * _.head([]);
12041
+ * // => undefined
12042
+ */
12043
+ function head(array) {
12044
+ return (array && array.length) ? array[0] : undefined;
12045
+ }
12046
+
12047
+ /**
12048
+ * Gets the index at which the first occurrence of `value` is found in `array`
12049
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12050
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
12051
+ * offset from the end of `array`.
12052
+ *
12053
+ * @static
12054
+ * @memberOf _
12055
+ * @since 0.1.0
12056
+ * @category Array
12057
+ * @param {Array} array The array to inspect.
12058
+ * @param {*} value The value to search for.
12059
+ * @param {number} [fromIndex=0] The index to search from.
12060
+ * @returns {number} Returns the index of the matched value, else `-1`.
12061
+ * @example
12062
+ *
12063
+ * _.indexOf([1, 2, 1, 2], 2);
12064
+ * // => 1
12065
+ *
12066
+ * // Search from the `fromIndex`.
12067
+ * _.indexOf([1, 2, 1, 2], 2, 2);
12068
+ * // => 3
12069
+ */
12070
+ function indexOf(array, value, fromIndex) {
12071
+ var length = array == null ? 0 : array.length;
12072
+ if (!length) {
12073
+ return -1;
12074
+ }
12075
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
12076
+ if (index < 0) {
12077
+ index = nativeMax(length + index, 0);
12078
+ }
12079
+ return baseIndexOf(array, value, index);
12080
+ }
12081
+
12082
+ /**
12083
+ * Gets all but the last element of `array`.
12084
+ *
12085
+ * @static
12086
+ * @memberOf _
12087
+ * @since 0.1.0
12088
+ * @category Array
12089
+ * @param {Array} array The array to query.
12090
+ * @returns {Array} Returns the slice of `array`.
12091
+ * @example
12092
+ *
12093
+ * _.initial([1, 2, 3]);
12094
+ * // => [1, 2]
12095
+ */
12096
+ function initial(array) {
12097
+ var length = array == null ? 0 : array.length;
12098
+ return length ? baseSlice(array, 0, -1) : [];
12099
+ }
12100
+
12101
+ /**
12102
+ * Creates an array of unique values that are included in all given arrays
12103
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12104
+ * for equality comparisons. The order and references of result values are
12105
+ * determined by the first array.
12106
+ *
12107
+ * @static
12108
+ * @memberOf _
12109
+ * @since 0.1.0
12110
+ * @category Array
12111
+ * @param {...Array} [arrays] The arrays to inspect.
12112
+ * @returns {Array} Returns the new array of intersecting values.
12113
+ * @example
12114
+ *
12115
+ * _.intersection([2, 1], [2, 3]);
12116
+ * // => [2]
12117
+ */
12118
+ var intersection = baseRest(function(arrays) {
12119
+ var mapped = arrayMap(arrays, castArrayLikeObject);
12120
+ return (mapped.length && mapped[0] === arrays[0])
12121
+ ? baseIntersection(mapped)
12122
+ : [];
12123
+ });
12124
+
12125
+ /**
12126
+ * This method is like `_.intersection` except that it accepts `iteratee`
12127
+ * which is invoked for each element of each `arrays` to generate the criterion
12128
+ * by which they're compared. The order and references of result values are
12129
+ * determined by the first array. The iteratee is invoked with one argument:
12130
+ * (value).
12131
+ *
12132
+ * @static
12133
+ * @memberOf _
12134
+ * @since 4.0.0
12135
+ * @category Array
12136
+ * @param {...Array} [arrays] The arrays to inspect.
12137
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12138
+ * @returns {Array} Returns the new array of intersecting values.
12139
+ * @example
12140
+ *
12141
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
12142
+ * // => [2.1]
12143
+ *
12144
+ * // The `_.property` iteratee shorthand.
12145
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
12146
+ * // => [{ 'x': 1 }]
12147
+ */
12148
+ var intersectionBy = baseRest(function(arrays) {
12149
+ var iteratee = last(arrays),
12150
+ mapped = arrayMap(arrays, castArrayLikeObject);
12151
+
12152
+ if (iteratee === last(mapped)) {
12153
+ iteratee = undefined;
12154
+ } else {
12155
+ mapped.pop();
12156
+ }
12157
+ return (mapped.length && mapped[0] === arrays[0])
12158
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
12159
+ : [];
12160
+ });
12161
+
12162
+ /**
12163
+ * This method is like `_.intersection` except that it accepts `comparator`
12164
+ * which is invoked to compare elements of `arrays`. The order and references
12165
+ * of result values are determined by the first array. The comparator is
12166
+ * invoked with two arguments: (arrVal, othVal).
12167
+ *
12168
+ * @static
12169
+ * @memberOf _
12170
+ * @since 4.0.0
12171
+ * @category Array
12172
+ * @param {...Array} [arrays] The arrays to inspect.
12173
+ * @param {Function} [comparator] The comparator invoked per element.
12174
+ * @returns {Array} Returns the new array of intersecting values.
12175
+ * @example
12176
+ *
12177
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
12178
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
12179
+ *
12180
+ * _.intersectionWith(objects, others, _.isEqual);
12181
+ * // => [{ 'x': 1, 'y': 2 }]
12182
+ */
12183
+ var intersectionWith = baseRest(function(arrays) {
12184
+ var comparator = last(arrays),
12185
+ mapped = arrayMap(arrays, castArrayLikeObject);
12186
+
12187
+ comparator = typeof comparator == 'function' ? comparator : undefined;
12188
+ if (comparator) {
12189
+ mapped.pop();
12190
+ }
12191
+ return (mapped.length && mapped[0] === arrays[0])
12192
+ ? baseIntersection(mapped, undefined, comparator)
12193
+ : [];
12194
+ });
12195
+
12196
+ /**
12197
+ * Converts all elements in `array` into a string separated by `separator`.
12198
+ *
12199
+ * @static
12200
+ * @memberOf _
12201
+ * @since 4.0.0
12202
+ * @category Array
12203
+ * @param {Array} array The array to convert.
12204
+ * @param {string} [separator=','] The element separator.
12205
+ * @returns {string} Returns the joined string.
12206
+ * @example
12207
+ *
12208
+ * _.join(['a', 'b', 'c'], '~');
12209
+ * // => 'a~b~c'
12210
+ */
12211
+ function join(array, separator) {
12212
+ return array == null ? '' : nativeJoin.call(array, separator);
12213
+ }
12214
+
12215
+ /**
12216
+ * Gets the last element of `array`.
12217
+ *
12218
+ * @static
12219
+ * @memberOf _
12220
+ * @since 0.1.0
12221
+ * @category Array
12222
+ * @param {Array} array The array to query.
12223
+ * @returns {*} Returns the last element of `array`.
12224
+ * @example
12225
+ *
12226
+ * _.last([1, 2, 3]);
12227
+ * // => 3
12228
+ */
12229
+ function last(array) {
12230
+ var length = array == null ? 0 : array.length;
12231
+ return length ? array[length - 1] : undefined;
12232
+ }
12233
+
12234
+ /**
12235
+ * This method is like `_.indexOf` except that it iterates over elements of
12236
+ * `array` from right to left.
12237
+ *
12238
+ * @static
12239
+ * @memberOf _
12240
+ * @since 0.1.0
12241
+ * @category Array
12242
+ * @param {Array} array The array to inspect.
12243
+ * @param {*} value The value to search for.
12244
+ * @param {number} [fromIndex=array.length-1] The index to search from.
12245
+ * @returns {number} Returns the index of the matched value, else `-1`.
12246
+ * @example
12247
+ *
12248
+ * _.lastIndexOf([1, 2, 1, 2], 2);
12249
+ * // => 3
12250
+ *
12251
+ * // Search from the `fromIndex`.
12252
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
12253
+ * // => 1
12254
+ */
12255
+ function lastIndexOf(array, value, fromIndex) {
12256
+ var length = array == null ? 0 : array.length;
12257
+ if (!length) {
12258
+ return -1;
12259
+ }
12260
+ var index = length;
12261
+ if (fromIndex !== undefined) {
12262
+ index = toInteger(fromIndex);
12263
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
12264
+ }
12265
+ return value === value
12266
+ ? strictLastIndexOf(array, value, index)
12267
+ : baseFindIndex(array, baseIsNaN, index, true);
12268
+ }
12269
+
12270
+ /**
12271
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
12272
+ * element from the end is returned.
12273
+ *
12274
+ * @static
12275
+ * @memberOf _
12276
+ * @since 4.11.0
12277
+ * @category Array
12278
+ * @param {Array} array The array to query.
12279
+ * @param {number} [n=0] The index of the element to return.
12280
+ * @returns {*} Returns the nth element of `array`.
12281
+ * @example
12282
+ *
12283
+ * var array = ['a', 'b', 'c', 'd'];
12284
+ *
12285
+ * _.nth(array, 1);
12286
+ * // => 'b'
12287
+ *
12288
+ * _.nth(array, -2);
12289
+ * // => 'c';
12290
+ */
12291
+ function nth(array, n) {
12292
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
12293
+ }
12294
+
12295
+ /**
12296
+ * Removes all given values from `array` using
12297
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12298
+ * for equality comparisons.
12299
+ *
12300
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
12301
+ * to remove elements from an array by predicate.
12302
+ *
12303
+ * @static
12304
+ * @memberOf _
12305
+ * @since 2.0.0
12306
+ * @category Array
12307
+ * @param {Array} array The array to modify.
12308
+ * @param {...*} [values] The values to remove.
12309
+ * @returns {Array} Returns `array`.
12310
+ * @example
12311
+ *
12312
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
12313
+ *
12314
+ * _.pull(array, 'a', 'c');
12315
+ * console.log(array);
12316
+ * // => ['b', 'b']
12317
+ */
12318
+ var pull = baseRest(pullAll);
12319
+
12320
+ /**
12321
+ * This method is like `_.pull` except that it accepts an array of values to remove.
12322
+ *
12323
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
12324
+ *
12325
+ * @static
12326
+ * @memberOf _
12327
+ * @since 4.0.0
12328
+ * @category Array
12329
+ * @param {Array} array The array to modify.
12330
+ * @param {Array} values The values to remove.
12331
+ * @returns {Array} Returns `array`.
12332
+ * @example
12333
+ *
12334
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
12335
+ *
12336
+ * _.pullAll(array, ['a', 'c']);
12337
+ * console.log(array);
12338
+ * // => ['b', 'b']
12339
+ */
12340
+ function pullAll(array, values) {
12341
+ return (array && array.length && values && values.length)
12342
+ ? basePullAll(array, values)
12343
+ : array;
12344
+ }
12345
+
12346
+ /**
12347
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
12348
+ * invoked for each element of `array` and `values` to generate the criterion
12349
+ * by which they're compared. The iteratee is invoked with one argument: (value).
12350
+ *
12351
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
12352
+ *
12353
+ * @static
12354
+ * @memberOf _
12355
+ * @since 4.0.0
12356
+ * @category Array
12357
+ * @param {Array} array The array to modify.
12358
+ * @param {Array} values The values to remove.
12359
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12360
+ * @returns {Array} Returns `array`.
12361
+ * @example
12362
+ *
12363
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
12364
+ *
12365
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
12366
+ * console.log(array);
12367
+ * // => [{ 'x': 2 }]
12368
+ */
12369
+ function pullAllBy(array, values, iteratee) {
12370
+ return (array && array.length && values && values.length)
12371
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
12372
+ : array;
12373
+ }
12374
+
12375
+ /**
12376
+ * This method is like `_.pullAll` except that it accepts `comparator` which
12377
+ * is invoked to compare elements of `array` to `values`. The comparator is
12378
+ * invoked with two arguments: (arrVal, othVal).
12379
+ *
12380
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
12381
+ *
12382
+ * @static
12383
+ * @memberOf _
12384
+ * @since 4.6.0
12385
+ * @category Array
12386
+ * @param {Array} array The array to modify.
12387
+ * @param {Array} values The values to remove.
12388
+ * @param {Function} [comparator] The comparator invoked per element.
12389
+ * @returns {Array} Returns `array`.
12390
+ * @example
12391
+ *
12392
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
12393
+ *
12394
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
12395
+ * console.log(array);
12396
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
12397
+ */
12398
+ function pullAllWith(array, values, comparator) {
12399
+ return (array && array.length && values && values.length)
12400
+ ? basePullAll(array, values, undefined, comparator)
12401
+ : array;
12402
+ }
12403
+
12404
+ /**
12405
+ * Removes elements from `array` corresponding to `indexes` and returns an
12406
+ * array of removed elements.
12407
+ *
12408
+ * **Note:** Unlike `_.at`, this method mutates `array`.
12409
+ *
12410
+ * @static
12411
+ * @memberOf _
12412
+ * @since 3.0.0
12413
+ * @category Array
12414
+ * @param {Array} array The array to modify.
12415
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
12416
+ * @returns {Array} Returns the new array of removed elements.
12417
+ * @example
12418
+ *
12419
+ * var array = ['a', 'b', 'c', 'd'];
12420
+ * var pulled = _.pullAt(array, [1, 3]);
12421
+ *
12422
+ * console.log(array);
12423
+ * // => ['a', 'c']
12424
+ *
12425
+ * console.log(pulled);
12426
+ * // => ['b', 'd']
12427
+ */
12428
+ var pullAt = flatRest(function(array, indexes) {
12429
+ var length = array == null ? 0 : array.length,
12430
+ result = baseAt(array, indexes);
12431
+
12432
+ basePullAt(array, arrayMap(indexes, function(index) {
12433
+ return isIndex(index, length) ? +index : index;
12434
+ }).sort(compareAscending));
12435
+
12436
+ return result;
12437
+ });
12438
+
12439
+ /**
12440
+ * Removes all elements from `array` that `predicate` returns truthy for
12441
+ * and returns an array of the removed elements. The predicate is invoked
12442
+ * with three arguments: (value, index, array).
12443
+ *
12444
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
12445
+ * to pull elements from an array by value.
12446
+ *
12447
+ * @static
12448
+ * @memberOf _
12449
+ * @since 2.0.0
12450
+ * @category Array
12451
+ * @param {Array} array The array to modify.
12452
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
12453
+ * @returns {Array} Returns the new array of removed elements.
12454
+ * @example
12455
+ *
12456
+ * var array = [1, 2, 3, 4];
12457
+ * var evens = _.remove(array, function(n) {
12458
+ * return n % 2 == 0;
12459
+ * });
12460
+ *
12461
+ * console.log(array);
12462
+ * // => [1, 3]
12463
+ *
12464
+ * console.log(evens);
12465
+ * // => [2, 4]
12466
+ */
12467
+ function remove(array, predicate) {
12468
+ var result = [];
12469
+ if (!(array && array.length)) {
12470
+ return result;
12471
+ }
12472
+ var index = -1,
12473
+ indexes = [],
12474
+ length = array.length;
12475
+
12476
+ predicate = getIteratee(predicate, 3);
12477
+ while (++index < length) {
12478
+ var value = array[index];
12479
+ if (predicate(value, index, array)) {
12480
+ result.push(value);
12481
+ indexes.push(index);
12482
+ }
12483
+ }
12484
+ basePullAt(array, indexes);
12485
+ return result;
12486
+ }
12487
+
12488
+ /**
12489
+ * Reverses `array` so that the first element becomes the last, the second
12490
+ * element becomes the second to last, and so on.
12491
+ *
12492
+ * **Note:** This method mutates `array` and is based on
12493
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
12494
+ *
12495
+ * @static
12496
+ * @memberOf _
12497
+ * @since 4.0.0
12498
+ * @category Array
12499
+ * @param {Array} array The array to modify.
12500
+ * @returns {Array} Returns `array`.
12501
+ * @example
12502
+ *
12503
+ * var array = [1, 2, 3];
12504
+ *
12505
+ * _.reverse(array);
12506
+ * // => [3, 2, 1]
12507
+ *
12508
+ * console.log(array);
12509
+ * // => [3, 2, 1]
12510
+ */
12511
+ function reverse(array) {
12512
+ return array == null ? array : nativeReverse.call(array);
12513
+ }
12514
+
12515
+ /**
12516
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
12517
+ *
12518
+ * **Note:** This method is used instead of
12519
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
12520
+ * returned.
12521
+ *
12522
+ * @static
12523
+ * @memberOf _
12524
+ * @since 3.0.0
12525
+ * @category Array
12526
+ * @param {Array} array The array to slice.
12527
+ * @param {number} [start=0] The start position.
12528
+ * @param {number} [end=array.length] The end position.
12529
+ * @returns {Array} Returns the slice of `array`.
12530
+ */
12531
+ function slice(array, start, end) {
12532
+ var length = array == null ? 0 : array.length;
12533
+ if (!length) {
12534
+ return [];
12535
+ }
12536
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
12537
+ start = 0;
12538
+ end = length;
12539
+ }
12540
+ else {
12541
+ start = start == null ? 0 : toInteger(start);
12542
+ end = end === undefined ? length : toInteger(end);
12543
+ }
12544
+ return baseSlice(array, start, end);
12545
+ }
12546
+
12547
+ /**
12548
+ * Uses a binary search to determine the lowest index at which `value`
12549
+ * should be inserted into `array` in order to maintain its sort order.
12550
+ *
12551
+ * @static
12552
+ * @memberOf _
12553
+ * @since 0.1.0
12554
+ * @category Array
12555
+ * @param {Array} array The sorted array to inspect.
12556
+ * @param {*} value The value to evaluate.
12557
+ * @returns {number} Returns the index at which `value` should be inserted
12558
+ * into `array`.
12559
+ * @example
12560
+ *
12561
+ * _.sortedIndex([30, 50], 40);
12562
+ * // => 1
12563
+ */
12564
+ function sortedIndex(array, value) {
12565
+ return baseSortedIndex(array, value);
12566
+ }
12567
+
12568
+ /**
12569
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
12570
+ * which is invoked for `value` and each element of `array` to compute their
12571
+ * sort ranking. The iteratee is invoked with one argument: (value).
12572
+ *
12573
+ * @static
12574
+ * @memberOf _
12575
+ * @since 4.0.0
12576
+ * @category Array
12577
+ * @param {Array} array The sorted array to inspect.
12578
+ * @param {*} value The value to evaluate.
12579
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12580
+ * @returns {number} Returns the index at which `value` should be inserted
12581
+ * into `array`.
12582
+ * @example
12583
+ *
12584
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
12585
+ *
12586
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
12587
+ * // => 0
12588
+ *
12589
+ * // The `_.property` iteratee shorthand.
12590
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
12591
+ * // => 0
12592
+ */
12593
+ function sortedIndexBy(array, value, iteratee) {
12594
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
12595
+ }
12596
+
12597
+ /**
12598
+ * This method is like `_.indexOf` except that it performs a binary
12599
+ * search on a sorted `array`.
12600
+ *
12601
+ * @static
12602
+ * @memberOf _
12603
+ * @since 4.0.0
12604
+ * @category Array
12605
+ * @param {Array} array The array to inspect.
12606
+ * @param {*} value The value to search for.
12607
+ * @returns {number} Returns the index of the matched value, else `-1`.
12608
+ * @example
12609
+ *
12610
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
12611
+ * // => 1
12612
+ */
12613
+ function sortedIndexOf(array, value) {
12614
+ var length = array == null ? 0 : array.length;
12615
+ if (length) {
12616
+ var index = baseSortedIndex(array, value);
12617
+ if (index < length && eq(array[index], value)) {
12618
+ return index;
12619
+ }
12620
+ }
12621
+ return -1;
12622
+ }
12623
+
12624
+ /**
12625
+ * This method is like `_.sortedIndex` except that it returns the highest
12626
+ * index at which `value` should be inserted into `array` in order to
12627
+ * maintain its sort order.
12628
+ *
12629
+ * @static
12630
+ * @memberOf _
12631
+ * @since 3.0.0
12632
+ * @category Array
12633
+ * @param {Array} array The sorted array to inspect.
12634
+ * @param {*} value The value to evaluate.
12635
+ * @returns {number} Returns the index at which `value` should be inserted
12636
+ * into `array`.
12637
+ * @example
12638
+ *
12639
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
12640
+ * // => 4
12641
+ */
12642
+ function sortedLastIndex(array, value) {
12643
+ return baseSortedIndex(array, value, true);
12644
+ }
12645
+
12646
+ /**
12647
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
12648
+ * which is invoked for `value` and each element of `array` to compute their
12649
+ * sort ranking. The iteratee is invoked with one argument: (value).
12650
+ *
12651
+ * @static
12652
+ * @memberOf _
12653
+ * @since 4.0.0
12654
+ * @category Array
12655
+ * @param {Array} array The sorted array to inspect.
12656
+ * @param {*} value The value to evaluate.
12657
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12658
+ * @returns {number} Returns the index at which `value` should be inserted
12659
+ * into `array`.
12660
+ * @example
12661
+ *
12662
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
12663
+ *
12664
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
12665
+ * // => 1
12666
+ *
12667
+ * // The `_.property` iteratee shorthand.
12668
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
12669
+ * // => 1
12670
+ */
12671
+ function sortedLastIndexBy(array, value, iteratee) {
12672
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
12673
+ }
12674
+
12675
+ /**
12676
+ * This method is like `_.lastIndexOf` except that it performs a binary
12677
+ * search on a sorted `array`.
12678
+ *
12679
+ * @static
12680
+ * @memberOf _
12681
+ * @since 4.0.0
12682
+ * @category Array
12683
+ * @param {Array} array The array to inspect.
12684
+ * @param {*} value The value to search for.
12685
+ * @returns {number} Returns the index of the matched value, else `-1`.
12686
+ * @example
12687
+ *
12688
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
12689
+ * // => 3
12690
+ */
12691
+ function sortedLastIndexOf(array, value) {
12692
+ var length = array == null ? 0 : array.length;
12693
+ if (length) {
12694
+ var index = baseSortedIndex(array, value, true) - 1;
12695
+ if (eq(array[index], value)) {
12696
+ return index;
12697
+ }
12698
+ }
12699
+ return -1;
12700
+ }
12701
+
12702
+ /**
12703
+ * This method is like `_.uniq` except that it's designed and optimized
12704
+ * for sorted arrays.
12705
+ *
12706
+ * @static
12707
+ * @memberOf _
12708
+ * @since 4.0.0
12709
+ * @category Array
12710
+ * @param {Array} array The array to inspect.
12711
+ * @returns {Array} Returns the new duplicate free array.
12712
+ * @example
12713
+ *
12714
+ * _.sortedUniq([1, 1, 2]);
12715
+ * // => [1, 2]
12716
+ */
12717
+ function sortedUniq(array) {
12718
+ return (array && array.length)
12719
+ ? baseSortedUniq(array)
12720
+ : [];
12721
+ }
12722
+
12723
+ /**
12724
+ * This method is like `_.uniqBy` except that it's designed and optimized
12725
+ * for sorted arrays.
12726
+ *
12727
+ * @static
12728
+ * @memberOf _
12729
+ * @since 4.0.0
12730
+ * @category Array
12731
+ * @param {Array} array The array to inspect.
12732
+ * @param {Function} [iteratee] The iteratee invoked per element.
12733
+ * @returns {Array} Returns the new duplicate free array.
12734
+ * @example
12735
+ *
12736
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
12737
+ * // => [1.1, 2.3]
12738
+ */
12739
+ function sortedUniqBy(array, iteratee) {
12740
+ return (array && array.length)
12741
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
12742
+ : [];
12743
+ }
12744
+
12745
+ /**
12746
+ * Gets all but the first element of `array`.
12747
+ *
12748
+ * @static
12749
+ * @memberOf _
12750
+ * @since 4.0.0
12751
+ * @category Array
12752
+ * @param {Array} array The array to query.
12753
+ * @returns {Array} Returns the slice of `array`.
12754
+ * @example
12755
+ *
12756
+ * _.tail([1, 2, 3]);
12757
+ * // => [2, 3]
12758
+ */
12759
+ function tail(array) {
12760
+ var length = array == null ? 0 : array.length;
12761
+ return length ? baseSlice(array, 1, length) : [];
12762
+ }
12763
+
12764
+ /**
12765
+ * Creates a slice of `array` with `n` elements taken from the beginning.
12766
+ *
12767
+ * @static
12768
+ * @memberOf _
12769
+ * @since 0.1.0
12770
+ * @category Array
12771
+ * @param {Array} array The array to query.
12772
+ * @param {number} [n=1] The number of elements to take.
12773
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12774
+ * @returns {Array} Returns the slice of `array`.
12775
+ * @example
12776
+ *
12777
+ * _.take([1, 2, 3]);
12778
+ * // => [1]
12779
+ *
12780
+ * _.take([1, 2, 3], 2);
12781
+ * // => [1, 2]
12782
+ *
12783
+ * _.take([1, 2, 3], 5);
12784
+ * // => [1, 2, 3]
12785
+ *
12786
+ * _.take([1, 2, 3], 0);
12787
+ * // => []
12788
+ */
12789
+ function take(array, n, guard) {
12790
+ if (!(array && array.length)) {
12791
+ return [];
12792
+ }
12793
+ n = (guard || n === undefined) ? 1 : toInteger(n);
12794
+ return baseSlice(array, 0, n < 0 ? 0 : n);
12795
+ }
12796
+
12797
+ /**
12798
+ * Creates a slice of `array` with `n` elements taken from the end.
12799
+ *
12800
+ * @static
12801
+ * @memberOf _
12802
+ * @since 3.0.0
12803
+ * @category Array
12804
+ * @param {Array} array The array to query.
12805
+ * @param {number} [n=1] The number of elements to take.
12806
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
12807
+ * @returns {Array} Returns the slice of `array`.
12808
+ * @example
12809
+ *
12810
+ * _.takeRight([1, 2, 3]);
12811
+ * // => [3]
12812
+ *
12813
+ * _.takeRight([1, 2, 3], 2);
12814
+ * // => [2, 3]
12815
+ *
12816
+ * _.takeRight([1, 2, 3], 5);
12817
+ * // => [1, 2, 3]
12818
+ *
12819
+ * _.takeRight([1, 2, 3], 0);
12820
+ * // => []
12821
+ */
12822
+ function takeRight(array, n, guard) {
12823
+ var length = array == null ? 0 : array.length;
12824
+ if (!length) {
12825
+ return [];
12826
+ }
12827
+ n = (guard || n === undefined) ? 1 : toInteger(n);
12828
+ n = length - n;
12829
+ return baseSlice(array, n < 0 ? 0 : n, length);
12830
+ }
12831
+
12832
+ /**
12833
+ * Creates a slice of `array` with elements taken from the end. Elements are
12834
+ * taken until `predicate` returns falsey. The predicate is invoked with
12835
+ * three arguments: (value, index, array).
12836
+ *
12837
+ * @static
12838
+ * @memberOf _
12839
+ * @since 3.0.0
12840
+ * @category Array
12841
+ * @param {Array} array The array to query.
12842
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
12843
+ * @returns {Array} Returns the slice of `array`.
12844
+ * @example
12845
+ *
12846
+ * var users = [
12847
+ * { 'user': 'barney', 'active': true },
12848
+ * { 'user': 'fred', 'active': false },
12849
+ * { 'user': 'pebbles', 'active': false }
12850
+ * ];
12851
+ *
12852
+ * _.takeRightWhile(users, function(o) { return !o.active; });
12853
+ * // => objects for ['fred', 'pebbles']
12854
+ *
12855
+ * // The `_.matches` iteratee shorthand.
12856
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
12857
+ * // => objects for ['pebbles']
12858
+ *
12859
+ * // The `_.matchesProperty` iteratee shorthand.
12860
+ * _.takeRightWhile(users, ['active', false]);
12861
+ * // => objects for ['fred', 'pebbles']
12862
+ *
12863
+ * // The `_.property` iteratee shorthand.
12864
+ * _.takeRightWhile(users, 'active');
12865
+ * // => []
12866
+ */
12867
+ function takeRightWhile(array, predicate) {
12868
+ return (array && array.length)
12869
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
12870
+ : [];
12871
+ }
12872
+
12873
+ /**
12874
+ * Creates a slice of `array` with elements taken from the beginning. Elements
12875
+ * are taken until `predicate` returns falsey. The predicate is invoked with
12876
+ * three arguments: (value, index, array).
12877
+ *
12878
+ * @static
12879
+ * @memberOf _
12880
+ * @since 3.0.0
12881
+ * @category Array
12882
+ * @param {Array} array The array to query.
12883
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
12884
+ * @returns {Array} Returns the slice of `array`.
12885
+ * @example
12886
+ *
12887
+ * var users = [
12888
+ * { 'user': 'barney', 'active': false },
12889
+ * { 'user': 'fred', 'active': false },
12890
+ * { 'user': 'pebbles', 'active': true }
12891
+ * ];
12892
+ *
12893
+ * _.takeWhile(users, function(o) { return !o.active; });
12894
+ * // => objects for ['barney', 'fred']
12895
+ *
12896
+ * // The `_.matches` iteratee shorthand.
12897
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
12898
+ * // => objects for ['barney']
12899
+ *
12900
+ * // The `_.matchesProperty` iteratee shorthand.
12901
+ * _.takeWhile(users, ['active', false]);
12902
+ * // => objects for ['barney', 'fred']
12903
+ *
12904
+ * // The `_.property` iteratee shorthand.
12905
+ * _.takeWhile(users, 'active');
12906
+ * // => []
12907
+ */
12908
+ function takeWhile(array, predicate) {
12909
+ return (array && array.length)
12910
+ ? baseWhile(array, getIteratee(predicate, 3))
12911
+ : [];
12912
+ }
12913
+
12914
+ /**
12915
+ * Creates an array of unique values, in order, from all given arrays using
12916
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12917
+ * for equality comparisons.
12918
+ *
12919
+ * @static
12920
+ * @memberOf _
12921
+ * @since 0.1.0
12922
+ * @category Array
12923
+ * @param {...Array} [arrays] The arrays to inspect.
12924
+ * @returns {Array} Returns the new array of combined values.
12925
+ * @example
12926
+ *
12927
+ * _.union([2], [1, 2]);
12928
+ * // => [2, 1]
12929
+ */
12930
+ var union = baseRest(function(arrays) {
12931
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
12932
+ });
12933
+
12934
+ /**
12935
+ * This method is like `_.union` except that it accepts `iteratee` which is
12936
+ * invoked for each element of each `arrays` to generate the criterion by
12937
+ * which uniqueness is computed. Result values are chosen from the first
12938
+ * array in which the value occurs. The iteratee is invoked with one argument:
12939
+ * (value).
12940
+ *
12941
+ * @static
12942
+ * @memberOf _
12943
+ * @since 4.0.0
12944
+ * @category Array
12945
+ * @param {...Array} [arrays] The arrays to inspect.
12946
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
12947
+ * @returns {Array} Returns the new array of combined values.
12948
+ * @example
12949
+ *
12950
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
12951
+ * // => [2.1, 1.2]
12952
+ *
12953
+ * // The `_.property` iteratee shorthand.
12954
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
12955
+ * // => [{ 'x': 1 }, { 'x': 2 }]
12956
+ */
12957
+ var unionBy = baseRest(function(arrays) {
12958
+ var iteratee = last(arrays);
12959
+ if (isArrayLikeObject(iteratee)) {
12960
+ iteratee = undefined;
12961
+ }
12962
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
12963
+ });
12964
+
12965
+ /**
12966
+ * This method is like `_.union` except that it accepts `comparator` which
12967
+ * is invoked to compare elements of `arrays`. Result values are chosen from
12968
+ * the first array in which the value occurs. The comparator is invoked
12969
+ * with two arguments: (arrVal, othVal).
12970
+ *
12971
+ * @static
12972
+ * @memberOf _
12973
+ * @since 4.0.0
12974
+ * @category Array
12975
+ * @param {...Array} [arrays] The arrays to inspect.
12976
+ * @param {Function} [comparator] The comparator invoked per element.
12977
+ * @returns {Array} Returns the new array of combined values.
12978
+ * @example
12979
+ *
12980
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
12981
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
12982
+ *
12983
+ * _.unionWith(objects, others, _.isEqual);
12984
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
12985
+ */
12986
+ var unionWith = baseRest(function(arrays) {
12987
+ var comparator = last(arrays);
12988
+ comparator = typeof comparator == 'function' ? comparator : undefined;
12989
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
12990
+ });
12991
+
12992
+ /**
12993
+ * Creates a duplicate-free version of an array, using
12994
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12995
+ * for equality comparisons, in which only the first occurrence of each element
12996
+ * is kept. The order of result values is determined by the order they occur
12997
+ * in the array.
12998
+ *
12999
+ * @static
13000
+ * @memberOf _
13001
+ * @since 0.1.0
13002
+ * @category Array
13003
+ * @param {Array} array The array to inspect.
13004
+ * @returns {Array} Returns the new duplicate free array.
13005
+ * @example
13006
+ *
13007
+ * _.uniq([2, 1, 2]);
13008
+ * // => [2, 1]
13009
+ */
13010
+ function uniq(array) {
13011
+ return (array && array.length) ? baseUniq(array) : [];
13012
+ }
13013
+
13014
+ /**
13015
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
13016
+ * invoked for each element in `array` to generate the criterion by which
13017
+ * uniqueness is computed. The order of result values is determined by the
13018
+ * order they occur in the array. The iteratee is invoked with one argument:
13019
+ * (value).
13020
+ *
13021
+ * @static
13022
+ * @memberOf _
13023
+ * @since 4.0.0
13024
+ * @category Array
13025
+ * @param {Array} array The array to inspect.
13026
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
13027
+ * @returns {Array} Returns the new duplicate free array.
13028
+ * @example
13029
+ *
13030
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
13031
+ * // => [2.1, 1.2]
13032
+ *
13033
+ * // The `_.property` iteratee shorthand.
13034
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
13035
+ * // => [{ 'x': 1 }, { 'x': 2 }]
13036
+ */
13037
+ function uniqBy(array, iteratee) {
13038
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
13039
+ }
13040
+
13041
+ /**
13042
+ * This method is like `_.uniq` except that it accepts `comparator` which
13043
+ * is invoked to compare elements of `array`. The order of result values is
13044
+ * determined by the order they occur in the array.The comparator is invoked
13045
+ * with two arguments: (arrVal, othVal).
13046
+ *
13047
+ * @static
13048
+ * @memberOf _
13049
+ * @since 4.0.0
13050
+ * @category Array
13051
+ * @param {Array} array The array to inspect.
13052
+ * @param {Function} [comparator] The comparator invoked per element.
13053
+ * @returns {Array} Returns the new duplicate free array.
13054
+ * @example
13055
+ *
13056
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
13057
+ *
13058
+ * _.uniqWith(objects, _.isEqual);
13059
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
13060
+ */
13061
+ function uniqWith(array, comparator) {
13062
+ comparator = typeof comparator == 'function' ? comparator : undefined;
13063
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
13064
+ }
13065
+
13066
+ /**
13067
+ * This method is like `_.zip` except that it accepts an array of grouped
13068
+ * elements and creates an array regrouping the elements to their pre-zip
13069
+ * configuration.
13070
+ *
13071
+ * @static
13072
+ * @memberOf _
13073
+ * @since 1.2.0
13074
+ * @category Array
13075
+ * @param {Array} array The array of grouped elements to process.
13076
+ * @returns {Array} Returns the new array of regrouped elements.
13077
+ * @example
13078
+ *
13079
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
13080
+ * // => [['a', 1, true], ['b', 2, false]]
13081
+ *
13082
+ * _.unzip(zipped);
13083
+ * // => [['a', 'b'], [1, 2], [true, false]]
13084
+ */
13085
+ function unzip(array) {
13086
+ if (!(array && array.length)) {
13087
+ return [];
13088
+ }
13089
+ var length = 0;
13090
+ array = arrayFilter(array, function(group) {
13091
+ if (isArrayLikeObject(group)) {
13092
+ length = nativeMax(group.length, length);
13093
+ return true;
13094
+ }
13095
+ });
13096
+ return baseTimes(length, function(index) {
13097
+ return arrayMap(array, baseProperty(index));
13098
+ });
13099
+ }
13100
+
13101
+ /**
13102
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
13103
+ * how regrouped values should be combined. The iteratee is invoked with the
13104
+ * elements of each group: (...group).
13105
+ *
13106
+ * @static
13107
+ * @memberOf _
13108
+ * @since 3.8.0
13109
+ * @category Array
13110
+ * @param {Array} array The array of grouped elements to process.
13111
+ * @param {Function} [iteratee=_.identity] The function to combine
13112
+ * regrouped values.
13113
+ * @returns {Array} Returns the new array of regrouped elements.
13114
+ * @example
13115
+ *
13116
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
13117
+ * // => [[1, 10, 100], [2, 20, 200]]
13118
+ *
13119
+ * _.unzipWith(zipped, _.add);
13120
+ * // => [3, 30, 300]
13121
+ */
13122
+ function unzipWith(array, iteratee) {
13123
+ if (!(array && array.length)) {
13124
+ return [];
13125
+ }
13126
+ var result = unzip(array);
13127
+ if (iteratee == null) {
13128
+ return result;
13129
+ }
13130
+ return arrayMap(result, function(group) {
13131
+ return apply(iteratee, undefined, group);
13132
+ });
13133
+ }
13134
+
13135
+ /**
13136
+ * Creates an array excluding all given values using
13137
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
13138
+ * for equality comparisons.
13139
+ *
13140
+ * **Note:** Unlike `_.pull`, this method returns a new array.
13141
+ *
13142
+ * @static
13143
+ * @memberOf _
13144
+ * @since 0.1.0
13145
+ * @category Array
13146
+ * @param {Array} array The array to inspect.
13147
+ * @param {...*} [values] The values to exclude.
13148
+ * @returns {Array} Returns the new array of filtered values.
13149
+ * @see _.difference, _.xor
13150
+ * @example
13151
+ *
13152
+ * _.without([2, 1, 2, 3], 1, 2);
13153
+ * // => [3]
13154
+ */
13155
+ var without = baseRest(function(array, values) {
13156
+ return isArrayLikeObject(array)
13157
+ ? baseDifference(array, values)
13158
+ : [];
13159
+ });
13160
+
13161
+ /**
13162
+ * Creates an array of unique values that is the
13163
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
13164
+ * of the given arrays. The order of result values is determined by the order
13165
+ * they occur in the arrays.
13166
+ *
13167
+ * @static
13168
+ * @memberOf _
13169
+ * @since 2.4.0
13170
+ * @category Array
13171
+ * @param {...Array} [arrays] The arrays to inspect.
13172
+ * @returns {Array} Returns the new array of filtered values.
13173
+ * @see _.difference, _.without
13174
+ * @example
13175
+ *
13176
+ * _.xor([2, 1], [2, 3]);
13177
+ * // => [1, 3]
13178
+ */
13179
+ var xor = baseRest(function(arrays) {
13180
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
13181
+ });
13182
+
13183
+ /**
13184
+ * This method is like `_.xor` except that it accepts `iteratee` which is
13185
+ * invoked for each element of each `arrays` to generate the criterion by
13186
+ * which by which they're compared. The order of result values is determined
13187
+ * by the order they occur in the arrays. The iteratee is invoked with one
13188
+ * argument: (value).
13189
+ *
13190
+ * @static
13191
+ * @memberOf _
13192
+ * @since 4.0.0
13193
+ * @category Array
13194
+ * @param {...Array} [arrays] The arrays to inspect.
13195
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
13196
+ * @returns {Array} Returns the new array of filtered values.
13197
+ * @example
13198
+ *
13199
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
13200
+ * // => [1.2, 3.4]
13201
+ *
13202
+ * // The `_.property` iteratee shorthand.
13203
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
13204
+ * // => [{ 'x': 2 }]
13205
+ */
13206
+ var xorBy = baseRest(function(arrays) {
13207
+ var iteratee = last(arrays);
13208
+ if (isArrayLikeObject(iteratee)) {
13209
+ iteratee = undefined;
13210
+ }
13211
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
13212
+ });
13213
+
13214
+ /**
13215
+ * This method is like `_.xor` except that it accepts `comparator` which is
13216
+ * invoked to compare elements of `arrays`. The order of result values is
13217
+ * determined by the order they occur in the arrays. The comparator is invoked
13218
+ * with two arguments: (arrVal, othVal).
13219
+ *
13220
+ * @static
13221
+ * @memberOf _
13222
+ * @since 4.0.0
13223
+ * @category Array
13224
+ * @param {...Array} [arrays] The arrays to inspect.
13225
+ * @param {Function} [comparator] The comparator invoked per element.
13226
+ * @returns {Array} Returns the new array of filtered values.
13227
+ * @example
13228
+ *
13229
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
13230
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
13231
+ *
13232
+ * _.xorWith(objects, others, _.isEqual);
13233
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
13234
+ */
13235
+ var xorWith = baseRest(function(arrays) {
13236
+ var comparator = last(arrays);
13237
+ comparator = typeof comparator == 'function' ? comparator : undefined;
13238
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
13239
+ });
13240
+
13241
+ /**
13242
+ * Creates an array of grouped elements, the first of which contains the
13243
+ * first elements of the given arrays, the second of which contains the
13244
+ * second elements of the given arrays, and so on.
13245
+ *
13246
+ * @static
13247
+ * @memberOf _
13248
+ * @since 0.1.0
13249
+ * @category Array
13250
+ * @param {...Array} [arrays] The arrays to process.
13251
+ * @returns {Array} Returns the new array of grouped elements.
13252
+ * @example
13253
+ *
13254
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
13255
+ * // => [['a', 1, true], ['b', 2, false]]
13256
+ */
13257
+ var zip = baseRest(unzip);
13258
+
13259
+ /**
13260
+ * This method is like `_.fromPairs` except that it accepts two arrays,
13261
+ * one of property identifiers and one of corresponding values.
13262
+ *
13263
+ * @static
13264
+ * @memberOf _
13265
+ * @since 0.4.0
13266
+ * @category Array
13267
+ * @param {Array} [props=[]] The property identifiers.
13268
+ * @param {Array} [values=[]] The property values.
13269
+ * @returns {Object} Returns the new object.
13270
+ * @example
13271
+ *
13272
+ * _.zipObject(['a', 'b'], [1, 2]);
13273
+ * // => { 'a': 1, 'b': 2 }
13274
+ */
13275
+ function zipObject(props, values) {
13276
+ return baseZipObject(props || [], values || [], assignValue);
13277
+ }
13278
+
13279
+ /**
13280
+ * This method is like `_.zipObject` except that it supports property paths.
13281
+ *
13282
+ * @static
13283
+ * @memberOf _
13284
+ * @since 4.1.0
13285
+ * @category Array
13286
+ * @param {Array} [props=[]] The property identifiers.
13287
+ * @param {Array} [values=[]] The property values.
13288
+ * @returns {Object} Returns the new object.
13289
+ * @example
13290
+ *
13291
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
13292
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
13293
+ */
13294
+ function zipObjectDeep(props, values) {
13295
+ return baseZipObject(props || [], values || [], baseSet);
13296
+ }
13297
+
13298
+ /**
13299
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
13300
+ * how grouped values should be combined. The iteratee is invoked with the
13301
+ * elements of each group: (...group).
13302
+ *
13303
+ * @static
13304
+ * @memberOf _
13305
+ * @since 3.8.0
13306
+ * @category Array
13307
+ * @param {...Array} [arrays] The arrays to process.
13308
+ * @param {Function} [iteratee=_.identity] The function to combine
13309
+ * grouped values.
13310
+ * @returns {Array} Returns the new array of grouped elements.
13311
+ * @example
13312
+ *
13313
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
13314
+ * return a + b + c;
13315
+ * });
13316
+ * // => [111, 222]
13317
+ */
13318
+ var zipWith = baseRest(function(arrays) {
13319
+ var length = arrays.length,
13320
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
13321
+
13322
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
13323
+ return unzipWith(arrays, iteratee);
13324
+ });
13325
+
13326
+ /*------------------------------------------------------------------------*/
13327
+
13328
+ /**
13329
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
13330
+ * chain sequences enabled. The result of such sequences must be unwrapped
13331
+ * with `_#value`.
13332
+ *
13333
+ * @static
13334
+ * @memberOf _
13335
+ * @since 1.3.0
13336
+ * @category Seq
13337
+ * @param {*} value The value to wrap.
13338
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13339
+ * @example
13340
+ *
13341
+ * var users = [
13342
+ * { 'user': 'barney', 'age': 36 },
13343
+ * { 'user': 'fred', 'age': 40 },
13344
+ * { 'user': 'pebbles', 'age': 1 }
13345
+ * ];
13346
+ *
13347
+ * var youngest = _
13348
+ * .chain(users)
13349
+ * .sortBy('age')
13350
+ * .map(function(o) {
13351
+ * return o.user + ' is ' + o.age;
13352
+ * })
13353
+ * .head()
13354
+ * .value();
13355
+ * // => 'pebbles is 1'
13356
+ */
13357
+ function chain(value) {
13358
+ var result = lodash(value);
13359
+ result.__chain__ = true;
13360
+ return result;
13361
+ }
13362
+
13363
+ /**
13364
+ * This method invokes `interceptor` and returns `value`. The interceptor
13365
+ * is invoked with one argument; (value). The purpose of this method is to
13366
+ * "tap into" a method chain sequence in order to modify intermediate results.
13367
+ *
13368
+ * @static
13369
+ * @memberOf _
13370
+ * @since 0.1.0
13371
+ * @category Seq
13372
+ * @param {*} value The value to provide to `interceptor`.
13373
+ * @param {Function} interceptor The function to invoke.
13374
+ * @returns {*} Returns `value`.
13375
+ * @example
13376
+ *
13377
+ * _([1, 2, 3])
13378
+ * .tap(function(array) {
13379
+ * // Mutate input array.
13380
+ * array.pop();
13381
+ * })
13382
+ * .reverse()
13383
+ * .value();
13384
+ * // => [2, 1]
13385
+ */
13386
+ function tap(value, interceptor) {
13387
+ interceptor(value);
13388
+ return value;
13389
+ }
13390
+
13391
+ /**
13392
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
13393
+ * The purpose of this method is to "pass thru" values replacing intermediate
13394
+ * results in a method chain sequence.
13395
+ *
13396
+ * @static
13397
+ * @memberOf _
13398
+ * @since 3.0.0
13399
+ * @category Seq
13400
+ * @param {*} value The value to provide to `interceptor`.
13401
+ * @param {Function} interceptor The function to invoke.
13402
+ * @returns {*} Returns the result of `interceptor`.
13403
+ * @example
13404
+ *
13405
+ * _(' abc ')
13406
+ * .chain()
13407
+ * .trim()
13408
+ * .thru(function(value) {
13409
+ * return [value];
13410
+ * })
13411
+ * .value();
13412
+ * // => ['abc']
13413
+ */
13414
+ function thru(value, interceptor) {
13415
+ return interceptor(value);
13416
+ }
13417
+
13418
+ /**
13419
+ * This method is the wrapper version of `_.at`.
13420
+ *
13421
+ * @name at
13422
+ * @memberOf _
13423
+ * @since 1.0.0
13424
+ * @category Seq
13425
+ * @param {...(string|string[])} [paths] The property paths to pick.
13426
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13427
+ * @example
13428
+ *
13429
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
13430
+ *
13431
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
13432
+ * // => [3, 4]
13433
+ */
13434
+ var wrapperAt = flatRest(function(paths) {
13435
+ var length = paths.length,
13436
+ start = length ? paths[0] : 0,
13437
+ value = this.__wrapped__,
13438
+ interceptor = function(object) { return baseAt(object, paths); };
13439
+
13440
+ if (length > 1 || this.__actions__.length ||
13441
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
13442
+ return this.thru(interceptor);
13443
+ }
13444
+ value = value.slice(start, +start + (length ? 1 : 0));
13445
+ value.__actions__.push({
13446
+ 'func': thru,
13447
+ 'args': [interceptor],
13448
+ 'thisArg': undefined
13449
+ });
13450
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
13451
+ if (length && !array.length) {
13452
+ array.push(undefined);
13453
+ }
13454
+ return array;
13455
+ });
13456
+ });
13457
+
13458
+ /**
13459
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
13460
+ *
13461
+ * @name chain
13462
+ * @memberOf _
13463
+ * @since 0.1.0
13464
+ * @category Seq
13465
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13466
+ * @example
13467
+ *
13468
+ * var users = [
13469
+ * { 'user': 'barney', 'age': 36 },
13470
+ * { 'user': 'fred', 'age': 40 }
13471
+ * ];
13472
+ *
13473
+ * // A sequence without explicit chaining.
13474
+ * _(users).head();
13475
+ * // => { 'user': 'barney', 'age': 36 }
13476
+ *
13477
+ * // A sequence with explicit chaining.
13478
+ * _(users)
13479
+ * .chain()
13480
+ * .head()
13481
+ * .pick('user')
13482
+ * .value();
13483
+ * // => { 'user': 'barney' }
13484
+ */
13485
+ function wrapperChain() {
13486
+ return chain(this);
13487
+ }
13488
+
13489
+ /**
13490
+ * Executes the chain sequence and returns the wrapped result.
13491
+ *
13492
+ * @name commit
13493
+ * @memberOf _
13494
+ * @since 3.2.0
13495
+ * @category Seq
13496
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13497
+ * @example
13498
+ *
13499
+ * var array = [1, 2];
13500
+ * var wrapped = _(array).push(3);
13501
+ *
13502
+ * console.log(array);
13503
+ * // => [1, 2]
13504
+ *
13505
+ * wrapped = wrapped.commit();
13506
+ * console.log(array);
13507
+ * // => [1, 2, 3]
13508
+ *
13509
+ * wrapped.last();
13510
+ * // => 3
13511
+ *
13512
+ * console.log(array);
13513
+ * // => [1, 2, 3]
13514
+ */
13515
+ function wrapperCommit() {
13516
+ return new LodashWrapper(this.value(), this.__chain__);
13517
+ }
13518
+
13519
+ /**
13520
+ * Gets the next value on a wrapped object following the
13521
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
13522
+ *
13523
+ * @name next
13524
+ * @memberOf _
13525
+ * @since 4.0.0
13526
+ * @category Seq
13527
+ * @returns {Object} Returns the next iterator value.
13528
+ * @example
13529
+ *
13530
+ * var wrapped = _([1, 2]);
13531
+ *
13532
+ * wrapped.next();
13533
+ * // => { 'done': false, 'value': 1 }
13534
+ *
13535
+ * wrapped.next();
13536
+ * // => { 'done': false, 'value': 2 }
13537
+ *
13538
+ * wrapped.next();
13539
+ * // => { 'done': true, 'value': undefined }
13540
+ */
13541
+ function wrapperNext() {
13542
+ if (this.__values__ === undefined) {
13543
+ this.__values__ = toArray(this.value());
13544
+ }
13545
+ var done = this.__index__ >= this.__values__.length,
13546
+ value = done ? undefined : this.__values__[this.__index__++];
13547
+
13548
+ return { 'done': done, 'value': value };
13549
+ }
13550
+
13551
+ /**
13552
+ * Enables the wrapper to be iterable.
13553
+ *
13554
+ * @name Symbol.iterator
13555
+ * @memberOf _
13556
+ * @since 4.0.0
13557
+ * @category Seq
13558
+ * @returns {Object} Returns the wrapper object.
13559
+ * @example
13560
+ *
13561
+ * var wrapped = _([1, 2]);
13562
+ *
13563
+ * wrapped[Symbol.iterator]() === wrapped;
13564
+ * // => true
13565
+ *
13566
+ * Array.from(wrapped);
13567
+ * // => [1, 2]
13568
+ */
13569
+ function wrapperToIterator() {
13570
+ return this;
13571
+ }
13572
+
13573
+ /**
13574
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
13575
+ *
13576
+ * @name plant
13577
+ * @memberOf _
13578
+ * @since 3.2.0
13579
+ * @category Seq
13580
+ * @param {*} value The value to plant.
13581
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13582
+ * @example
13583
+ *
13584
+ * function square(n) {
13585
+ * return n * n;
13586
+ * }
13587
+ *
13588
+ * var wrapped = _([1, 2]).map(square);
13589
+ * var other = wrapped.plant([3, 4]);
13590
+ *
13591
+ * other.value();
13592
+ * // => [9, 16]
13593
+ *
13594
+ * wrapped.value();
13595
+ * // => [1, 4]
13596
+ */
13597
+ function wrapperPlant(value) {
13598
+ var result,
13599
+ parent = this;
13600
+
13601
+ while (parent instanceof baseLodash) {
13602
+ var clone = wrapperClone(parent);
13603
+ clone.__index__ = 0;
13604
+ clone.__values__ = undefined;
13605
+ if (result) {
13606
+ previous.__wrapped__ = clone;
13607
+ } else {
13608
+ result = clone;
13609
+ }
13610
+ var previous = clone;
13611
+ parent = parent.__wrapped__;
13612
+ }
13613
+ previous.__wrapped__ = value;
13614
+ return result;
13615
+ }
13616
+
13617
+ /**
13618
+ * This method is the wrapper version of `_.reverse`.
13619
+ *
13620
+ * **Note:** This method mutates the wrapped array.
13621
+ *
13622
+ * @name reverse
13623
+ * @memberOf _
13624
+ * @since 0.1.0
13625
+ * @category Seq
13626
+ * @returns {Object} Returns the new `lodash` wrapper instance.
13627
+ * @example
13628
+ *
13629
+ * var array = [1, 2, 3];
13630
+ *
13631
+ * _(array).reverse().value()
13632
+ * // => [3, 2, 1]
13633
+ *
13634
+ * console.log(array);
13635
+ * // => [3, 2, 1]
13636
+ */
13637
+ function wrapperReverse() {
13638
+ var value = this.__wrapped__;
13639
+ if (value instanceof LazyWrapper) {
13640
+ var wrapped = value;
13641
+ if (this.__actions__.length) {
13642
+ wrapped = new LazyWrapper(this);
13643
+ }
13644
+ wrapped = wrapped.reverse();
13645
+ wrapped.__actions__.push({
13646
+ 'func': thru,
13647
+ 'args': [reverse],
13648
+ 'thisArg': undefined
13649
+ });
13650
+ return new LodashWrapper(wrapped, this.__chain__);
13651
+ }
13652
+ return this.thru(reverse);
13653
+ }
13654
+
13655
+ /**
13656
+ * Executes the chain sequence to resolve the unwrapped value.
13657
+ *
13658
+ * @name value
13659
+ * @memberOf _
13660
+ * @since 0.1.0
13661
+ * @alias toJSON, valueOf
13662
+ * @category Seq
13663
+ * @returns {*} Returns the resolved unwrapped value.
13664
+ * @example
13665
+ *
13666
+ * _([1, 2, 3]).value();
13667
+ * // => [1, 2, 3]
13668
+ */
13669
+ function wrapperValue() {
13670
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
13671
+ }
13672
+
13673
+ /*------------------------------------------------------------------------*/
13674
+
13675
+ /**
13676
+ * Creates an object composed of keys generated from the results of running
13677
+ * each element of `collection` thru `iteratee`. The corresponding value of
13678
+ * each key is the number of times the key was returned by `iteratee`. The
13679
+ * iteratee is invoked with one argument: (value).
13680
+ *
13681
+ * @static
13682
+ * @memberOf _
13683
+ * @since 0.5.0
13684
+ * @category Collection
13685
+ * @param {Array|Object} collection The collection to iterate over.
13686
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
13687
+ * @returns {Object} Returns the composed aggregate object.
13688
+ * @example
13689
+ *
13690
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
13691
+ * // => { '4': 1, '6': 2 }
13692
+ *
13693
+ * // The `_.property` iteratee shorthand.
13694
+ * _.countBy(['one', 'two', 'three'], 'length');
13695
+ * // => { '3': 2, '5': 1 }
13696
+ */
13697
+ var countBy = createAggregator(function(result, value, key) {
13698
+ if (hasOwnProperty.call(result, key)) {
13699
+ ++result[key];
13700
+ } else {
13701
+ baseAssignValue(result, key, 1);
13702
+ }
13703
+ });
13704
+
13705
+ /**
13706
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
13707
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
13708
+ * invoked with three arguments: (value, index|key, collection).
13709
+ *
13710
+ * **Note:** This method returns `true` for
13711
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
13712
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
13713
+ * elements of empty collections.
13714
+ *
13715
+ * @static
13716
+ * @memberOf _
13717
+ * @since 0.1.0
13718
+ * @category Collection
13719
+ * @param {Array|Object} collection The collection to iterate over.
13720
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
13721
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
13722
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
13723
+ * else `false`.
13724
+ * @example
13725
+ *
13726
+ * _.every([true, 1, null, 'yes'], Boolean);
13727
+ * // => false
13728
+ *
13729
+ * var users = [
13730
+ * { 'user': 'barney', 'age': 36, 'active': false },
13731
+ * { 'user': 'fred', 'age': 40, 'active': false }
13732
+ * ];
13733
+ *
13734
+ * // The `_.matches` iteratee shorthand.
13735
+ * _.every(users, { 'user': 'barney', 'active': false });
13736
+ * // => false
13737
+ *
13738
+ * // The `_.matchesProperty` iteratee shorthand.
13739
+ * _.every(users, ['active', false]);
13740
+ * // => true
13741
+ *
13742
+ * // The `_.property` iteratee shorthand.
13743
+ * _.every(users, 'active');
13744
+ * // => false
13745
+ */
13746
+ function every(collection, predicate, guard) {
13747
+ var func = isArray(collection) ? arrayEvery : baseEvery;
13748
+ if (guard && isIterateeCall(collection, predicate, guard)) {
13749
+ predicate = undefined;
13750
+ }
13751
+ return func(collection, getIteratee(predicate, 3));
13752
+ }
13753
+
13754
+ /**
13755
+ * Iterates over elements of `collection`, returning an array of all elements
13756
+ * `predicate` returns truthy for. The predicate is invoked with three
13757
+ * arguments: (value, index|key, collection).
13758
+ *
13759
+ * **Note:** Unlike `_.remove`, this method returns a new array.
13760
+ *
13761
+ * @static
13762
+ * @memberOf _
13763
+ * @since 0.1.0
13764
+ * @category Collection
13765
+ * @param {Array|Object} collection The collection to iterate over.
13766
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
13767
+ * @returns {Array} Returns the new filtered array.
13768
+ * @see _.reject
13769
+ * @example
13770
+ *
13771
+ * var users = [
13772
+ * { 'user': 'barney', 'age': 36, 'active': true },
13773
+ * { 'user': 'fred', 'age': 40, 'active': false }
13774
+ * ];
13775
+ *
13776
+ * _.filter(users, function(o) { return !o.active; });
13777
+ * // => objects for ['fred']
13778
+ *
13779
+ * // The `_.matches` iteratee shorthand.
13780
+ * _.filter(users, { 'age': 36, 'active': true });
13781
+ * // => objects for ['barney']
13782
+ *
13783
+ * // The `_.matchesProperty` iteratee shorthand.
13784
+ * _.filter(users, ['active', false]);
13785
+ * // => objects for ['fred']
13786
+ *
13787
+ * // The `_.property` iteratee shorthand.
13788
+ * _.filter(users, 'active');
13789
+ * // => objects for ['barney']
13790
+ */
13791
+ function filter(collection, predicate) {
13792
+ var func = isArray(collection) ? arrayFilter : baseFilter;
13793
+ return func(collection, getIteratee(predicate, 3));
13794
+ }
13795
+
13796
+ /**
13797
+ * Iterates over elements of `collection`, returning the first element
13798
+ * `predicate` returns truthy for. The predicate is invoked with three
13799
+ * arguments: (value, index|key, collection).
13800
+ *
13801
+ * @static
13802
+ * @memberOf _
13803
+ * @since 0.1.0
13804
+ * @category Collection
13805
+ * @param {Array|Object} collection The collection to inspect.
13806
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
13807
+ * @param {number} [fromIndex=0] The index to search from.
13808
+ * @returns {*} Returns the matched element, else `undefined`.
13809
+ * @example
13810
+ *
13811
+ * var users = [
13812
+ * { 'user': 'barney', 'age': 36, 'active': true },
13813
+ * { 'user': 'fred', 'age': 40, 'active': false },
13814
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
13815
+ * ];
13816
+ *
13817
+ * _.find(users, function(o) { return o.age < 40; });
13818
+ * // => object for 'barney'
13819
+ *
13820
+ * // The `_.matches` iteratee shorthand.
13821
+ * _.find(users, { 'age': 1, 'active': true });
13822
+ * // => object for 'pebbles'
13823
+ *
13824
+ * // The `_.matchesProperty` iteratee shorthand.
13825
+ * _.find(users, ['active', false]);
13826
+ * // => object for 'fred'
13827
+ *
13828
+ * // The `_.property` iteratee shorthand.
13829
+ * _.find(users, 'active');
13830
+ * // => object for 'barney'
13831
+ */
13832
+ var find = createFind(findIndex);
13833
+
13834
+ /**
13835
+ * This method is like `_.find` except that it iterates over elements of
13836
+ * `collection` from right to left.
13837
+ *
13838
+ * @static
13839
+ * @memberOf _
13840
+ * @since 2.0.0
13841
+ * @category Collection
13842
+ * @param {Array|Object} collection The collection to inspect.
13843
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
13844
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
13845
+ * @returns {*} Returns the matched element, else `undefined`.
13846
+ * @example
13847
+ *
13848
+ * _.findLast([1, 2, 3, 4], function(n) {
13849
+ * return n % 2 == 1;
13850
+ * });
13851
+ * // => 3
13852
+ */
13853
+ var findLast = createFind(findLastIndex);
13854
+
13855
+ /**
13856
+ * Creates a flattened array of values by running each element in `collection`
13857
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
13858
+ * with three arguments: (value, index|key, collection).
13859
+ *
13860
+ * @static
13861
+ * @memberOf _
13862
+ * @since 4.0.0
13863
+ * @category Collection
13864
+ * @param {Array|Object} collection The collection to iterate over.
13865
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
13866
+ * @returns {Array} Returns the new flattened array.
13867
+ * @example
13868
+ *
13869
+ * function duplicate(n) {
13870
+ * return [n, n];
13871
+ * }
13872
+ *
13873
+ * _.flatMap([1, 2], duplicate);
13874
+ * // => [1, 1, 2, 2]
13875
+ */
13876
+ function flatMap(collection, iteratee) {
13877
+ return baseFlatten(map(collection, iteratee), 1);
13878
+ }
13879
+
13880
+ /**
13881
+ * This method is like `_.flatMap` except that it recursively flattens the
13882
+ * mapped results.
13883
+ *
13884
+ * @static
13885
+ * @memberOf _
13886
+ * @since 4.7.0
13887
+ * @category Collection
13888
+ * @param {Array|Object} collection The collection to iterate over.
13889
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
13890
+ * @returns {Array} Returns the new flattened array.
13891
+ * @example
13892
+ *
13893
+ * function duplicate(n) {
13894
+ * return [[[n, n]]];
13895
+ * }
13896
+ *
13897
+ * _.flatMapDeep([1, 2], duplicate);
13898
+ * // => [1, 1, 2, 2]
13899
+ */
13900
+ function flatMapDeep(collection, iteratee) {
13901
+ return baseFlatten(map(collection, iteratee), INFINITY);
13902
+ }
13903
+
13904
+ /**
13905
+ * This method is like `_.flatMap` except that it recursively flattens the
13906
+ * mapped results up to `depth` times.
13907
+ *
13908
+ * @static
13909
+ * @memberOf _
13910
+ * @since 4.7.0
13911
+ * @category Collection
13912
+ * @param {Array|Object} collection The collection to iterate over.
13913
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
13914
+ * @param {number} [depth=1] The maximum recursion depth.
13915
+ * @returns {Array} Returns the new flattened array.
13916
+ * @example
13917
+ *
13918
+ * function duplicate(n) {
13919
+ * return [[[n, n]]];
13920
+ * }
13921
+ *
13922
+ * _.flatMapDepth([1, 2], duplicate, 2);
13923
+ * // => [[1, 1], [2, 2]]
13924
+ */
13925
+ function flatMapDepth(collection, iteratee, depth) {
13926
+ depth = depth === undefined ? 1 : toInteger(depth);
13927
+ return baseFlatten(map(collection, iteratee), depth);
13928
+ }
13929
+
13930
+ /**
13931
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
13932
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
13933
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
13934
+ *
13935
+ * **Note:** As with other "Collections" methods, objects with a "length"
13936
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
13937
+ * or `_.forOwn` for object iteration.
13938
+ *
13939
+ * @static
13940
+ * @memberOf _
13941
+ * @since 0.1.0
13942
+ * @alias each
13943
+ * @category Collection
13944
+ * @param {Array|Object} collection The collection to iterate over.
13945
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
13946
+ * @returns {Array|Object} Returns `collection`.
13947
+ * @see _.forEachRight
13948
+ * @example
13949
+ *
13950
+ * _.forEach([1, 2], function(value) {
13951
+ * console.log(value);
13952
+ * });
13953
+ * // => Logs `1` then `2`.
13954
+ *
13955
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
13956
+ * console.log(key);
13957
+ * });
13958
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
13959
+ */
13960
+ function forEach(collection, iteratee) {
13961
+ var func = isArray(collection) ? arrayEach : baseEach;
13962
+ return func(collection, getIteratee(iteratee, 3));
13963
+ }
13964
+
13965
+ /**
13966
+ * This method is like `_.forEach` except that it iterates over elements of
13967
+ * `collection` from right to left.
13968
+ *
13969
+ * @static
13970
+ * @memberOf _
13971
+ * @since 2.0.0
13972
+ * @alias eachRight
13973
+ * @category Collection
13974
+ * @param {Array|Object} collection The collection to iterate over.
13975
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
13976
+ * @returns {Array|Object} Returns `collection`.
13977
+ * @see _.forEach
13978
+ * @example
13979
+ *
13980
+ * _.forEachRight([1, 2], function(value) {
13981
+ * console.log(value);
13982
+ * });
13983
+ * // => Logs `2` then `1`.
13984
+ */
13985
+ function forEachRight(collection, iteratee) {
13986
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
13987
+ return func(collection, getIteratee(iteratee, 3));
13988
+ }
13989
+
13990
+ /**
13991
+ * Creates an object composed of keys generated from the results of running
13992
+ * each element of `collection` thru `iteratee`. The order of grouped values
13993
+ * is determined by the order they occur in `collection`. The corresponding
13994
+ * value of each key is an array of elements responsible for generating the
13995
+ * key. The iteratee is invoked with one argument: (value).
13996
+ *
13997
+ * @static
13998
+ * @memberOf _
13999
+ * @since 0.1.0
14000
+ * @category Collection
14001
+ * @param {Array|Object} collection The collection to iterate over.
14002
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
14003
+ * @returns {Object} Returns the composed aggregate object.
14004
+ * @example
14005
+ *
14006
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
14007
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
14008
+ *
14009
+ * // The `_.property` iteratee shorthand.
14010
+ * _.groupBy(['one', 'two', 'three'], 'length');
14011
+ * // => { '3': ['one', 'two'], '5': ['three'] }
14012
+ */
14013
+ var groupBy = createAggregator(function(result, value, key) {
14014
+ if (hasOwnProperty.call(result, key)) {
14015
+ result[key].push(value);
14016
+ } else {
14017
+ baseAssignValue(result, key, [value]);
14018
+ }
14019
+ });
14020
+
14021
+ /**
14022
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
14023
+ * checked for a substring of `value`, otherwise
14024
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
14025
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
14026
+ * the offset from the end of `collection`.
14027
+ *
14028
+ * @static
14029
+ * @memberOf _
14030
+ * @since 0.1.0
14031
+ * @category Collection
14032
+ * @param {Array|Object|string} collection The collection to inspect.
14033
+ * @param {*} value The value to search for.
14034
+ * @param {number} [fromIndex=0] The index to search from.
14035
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
14036
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
14037
+ * @example
14038
+ *
14039
+ * _.includes([1, 2, 3], 1);
14040
+ * // => true
14041
+ *
14042
+ * _.includes([1, 2, 3], 1, 2);
14043
+ * // => false
14044
+ *
14045
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
14046
+ * // => true
14047
+ *
14048
+ * _.includes('abcd', 'bc');
14049
+ * // => true
14050
+ */
14051
+ function includes(collection, value, fromIndex, guard) {
14052
+ collection = isArrayLike(collection) ? collection : values(collection);
14053
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
14054
+
14055
+ var length = collection.length;
14056
+ if (fromIndex < 0) {
14057
+ fromIndex = nativeMax(length + fromIndex, 0);
14058
+ }
14059
+ return isString(collection)
14060
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
14061
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
14062
+ }
14063
+
14064
+ /**
14065
+ * Invokes the method at `path` of each element in `collection`, returning
14066
+ * an array of the results of each invoked method. Any additional arguments
14067
+ * are provided to each invoked method. If `path` is a function, it's invoked
14068
+ * for, and `this` bound to, each element in `collection`.
14069
+ *
14070
+ * @static
14071
+ * @memberOf _
14072
+ * @since 4.0.0
14073
+ * @category Collection
14074
+ * @param {Array|Object} collection The collection to iterate over.
14075
+ * @param {Array|Function|string} path The path of the method to invoke or
14076
+ * the function invoked per iteration.
14077
+ * @param {...*} [args] The arguments to invoke each method with.
14078
+ * @returns {Array} Returns the array of results.
14079
+ * @example
14080
+ *
14081
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
14082
+ * // => [[1, 5, 7], [1, 2, 3]]
14083
+ *
14084
+ * _.invokeMap([123, 456], String.prototype.split, '');
14085
+ * // => [['1', '2', '3'], ['4', '5', '6']]
14086
+ */
14087
+ var invokeMap = baseRest(function(collection, path, args) {
14088
+ var index = -1,
14089
+ isFunc = typeof path == 'function',
14090
+ result = isArrayLike(collection) ? Array(collection.length) : [];
14091
+
14092
+ baseEach(collection, function(value) {
14093
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
14094
+ });
14095
+ return result;
14096
+ });
14097
+
14098
+ /**
14099
+ * Creates an object composed of keys generated from the results of running
14100
+ * each element of `collection` thru `iteratee`. The corresponding value of
14101
+ * each key is the last element responsible for generating the key. The
14102
+ * iteratee is invoked with one argument: (value).
14103
+ *
14104
+ * @static
14105
+ * @memberOf _
14106
+ * @since 4.0.0
14107
+ * @category Collection
14108
+ * @param {Array|Object} collection The collection to iterate over.
14109
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
14110
+ * @returns {Object} Returns the composed aggregate object.
14111
+ * @example
14112
+ *
14113
+ * var array = [
14114
+ * { 'dir': 'left', 'code': 97 },
14115
+ * { 'dir': 'right', 'code': 100 }
14116
+ * ];
14117
+ *
14118
+ * _.keyBy(array, function(o) {
14119
+ * return String.fromCharCode(o.code);
14120
+ * });
14121
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
14122
+ *
14123
+ * _.keyBy(array, 'dir');
14124
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
14125
+ */
14126
+ var keyBy = createAggregator(function(result, value, key) {
14127
+ baseAssignValue(result, key, value);
14128
+ });
14129
+
14130
+ /**
14131
+ * Creates an array of values by running each element in `collection` thru
14132
+ * `iteratee`. The iteratee is invoked with three arguments:
14133
+ * (value, index|key, collection).
14134
+ *
14135
+ * Many lodash methods are guarded to work as iteratees for methods like
14136
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
14137
+ *
14138
+ * The guarded methods are:
14139
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
14140
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
14141
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
14142
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
14143
+ *
14144
+ * @static
14145
+ * @memberOf _
14146
+ * @since 0.1.0
14147
+ * @category Collection
14148
+ * @param {Array|Object} collection The collection to iterate over.
14149
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14150
+ * @returns {Array} Returns the new mapped array.
14151
+ * @example
14152
+ *
14153
+ * function square(n) {
14154
+ * return n * n;
14155
+ * }
14156
+ *
14157
+ * _.map([4, 8], square);
14158
+ * // => [16, 64]
14159
+ *
14160
+ * _.map({ 'a': 4, 'b': 8 }, square);
14161
+ * // => [16, 64] (iteration order is not guaranteed)
14162
+ *
14163
+ * var users = [
14164
+ * { 'user': 'barney' },
14165
+ * { 'user': 'fred' }
14166
+ * ];
14167
+ *
14168
+ * // The `_.property` iteratee shorthand.
14169
+ * _.map(users, 'user');
14170
+ * // => ['barney', 'fred']
14171
+ */
14172
+ function map(collection, iteratee) {
14173
+ var func = isArray(collection) ? arrayMap : baseMap;
14174
+ return func(collection, getIteratee(iteratee, 3));
14175
+ }
14176
+
14177
+ /**
14178
+ * This method is like `_.sortBy` except that it allows specifying the sort
14179
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
14180
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
14181
+ * descending or "asc" for ascending sort order of corresponding values.
14182
+ *
14183
+ * @static
14184
+ * @memberOf _
14185
+ * @since 4.0.0
14186
+ * @category Collection
14187
+ * @param {Array|Object} collection The collection to iterate over.
14188
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
14189
+ * The iteratees to sort by.
14190
+ * @param {string[]} [orders] The sort orders of `iteratees`.
14191
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
14192
+ * @returns {Array} Returns the new sorted array.
14193
+ * @example
14194
+ *
14195
+ * var users = [
14196
+ * { 'user': 'fred', 'age': 48 },
14197
+ * { 'user': 'barney', 'age': 34 },
14198
+ * { 'user': 'fred', 'age': 40 },
14199
+ * { 'user': 'barney', 'age': 36 }
14200
+ * ];
14201
+ *
14202
+ * // Sort by `user` in ascending order and by `age` in descending order.
14203
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
14204
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
14205
+ */
14206
+ function orderBy(collection, iteratees, orders, guard) {
14207
+ if (collection == null) {
14208
+ return [];
14209
+ }
14210
+ if (!isArray(iteratees)) {
14211
+ iteratees = iteratees == null ? [] : [iteratees];
14212
+ }
14213
+ orders = guard ? undefined : orders;
14214
+ if (!isArray(orders)) {
14215
+ orders = orders == null ? [] : [orders];
14216
+ }
14217
+ return baseOrderBy(collection, iteratees, orders);
14218
+ }
14219
+
14220
+ /**
14221
+ * Creates an array of elements split into two groups, the first of which
14222
+ * contains elements `predicate` returns truthy for, the second of which
14223
+ * contains elements `predicate` returns falsey for. The predicate is
14224
+ * invoked with one argument: (value).
14225
+ *
14226
+ * @static
14227
+ * @memberOf _
14228
+ * @since 3.0.0
14229
+ * @category Collection
14230
+ * @param {Array|Object} collection The collection to iterate over.
14231
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
14232
+ * @returns {Array} Returns the array of grouped elements.
14233
+ * @example
14234
+ *
14235
+ * var users = [
14236
+ * { 'user': 'barney', 'age': 36, 'active': false },
14237
+ * { 'user': 'fred', 'age': 40, 'active': true },
14238
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
14239
+ * ];
14240
+ *
14241
+ * _.partition(users, function(o) { return o.active; });
14242
+ * // => objects for [['fred'], ['barney', 'pebbles']]
14243
+ *
14244
+ * // The `_.matches` iteratee shorthand.
14245
+ * _.partition(users, { 'age': 1, 'active': false });
14246
+ * // => objects for [['pebbles'], ['barney', 'fred']]
14247
+ *
14248
+ * // The `_.matchesProperty` iteratee shorthand.
14249
+ * _.partition(users, ['active', false]);
14250
+ * // => objects for [['barney', 'pebbles'], ['fred']]
14251
+ *
14252
+ * // The `_.property` iteratee shorthand.
14253
+ * _.partition(users, 'active');
14254
+ * // => objects for [['fred'], ['barney', 'pebbles']]
14255
+ */
14256
+ var partition = createAggregator(function(result, value, key) {
14257
+ result[key ? 0 : 1].push(value);
14258
+ }, function() { return [[], []]; });
14259
+
14260
+ /**
14261
+ * Reduces `collection` to a value which is the accumulated result of running
14262
+ * each element in `collection` thru `iteratee`, where each successive
14263
+ * invocation is supplied the return value of the previous. If `accumulator`
14264
+ * is not given, the first element of `collection` is used as the initial
14265
+ * value. The iteratee is invoked with four arguments:
14266
+ * (accumulator, value, index|key, collection).
14267
+ *
14268
+ * Many lodash methods are guarded to work as iteratees for methods like
14269
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
14270
+ *
14271
+ * The guarded methods are:
14272
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
14273
+ * and `sortBy`
14274
+ *
14275
+ * @static
14276
+ * @memberOf _
14277
+ * @since 0.1.0
14278
+ * @category Collection
14279
+ * @param {Array|Object} collection The collection to iterate over.
14280
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14281
+ * @param {*} [accumulator] The initial value.
14282
+ * @returns {*} Returns the accumulated value.
14283
+ * @see _.reduceRight
14284
+ * @example
14285
+ *
14286
+ * _.reduce([1, 2], function(sum, n) {
14287
+ * return sum + n;
14288
+ * }, 0);
14289
+ * // => 3
14290
+ *
14291
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
14292
+ * (result[value] || (result[value] = [])).push(key);
14293
+ * return result;
14294
+ * }, {});
14295
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
14296
+ */
14297
+ function reduce(collection, iteratee, accumulator) {
14298
+ var func = isArray(collection) ? arrayReduce : baseReduce,
14299
+ initAccum = arguments.length < 3;
14300
+
14301
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
14302
+ }
14303
+
14304
+ /**
14305
+ * This method is like `_.reduce` except that it iterates over elements of
14306
+ * `collection` from right to left.
14307
+ *
14308
+ * @static
14309
+ * @memberOf _
14310
+ * @since 0.1.0
14311
+ * @category Collection
14312
+ * @param {Array|Object} collection The collection to iterate over.
14313
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
14314
+ * @param {*} [accumulator] The initial value.
14315
+ * @returns {*} Returns the accumulated value.
14316
+ * @see _.reduce
14317
+ * @example
14318
+ *
14319
+ * var array = [[0, 1], [2, 3], [4, 5]];
14320
+ *
14321
+ * _.reduceRight(array, function(flattened, other) {
14322
+ * return flattened.concat(other);
14323
+ * }, []);
14324
+ * // => [4, 5, 2, 3, 0, 1]
14325
+ */
14326
+ function reduceRight(collection, iteratee, accumulator) {
14327
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
14328
+ initAccum = arguments.length < 3;
14329
+
14330
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
14331
+ }
14332
+
14333
+ /**
14334
+ * The opposite of `_.filter`; this method returns the elements of `collection`
14335
+ * that `predicate` does **not** return truthy for.
14336
+ *
14337
+ * @static
14338
+ * @memberOf _
14339
+ * @since 0.1.0
14340
+ * @category Collection
14341
+ * @param {Array|Object} collection The collection to iterate over.
14342
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
14343
+ * @returns {Array} Returns the new filtered array.
14344
+ * @see _.filter
14345
+ * @example
14346
+ *
14347
+ * var users = [
14348
+ * { 'user': 'barney', 'age': 36, 'active': false },
14349
+ * { 'user': 'fred', 'age': 40, 'active': true }
14350
+ * ];
14351
+ *
14352
+ * _.reject(users, function(o) { return !o.active; });
14353
+ * // => objects for ['fred']
14354
+ *
14355
+ * // The `_.matches` iteratee shorthand.
14356
+ * _.reject(users, { 'age': 40, 'active': true });
14357
+ * // => objects for ['barney']
14358
+ *
14359
+ * // The `_.matchesProperty` iteratee shorthand.
14360
+ * _.reject(users, ['active', false]);
14361
+ * // => objects for ['fred']
14362
+ *
14363
+ * // The `_.property` iteratee shorthand.
14364
+ * _.reject(users, 'active');
14365
+ * // => objects for ['barney']
14366
+ */
14367
+ function reject(collection, predicate) {
14368
+ var func = isArray(collection) ? arrayFilter : baseFilter;
14369
+ return func(collection, negate(getIteratee(predicate, 3)));
14370
+ }
14371
+
14372
+ /**
14373
+ * Gets a random element from `collection`.
14374
+ *
14375
+ * @static
14376
+ * @memberOf _
14377
+ * @since 2.0.0
14378
+ * @category Collection
14379
+ * @param {Array|Object} collection The collection to sample.
14380
+ * @returns {*} Returns the random element.
14381
+ * @example
14382
+ *
14383
+ * _.sample([1, 2, 3, 4]);
14384
+ * // => 2
14385
+ */
14386
+ function sample(collection) {
14387
+ var func = isArray(collection) ? arraySample : baseSample;
14388
+ return func(collection);
14389
+ }
14390
+
14391
+ /**
14392
+ * Gets `n` random elements at unique keys from `collection` up to the
14393
+ * size of `collection`.
14394
+ *
14395
+ * @static
14396
+ * @memberOf _
14397
+ * @since 4.0.0
14398
+ * @category Collection
14399
+ * @param {Array|Object} collection The collection to sample.
14400
+ * @param {number} [n=1] The number of elements to sample.
14401
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14402
+ * @returns {Array} Returns the random elements.
14403
+ * @example
14404
+ *
14405
+ * _.sampleSize([1, 2, 3], 2);
14406
+ * // => [3, 1]
14407
+ *
14408
+ * _.sampleSize([1, 2, 3], 4);
14409
+ * // => [2, 3, 1]
14410
+ */
14411
+ function sampleSize(collection, n, guard) {
14412
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
14413
+ n = 1;
14414
+ } else {
14415
+ n = toInteger(n);
14416
+ }
14417
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
14418
+ return func(collection, n);
14419
+ }
14420
+
14421
+ /**
14422
+ * Creates an array of shuffled values, using a version of the
14423
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
14424
+ *
14425
+ * @static
14426
+ * @memberOf _
14427
+ * @since 0.1.0
14428
+ * @category Collection
14429
+ * @param {Array|Object} collection The collection to shuffle.
14430
+ * @returns {Array} Returns the new shuffled array.
14431
+ * @example
14432
+ *
14433
+ * _.shuffle([1, 2, 3, 4]);
14434
+ * // => [4, 1, 3, 2]
14435
+ */
14436
+ function shuffle(collection) {
14437
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
14438
+ return func(collection);
14439
+ }
14440
+
14441
+ /**
14442
+ * Gets the size of `collection` by returning its length for array-like
14443
+ * values or the number of own enumerable string keyed properties for objects.
14444
+ *
14445
+ * @static
14446
+ * @memberOf _
14447
+ * @since 0.1.0
14448
+ * @category Collection
14449
+ * @param {Array|Object|string} collection The collection to inspect.
14450
+ * @returns {number} Returns the collection size.
14451
+ * @example
14452
+ *
14453
+ * _.size([1, 2, 3]);
14454
+ * // => 3
14455
+ *
14456
+ * _.size({ 'a': 1, 'b': 2 });
14457
+ * // => 2
14458
+ *
14459
+ * _.size('pebbles');
14460
+ * // => 7
14461
+ */
14462
+ function size(collection) {
14463
+ if (collection == null) {
14464
+ return 0;
14465
+ }
14466
+ if (isArrayLike(collection)) {
14467
+ return isString(collection) ? stringSize(collection) : collection.length;
14468
+ }
14469
+ var tag = getTag(collection);
14470
+ if (tag == mapTag || tag == setTag) {
14471
+ return collection.size;
14472
+ }
14473
+ return baseKeys(collection).length;
14474
+ }
14475
+
14476
+ /**
14477
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
14478
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
14479
+ * invoked with three arguments: (value, index|key, collection).
14480
+ *
14481
+ * @static
14482
+ * @memberOf _
14483
+ * @since 0.1.0
14484
+ * @category Collection
14485
+ * @param {Array|Object} collection The collection to iterate over.
14486
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
14487
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14488
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
14489
+ * else `false`.
14490
+ * @example
14491
+ *
14492
+ * _.some([null, 0, 'yes', false], Boolean);
14493
+ * // => true
14494
+ *
14495
+ * var users = [
14496
+ * { 'user': 'barney', 'active': true },
14497
+ * { 'user': 'fred', 'active': false }
14498
+ * ];
14499
+ *
14500
+ * // The `_.matches` iteratee shorthand.
14501
+ * _.some(users, { 'user': 'barney', 'active': false });
14502
+ * // => false
14503
+ *
14504
+ * // The `_.matchesProperty` iteratee shorthand.
14505
+ * _.some(users, ['active', false]);
14506
+ * // => true
14507
+ *
14508
+ * // The `_.property` iteratee shorthand.
14509
+ * _.some(users, 'active');
14510
+ * // => true
14511
+ */
14512
+ function some(collection, predicate, guard) {
14513
+ var func = isArray(collection) ? arraySome : baseSome;
14514
+ if (guard && isIterateeCall(collection, predicate, guard)) {
14515
+ predicate = undefined;
14516
+ }
14517
+ return func(collection, getIteratee(predicate, 3));
14518
+ }
14519
+
14520
+ /**
14521
+ * Creates an array of elements, sorted in ascending order by the results of
14522
+ * running each element in a collection thru each iteratee. This method
14523
+ * performs a stable sort, that is, it preserves the original sort order of
14524
+ * equal elements. The iteratees are invoked with one argument: (value).
14525
+ *
14526
+ * @static
14527
+ * @memberOf _
14528
+ * @since 0.1.0
14529
+ * @category Collection
14530
+ * @param {Array|Object} collection The collection to iterate over.
14531
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
14532
+ * The iteratees to sort by.
14533
+ * @returns {Array} Returns the new sorted array.
14534
+ * @example
14535
+ *
14536
+ * var users = [
14537
+ * { 'user': 'fred', 'age': 48 },
14538
+ * { 'user': 'barney', 'age': 36 },
14539
+ * { 'user': 'fred', 'age': 40 },
14540
+ * { 'user': 'barney', 'age': 34 }
14541
+ * ];
14542
+ *
14543
+ * _.sortBy(users, [function(o) { return o.user; }]);
14544
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
14545
+ *
14546
+ * _.sortBy(users, ['user', 'age']);
14547
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
14548
+ */
14549
+ var sortBy = baseRest(function(collection, iteratees) {
14550
+ if (collection == null) {
14551
+ return [];
14552
+ }
14553
+ var length = iteratees.length;
14554
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
14555
+ iteratees = [];
14556
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
14557
+ iteratees = [iteratees[0]];
14558
+ }
14559
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
14560
+ });
14561
+
14562
+ /*------------------------------------------------------------------------*/
14563
+
14564
+ /**
14565
+ * Gets the timestamp of the number of milliseconds that have elapsed since
14566
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
14567
+ *
14568
+ * @static
14569
+ * @memberOf _
14570
+ * @since 2.4.0
14571
+ * @category Date
14572
+ * @returns {number} Returns the timestamp.
14573
+ * @example
14574
+ *
14575
+ * _.defer(function(stamp) {
14576
+ * console.log(_.now() - stamp);
14577
+ * }, _.now());
14578
+ * // => Logs the number of milliseconds it took for the deferred invocation.
14579
+ */
14580
+ var now = ctxNow || function() {
14581
+ return root.Date.now();
14582
+ };
14583
+
14584
+ /*------------------------------------------------------------------------*/
14585
+
14586
+ /**
14587
+ * The opposite of `_.before`; this method creates a function that invokes
14588
+ * `func` once it's called `n` or more times.
14589
+ *
14590
+ * @static
14591
+ * @memberOf _
14592
+ * @since 0.1.0
14593
+ * @category Function
14594
+ * @param {number} n The number of calls before `func` is invoked.
14595
+ * @param {Function} func The function to restrict.
14596
+ * @returns {Function} Returns the new restricted function.
14597
+ * @example
14598
+ *
14599
+ * var saves = ['profile', 'settings'];
14600
+ *
14601
+ * var done = _.after(saves.length, function() {
14602
+ * console.log('done saving!');
14603
+ * });
14604
+ *
14605
+ * _.forEach(saves, function(type) {
14606
+ * asyncSave({ 'type': type, 'complete': done });
14607
+ * });
14608
+ * // => Logs 'done saving!' after the two async saves have completed.
14609
+ */
14610
+ function after(n, func) {
14611
+ if (typeof func != 'function') {
14612
+ throw new TypeError(FUNC_ERROR_TEXT);
14613
+ }
14614
+ n = toInteger(n);
14615
+ return function() {
14616
+ if (--n < 1) {
14617
+ return func.apply(this, arguments);
14618
+ }
14619
+ };
14620
+ }
14621
+
14622
+ /**
14623
+ * Creates a function that invokes `func`, with up to `n` arguments,
14624
+ * ignoring any additional arguments.
14625
+ *
14626
+ * @static
14627
+ * @memberOf _
14628
+ * @since 3.0.0
14629
+ * @category Function
14630
+ * @param {Function} func The function to cap arguments for.
14631
+ * @param {number} [n=func.length] The arity cap.
14632
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14633
+ * @returns {Function} Returns the new capped function.
14634
+ * @example
14635
+ *
14636
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
14637
+ * // => [6, 8, 10]
14638
+ */
14639
+ function ary(func, n, guard) {
14640
+ n = guard ? undefined : n;
14641
+ n = (func && n == null) ? func.length : n;
14642
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
14643
+ }
14644
+
14645
+ /**
14646
+ * Creates a function that invokes `func`, with the `this` binding and arguments
14647
+ * of the created function, while it's called less than `n` times. Subsequent
14648
+ * calls to the created function return the result of the last `func` invocation.
14649
+ *
14650
+ * @static
14651
+ * @memberOf _
14652
+ * @since 3.0.0
14653
+ * @category Function
14654
+ * @param {number} n The number of calls at which `func` is no longer invoked.
14655
+ * @param {Function} func The function to restrict.
14656
+ * @returns {Function} Returns the new restricted function.
14657
+ * @example
14658
+ *
14659
+ * jQuery(element).on('click', _.before(5, addContactToList));
14660
+ * // => Allows adding up to 4 contacts to the list.
14661
+ */
14662
+ function before(n, func) {
14663
+ var result;
14664
+ if (typeof func != 'function') {
14665
+ throw new TypeError(FUNC_ERROR_TEXT);
14666
+ }
14667
+ n = toInteger(n);
14668
+ return function() {
14669
+ if (--n > 0) {
14670
+ result = func.apply(this, arguments);
14671
+ }
14672
+ if (n <= 1) {
14673
+ func = undefined;
14674
+ }
14675
+ return result;
14676
+ };
14677
+ }
14678
+
14679
+ /**
14680
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
14681
+ * and `partials` prepended to the arguments it receives.
14682
+ *
14683
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
14684
+ * may be used as a placeholder for partially applied arguments.
14685
+ *
14686
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
14687
+ * property of bound functions.
14688
+ *
14689
+ * @static
14690
+ * @memberOf _
14691
+ * @since 0.1.0
14692
+ * @category Function
14693
+ * @param {Function} func The function to bind.
14694
+ * @param {*} thisArg The `this` binding of `func`.
14695
+ * @param {...*} [partials] The arguments to be partially applied.
14696
+ * @returns {Function} Returns the new bound function.
14697
+ * @example
14698
+ *
14699
+ * function greet(greeting, punctuation) {
14700
+ * return greeting + ' ' + this.user + punctuation;
14701
+ * }
14702
+ *
14703
+ * var object = { 'user': 'fred' };
14704
+ *
14705
+ * var bound = _.bind(greet, object, 'hi');
14706
+ * bound('!');
14707
+ * // => 'hi fred!'
14708
+ *
14709
+ * // Bound with placeholders.
14710
+ * var bound = _.bind(greet, object, _, '!');
14711
+ * bound('hi');
14712
+ * // => 'hi fred!'
14713
+ */
14714
+ var bind = baseRest(function(func, thisArg, partials) {
14715
+ var bitmask = WRAP_BIND_FLAG;
14716
+ if (partials.length) {
14717
+ var holders = replaceHolders(partials, getHolder(bind));
14718
+ bitmask |= WRAP_PARTIAL_FLAG;
14719
+ }
14720
+ return createWrap(func, bitmask, thisArg, partials, holders);
14721
+ });
14722
+
14723
+ /**
14724
+ * Creates a function that invokes the method at `object[key]` with `partials`
14725
+ * prepended to the arguments it receives.
14726
+ *
14727
+ * This method differs from `_.bind` by allowing bound functions to reference
14728
+ * methods that may be redefined or don't yet exist. See
14729
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
14730
+ * for more details.
14731
+ *
14732
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
14733
+ * builds, may be used as a placeholder for partially applied arguments.
14734
+ *
14735
+ * @static
14736
+ * @memberOf _
14737
+ * @since 0.10.0
14738
+ * @category Function
14739
+ * @param {Object} object The object to invoke the method on.
14740
+ * @param {string} key The key of the method.
14741
+ * @param {...*} [partials] The arguments to be partially applied.
14742
+ * @returns {Function} Returns the new bound function.
14743
+ * @example
14744
+ *
14745
+ * var object = {
14746
+ * 'user': 'fred',
14747
+ * 'greet': function(greeting, punctuation) {
14748
+ * return greeting + ' ' + this.user + punctuation;
14749
+ * }
14750
+ * };
14751
+ *
14752
+ * var bound = _.bindKey(object, 'greet', 'hi');
14753
+ * bound('!');
14754
+ * // => 'hi fred!'
14755
+ *
14756
+ * object.greet = function(greeting, punctuation) {
14757
+ * return greeting + 'ya ' + this.user + punctuation;
14758
+ * };
14759
+ *
14760
+ * bound('!');
14761
+ * // => 'hiya fred!'
14762
+ *
14763
+ * // Bound with placeholders.
14764
+ * var bound = _.bindKey(object, 'greet', _, '!');
14765
+ * bound('hi');
14766
+ * // => 'hiya fred!'
14767
+ */
14768
+ var bindKey = baseRest(function(object, key, partials) {
14769
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
14770
+ if (partials.length) {
14771
+ var holders = replaceHolders(partials, getHolder(bindKey));
14772
+ bitmask |= WRAP_PARTIAL_FLAG;
14773
+ }
14774
+ return createWrap(key, bitmask, object, partials, holders);
14775
+ });
14776
+
14777
+ /**
14778
+ * Creates a function that accepts arguments of `func` and either invokes
14779
+ * `func` returning its result, if at least `arity` number of arguments have
14780
+ * been provided, or returns a function that accepts the remaining `func`
14781
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
14782
+ * is not sufficient.
14783
+ *
14784
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
14785
+ * may be used as a placeholder for provided arguments.
14786
+ *
14787
+ * **Note:** This method doesn't set the "length" property of curried functions.
14788
+ *
14789
+ * @static
14790
+ * @memberOf _
14791
+ * @since 2.0.0
14792
+ * @category Function
14793
+ * @param {Function} func The function to curry.
14794
+ * @param {number} [arity=func.length] The arity of `func`.
14795
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14796
+ * @returns {Function} Returns the new curried function.
14797
+ * @example
14798
+ *
14799
+ * var abc = function(a, b, c) {
14800
+ * return [a, b, c];
14801
+ * };
14802
+ *
14803
+ * var curried = _.curry(abc);
14804
+ *
14805
+ * curried(1)(2)(3);
14806
+ * // => [1, 2, 3]
14807
+ *
14808
+ * curried(1, 2)(3);
14809
+ * // => [1, 2, 3]
14810
+ *
14811
+ * curried(1, 2, 3);
14812
+ * // => [1, 2, 3]
14813
+ *
14814
+ * // Curried with placeholders.
14815
+ * curried(1)(_, 3)(2);
14816
+ * // => [1, 2, 3]
14817
+ */
14818
+ function curry(func, arity, guard) {
14819
+ arity = guard ? undefined : arity;
14820
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
14821
+ result.placeholder = curry.placeholder;
14822
+ return result;
14823
+ }
14824
+
14825
+ /**
14826
+ * This method is like `_.curry` except that arguments are applied to `func`
14827
+ * in the manner of `_.partialRight` instead of `_.partial`.
14828
+ *
14829
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
14830
+ * builds, may be used as a placeholder for provided arguments.
14831
+ *
14832
+ * **Note:** This method doesn't set the "length" property of curried functions.
14833
+ *
14834
+ * @static
14835
+ * @memberOf _
14836
+ * @since 3.0.0
14837
+ * @category Function
14838
+ * @param {Function} func The function to curry.
14839
+ * @param {number} [arity=func.length] The arity of `func`.
14840
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
14841
+ * @returns {Function} Returns the new curried function.
14842
+ * @example
14843
+ *
14844
+ * var abc = function(a, b, c) {
14845
+ * return [a, b, c];
14846
+ * };
14847
+ *
14848
+ * var curried = _.curryRight(abc);
14849
+ *
14850
+ * curried(3)(2)(1);
14851
+ * // => [1, 2, 3]
14852
+ *
14853
+ * curried(2, 3)(1);
14854
+ * // => [1, 2, 3]
14855
+ *
14856
+ * curried(1, 2, 3);
14857
+ * // => [1, 2, 3]
14858
+ *
14859
+ * // Curried with placeholders.
14860
+ * curried(3)(1, _)(2);
14861
+ * // => [1, 2, 3]
14862
+ */
14863
+ function curryRight(func, arity, guard) {
14864
+ arity = guard ? undefined : arity;
14865
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
14866
+ result.placeholder = curryRight.placeholder;
14867
+ return result;
14868
+ }
14869
+
14870
+ /**
14871
+ * Creates a debounced function that delays invoking `func` until after `wait`
14872
+ * milliseconds have elapsed since the last time the debounced function was
14873
+ * invoked. The debounced function comes with a `cancel` method to cancel
14874
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
14875
+ * Provide `options` to indicate whether `func` should be invoked on the
14876
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
14877
+ * with the last arguments provided to the debounced function. Subsequent
14878
+ * calls to the debounced function return the result of the last `func`
14879
+ * invocation.
14880
+ *
14881
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
14882
+ * invoked on the trailing edge of the timeout only if the debounced function
14883
+ * is invoked more than once during the `wait` timeout.
14884
+ *
14885
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
14886
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
14887
+ *
14888
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
14889
+ * for details over the differences between `_.debounce` and `_.throttle`.
14890
+ *
14891
+ * @static
14892
+ * @memberOf _
14893
+ * @since 0.1.0
14894
+ * @category Function
14895
+ * @param {Function} func The function to debounce.
14896
+ * @param {number} [wait=0] The number of milliseconds to delay.
14897
+ * @param {Object} [options={}] The options object.
14898
+ * @param {boolean} [options.leading=false]
14899
+ * Specify invoking on the leading edge of the timeout.
14900
+ * @param {number} [options.maxWait]
14901
+ * The maximum time `func` is allowed to be delayed before it's invoked.
14902
+ * @param {boolean} [options.trailing=true]
14903
+ * Specify invoking on the trailing edge of the timeout.
14904
+ * @returns {Function} Returns the new debounced function.
14905
+ * @example
14906
+ *
14907
+ * // Avoid costly calculations while the window size is in flux.
14908
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
14909
+ *
14910
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
14911
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
14912
+ * 'leading': true,
14913
+ * 'trailing': false
14914
+ * }));
14915
+ *
14916
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
14917
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
14918
+ * var source = new EventSource('/stream');
14919
+ * jQuery(source).on('message', debounced);
14920
+ *
14921
+ * // Cancel the trailing debounced invocation.
14922
+ * jQuery(window).on('popstate', debounced.cancel);
14923
+ */
14924
+ function debounce(func, wait, options) {
14925
+ var lastArgs,
14926
+ lastThis,
14927
+ maxWait,
14928
+ result,
14929
+ timerId,
14930
+ lastCallTime,
14931
+ lastInvokeTime = 0,
14932
+ leading = false,
14933
+ maxing = false,
14934
+ trailing = true;
14935
+
14936
+ if (typeof func != 'function') {
14937
+ throw new TypeError(FUNC_ERROR_TEXT);
14938
+ }
14939
+ wait = toNumber(wait) || 0;
14940
+ if (isObject(options)) {
14941
+ leading = !!options.leading;
14942
+ maxing = 'maxWait' in options;
14943
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
14944
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
14945
+ }
14946
+
14947
+ function invokeFunc(time) {
14948
+ var args = lastArgs,
14949
+ thisArg = lastThis;
14950
+
14951
+ lastArgs = lastThis = undefined;
14952
+ lastInvokeTime = time;
14953
+ result = func.apply(thisArg, args);
14954
+ return result;
14955
+ }
14956
+
14957
+ function leadingEdge(time) {
14958
+ // Reset any `maxWait` timer.
14959
+ lastInvokeTime = time;
14960
+ // Start the timer for the trailing edge.
14961
+ timerId = setTimeout(timerExpired, wait);
14962
+ // Invoke the leading edge.
14963
+ return leading ? invokeFunc(time) : result;
14964
+ }
14965
+
14966
+ function remainingWait(time) {
14967
+ var timeSinceLastCall = time - lastCallTime,
14968
+ timeSinceLastInvoke = time - lastInvokeTime,
14969
+ timeWaiting = wait - timeSinceLastCall;
14970
+
14971
+ return maxing
14972
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
14973
+ : timeWaiting;
14974
+ }
14975
+
14976
+ function shouldInvoke(time) {
14977
+ var timeSinceLastCall = time - lastCallTime,
14978
+ timeSinceLastInvoke = time - lastInvokeTime;
14979
+
14980
+ // Either this is the first call, activity has stopped and we're at the
14981
+ // trailing edge, the system time has gone backwards and we're treating
14982
+ // it as the trailing edge, or we've hit the `maxWait` limit.
14983
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
14984
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
14985
+ }
14986
+
14987
+ function timerExpired() {
14988
+ var time = now();
14989
+ if (shouldInvoke(time)) {
14990
+ return trailingEdge(time);
14991
+ }
14992
+ // Restart the timer.
14993
+ timerId = setTimeout(timerExpired, remainingWait(time));
14994
+ }
14995
+
14996
+ function trailingEdge(time) {
14997
+ timerId = undefined;
14998
+
14999
+ // Only invoke if we have `lastArgs` which means `func` has been
15000
+ // debounced at least once.
15001
+ if (trailing && lastArgs) {
15002
+ return invokeFunc(time);
15003
+ }
15004
+ lastArgs = lastThis = undefined;
15005
+ return result;
15006
+ }
15007
+
15008
+ function cancel() {
15009
+ if (timerId !== undefined) {
15010
+ clearTimeout(timerId);
15011
+ }
15012
+ lastInvokeTime = 0;
15013
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
15014
+ }
15015
+
15016
+ function flush() {
15017
+ return timerId === undefined ? result : trailingEdge(now());
15018
+ }
15019
+
15020
+ function debounced() {
15021
+ var time = now(),
15022
+ isInvoking = shouldInvoke(time);
15023
+
15024
+ lastArgs = arguments;
15025
+ lastThis = this;
15026
+ lastCallTime = time;
15027
+
15028
+ if (isInvoking) {
15029
+ if (timerId === undefined) {
15030
+ return leadingEdge(lastCallTime);
15031
+ }
15032
+ if (maxing) {
15033
+ // Handle invocations in a tight loop.
15034
+ timerId = setTimeout(timerExpired, wait);
15035
+ return invokeFunc(lastCallTime);
15036
+ }
15037
+ }
15038
+ if (timerId === undefined) {
15039
+ timerId = setTimeout(timerExpired, wait);
15040
+ }
15041
+ return result;
15042
+ }
15043
+ debounced.cancel = cancel;
15044
+ debounced.flush = flush;
15045
+ return debounced;
15046
+ }
15047
+
15048
+ /**
15049
+ * Defers invoking the `func` until the current call stack has cleared. Any
15050
+ * additional arguments are provided to `func` when it's invoked.
15051
+ *
15052
+ * @static
15053
+ * @memberOf _
15054
+ * @since 0.1.0
15055
+ * @category Function
15056
+ * @param {Function} func The function to defer.
15057
+ * @param {...*} [args] The arguments to invoke `func` with.
15058
+ * @returns {number} Returns the timer id.
15059
+ * @example
15060
+ *
15061
+ * _.defer(function(text) {
15062
+ * console.log(text);
15063
+ * }, 'deferred');
15064
+ * // => Logs 'deferred' after one millisecond.
15065
+ */
15066
+ var defer = baseRest(function(func, args) {
15067
+ return baseDelay(func, 1, args);
15068
+ });
15069
+
15070
+ /**
15071
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
15072
+ * provided to `func` when it's invoked.
15073
+ *
15074
+ * @static
15075
+ * @memberOf _
15076
+ * @since 0.1.0
15077
+ * @category Function
15078
+ * @param {Function} func The function to delay.
15079
+ * @param {number} wait The number of milliseconds to delay invocation.
15080
+ * @param {...*} [args] The arguments to invoke `func` with.
15081
+ * @returns {number} Returns the timer id.
15082
+ * @example
15083
+ *
15084
+ * _.delay(function(text) {
15085
+ * console.log(text);
15086
+ * }, 1000, 'later');
15087
+ * // => Logs 'later' after one second.
15088
+ */
15089
+ var delay = baseRest(function(func, wait, args) {
15090
+ return baseDelay(func, toNumber(wait) || 0, args);
15091
+ });
15092
+
15093
+ /**
15094
+ * Creates a function that invokes `func` with arguments reversed.
15095
+ *
15096
+ * @static
15097
+ * @memberOf _
15098
+ * @since 4.0.0
15099
+ * @category Function
15100
+ * @param {Function} func The function to flip arguments for.
15101
+ * @returns {Function} Returns the new flipped function.
15102
+ * @example
15103
+ *
15104
+ * var flipped = _.flip(function() {
15105
+ * return _.toArray(arguments);
15106
+ * });
15107
+ *
15108
+ * flipped('a', 'b', 'c', 'd');
15109
+ * // => ['d', 'c', 'b', 'a']
15110
+ */
15111
+ function flip(func) {
15112
+ return createWrap(func, WRAP_FLIP_FLAG);
15113
+ }
15114
+
15115
+ /**
15116
+ * Creates a function that memoizes the result of `func`. If `resolver` is
15117
+ * provided, it determines the cache key for storing the result based on the
15118
+ * arguments provided to the memoized function. By default, the first argument
15119
+ * provided to the memoized function is used as the map cache key. The `func`
15120
+ * is invoked with the `this` binding of the memoized function.
15121
+ *
15122
+ * **Note:** The cache is exposed as the `cache` property on the memoized
15123
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
15124
+ * constructor with one whose instances implement the
15125
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
15126
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
15127
+ *
15128
+ * @static
15129
+ * @memberOf _
15130
+ * @since 0.1.0
15131
+ * @category Function
15132
+ * @param {Function} func The function to have its output memoized.
15133
+ * @param {Function} [resolver] The function to resolve the cache key.
15134
+ * @returns {Function} Returns the new memoized function.
15135
+ * @example
15136
+ *
15137
+ * var object = { 'a': 1, 'b': 2 };
15138
+ * var other = { 'c': 3, 'd': 4 };
15139
+ *
15140
+ * var values = _.memoize(_.values);
15141
+ * values(object);
15142
+ * // => [1, 2]
15143
+ *
15144
+ * values(other);
15145
+ * // => [3, 4]
15146
+ *
15147
+ * object.a = 2;
15148
+ * values(object);
15149
+ * // => [1, 2]
15150
+ *
15151
+ * // Modify the result cache.
15152
+ * values.cache.set(object, ['a', 'b']);
15153
+ * values(object);
15154
+ * // => ['a', 'b']
15155
+ *
15156
+ * // Replace `_.memoize.Cache`.
15157
+ * _.memoize.Cache = WeakMap;
15158
+ */
15159
+ function memoize(func, resolver) {
15160
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
15161
+ throw new TypeError(FUNC_ERROR_TEXT);
15162
+ }
15163
+ var memoized = function() {
15164
+ var args = arguments,
15165
+ key = resolver ? resolver.apply(this, args) : args[0],
15166
+ cache = memoized.cache;
15167
+
15168
+ if (cache.has(key)) {
15169
+ return cache.get(key);
15170
+ }
15171
+ var result = func.apply(this, args);
15172
+ memoized.cache = cache.set(key, result) || cache;
15173
+ return result;
15174
+ };
15175
+ memoized.cache = new (memoize.Cache || MapCache);
15176
+ return memoized;
15177
+ }
15178
+
15179
+ // Expose `MapCache`.
15180
+ memoize.Cache = MapCache;
15181
+
15182
+ /**
15183
+ * Creates a function that negates the result of the predicate `func`. The
15184
+ * `func` predicate is invoked with the `this` binding and arguments of the
15185
+ * created function.
15186
+ *
15187
+ * @static
15188
+ * @memberOf _
15189
+ * @since 3.0.0
15190
+ * @category Function
15191
+ * @param {Function} predicate The predicate to negate.
15192
+ * @returns {Function} Returns the new negated function.
15193
+ * @example
15194
+ *
15195
+ * function isEven(n) {
15196
+ * return n % 2 == 0;
15197
+ * }
15198
+ *
15199
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
15200
+ * // => [1, 3, 5]
15201
+ */
15202
+ function negate(predicate) {
15203
+ if (typeof predicate != 'function') {
15204
+ throw new TypeError(FUNC_ERROR_TEXT);
15205
+ }
15206
+ return function() {
15207
+ var args = arguments;
15208
+ switch (args.length) {
15209
+ case 0: return !predicate.call(this);
15210
+ case 1: return !predicate.call(this, args[0]);
15211
+ case 2: return !predicate.call(this, args[0], args[1]);
15212
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
15213
+ }
15214
+ return !predicate.apply(this, args);
15215
+ };
15216
+ }
15217
+
15218
+ /**
15219
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
15220
+ * to the function return the value of the first invocation. The `func` is
15221
+ * invoked with the `this` binding and arguments of the created function.
15222
+ *
15223
+ * @static
15224
+ * @memberOf _
15225
+ * @since 0.1.0
15226
+ * @category Function
15227
+ * @param {Function} func The function to restrict.
15228
+ * @returns {Function} Returns the new restricted function.
15229
+ * @example
15230
+ *
15231
+ * var initialize = _.once(createApplication);
15232
+ * initialize();
15233
+ * initialize();
15234
+ * // => `createApplication` is invoked once
15235
+ */
15236
+ function once(func) {
15237
+ return before(2, func);
15238
+ }
15239
+
15240
+ /**
15241
+ * Creates a function that invokes `func` with its arguments transformed.
15242
+ *
15243
+ * @static
15244
+ * @since 4.0.0
15245
+ * @memberOf _
15246
+ * @category Function
15247
+ * @param {Function} func The function to wrap.
15248
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
15249
+ * The argument transforms.
15250
+ * @returns {Function} Returns the new function.
15251
+ * @example
15252
+ *
15253
+ * function doubled(n) {
15254
+ * return n * 2;
15255
+ * }
15256
+ *
15257
+ * function square(n) {
15258
+ * return n * n;
15259
+ * }
15260
+ *
15261
+ * var func = _.overArgs(function(x, y) {
15262
+ * return [x, y];
15263
+ * }, [square, doubled]);
15264
+ *
15265
+ * func(9, 3);
15266
+ * // => [81, 6]
15267
+ *
15268
+ * func(10, 5);
15269
+ * // => [100, 10]
15270
+ */
15271
+ var overArgs = castRest(function(func, transforms) {
15272
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
15273
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
15274
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
15275
+
15276
+ var funcsLength = transforms.length;
15277
+ return baseRest(function(args) {
15278
+ var index = -1,
15279
+ length = nativeMin(args.length, funcsLength);
15280
+
15281
+ while (++index < length) {
15282
+ args[index] = transforms[index].call(this, args[index]);
15283
+ }
15284
+ return apply(func, this, args);
15285
+ });
15286
+ });
15287
+
15288
+ /**
15289
+ * Creates a function that invokes `func` with `partials` prepended to the
15290
+ * arguments it receives. This method is like `_.bind` except it does **not**
15291
+ * alter the `this` binding.
15292
+ *
15293
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
15294
+ * builds, may be used as a placeholder for partially applied arguments.
15295
+ *
15296
+ * **Note:** This method doesn't set the "length" property of partially
15297
+ * applied functions.
15298
+ *
15299
+ * @static
15300
+ * @memberOf _
15301
+ * @since 0.2.0
15302
+ * @category Function
15303
+ * @param {Function} func The function to partially apply arguments to.
15304
+ * @param {...*} [partials] The arguments to be partially applied.
15305
+ * @returns {Function} Returns the new partially applied function.
15306
+ * @example
15307
+ *
15308
+ * function greet(greeting, name) {
15309
+ * return greeting + ' ' + name;
15310
+ * }
15311
+ *
15312
+ * var sayHelloTo = _.partial(greet, 'hello');
15313
+ * sayHelloTo('fred');
15314
+ * // => 'hello fred'
15315
+ *
15316
+ * // Partially applied with placeholders.
15317
+ * var greetFred = _.partial(greet, _, 'fred');
15318
+ * greetFred('hi');
15319
+ * // => 'hi fred'
15320
+ */
15321
+ var partial = baseRest(function(func, partials) {
15322
+ var holders = replaceHolders(partials, getHolder(partial));
15323
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
15324
+ });
15325
+
15326
+ /**
15327
+ * This method is like `_.partial` except that partially applied arguments
15328
+ * are appended to the arguments it receives.
15329
+ *
15330
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
15331
+ * builds, may be used as a placeholder for partially applied arguments.
15332
+ *
15333
+ * **Note:** This method doesn't set the "length" property of partially
15334
+ * applied functions.
15335
+ *
15336
+ * @static
15337
+ * @memberOf _
15338
+ * @since 1.0.0
15339
+ * @category Function
15340
+ * @param {Function} func The function to partially apply arguments to.
15341
+ * @param {...*} [partials] The arguments to be partially applied.
15342
+ * @returns {Function} Returns the new partially applied function.
15343
+ * @example
15344
+ *
15345
+ * function greet(greeting, name) {
15346
+ * return greeting + ' ' + name;
15347
+ * }
15348
+ *
15349
+ * var greetFred = _.partialRight(greet, 'fred');
15350
+ * greetFred('hi');
15351
+ * // => 'hi fred'
15352
+ *
15353
+ * // Partially applied with placeholders.
15354
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
15355
+ * sayHelloTo('fred');
15356
+ * // => 'hello fred'
15357
+ */
15358
+ var partialRight = baseRest(function(func, partials) {
15359
+ var holders = replaceHolders(partials, getHolder(partialRight));
15360
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
15361
+ });
15362
+
15363
+ /**
15364
+ * Creates a function that invokes `func` with arguments arranged according
15365
+ * to the specified `indexes` where the argument value at the first index is
15366
+ * provided as the first argument, the argument value at the second index is
15367
+ * provided as the second argument, and so on.
15368
+ *
15369
+ * @static
15370
+ * @memberOf _
15371
+ * @since 3.0.0
15372
+ * @category Function
15373
+ * @param {Function} func The function to rearrange arguments for.
15374
+ * @param {...(number|number[])} indexes The arranged argument indexes.
15375
+ * @returns {Function} Returns the new function.
15376
+ * @example
15377
+ *
15378
+ * var rearged = _.rearg(function(a, b, c) {
15379
+ * return [a, b, c];
15380
+ * }, [2, 0, 1]);
15381
+ *
15382
+ * rearged('b', 'c', 'a')
15383
+ * // => ['a', 'b', 'c']
15384
+ */
15385
+ var rearg = flatRest(function(func, indexes) {
15386
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
15387
+ });
15388
+
15389
+ /**
15390
+ * Creates a function that invokes `func` with the `this` binding of the
15391
+ * created function and arguments from `start` and beyond provided as
15392
+ * an array.
15393
+ *
15394
+ * **Note:** This method is based on the
15395
+ * [rest parameter](https://mdn.io/rest_parameters).
15396
+ *
15397
+ * @static
15398
+ * @memberOf _
15399
+ * @since 4.0.0
15400
+ * @category Function
15401
+ * @param {Function} func The function to apply a rest parameter to.
15402
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
15403
+ * @returns {Function} Returns the new function.
15404
+ * @example
15405
+ *
15406
+ * var say = _.rest(function(what, names) {
15407
+ * return what + ' ' + _.initial(names).join(', ') +
15408
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
15409
+ * });
15410
+ *
15411
+ * say('hello', 'fred', 'barney', 'pebbles');
15412
+ * // => 'hello fred, barney, & pebbles'
15413
+ */
15414
+ function rest(func, start) {
15415
+ if (typeof func != 'function') {
15416
+ throw new TypeError(FUNC_ERROR_TEXT);
15417
+ }
15418
+ start = start === undefined ? start : toInteger(start);
15419
+ return baseRest(func, start);
15420
+ }
15421
+
15422
+ /**
15423
+ * Creates a function that invokes `func` with the `this` binding of the
15424
+ * create function and an array of arguments much like
15425
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
15426
+ *
15427
+ * **Note:** This method is based on the
15428
+ * [spread operator](https://mdn.io/spread_operator).
15429
+ *
15430
+ * @static
15431
+ * @memberOf _
15432
+ * @since 3.2.0
15433
+ * @category Function
15434
+ * @param {Function} func The function to spread arguments over.
15435
+ * @param {number} [start=0] The start position of the spread.
15436
+ * @returns {Function} Returns the new function.
15437
+ * @example
15438
+ *
15439
+ * var say = _.spread(function(who, what) {
15440
+ * return who + ' says ' + what;
15441
+ * });
15442
+ *
15443
+ * say(['fred', 'hello']);
15444
+ * // => 'fred says hello'
15445
+ *
15446
+ * var numbers = Promise.all([
15447
+ * Promise.resolve(40),
15448
+ * Promise.resolve(36)
15449
+ * ]);
15450
+ *
15451
+ * numbers.then(_.spread(function(x, y) {
15452
+ * return x + y;
15453
+ * }));
15454
+ * // => a Promise of 76
15455
+ */
15456
+ function spread(func, start) {
15457
+ if (typeof func != 'function') {
15458
+ throw new TypeError(FUNC_ERROR_TEXT);
15459
+ }
15460
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
15461
+ return baseRest(function(args) {
15462
+ var array = args[start],
15463
+ otherArgs = castSlice(args, 0, start);
15464
+
15465
+ if (array) {
15466
+ arrayPush(otherArgs, array);
15467
+ }
15468
+ return apply(func, this, otherArgs);
15469
+ });
15470
+ }
15471
+
15472
+ /**
15473
+ * Creates a throttled function that only invokes `func` at most once per
15474
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
15475
+ * method to cancel delayed `func` invocations and a `flush` method to
15476
+ * immediately invoke them. Provide `options` to indicate whether `func`
15477
+ * should be invoked on the leading and/or trailing edge of the `wait`
15478
+ * timeout. The `func` is invoked with the last arguments provided to the
15479
+ * throttled function. Subsequent calls to the throttled function return the
15480
+ * result of the last `func` invocation.
15481
+ *
15482
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
15483
+ * invoked on the trailing edge of the timeout only if the throttled function
15484
+ * is invoked more than once during the `wait` timeout.
15485
+ *
15486
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
15487
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
15488
+ *
15489
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
15490
+ * for details over the differences between `_.throttle` and `_.debounce`.
15491
+ *
15492
+ * @static
15493
+ * @memberOf _
15494
+ * @since 0.1.0
15495
+ * @category Function
15496
+ * @param {Function} func The function to throttle.
15497
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
15498
+ * @param {Object} [options={}] The options object.
15499
+ * @param {boolean} [options.leading=true]
15500
+ * Specify invoking on the leading edge of the timeout.
15501
+ * @param {boolean} [options.trailing=true]
15502
+ * Specify invoking on the trailing edge of the timeout.
15503
+ * @returns {Function} Returns the new throttled function.
15504
+ * @example
15505
+ *
15506
+ * // Avoid excessively updating the position while scrolling.
15507
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
15508
+ *
15509
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
15510
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
15511
+ * jQuery(element).on('click', throttled);
15512
+ *
15513
+ * // Cancel the trailing throttled invocation.
15514
+ * jQuery(window).on('popstate', throttled.cancel);
15515
+ */
15516
+ function throttle(func, wait, options) {
15517
+ var leading = true,
15518
+ trailing = true;
15519
+
15520
+ if (typeof func != 'function') {
15521
+ throw new TypeError(FUNC_ERROR_TEXT);
15522
+ }
15523
+ if (isObject(options)) {
15524
+ leading = 'leading' in options ? !!options.leading : leading;
15525
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
15526
+ }
15527
+ return debounce(func, wait, {
15528
+ 'leading': leading,
15529
+ 'maxWait': wait,
15530
+ 'trailing': trailing
15531
+ });
15532
+ }
15533
+
15534
+ /**
15535
+ * Creates a function that accepts up to one argument, ignoring any
15536
+ * additional arguments.
15537
+ *
15538
+ * @static
15539
+ * @memberOf _
15540
+ * @since 4.0.0
15541
+ * @category Function
15542
+ * @param {Function} func The function to cap arguments for.
15543
+ * @returns {Function} Returns the new capped function.
15544
+ * @example
15545
+ *
15546
+ * _.map(['6', '8', '10'], _.unary(parseInt));
15547
+ * // => [6, 8, 10]
15548
+ */
15549
+ function unary(func) {
15550
+ return ary(func, 1);
15551
+ }
15552
+
15553
+ /**
15554
+ * Creates a function that provides `value` to `wrapper` as its first
15555
+ * argument. Any additional arguments provided to the function are appended
15556
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
15557
+ * binding of the created function.
15558
+ *
15559
+ * @static
15560
+ * @memberOf _
15561
+ * @since 0.1.0
15562
+ * @category Function
15563
+ * @param {*} value The value to wrap.
15564
+ * @param {Function} [wrapper=identity] The wrapper function.
15565
+ * @returns {Function} Returns the new function.
15566
+ * @example
15567
+ *
15568
+ * var p = _.wrap(_.escape, function(func, text) {
15569
+ * return '<p>' + func(text) + '</p>';
15570
+ * });
15571
+ *
15572
+ * p('fred, barney, & pebbles');
15573
+ * // => '<p>fred, barney, &amp; pebbles</p>'
15574
+ */
15575
+ function wrap(value, wrapper) {
15576
+ return partial(castFunction(wrapper), value);
15577
+ }
15578
+
15579
+ /*------------------------------------------------------------------------*/
15580
+
15581
+ /**
15582
+ * Casts `value` as an array if it's not one.
15583
+ *
15584
+ * @static
15585
+ * @memberOf _
15586
+ * @since 4.4.0
15587
+ * @category Lang
15588
+ * @param {*} value The value to inspect.
15589
+ * @returns {Array} Returns the cast array.
15590
+ * @example
15591
+ *
15592
+ * _.castArray(1);
15593
+ * // => [1]
15594
+ *
15595
+ * _.castArray({ 'a': 1 });
15596
+ * // => [{ 'a': 1 }]
15597
+ *
15598
+ * _.castArray('abc');
15599
+ * // => ['abc']
15600
+ *
15601
+ * _.castArray(null);
15602
+ * // => [null]
15603
+ *
15604
+ * _.castArray(undefined);
15605
+ * // => [undefined]
15606
+ *
15607
+ * _.castArray();
15608
+ * // => []
15609
+ *
15610
+ * var array = [1, 2, 3];
15611
+ * console.log(_.castArray(array) === array);
15612
+ * // => true
15613
+ */
15614
+ function castArray() {
15615
+ if (!arguments.length) {
15616
+ return [];
15617
+ }
15618
+ var value = arguments[0];
15619
+ return isArray(value) ? value : [value];
15620
+ }
15621
+
15622
+ /**
15623
+ * Creates a shallow clone of `value`.
15624
+ *
15625
+ * **Note:** This method is loosely based on the
15626
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
15627
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
15628
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
15629
+ * arrays. The own enumerable properties of `arguments` objects are cloned
15630
+ * as plain objects. An empty object is returned for uncloneable values such
15631
+ * as error objects, functions, DOM nodes, and WeakMaps.
15632
+ *
15633
+ * @static
15634
+ * @memberOf _
15635
+ * @since 0.1.0
15636
+ * @category Lang
15637
+ * @param {*} value The value to clone.
15638
+ * @returns {*} Returns the cloned value.
15639
+ * @see _.cloneDeep
15640
+ * @example
15641
+ *
15642
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
15643
+ *
15644
+ * var shallow = _.clone(objects);
15645
+ * console.log(shallow[0] === objects[0]);
15646
+ * // => true
15647
+ */
15648
+ function clone(value) {
15649
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
15650
+ }
15651
+
15652
+ /**
15653
+ * This method is like `_.clone` except that it accepts `customizer` which
15654
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
15655
+ * cloning is handled by the method instead. The `customizer` is invoked with
15656
+ * up to four arguments; (value [, index|key, object, stack]).
15657
+ *
15658
+ * @static
15659
+ * @memberOf _
15660
+ * @since 4.0.0
15661
+ * @category Lang
15662
+ * @param {*} value The value to clone.
15663
+ * @param {Function} [customizer] The function to customize cloning.
15664
+ * @returns {*} Returns the cloned value.
15665
+ * @see _.cloneDeepWith
15666
+ * @example
15667
+ *
15668
+ * function customizer(value) {
15669
+ * if (_.isElement(value)) {
15670
+ * return value.cloneNode(false);
15671
+ * }
15672
+ * }
15673
+ *
15674
+ * var el = _.cloneWith(document.body, customizer);
15675
+ *
15676
+ * console.log(el === document.body);
15677
+ * // => false
15678
+ * console.log(el.nodeName);
15679
+ * // => 'BODY'
15680
+ * console.log(el.childNodes.length);
15681
+ * // => 0
15682
+ */
15683
+ function cloneWith(value, customizer) {
15684
+ customizer = typeof customizer == 'function' ? customizer : undefined;
15685
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
15686
+ }
15687
+
15688
+ /**
15689
+ * This method is like `_.clone` except that it recursively clones `value`.
15690
+ *
15691
+ * @static
15692
+ * @memberOf _
15693
+ * @since 1.0.0
15694
+ * @category Lang
15695
+ * @param {*} value The value to recursively clone.
15696
+ * @returns {*} Returns the deep cloned value.
15697
+ * @see _.clone
15698
+ * @example
15699
+ *
15700
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
15701
+ *
15702
+ * var deep = _.cloneDeep(objects);
15703
+ * console.log(deep[0] === objects[0]);
15704
+ * // => false
15705
+ */
15706
+ function cloneDeep(value) {
15707
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
15708
+ }
15709
+
15710
+ /**
15711
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
15712
+ *
15713
+ * @static
15714
+ * @memberOf _
15715
+ * @since 4.0.0
15716
+ * @category Lang
15717
+ * @param {*} value The value to recursively clone.
15718
+ * @param {Function} [customizer] The function to customize cloning.
15719
+ * @returns {*} Returns the deep cloned value.
15720
+ * @see _.cloneWith
15721
+ * @example
15722
+ *
15723
+ * function customizer(value) {
15724
+ * if (_.isElement(value)) {
15725
+ * return value.cloneNode(true);
15726
+ * }
15727
+ * }
15728
+ *
15729
+ * var el = _.cloneDeepWith(document.body, customizer);
15730
+ *
15731
+ * console.log(el === document.body);
15732
+ * // => false
15733
+ * console.log(el.nodeName);
15734
+ * // => 'BODY'
15735
+ * console.log(el.childNodes.length);
15736
+ * // => 20
15737
+ */
15738
+ function cloneDeepWith(value, customizer) {
15739
+ customizer = typeof customizer == 'function' ? customizer : undefined;
15740
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
15741
+ }
15742
+
15743
+ /**
15744
+ * Checks if `object` conforms to `source` by invoking the predicate
15745
+ * properties of `source` with the corresponding property values of `object`.
15746
+ *
15747
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
15748
+ * partially applied.
15749
+ *
15750
+ * @static
15751
+ * @memberOf _
15752
+ * @since 4.14.0
15753
+ * @category Lang
15754
+ * @param {Object} object The object to inspect.
15755
+ * @param {Object} source The object of property predicates to conform to.
15756
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
15757
+ * @example
15758
+ *
15759
+ * var object = { 'a': 1, 'b': 2 };
15760
+ *
15761
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
15762
+ * // => true
15763
+ *
15764
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
15765
+ * // => false
15766
+ */
15767
+ function conformsTo(object, source) {
15768
+ return source == null || baseConformsTo(object, source, keys(source));
15769
+ }
15770
+
15771
+ /**
15772
+ * Performs a
15773
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
15774
+ * comparison between two values to determine if they are equivalent.
15775
+ *
15776
+ * @static
15777
+ * @memberOf _
15778
+ * @since 4.0.0
15779
+ * @category Lang
15780
+ * @param {*} value The value to compare.
15781
+ * @param {*} other The other value to compare.
15782
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
15783
+ * @example
15784
+ *
15785
+ * var object = { 'a': 1 };
15786
+ * var other = { 'a': 1 };
15787
+ *
15788
+ * _.eq(object, object);
15789
+ * // => true
15790
+ *
15791
+ * _.eq(object, other);
15792
+ * // => false
15793
+ *
15794
+ * _.eq('a', 'a');
15795
+ * // => true
15796
+ *
15797
+ * _.eq('a', Object('a'));
15798
+ * // => false
15799
+ *
15800
+ * _.eq(NaN, NaN);
15801
+ * // => true
15802
+ */
15803
+ function eq(value, other) {
15804
+ return value === other || (value !== value && other !== other);
15805
+ }
15806
+
15807
+ /**
15808
+ * Checks if `value` is greater than `other`.
15809
+ *
15810
+ * @static
15811
+ * @memberOf _
15812
+ * @since 3.9.0
15813
+ * @category Lang
15814
+ * @param {*} value The value to compare.
15815
+ * @param {*} other The other value to compare.
15816
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
15817
+ * else `false`.
15818
+ * @see _.lt
15819
+ * @example
15820
+ *
15821
+ * _.gt(3, 1);
15822
+ * // => true
15823
+ *
15824
+ * _.gt(3, 3);
15825
+ * // => false
15826
+ *
15827
+ * _.gt(1, 3);
15828
+ * // => false
15829
+ */
15830
+ var gt = createRelationalOperation(baseGt);
15831
+
15832
+ /**
15833
+ * Checks if `value` is greater than or equal to `other`.
15834
+ *
15835
+ * @static
15836
+ * @memberOf _
15837
+ * @since 3.9.0
15838
+ * @category Lang
15839
+ * @param {*} value The value to compare.
15840
+ * @param {*} other The other value to compare.
15841
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
15842
+ * `other`, else `false`.
15843
+ * @see _.lte
15844
+ * @example
15845
+ *
15846
+ * _.gte(3, 1);
15847
+ * // => true
15848
+ *
15849
+ * _.gte(3, 3);
15850
+ * // => true
15851
+ *
15852
+ * _.gte(1, 3);
15853
+ * // => false
15854
+ */
15855
+ var gte = createRelationalOperation(function(value, other) {
15856
+ return value >= other;
15857
+ });
15858
+
15859
+ /**
15860
+ * Checks if `value` is likely an `arguments` object.
15861
+ *
15862
+ * @static
15863
+ * @memberOf _
15864
+ * @since 0.1.0
15865
+ * @category Lang
15866
+ * @param {*} value The value to check.
15867
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
15868
+ * else `false`.
15869
+ * @example
15870
+ *
15871
+ * _.isArguments(function() { return arguments; }());
15872
+ * // => true
15873
+ *
15874
+ * _.isArguments([1, 2, 3]);
15875
+ * // => false
15876
+ */
15877
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
15878
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
15879
+ !propertyIsEnumerable.call(value, 'callee');
15880
+ };
15881
+
15882
+ /**
15883
+ * Checks if `value` is classified as an `Array` object.
15884
+ *
15885
+ * @static
15886
+ * @memberOf _
15887
+ * @since 0.1.0
15888
+ * @category Lang
15889
+ * @param {*} value The value to check.
15890
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
15891
+ * @example
15892
+ *
15893
+ * _.isArray([1, 2, 3]);
15894
+ * // => true
15895
+ *
15896
+ * _.isArray(document.body.children);
15897
+ * // => false
15898
+ *
15899
+ * _.isArray('abc');
15900
+ * // => false
15901
+ *
15902
+ * _.isArray(_.noop);
15903
+ * // => false
15904
+ */
15905
+ var isArray = Array.isArray;
15906
+
15907
+ /**
15908
+ * Checks if `value` is classified as an `ArrayBuffer` object.
15909
+ *
15910
+ * @static
15911
+ * @memberOf _
15912
+ * @since 4.3.0
15913
+ * @category Lang
15914
+ * @param {*} value The value to check.
15915
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
15916
+ * @example
15917
+ *
15918
+ * _.isArrayBuffer(new ArrayBuffer(2));
15919
+ * // => true
15920
+ *
15921
+ * _.isArrayBuffer(new Array(2));
15922
+ * // => false
15923
+ */
15924
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
15925
+
15926
+ /**
15927
+ * Checks if `value` is array-like. A value is considered array-like if it's
15928
+ * not a function and has a `value.length` that's an integer greater than or
15929
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
15930
+ *
15931
+ * @static
15932
+ * @memberOf _
15933
+ * @since 4.0.0
15934
+ * @category Lang
15935
+ * @param {*} value The value to check.
15936
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
15937
+ * @example
15938
+ *
15939
+ * _.isArrayLike([1, 2, 3]);
15940
+ * // => true
15941
+ *
15942
+ * _.isArrayLike(document.body.children);
15943
+ * // => true
15944
+ *
15945
+ * _.isArrayLike('abc');
15946
+ * // => true
15947
+ *
15948
+ * _.isArrayLike(_.noop);
15949
+ * // => false
15950
+ */
15951
+ function isArrayLike(value) {
15952
+ return value != null && isLength(value.length) && !isFunction(value);
15953
+ }
15954
+
15955
+ /**
15956
+ * This method is like `_.isArrayLike` except that it also checks if `value`
15957
+ * is an object.
15958
+ *
15959
+ * @static
15960
+ * @memberOf _
15961
+ * @since 4.0.0
15962
+ * @category Lang
15963
+ * @param {*} value The value to check.
15964
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
15965
+ * else `false`.
15966
+ * @example
15967
+ *
15968
+ * _.isArrayLikeObject([1, 2, 3]);
15969
+ * // => true
15970
+ *
15971
+ * _.isArrayLikeObject(document.body.children);
15972
+ * // => true
15973
+ *
15974
+ * _.isArrayLikeObject('abc');
15975
+ * // => false
15976
+ *
15977
+ * _.isArrayLikeObject(_.noop);
15978
+ * // => false
15979
+ */
15980
+ function isArrayLikeObject(value) {
15981
+ return isObjectLike(value) && isArrayLike(value);
15982
+ }
15983
+
15984
+ /**
15985
+ * Checks if `value` is classified as a boolean primitive or object.
15986
+ *
15987
+ * @static
15988
+ * @memberOf _
15989
+ * @since 0.1.0
15990
+ * @category Lang
15991
+ * @param {*} value The value to check.
15992
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
15993
+ * @example
15994
+ *
15995
+ * _.isBoolean(false);
15996
+ * // => true
15997
+ *
15998
+ * _.isBoolean(null);
15999
+ * // => false
16000
+ */
16001
+ function isBoolean(value) {
16002
+ return value === true || value === false ||
16003
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
16004
+ }
16005
+
16006
+ /**
16007
+ * Checks if `value` is a buffer.
16008
+ *
16009
+ * @static
16010
+ * @memberOf _
16011
+ * @since 4.3.0
16012
+ * @category Lang
16013
+ * @param {*} value The value to check.
16014
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
16015
+ * @example
16016
+ *
16017
+ * _.isBuffer(new Buffer(2));
16018
+ * // => true
16019
+ *
16020
+ * _.isBuffer(new Uint8Array(2));
16021
+ * // => false
16022
+ */
16023
+ var isBuffer = nativeIsBuffer || stubFalse;
16024
+
16025
+ /**
16026
+ * Checks if `value` is classified as a `Date` object.
16027
+ *
16028
+ * @static
16029
+ * @memberOf _
16030
+ * @since 0.1.0
16031
+ * @category Lang
16032
+ * @param {*} value The value to check.
16033
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
16034
+ * @example
16035
+ *
16036
+ * _.isDate(new Date);
16037
+ * // => true
16038
+ *
16039
+ * _.isDate('Mon April 23 2012');
16040
+ * // => false
16041
+ */
16042
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
16043
+
16044
+ /**
16045
+ * Checks if `value` is likely a DOM element.
16046
+ *
16047
+ * @static
16048
+ * @memberOf _
16049
+ * @since 0.1.0
16050
+ * @category Lang
16051
+ * @param {*} value The value to check.
16052
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
16053
+ * @example
16054
+ *
16055
+ * _.isElement(document.body);
16056
+ * // => true
16057
+ *
16058
+ * _.isElement('<body>');
16059
+ * // => false
16060
+ */
16061
+ function isElement(value) {
16062
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
16063
+ }
16064
+
16065
+ /**
16066
+ * Checks if `value` is an empty object, collection, map, or set.
16067
+ *
16068
+ * Objects are considered empty if they have no own enumerable string keyed
16069
+ * properties.
16070
+ *
16071
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
16072
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
16073
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
16074
+ *
16075
+ * @static
16076
+ * @memberOf _
16077
+ * @since 0.1.0
16078
+ * @category Lang
16079
+ * @param {*} value The value to check.
16080
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
16081
+ * @example
16082
+ *
16083
+ * _.isEmpty(null);
16084
+ * // => true
16085
+ *
16086
+ * _.isEmpty(true);
16087
+ * // => true
16088
+ *
16089
+ * _.isEmpty(1);
16090
+ * // => true
16091
+ *
16092
+ * _.isEmpty([1, 2, 3]);
16093
+ * // => false
16094
+ *
16095
+ * _.isEmpty({ 'a': 1 });
16096
+ * // => false
16097
+ */
16098
+ function isEmpty(value) {
16099
+ if (value == null) {
16100
+ return true;
16101
+ }
16102
+ if (isArrayLike(value) &&
16103
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
16104
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
16105
+ return !value.length;
16106
+ }
16107
+ var tag = getTag(value);
16108
+ if (tag == mapTag || tag == setTag) {
16109
+ return !value.size;
16110
+ }
16111
+ if (isPrototype(value)) {
16112
+ return !baseKeys(value).length;
16113
+ }
16114
+ for (var key in value) {
16115
+ if (hasOwnProperty.call(value, key)) {
16116
+ return false;
16117
+ }
16118
+ }
16119
+ return true;
16120
+ }
16121
+
16122
+ /**
16123
+ * Performs a deep comparison between two values to determine if they are
16124
+ * equivalent.
16125
+ *
16126
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
16127
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
16128
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
16129
+ * by their own, not inherited, enumerable properties. Functions and DOM
16130
+ * nodes are compared by strict equality, i.e. `===`.
16131
+ *
16132
+ * @static
16133
+ * @memberOf _
16134
+ * @since 0.1.0
16135
+ * @category Lang
16136
+ * @param {*} value The value to compare.
16137
+ * @param {*} other The other value to compare.
16138
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
16139
+ * @example
16140
+ *
16141
+ * var object = { 'a': 1 };
16142
+ * var other = { 'a': 1 };
16143
+ *
16144
+ * _.isEqual(object, other);
16145
+ * // => true
16146
+ *
16147
+ * object === other;
16148
+ * // => false
16149
+ */
16150
+ function isEqual(value, other) {
16151
+ return baseIsEqual(value, other);
16152
+ }
16153
+
16154
+ /**
16155
+ * This method is like `_.isEqual` except that it accepts `customizer` which
16156
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
16157
+ * are handled by the method instead. The `customizer` is invoked with up to
16158
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
16159
+ *
16160
+ * @static
16161
+ * @memberOf _
16162
+ * @since 4.0.0
16163
+ * @category Lang
16164
+ * @param {*} value The value to compare.
16165
+ * @param {*} other The other value to compare.
16166
+ * @param {Function} [customizer] The function to customize comparisons.
16167
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
16168
+ * @example
16169
+ *
16170
+ * function isGreeting(value) {
16171
+ * return /^h(?:i|ello)$/.test(value);
16172
+ * }
16173
+ *
16174
+ * function customizer(objValue, othValue) {
16175
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
16176
+ * return true;
16177
+ * }
16178
+ * }
16179
+ *
16180
+ * var array = ['hello', 'goodbye'];
16181
+ * var other = ['hi', 'goodbye'];
16182
+ *
16183
+ * _.isEqualWith(array, other, customizer);
16184
+ * // => true
16185
+ */
16186
+ function isEqualWith(value, other, customizer) {
16187
+ customizer = typeof customizer == 'function' ? customizer : undefined;
16188
+ var result = customizer ? customizer(value, other) : undefined;
16189
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
16190
+ }
16191
+
16192
+ /**
16193
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
16194
+ * `SyntaxError`, `TypeError`, or `URIError` object.
16195
+ *
16196
+ * @static
16197
+ * @memberOf _
16198
+ * @since 3.0.0
16199
+ * @category Lang
16200
+ * @param {*} value The value to check.
16201
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
16202
+ * @example
16203
+ *
16204
+ * _.isError(new Error);
16205
+ * // => true
16206
+ *
16207
+ * _.isError(Error);
16208
+ * // => false
16209
+ */
16210
+ function isError(value) {
16211
+ if (!isObjectLike(value)) {
16212
+ return false;
16213
+ }
16214
+ var tag = baseGetTag(value);
16215
+ return tag == errorTag || tag == domExcTag ||
16216
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
16217
+ }
16218
+
16219
+ /**
16220
+ * Checks if `value` is a finite primitive number.
16221
+ *
16222
+ * **Note:** This method is based on
16223
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
16224
+ *
16225
+ * @static
16226
+ * @memberOf _
16227
+ * @since 0.1.0
16228
+ * @category Lang
16229
+ * @param {*} value The value to check.
16230
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
16231
+ * @example
16232
+ *
16233
+ * _.isFinite(3);
16234
+ * // => true
16235
+ *
16236
+ * _.isFinite(Number.MIN_VALUE);
16237
+ * // => true
16238
+ *
16239
+ * _.isFinite(Infinity);
16240
+ * // => false
16241
+ *
16242
+ * _.isFinite('3');
16243
+ * // => false
16244
+ */
16245
+ function isFinite(value) {
16246
+ return typeof value == 'number' && nativeIsFinite(value);
16247
+ }
16248
+
16249
+ /**
16250
+ * Checks if `value` is classified as a `Function` object.
16251
+ *
16252
+ * @static
16253
+ * @memberOf _
16254
+ * @since 0.1.0
16255
+ * @category Lang
16256
+ * @param {*} value The value to check.
16257
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
16258
+ * @example
16259
+ *
16260
+ * _.isFunction(_);
16261
+ * // => true
16262
+ *
16263
+ * _.isFunction(/abc/);
16264
+ * // => false
16265
+ */
16266
+ function isFunction(value) {
16267
+ if (!isObject(value)) {
16268
+ return false;
16269
+ }
16270
+ // The use of `Object#toString` avoids issues with the `typeof` operator
16271
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
16272
+ var tag = baseGetTag(value);
16273
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
16274
+ }
16275
+
16276
+ /**
16277
+ * Checks if `value` is an integer.
16278
+ *
16279
+ * **Note:** This method is based on
16280
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
16281
+ *
16282
+ * @static
16283
+ * @memberOf _
16284
+ * @since 4.0.0
16285
+ * @category Lang
16286
+ * @param {*} value The value to check.
16287
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
16288
+ * @example
16289
+ *
16290
+ * _.isInteger(3);
16291
+ * // => true
16292
+ *
16293
+ * _.isInteger(Number.MIN_VALUE);
16294
+ * // => false
16295
+ *
16296
+ * _.isInteger(Infinity);
16297
+ * // => false
16298
+ *
16299
+ * _.isInteger('3');
16300
+ * // => false
16301
+ */
16302
+ function isInteger(value) {
16303
+ return typeof value == 'number' && value == toInteger(value);
16304
+ }
16305
+
16306
+ /**
16307
+ * Checks if `value` is a valid array-like length.
16308
+ *
16309
+ * **Note:** This method is loosely based on
16310
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
16311
+ *
16312
+ * @static
16313
+ * @memberOf _
16314
+ * @since 4.0.0
16315
+ * @category Lang
16316
+ * @param {*} value The value to check.
16317
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
16318
+ * @example
16319
+ *
16320
+ * _.isLength(3);
16321
+ * // => true
16322
+ *
16323
+ * _.isLength(Number.MIN_VALUE);
16324
+ * // => false
16325
+ *
16326
+ * _.isLength(Infinity);
16327
+ * // => false
16328
+ *
16329
+ * _.isLength('3');
16330
+ * // => false
16331
+ */
16332
+ function isLength(value) {
16333
+ return typeof value == 'number' &&
16334
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
16335
+ }
16336
+
16337
+ /**
16338
+ * Checks if `value` is the
16339
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
16340
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
16341
+ *
16342
+ * @static
16343
+ * @memberOf _
16344
+ * @since 0.1.0
16345
+ * @category Lang
16346
+ * @param {*} value The value to check.
16347
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
16348
+ * @example
16349
+ *
16350
+ * _.isObject({});
16351
+ * // => true
16352
+ *
16353
+ * _.isObject([1, 2, 3]);
16354
+ * // => true
16355
+ *
16356
+ * _.isObject(_.noop);
16357
+ * // => true
16358
+ *
16359
+ * _.isObject(null);
16360
+ * // => false
16361
+ */
16362
+ function isObject(value) {
16363
+ var type = typeof value;
16364
+ return value != null && (type == 'object' || type == 'function');
16365
+ }
16366
+
16367
+ /**
16368
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
16369
+ * and has a `typeof` result of "object".
16370
+ *
16371
+ * @static
16372
+ * @memberOf _
16373
+ * @since 4.0.0
16374
+ * @category Lang
16375
+ * @param {*} value The value to check.
16376
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
16377
+ * @example
16378
+ *
16379
+ * _.isObjectLike({});
16380
+ * // => true
16381
+ *
16382
+ * _.isObjectLike([1, 2, 3]);
16383
+ * // => true
16384
+ *
16385
+ * _.isObjectLike(_.noop);
16386
+ * // => false
16387
+ *
16388
+ * _.isObjectLike(null);
16389
+ * // => false
16390
+ */
16391
+ function isObjectLike(value) {
16392
+ return value != null && typeof value == 'object';
16393
+ }
16394
+
16395
+ /**
16396
+ * Checks if `value` is classified as a `Map` object.
16397
+ *
16398
+ * @static
16399
+ * @memberOf _
16400
+ * @since 4.3.0
16401
+ * @category Lang
16402
+ * @param {*} value The value to check.
16403
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
16404
+ * @example
16405
+ *
16406
+ * _.isMap(new Map);
16407
+ * // => true
16408
+ *
16409
+ * _.isMap(new WeakMap);
16410
+ * // => false
16411
+ */
16412
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
16413
+
16414
+ /**
16415
+ * Performs a partial deep comparison between `object` and `source` to
16416
+ * determine if `object` contains equivalent property values.
16417
+ *
16418
+ * **Note:** This method is equivalent to `_.matches` when `source` is
16419
+ * partially applied.
16420
+ *
16421
+ * Partial comparisons will match empty array and empty object `source`
16422
+ * values against any array or object value, respectively. See `_.isEqual`
16423
+ * for a list of supported value comparisons.
16424
+ *
16425
+ * @static
16426
+ * @memberOf _
16427
+ * @since 3.0.0
16428
+ * @category Lang
16429
+ * @param {Object} object The object to inspect.
16430
+ * @param {Object} source The object of property values to match.
16431
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
16432
+ * @example
16433
+ *
16434
+ * var object = { 'a': 1, 'b': 2 };
16435
+ *
16436
+ * _.isMatch(object, { 'b': 2 });
16437
+ * // => true
16438
+ *
16439
+ * _.isMatch(object, { 'b': 1 });
16440
+ * // => false
16441
+ */
16442
+ function isMatch(object, source) {
16443
+ return object === source || baseIsMatch(object, source, getMatchData(source));
16444
+ }
16445
+
16446
+ /**
16447
+ * This method is like `_.isMatch` except that it accepts `customizer` which
16448
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
16449
+ * are handled by the method instead. The `customizer` is invoked with five
16450
+ * arguments: (objValue, srcValue, index|key, object, source).
16451
+ *
16452
+ * @static
16453
+ * @memberOf _
16454
+ * @since 4.0.0
16455
+ * @category Lang
16456
+ * @param {Object} object The object to inspect.
16457
+ * @param {Object} source The object of property values to match.
16458
+ * @param {Function} [customizer] The function to customize comparisons.
16459
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
16460
+ * @example
16461
+ *
16462
+ * function isGreeting(value) {
16463
+ * return /^h(?:i|ello)$/.test(value);
16464
+ * }
16465
+ *
16466
+ * function customizer(objValue, srcValue) {
16467
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
16468
+ * return true;
16469
+ * }
16470
+ * }
16471
+ *
16472
+ * var object = { 'greeting': 'hello' };
16473
+ * var source = { 'greeting': 'hi' };
16474
+ *
16475
+ * _.isMatchWith(object, source, customizer);
16476
+ * // => true
16477
+ */
16478
+ function isMatchWith(object, source, customizer) {
16479
+ customizer = typeof customizer == 'function' ? customizer : undefined;
16480
+ return baseIsMatch(object, source, getMatchData(source), customizer);
16481
+ }
16482
+
16483
+ /**
16484
+ * Checks if `value` is `NaN`.
16485
+ *
16486
+ * **Note:** This method is based on
16487
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
16488
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
16489
+ * `undefined` and other non-number values.
16490
+ *
16491
+ * @static
16492
+ * @memberOf _
16493
+ * @since 0.1.0
16494
+ * @category Lang
16495
+ * @param {*} value The value to check.
16496
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
16497
+ * @example
16498
+ *
16499
+ * _.isNaN(NaN);
16500
+ * // => true
16501
+ *
16502
+ * _.isNaN(new Number(NaN));
16503
+ * // => true
16504
+ *
16505
+ * isNaN(undefined);
16506
+ * // => true
16507
+ *
16508
+ * _.isNaN(undefined);
16509
+ * // => false
16510
+ */
16511
+ function isNaN(value) {
16512
+ // An `NaN` primitive is the only value that is not equal to itself.
16513
+ // Perform the `toStringTag` check first to avoid errors with some
16514
+ // ActiveX objects in IE.
16515
+ return isNumber(value) && value != +value;
16516
+ }
16517
+
16518
+ /**
16519
+ * Checks if `value` is a pristine native function.
16520
+ *
16521
+ * **Note:** This method can't reliably detect native functions in the presence
16522
+ * of the core-js package because core-js circumvents this kind of detection.
16523
+ * Despite multiple requests, the core-js maintainer has made it clear: any
16524
+ * attempt to fix the detection will be obstructed. As a result, we're left
16525
+ * with little choice but to throw an error. Unfortunately, this also affects
16526
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
16527
+ * which rely on core-js.
16528
+ *
16529
+ * @static
16530
+ * @memberOf _
16531
+ * @since 3.0.0
16532
+ * @category Lang
16533
+ * @param {*} value The value to check.
16534
+ * @returns {boolean} Returns `true` if `value` is a native function,
16535
+ * else `false`.
16536
+ * @example
16537
+ *
16538
+ * _.isNative(Array.prototype.push);
16539
+ * // => true
16540
+ *
16541
+ * _.isNative(_);
16542
+ * // => false
16543
+ */
16544
+ function isNative(value) {
16545
+ if (isMaskable(value)) {
16546
+ throw new Error(CORE_ERROR_TEXT);
16547
+ }
16548
+ return baseIsNative(value);
16549
+ }
16550
+
16551
+ /**
16552
+ * Checks if `value` is `null`.
16553
+ *
16554
+ * @static
16555
+ * @memberOf _
16556
+ * @since 0.1.0
16557
+ * @category Lang
16558
+ * @param {*} value The value to check.
16559
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
16560
+ * @example
16561
+ *
16562
+ * _.isNull(null);
16563
+ * // => true
16564
+ *
16565
+ * _.isNull(void 0);
16566
+ * // => false
16567
+ */
16568
+ function isNull(value) {
16569
+ return value === null;
16570
+ }
16571
+
16572
+ /**
16573
+ * Checks if `value` is `null` or `undefined`.
16574
+ *
16575
+ * @static
16576
+ * @memberOf _
16577
+ * @since 4.0.0
16578
+ * @category Lang
16579
+ * @param {*} value The value to check.
16580
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
16581
+ * @example
16582
+ *
16583
+ * _.isNil(null);
16584
+ * // => true
16585
+ *
16586
+ * _.isNil(void 0);
16587
+ * // => true
16588
+ *
16589
+ * _.isNil(NaN);
16590
+ * // => false
16591
+ */
16592
+ function isNil(value) {
16593
+ return value == null;
16594
+ }
16595
+
16596
+ /**
16597
+ * Checks if `value` is classified as a `Number` primitive or object.
16598
+ *
16599
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
16600
+ * classified as numbers, use the `_.isFinite` method.
16601
+ *
16602
+ * @static
16603
+ * @memberOf _
16604
+ * @since 0.1.0
16605
+ * @category Lang
16606
+ * @param {*} value The value to check.
16607
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
16608
+ * @example
16609
+ *
16610
+ * _.isNumber(3);
16611
+ * // => true
16612
+ *
16613
+ * _.isNumber(Number.MIN_VALUE);
16614
+ * // => true
16615
+ *
16616
+ * _.isNumber(Infinity);
16617
+ * // => true
16618
+ *
16619
+ * _.isNumber('3');
16620
+ * // => false
16621
+ */
16622
+ function isNumber(value) {
16623
+ return typeof value == 'number' ||
16624
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
16625
+ }
16626
+
16627
+ /**
16628
+ * Checks if `value` is a plain object, that is, an object created by the
16629
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
16630
+ *
16631
+ * @static
16632
+ * @memberOf _
16633
+ * @since 0.8.0
16634
+ * @category Lang
16635
+ * @param {*} value The value to check.
16636
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
16637
+ * @example
16638
+ *
16639
+ * function Foo() {
16640
+ * this.a = 1;
16641
+ * }
16642
+ *
16643
+ * _.isPlainObject(new Foo);
16644
+ * // => false
16645
+ *
16646
+ * _.isPlainObject([1, 2, 3]);
16647
+ * // => false
16648
+ *
16649
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
16650
+ * // => true
16651
+ *
16652
+ * _.isPlainObject(Object.create(null));
16653
+ * // => true
16654
+ */
16655
+ function isPlainObject(value) {
16656
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
16657
+ return false;
16658
+ }
16659
+ var proto = getPrototype(value);
16660
+ if (proto === null) {
16661
+ return true;
16662
+ }
16663
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
16664
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
16665
+ funcToString.call(Ctor) == objectCtorString;
16666
+ }
16667
+
16668
+ /**
16669
+ * Checks if `value` is classified as a `RegExp` object.
16670
+ *
16671
+ * @static
16672
+ * @memberOf _
16673
+ * @since 0.1.0
16674
+ * @category Lang
16675
+ * @param {*} value The value to check.
16676
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
16677
+ * @example
16678
+ *
16679
+ * _.isRegExp(/abc/);
16680
+ * // => true
16681
+ *
16682
+ * _.isRegExp('/abc/');
16683
+ * // => false
16684
+ */
16685
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
16686
+
16687
+ /**
16688
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
16689
+ * double precision number which isn't the result of a rounded unsafe integer.
16690
+ *
16691
+ * **Note:** This method is based on
16692
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
16693
+ *
16694
+ * @static
16695
+ * @memberOf _
16696
+ * @since 4.0.0
16697
+ * @category Lang
16698
+ * @param {*} value The value to check.
16699
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
16700
+ * @example
16701
+ *
16702
+ * _.isSafeInteger(3);
16703
+ * // => true
16704
+ *
16705
+ * _.isSafeInteger(Number.MIN_VALUE);
16706
+ * // => false
16707
+ *
16708
+ * _.isSafeInteger(Infinity);
16709
+ * // => false
16710
+ *
16711
+ * _.isSafeInteger('3');
16712
+ * // => false
16713
+ */
16714
+ function isSafeInteger(value) {
16715
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
16716
+ }
16717
+
16718
+ /**
16719
+ * Checks if `value` is classified as a `Set` object.
16720
+ *
16721
+ * @static
16722
+ * @memberOf _
16723
+ * @since 4.3.0
16724
+ * @category Lang
16725
+ * @param {*} value The value to check.
16726
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
16727
+ * @example
16728
+ *
16729
+ * _.isSet(new Set);
16730
+ * // => true
16731
+ *
16732
+ * _.isSet(new WeakSet);
16733
+ * // => false
16734
+ */
16735
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
16736
+
16737
+ /**
16738
+ * Checks if `value` is classified as a `String` primitive or object.
16739
+ *
16740
+ * @static
16741
+ * @since 0.1.0
16742
+ * @memberOf _
16743
+ * @category Lang
16744
+ * @param {*} value The value to check.
16745
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
16746
+ * @example
16747
+ *
16748
+ * _.isString('abc');
16749
+ * // => true
16750
+ *
16751
+ * _.isString(1);
16752
+ * // => false
16753
+ */
16754
+ function isString(value) {
16755
+ return typeof value == 'string' ||
16756
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
16757
+ }
16758
+
16759
+ /**
16760
+ * Checks if `value` is classified as a `Symbol` primitive or object.
16761
+ *
16762
+ * @static
16763
+ * @memberOf _
16764
+ * @since 4.0.0
16765
+ * @category Lang
16766
+ * @param {*} value The value to check.
16767
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
16768
+ * @example
16769
+ *
16770
+ * _.isSymbol(Symbol.iterator);
16771
+ * // => true
16772
+ *
16773
+ * _.isSymbol('abc');
16774
+ * // => false
16775
+ */
16776
+ function isSymbol(value) {
16777
+ return typeof value == 'symbol' ||
16778
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
16779
+ }
16780
+
16781
+ /**
16782
+ * Checks if `value` is classified as a typed array.
16783
+ *
16784
+ * @static
16785
+ * @memberOf _
16786
+ * @since 3.0.0
16787
+ * @category Lang
16788
+ * @param {*} value The value to check.
16789
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
16790
+ * @example
16791
+ *
16792
+ * _.isTypedArray(new Uint8Array);
16793
+ * // => true
16794
+ *
16795
+ * _.isTypedArray([]);
16796
+ * // => false
16797
+ */
16798
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
16799
+
16800
+ /**
16801
+ * Checks if `value` is `undefined`.
16802
+ *
16803
+ * @static
16804
+ * @since 0.1.0
16805
+ * @memberOf _
16806
+ * @category Lang
16807
+ * @param {*} value The value to check.
16808
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
16809
+ * @example
16810
+ *
16811
+ * _.isUndefined(void 0);
16812
+ * // => true
16813
+ *
16814
+ * _.isUndefined(null);
16815
+ * // => false
16816
+ */
16817
+ function isUndefined(value) {
16818
+ return value === undefined;
16819
+ }
16820
+
16821
+ /**
16822
+ * Checks if `value` is classified as a `WeakMap` object.
16823
+ *
16824
+ * @static
16825
+ * @memberOf _
16826
+ * @since 4.3.0
16827
+ * @category Lang
16828
+ * @param {*} value The value to check.
16829
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
16830
+ * @example
16831
+ *
16832
+ * _.isWeakMap(new WeakMap);
16833
+ * // => true
16834
+ *
16835
+ * _.isWeakMap(new Map);
16836
+ * // => false
16837
+ */
16838
+ function isWeakMap(value) {
16839
+ return isObjectLike(value) && getTag(value) == weakMapTag;
16840
+ }
16841
+
16842
+ /**
16843
+ * Checks if `value` is classified as a `WeakSet` object.
16844
+ *
16845
+ * @static
16846
+ * @memberOf _
16847
+ * @since 4.3.0
16848
+ * @category Lang
16849
+ * @param {*} value The value to check.
16850
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
16851
+ * @example
16852
+ *
16853
+ * _.isWeakSet(new WeakSet);
16854
+ * // => true
16855
+ *
16856
+ * _.isWeakSet(new Set);
16857
+ * // => false
16858
+ */
16859
+ function isWeakSet(value) {
16860
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
16861
+ }
16862
+
16863
+ /**
16864
+ * Checks if `value` is less than `other`.
16865
+ *
16866
+ * @static
16867
+ * @memberOf _
16868
+ * @since 3.9.0
16869
+ * @category Lang
16870
+ * @param {*} value The value to compare.
16871
+ * @param {*} other The other value to compare.
16872
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
16873
+ * else `false`.
16874
+ * @see _.gt
16875
+ * @example
16876
+ *
16877
+ * _.lt(1, 3);
16878
+ * // => true
16879
+ *
16880
+ * _.lt(3, 3);
16881
+ * // => false
16882
+ *
16883
+ * _.lt(3, 1);
16884
+ * // => false
16885
+ */
16886
+ var lt = createRelationalOperation(baseLt);
16887
+
16888
+ /**
16889
+ * Checks if `value` is less than or equal to `other`.
16890
+ *
16891
+ * @static
16892
+ * @memberOf _
16893
+ * @since 3.9.0
16894
+ * @category Lang
16895
+ * @param {*} value The value to compare.
16896
+ * @param {*} other The other value to compare.
16897
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
16898
+ * `other`, else `false`.
16899
+ * @see _.gte
16900
+ * @example
16901
+ *
16902
+ * _.lte(1, 3);
16903
+ * // => true
16904
+ *
16905
+ * _.lte(3, 3);
16906
+ * // => true
16907
+ *
16908
+ * _.lte(3, 1);
16909
+ * // => false
16910
+ */
16911
+ var lte = createRelationalOperation(function(value, other) {
16912
+ return value <= other;
16913
+ });
16914
+
16915
+ /**
16916
+ * Converts `value` to an array.
16917
+ *
16918
+ * @static
16919
+ * @since 0.1.0
16920
+ * @memberOf _
16921
+ * @category Lang
16922
+ * @param {*} value The value to convert.
16923
+ * @returns {Array} Returns the converted array.
16924
+ * @example
16925
+ *
16926
+ * _.toArray({ 'a': 1, 'b': 2 });
16927
+ * // => [1, 2]
16928
+ *
16929
+ * _.toArray('abc');
16930
+ * // => ['a', 'b', 'c']
16931
+ *
16932
+ * _.toArray(1);
16933
+ * // => []
16934
+ *
16935
+ * _.toArray(null);
16936
+ * // => []
16937
+ */
16938
+ function toArray(value) {
16939
+ if (!value) {
16940
+ return [];
16941
+ }
16942
+ if (isArrayLike(value)) {
16943
+ return isString(value) ? stringToArray(value) : copyArray(value);
16944
+ }
16945
+ if (symIterator && value[symIterator]) {
16946
+ return iteratorToArray(value[symIterator]());
16947
+ }
16948
+ var tag = getTag(value),
16949
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
16950
+
16951
+ return func(value);
16952
+ }
16953
+
16954
+ /**
16955
+ * Converts `value` to a finite number.
16956
+ *
16957
+ * @static
16958
+ * @memberOf _
16959
+ * @since 4.12.0
16960
+ * @category Lang
16961
+ * @param {*} value The value to convert.
16962
+ * @returns {number} Returns the converted number.
16963
+ * @example
16964
+ *
16965
+ * _.toFinite(3.2);
16966
+ * // => 3.2
16967
+ *
16968
+ * _.toFinite(Number.MIN_VALUE);
16969
+ * // => 5e-324
16970
+ *
16971
+ * _.toFinite(Infinity);
16972
+ * // => 1.7976931348623157e+308
16973
+ *
16974
+ * _.toFinite('3.2');
16975
+ * // => 3.2
16976
+ */
16977
+ function toFinite(value) {
16978
+ if (!value) {
16979
+ return value === 0 ? value : 0;
16980
+ }
16981
+ value = toNumber(value);
16982
+ if (value === INFINITY || value === -INFINITY) {
16983
+ var sign = (value < 0 ? -1 : 1);
16984
+ return sign * MAX_INTEGER;
16985
+ }
16986
+ return value === value ? value : 0;
16987
+ }
16988
+
16989
+ /**
16990
+ * Converts `value` to an integer.
16991
+ *
16992
+ * **Note:** This method is loosely based on
16993
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
16994
+ *
16995
+ * @static
16996
+ * @memberOf _
16997
+ * @since 4.0.0
16998
+ * @category Lang
16999
+ * @param {*} value The value to convert.
17000
+ * @returns {number} Returns the converted integer.
17001
+ * @example
17002
+ *
17003
+ * _.toInteger(3.2);
17004
+ * // => 3
17005
+ *
17006
+ * _.toInteger(Number.MIN_VALUE);
17007
+ * // => 0
17008
+ *
17009
+ * _.toInteger(Infinity);
17010
+ * // => 1.7976931348623157e+308
17011
+ *
17012
+ * _.toInteger('3.2');
17013
+ * // => 3
17014
+ */
17015
+ function toInteger(value) {
17016
+ var result = toFinite(value),
17017
+ remainder = result % 1;
17018
+
17019
+ return result === result ? (remainder ? result - remainder : result) : 0;
17020
+ }
17021
+
17022
+ /**
17023
+ * Converts `value` to an integer suitable for use as the length of an
17024
+ * array-like object.
17025
+ *
17026
+ * **Note:** This method is based on
17027
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
17028
+ *
17029
+ * @static
17030
+ * @memberOf _
17031
+ * @since 4.0.0
17032
+ * @category Lang
17033
+ * @param {*} value The value to convert.
17034
+ * @returns {number} Returns the converted integer.
17035
+ * @example
17036
+ *
17037
+ * _.toLength(3.2);
17038
+ * // => 3
17039
+ *
17040
+ * _.toLength(Number.MIN_VALUE);
17041
+ * // => 0
17042
+ *
17043
+ * _.toLength(Infinity);
17044
+ * // => 4294967295
17045
+ *
17046
+ * _.toLength('3.2');
17047
+ * // => 3
17048
+ */
17049
+ function toLength(value) {
17050
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
17051
+ }
17052
+
17053
+ /**
17054
+ * Converts `value` to a number.
17055
+ *
17056
+ * @static
17057
+ * @memberOf _
17058
+ * @since 4.0.0
17059
+ * @category Lang
17060
+ * @param {*} value The value to process.
17061
+ * @returns {number} Returns the number.
17062
+ * @example
17063
+ *
17064
+ * _.toNumber(3.2);
17065
+ * // => 3.2
17066
+ *
17067
+ * _.toNumber(Number.MIN_VALUE);
17068
+ * // => 5e-324
17069
+ *
17070
+ * _.toNumber(Infinity);
17071
+ * // => Infinity
17072
+ *
17073
+ * _.toNumber('3.2');
17074
+ * // => 3.2
17075
+ */
17076
+ function toNumber(value) {
17077
+ if (typeof value == 'number') {
17078
+ return value;
17079
+ }
17080
+ if (isSymbol(value)) {
17081
+ return NAN;
17082
+ }
17083
+ if (isObject(value)) {
17084
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
17085
+ value = isObject(other) ? (other + '') : other;
17086
+ }
17087
+ if (typeof value != 'string') {
17088
+ return value === 0 ? value : +value;
17089
+ }
17090
+ value = value.replace(reTrim, '');
17091
+ var isBinary = reIsBinary.test(value);
17092
+ return (isBinary || reIsOctal.test(value))
17093
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
17094
+ : (reIsBadHex.test(value) ? NAN : +value);
17095
+ }
17096
+
17097
+ /**
17098
+ * Converts `value` to a plain object flattening inherited enumerable string
17099
+ * keyed properties of `value` to own properties of the plain object.
17100
+ *
17101
+ * @static
17102
+ * @memberOf _
17103
+ * @since 3.0.0
17104
+ * @category Lang
17105
+ * @param {*} value The value to convert.
17106
+ * @returns {Object} Returns the converted plain object.
17107
+ * @example
17108
+ *
17109
+ * function Foo() {
17110
+ * this.b = 2;
17111
+ * }
17112
+ *
17113
+ * Foo.prototype.c = 3;
17114
+ *
17115
+ * _.assign({ 'a': 1 }, new Foo);
17116
+ * // => { 'a': 1, 'b': 2 }
17117
+ *
17118
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
17119
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
17120
+ */
17121
+ function toPlainObject(value) {
17122
+ return copyObject(value, keysIn(value));
17123
+ }
17124
+
17125
+ /**
17126
+ * Converts `value` to a safe integer. A safe integer can be compared and
17127
+ * represented correctly.
17128
+ *
17129
+ * @static
17130
+ * @memberOf _
17131
+ * @since 4.0.0
17132
+ * @category Lang
17133
+ * @param {*} value The value to convert.
17134
+ * @returns {number} Returns the converted integer.
17135
+ * @example
17136
+ *
17137
+ * _.toSafeInteger(3.2);
17138
+ * // => 3
17139
+ *
17140
+ * _.toSafeInteger(Number.MIN_VALUE);
17141
+ * // => 0
17142
+ *
17143
+ * _.toSafeInteger(Infinity);
17144
+ * // => 9007199254740991
17145
+ *
17146
+ * _.toSafeInteger('3.2');
17147
+ * // => 3
17148
+ */
17149
+ function toSafeInteger(value) {
17150
+ return value
17151
+ ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
17152
+ : (value === 0 ? value : 0);
17153
+ }
17154
+
17155
+ /**
17156
+ * Converts `value` to a string. An empty string is returned for `null`
17157
+ * and `undefined` values. The sign of `-0` is preserved.
17158
+ *
17159
+ * @static
17160
+ * @memberOf _
17161
+ * @since 4.0.0
17162
+ * @category Lang
17163
+ * @param {*} value The value to convert.
17164
+ * @returns {string} Returns the converted string.
17165
+ * @example
17166
+ *
17167
+ * _.toString(null);
17168
+ * // => ''
17169
+ *
17170
+ * _.toString(-0);
17171
+ * // => '-0'
17172
+ *
17173
+ * _.toString([1, 2, 3]);
17174
+ * // => '1,2,3'
17175
+ */
17176
+ function toString(value) {
17177
+ return value == null ? '' : baseToString(value);
17178
+ }
17179
+
17180
+ /*------------------------------------------------------------------------*/
17181
+
17182
+ /**
17183
+ * Assigns own enumerable string keyed properties of source objects to the
17184
+ * destination object. Source objects are applied from left to right.
17185
+ * Subsequent sources overwrite property assignments of previous sources.
17186
+ *
17187
+ * **Note:** This method mutates `object` and is loosely based on
17188
+ * [`Object.assign`](https://mdn.io/Object/assign).
17189
+ *
17190
+ * @static
17191
+ * @memberOf _
17192
+ * @since 0.10.0
17193
+ * @category Object
17194
+ * @param {Object} object The destination object.
17195
+ * @param {...Object} [sources] The source objects.
17196
+ * @returns {Object} Returns `object`.
17197
+ * @see _.assignIn
17198
+ * @example
17199
+ *
17200
+ * function Foo() {
17201
+ * this.a = 1;
17202
+ * }
17203
+ *
17204
+ * function Bar() {
17205
+ * this.c = 3;
17206
+ * }
17207
+ *
17208
+ * Foo.prototype.b = 2;
17209
+ * Bar.prototype.d = 4;
17210
+ *
17211
+ * _.assign({ 'a': 0 }, new Foo, new Bar);
17212
+ * // => { 'a': 1, 'c': 3 }
17213
+ */
17214
+ var assign = createAssigner(function(object, source) {
17215
+ if (isPrototype(source) || isArrayLike(source)) {
17216
+ copyObject(source, keys(source), object);
17217
+ return;
17218
+ }
17219
+ for (var key in source) {
17220
+ if (hasOwnProperty.call(source, key)) {
17221
+ assignValue(object, key, source[key]);
17222
+ }
17223
+ }
17224
+ });
17225
+
17226
+ /**
17227
+ * This method is like `_.assign` except that it iterates over own and
17228
+ * inherited source properties.
17229
+ *
17230
+ * **Note:** This method mutates `object`.
17231
+ *
17232
+ * @static
17233
+ * @memberOf _
17234
+ * @since 4.0.0
17235
+ * @alias extend
17236
+ * @category Object
17237
+ * @param {Object} object The destination object.
17238
+ * @param {...Object} [sources] The source objects.
17239
+ * @returns {Object} Returns `object`.
17240
+ * @see _.assign
17241
+ * @example
17242
+ *
17243
+ * function Foo() {
17244
+ * this.a = 1;
17245
+ * }
17246
+ *
17247
+ * function Bar() {
17248
+ * this.c = 3;
17249
+ * }
17250
+ *
17251
+ * Foo.prototype.b = 2;
17252
+ * Bar.prototype.d = 4;
17253
+ *
17254
+ * _.assignIn({ 'a': 0 }, new Foo, new Bar);
17255
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
17256
+ */
17257
+ var assignIn = createAssigner(function(object, source) {
17258
+ copyObject(source, keysIn(source), object);
17259
+ });
17260
+
17261
+ /**
17262
+ * This method is like `_.assignIn` except that it accepts `customizer`
17263
+ * which is invoked to produce the assigned values. If `customizer` returns
17264
+ * `undefined`, assignment is handled by the method instead. The `customizer`
17265
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
17266
+ *
17267
+ * **Note:** This method mutates `object`.
17268
+ *
17269
+ * @static
17270
+ * @memberOf _
17271
+ * @since 4.0.0
17272
+ * @alias extendWith
17273
+ * @category Object
17274
+ * @param {Object} object The destination object.
17275
+ * @param {...Object} sources The source objects.
17276
+ * @param {Function} [customizer] The function to customize assigned values.
17277
+ * @returns {Object} Returns `object`.
17278
+ * @see _.assignWith
17279
+ * @example
17280
+ *
17281
+ * function customizer(objValue, srcValue) {
17282
+ * return _.isUndefined(objValue) ? srcValue : objValue;
17283
+ * }
17284
+ *
17285
+ * var defaults = _.partialRight(_.assignInWith, customizer);
17286
+ *
17287
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
17288
+ * // => { 'a': 1, 'b': 2 }
17289
+ */
17290
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
17291
+ copyObject(source, keysIn(source), object, customizer);
17292
+ });
17293
+
17294
+ /**
17295
+ * This method is like `_.assign` except that it accepts `customizer`
17296
+ * which is invoked to produce the assigned values. If `customizer` returns
17297
+ * `undefined`, assignment is handled by the method instead. The `customizer`
17298
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
17299
+ *
17300
+ * **Note:** This method mutates `object`.
17301
+ *
17302
+ * @static
17303
+ * @memberOf _
17304
+ * @since 4.0.0
17305
+ * @category Object
17306
+ * @param {Object} object The destination object.
17307
+ * @param {...Object} sources The source objects.
17308
+ * @param {Function} [customizer] The function to customize assigned values.
17309
+ * @returns {Object} Returns `object`.
17310
+ * @see _.assignInWith
17311
+ * @example
17312
+ *
17313
+ * function customizer(objValue, srcValue) {
17314
+ * return _.isUndefined(objValue) ? srcValue : objValue;
17315
+ * }
17316
+ *
17317
+ * var defaults = _.partialRight(_.assignWith, customizer);
17318
+ *
17319
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
17320
+ * // => { 'a': 1, 'b': 2 }
17321
+ */
17322
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
17323
+ copyObject(source, keys(source), object, customizer);
17324
+ });
17325
+
17326
+ /**
17327
+ * Creates an array of values corresponding to `paths` of `object`.
17328
+ *
17329
+ * @static
17330
+ * @memberOf _
17331
+ * @since 1.0.0
17332
+ * @category Object
17333
+ * @param {Object} object The object to iterate over.
17334
+ * @param {...(string|string[])} [paths] The property paths to pick.
17335
+ * @returns {Array} Returns the picked values.
17336
+ * @example
17337
+ *
17338
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
17339
+ *
17340
+ * _.at(object, ['a[0].b.c', 'a[1]']);
17341
+ * // => [3, 4]
17342
+ */
17343
+ var at = flatRest(baseAt);
17344
+
17345
+ /**
17346
+ * Creates an object that inherits from the `prototype` object. If a
17347
+ * `properties` object is given, its own enumerable string keyed properties
17348
+ * are assigned to the created object.
17349
+ *
17350
+ * @static
17351
+ * @memberOf _
17352
+ * @since 2.3.0
17353
+ * @category Object
17354
+ * @param {Object} prototype The object to inherit from.
17355
+ * @param {Object} [properties] The properties to assign to the object.
17356
+ * @returns {Object} Returns the new object.
17357
+ * @example
17358
+ *
17359
+ * function Shape() {
17360
+ * this.x = 0;
17361
+ * this.y = 0;
17362
+ * }
17363
+ *
17364
+ * function Circle() {
17365
+ * Shape.call(this);
17366
+ * }
17367
+ *
17368
+ * Circle.prototype = _.create(Shape.prototype, {
17369
+ * 'constructor': Circle
17370
+ * });
17371
+ *
17372
+ * var circle = new Circle;
17373
+ * circle instanceof Circle;
17374
+ * // => true
17375
+ *
17376
+ * circle instanceof Shape;
17377
+ * // => true
17378
+ */
17379
+ function create(prototype, properties) {
17380
+ var result = baseCreate(prototype);
17381
+ return properties == null ? result : baseAssign(result, properties);
17382
+ }
17383
+
17384
+ /**
17385
+ * Assigns own and inherited enumerable string keyed properties of source
17386
+ * objects to the destination object for all destination properties that
17387
+ * resolve to `undefined`. Source objects are applied from left to right.
17388
+ * Once a property is set, additional values of the same property are ignored.
17389
+ *
17390
+ * **Note:** This method mutates `object`.
17391
+ *
17392
+ * @static
17393
+ * @since 0.1.0
17394
+ * @memberOf _
17395
+ * @category Object
17396
+ * @param {Object} object The destination object.
17397
+ * @param {...Object} [sources] The source objects.
17398
+ * @returns {Object} Returns `object`.
17399
+ * @see _.defaultsDeep
17400
+ * @example
17401
+ *
17402
+ * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
17403
+ * // => { 'a': 1, 'b': 2 }
17404
+ */
17405
+ var defaults = baseRest(function(object, sources) {
17406
+ object = Object(object);
17407
+
17408
+ var index = -1;
17409
+ var length = sources.length;
17410
+ var guard = length > 2 ? sources[2] : undefined;
17411
+
17412
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
17413
+ length = 1;
17414
+ }
17415
+
17416
+ while (++index < length) {
17417
+ var source = sources[index];
17418
+ var props = keysIn(source);
17419
+ var propsIndex = -1;
17420
+ var propsLength = props.length;
17421
+
17422
+ while (++propsIndex < propsLength) {
17423
+ var key = props[propsIndex];
17424
+ var value = object[key];
17425
+
17426
+ if (value === undefined ||
17427
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
17428
+ object[key] = source[key];
17429
+ }
17430
+ }
17431
+ }
17432
+
17433
+ return object;
17434
+ });
17435
+
17436
+ /**
17437
+ * This method is like `_.defaults` except that it recursively assigns
17438
+ * default properties.
17439
+ *
17440
+ * **Note:** This method mutates `object`.
17441
+ *
17442
+ * @static
17443
+ * @memberOf _
17444
+ * @since 3.10.0
17445
+ * @category Object
17446
+ * @param {Object} object The destination object.
17447
+ * @param {...Object} [sources] The source objects.
17448
+ * @returns {Object} Returns `object`.
17449
+ * @see _.defaults
17450
+ * @example
17451
+ *
17452
+ * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
17453
+ * // => { 'a': { 'b': 2, 'c': 3 } }
17454
+ */
17455
+ var defaultsDeep = baseRest(function(args) {
17456
+ args.push(undefined, customDefaultsMerge);
17457
+ return apply(mergeWith, undefined, args);
17458
+ });
17459
+
17460
+ /**
17461
+ * This method is like `_.find` except that it returns the key of the first
17462
+ * element `predicate` returns truthy for instead of the element itself.
17463
+ *
17464
+ * @static
17465
+ * @memberOf _
17466
+ * @since 1.1.0
17467
+ * @category Object
17468
+ * @param {Object} object The object to inspect.
17469
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
17470
+ * @returns {string|undefined} Returns the key of the matched element,
17471
+ * else `undefined`.
17472
+ * @example
17473
+ *
17474
+ * var users = {
17475
+ * 'barney': { 'age': 36, 'active': true },
17476
+ * 'fred': { 'age': 40, 'active': false },
17477
+ * 'pebbles': { 'age': 1, 'active': true }
17478
+ * };
17479
+ *
17480
+ * _.findKey(users, function(o) { return o.age < 40; });
17481
+ * // => 'barney' (iteration order is not guaranteed)
17482
+ *
17483
+ * // The `_.matches` iteratee shorthand.
17484
+ * _.findKey(users, { 'age': 1, 'active': true });
17485
+ * // => 'pebbles'
17486
+ *
17487
+ * // The `_.matchesProperty` iteratee shorthand.
17488
+ * _.findKey(users, ['active', false]);
17489
+ * // => 'fred'
17490
+ *
17491
+ * // The `_.property` iteratee shorthand.
17492
+ * _.findKey(users, 'active');
17493
+ * // => 'barney'
17494
+ */
17495
+ function findKey(object, predicate) {
17496
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
17497
+ }
17498
+
17499
+ /**
17500
+ * This method is like `_.findKey` except that it iterates over elements of
17501
+ * a collection in the opposite order.
17502
+ *
17503
+ * @static
17504
+ * @memberOf _
17505
+ * @since 2.0.0
17506
+ * @category Object
17507
+ * @param {Object} object The object to inspect.
17508
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
17509
+ * @returns {string|undefined} Returns the key of the matched element,
17510
+ * else `undefined`.
17511
+ * @example
17512
+ *
17513
+ * var users = {
17514
+ * 'barney': { 'age': 36, 'active': true },
17515
+ * 'fred': { 'age': 40, 'active': false },
17516
+ * 'pebbles': { 'age': 1, 'active': true }
17517
+ * };
17518
+ *
17519
+ * _.findLastKey(users, function(o) { return o.age < 40; });
17520
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
17521
+ *
17522
+ * // The `_.matches` iteratee shorthand.
17523
+ * _.findLastKey(users, { 'age': 36, 'active': true });
17524
+ * // => 'barney'
17525
+ *
17526
+ * // The `_.matchesProperty` iteratee shorthand.
17527
+ * _.findLastKey(users, ['active', false]);
17528
+ * // => 'fred'
17529
+ *
17530
+ * // The `_.property` iteratee shorthand.
17531
+ * _.findLastKey(users, 'active');
17532
+ * // => 'pebbles'
17533
+ */
17534
+ function findLastKey(object, predicate) {
17535
+ return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
17536
+ }
17537
+
17538
+ /**
17539
+ * Iterates over own and inherited enumerable string keyed properties of an
17540
+ * object and invokes `iteratee` for each property. The iteratee is invoked
17541
+ * with three arguments: (value, key, object). Iteratee functions may exit
17542
+ * iteration early by explicitly returning `false`.
17543
+ *
17544
+ * @static
17545
+ * @memberOf _
17546
+ * @since 0.3.0
17547
+ * @category Object
17548
+ * @param {Object} object The object to iterate over.
17549
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17550
+ * @returns {Object} Returns `object`.
17551
+ * @see _.forInRight
17552
+ * @example
17553
+ *
17554
+ * function Foo() {
17555
+ * this.a = 1;
17556
+ * this.b = 2;
17557
+ * }
17558
+ *
17559
+ * Foo.prototype.c = 3;
17560
+ *
17561
+ * _.forIn(new Foo, function(value, key) {
17562
+ * console.log(key);
17563
+ * });
17564
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
17565
+ */
17566
+ function forIn(object, iteratee) {
17567
+ return object == null
17568
+ ? object
17569
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
17570
+ }
17571
+
17572
+ /**
17573
+ * This method is like `_.forIn` except that it iterates over properties of
17574
+ * `object` in the opposite order.
17575
+ *
17576
+ * @static
17577
+ * @memberOf _
17578
+ * @since 2.0.0
17579
+ * @category Object
17580
+ * @param {Object} object The object to iterate over.
17581
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17582
+ * @returns {Object} Returns `object`.
17583
+ * @see _.forIn
17584
+ * @example
17585
+ *
17586
+ * function Foo() {
17587
+ * this.a = 1;
17588
+ * this.b = 2;
17589
+ * }
17590
+ *
17591
+ * Foo.prototype.c = 3;
17592
+ *
17593
+ * _.forInRight(new Foo, function(value, key) {
17594
+ * console.log(key);
17595
+ * });
17596
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
17597
+ */
17598
+ function forInRight(object, iteratee) {
17599
+ return object == null
17600
+ ? object
17601
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
17602
+ }
17603
+
17604
+ /**
17605
+ * Iterates over own enumerable string keyed properties of an object and
17606
+ * invokes `iteratee` for each property. The iteratee is invoked with three
17607
+ * arguments: (value, key, object). Iteratee functions may exit iteration
17608
+ * early by explicitly returning `false`.
17609
+ *
17610
+ * @static
17611
+ * @memberOf _
17612
+ * @since 0.3.0
17613
+ * @category Object
17614
+ * @param {Object} object The object to iterate over.
17615
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17616
+ * @returns {Object} Returns `object`.
17617
+ * @see _.forOwnRight
17618
+ * @example
17619
+ *
17620
+ * function Foo() {
17621
+ * this.a = 1;
17622
+ * this.b = 2;
17623
+ * }
17624
+ *
17625
+ * Foo.prototype.c = 3;
17626
+ *
17627
+ * _.forOwn(new Foo, function(value, key) {
17628
+ * console.log(key);
17629
+ * });
17630
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
17631
+ */
17632
+ function forOwn(object, iteratee) {
17633
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
17634
+ }
17635
+
17636
+ /**
17637
+ * This method is like `_.forOwn` except that it iterates over properties of
17638
+ * `object` in the opposite order.
17639
+ *
17640
+ * @static
17641
+ * @memberOf _
17642
+ * @since 2.0.0
17643
+ * @category Object
17644
+ * @param {Object} object The object to iterate over.
17645
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17646
+ * @returns {Object} Returns `object`.
17647
+ * @see _.forOwn
17648
+ * @example
17649
+ *
17650
+ * function Foo() {
17651
+ * this.a = 1;
17652
+ * this.b = 2;
17653
+ * }
17654
+ *
17655
+ * Foo.prototype.c = 3;
17656
+ *
17657
+ * _.forOwnRight(new Foo, function(value, key) {
17658
+ * console.log(key);
17659
+ * });
17660
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
17661
+ */
17662
+ function forOwnRight(object, iteratee) {
17663
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
17664
+ }
17665
+
17666
+ /**
17667
+ * Creates an array of function property names from own enumerable properties
17668
+ * of `object`.
17669
+ *
17670
+ * @static
17671
+ * @since 0.1.0
17672
+ * @memberOf _
17673
+ * @category Object
17674
+ * @param {Object} object The object to inspect.
17675
+ * @returns {Array} Returns the function names.
17676
+ * @see _.functionsIn
17677
+ * @example
17678
+ *
17679
+ * function Foo() {
17680
+ * this.a = _.constant('a');
17681
+ * this.b = _.constant('b');
17682
+ * }
17683
+ *
17684
+ * Foo.prototype.c = _.constant('c');
17685
+ *
17686
+ * _.functions(new Foo);
17687
+ * // => ['a', 'b']
17688
+ */
17689
+ function functions(object) {
17690
+ return object == null ? [] : baseFunctions(object, keys(object));
17691
+ }
17692
+
17693
+ /**
17694
+ * Creates an array of function property names from own and inherited
17695
+ * enumerable properties of `object`.
17696
+ *
17697
+ * @static
17698
+ * @memberOf _
17699
+ * @since 4.0.0
17700
+ * @category Object
17701
+ * @param {Object} object The object to inspect.
17702
+ * @returns {Array} Returns the function names.
17703
+ * @see _.functions
17704
+ * @example
17705
+ *
17706
+ * function Foo() {
17707
+ * this.a = _.constant('a');
17708
+ * this.b = _.constant('b');
17709
+ * }
17710
+ *
17711
+ * Foo.prototype.c = _.constant('c');
17712
+ *
17713
+ * _.functionsIn(new Foo);
17714
+ * // => ['a', 'b', 'c']
17715
+ */
17716
+ function functionsIn(object) {
17717
+ return object == null ? [] : baseFunctions(object, keysIn(object));
17718
+ }
17719
+
17720
+ /**
17721
+ * Gets the value at `path` of `object`. If the resolved value is
17722
+ * `undefined`, the `defaultValue` is returned in its place.
17723
+ *
17724
+ * @static
17725
+ * @memberOf _
17726
+ * @since 3.7.0
17727
+ * @category Object
17728
+ * @param {Object} object The object to query.
17729
+ * @param {Array|string} path The path of the property to get.
17730
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
17731
+ * @returns {*} Returns the resolved value.
17732
+ * @example
17733
+ *
17734
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
17735
+ *
17736
+ * _.get(object, 'a[0].b.c');
17737
+ * // => 3
17738
+ *
17739
+ * _.get(object, ['a', '0', 'b', 'c']);
17740
+ * // => 3
17741
+ *
17742
+ * _.get(object, 'a.b.c', 'default');
17743
+ * // => 'default'
17744
+ */
17745
+ function get(object, path, defaultValue) {
17746
+ var result = object == null ? undefined : baseGet(object, path);
17747
+ return result === undefined ? defaultValue : result;
17748
+ }
17749
+
17750
+ /**
17751
+ * Checks if `path` is a direct property of `object`.
17752
+ *
17753
+ * @static
17754
+ * @since 0.1.0
17755
+ * @memberOf _
17756
+ * @category Object
17757
+ * @param {Object} object The object to query.
17758
+ * @param {Array|string} path The path to check.
17759
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
17760
+ * @example
17761
+ *
17762
+ * var object = { 'a': { 'b': 2 } };
17763
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
17764
+ *
17765
+ * _.has(object, 'a');
17766
+ * // => true
17767
+ *
17768
+ * _.has(object, 'a.b');
17769
+ * // => true
17770
+ *
17771
+ * _.has(object, ['a', 'b']);
17772
+ * // => true
17773
+ *
17774
+ * _.has(other, 'a');
17775
+ * // => false
17776
+ */
17777
+ function has(object, path) {
17778
+ return object != null && hasPath(object, path, baseHas);
17779
+ }
17780
+
17781
+ /**
17782
+ * Checks if `path` is a direct or inherited property of `object`.
17783
+ *
17784
+ * @static
17785
+ * @memberOf _
17786
+ * @since 4.0.0
17787
+ * @category Object
17788
+ * @param {Object} object The object to query.
17789
+ * @param {Array|string} path The path to check.
17790
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
17791
+ * @example
17792
+ *
17793
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
17794
+ *
17795
+ * _.hasIn(object, 'a');
17796
+ * // => true
17797
+ *
17798
+ * _.hasIn(object, 'a.b');
17799
+ * // => true
17800
+ *
17801
+ * _.hasIn(object, ['a', 'b']);
17802
+ * // => true
17803
+ *
17804
+ * _.hasIn(object, 'b');
17805
+ * // => false
17806
+ */
17807
+ function hasIn(object, path) {
17808
+ return object != null && hasPath(object, path, baseHasIn);
17809
+ }
17810
+
17811
+ /**
17812
+ * Creates an object composed of the inverted keys and values of `object`.
17813
+ * If `object` contains duplicate values, subsequent values overwrite
17814
+ * property assignments of previous values.
17815
+ *
17816
+ * @static
17817
+ * @memberOf _
17818
+ * @since 0.7.0
17819
+ * @category Object
17820
+ * @param {Object} object The object to invert.
17821
+ * @returns {Object} Returns the new inverted object.
17822
+ * @example
17823
+ *
17824
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
17825
+ *
17826
+ * _.invert(object);
17827
+ * // => { '1': 'c', '2': 'b' }
17828
+ */
17829
+ var invert = createInverter(function(result, value, key) {
17830
+ if (value != null &&
17831
+ typeof value.toString != 'function') {
17832
+ value = nativeObjectToString.call(value);
17833
+ }
17834
+
17835
+ result[value] = key;
17836
+ }, constant(identity));
17837
+
17838
+ /**
17839
+ * This method is like `_.invert` except that the inverted object is generated
17840
+ * from the results of running each element of `object` thru `iteratee`. The
17841
+ * corresponding inverted value of each inverted key is an array of keys
17842
+ * responsible for generating the inverted value. The iteratee is invoked
17843
+ * with one argument: (value).
17844
+ *
17845
+ * @static
17846
+ * @memberOf _
17847
+ * @since 4.1.0
17848
+ * @category Object
17849
+ * @param {Object} object The object to invert.
17850
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
17851
+ * @returns {Object} Returns the new inverted object.
17852
+ * @example
17853
+ *
17854
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
17855
+ *
17856
+ * _.invertBy(object);
17857
+ * // => { '1': ['a', 'c'], '2': ['b'] }
17858
+ *
17859
+ * _.invertBy(object, function(value) {
17860
+ * return 'group' + value;
17861
+ * });
17862
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
17863
+ */
17864
+ var invertBy = createInverter(function(result, value, key) {
17865
+ if (value != null &&
17866
+ typeof value.toString != 'function') {
17867
+ value = nativeObjectToString.call(value);
17868
+ }
17869
+
17870
+ if (hasOwnProperty.call(result, value)) {
17871
+ result[value].push(key);
17872
+ } else {
17873
+ result[value] = [key];
17874
+ }
17875
+ }, getIteratee);
17876
+
17877
+ /**
17878
+ * Invokes the method at `path` of `object`.
17879
+ *
17880
+ * @static
17881
+ * @memberOf _
17882
+ * @since 4.0.0
17883
+ * @category Object
17884
+ * @param {Object} object The object to query.
17885
+ * @param {Array|string} path The path of the method to invoke.
17886
+ * @param {...*} [args] The arguments to invoke the method with.
17887
+ * @returns {*} Returns the result of the invoked method.
17888
+ * @example
17889
+ *
17890
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
17891
+ *
17892
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
17893
+ * // => [2, 3]
17894
+ */
17895
+ var invoke = baseRest(baseInvoke);
17896
+
17897
+ /**
17898
+ * Creates an array of the own enumerable property names of `object`.
17899
+ *
17900
+ * **Note:** Non-object values are coerced to objects. See the
17901
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
17902
+ * for more details.
17903
+ *
17904
+ * @static
17905
+ * @since 0.1.0
17906
+ * @memberOf _
17907
+ * @category Object
17908
+ * @param {Object} object The object to query.
17909
+ * @returns {Array} Returns the array of property names.
17910
+ * @example
17911
+ *
17912
+ * function Foo() {
17913
+ * this.a = 1;
17914
+ * this.b = 2;
17915
+ * }
17916
+ *
17917
+ * Foo.prototype.c = 3;
17918
+ *
17919
+ * _.keys(new Foo);
17920
+ * // => ['a', 'b'] (iteration order is not guaranteed)
17921
+ *
17922
+ * _.keys('hi');
17923
+ * // => ['0', '1']
17924
+ */
17925
+ function keys(object) {
17926
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
17927
+ }
17928
+
17929
+ /**
17930
+ * Creates an array of the own and inherited enumerable property names of `object`.
17931
+ *
17932
+ * **Note:** Non-object values are coerced to objects.
17933
+ *
17934
+ * @static
17935
+ * @memberOf _
17936
+ * @since 3.0.0
17937
+ * @category Object
17938
+ * @param {Object} object The object to query.
17939
+ * @returns {Array} Returns the array of property names.
17940
+ * @example
17941
+ *
17942
+ * function Foo() {
17943
+ * this.a = 1;
17944
+ * this.b = 2;
17945
+ * }
17946
+ *
17947
+ * Foo.prototype.c = 3;
17948
+ *
17949
+ * _.keysIn(new Foo);
17950
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
17951
+ */
17952
+ function keysIn(object) {
17953
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
17954
+ }
17955
+
17956
+ /**
17957
+ * The opposite of `_.mapValues`; this method creates an object with the
17958
+ * same values as `object` and keys generated by running each own enumerable
17959
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
17960
+ * with three arguments: (value, key, object).
17961
+ *
17962
+ * @static
17963
+ * @memberOf _
17964
+ * @since 3.8.0
17965
+ * @category Object
17966
+ * @param {Object} object The object to iterate over.
17967
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17968
+ * @returns {Object} Returns the new mapped object.
17969
+ * @see _.mapValues
17970
+ * @example
17971
+ *
17972
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
17973
+ * return key + value;
17974
+ * });
17975
+ * // => { 'a1': 1, 'b2': 2 }
17976
+ */
17977
+ function mapKeys(object, iteratee) {
17978
+ var result = {};
17979
+ iteratee = getIteratee(iteratee, 3);
17980
+
17981
+ baseForOwn(object, function(value, key, object) {
17982
+ baseAssignValue(result, iteratee(value, key, object), value);
17983
+ });
17984
+ return result;
17985
+ }
17986
+
17987
+ /**
17988
+ * Creates an object with the same keys as `object` and values generated
17989
+ * by running each own enumerable string keyed property of `object` thru
17990
+ * `iteratee`. The iteratee is invoked with three arguments:
17991
+ * (value, key, object).
17992
+ *
17993
+ * @static
17994
+ * @memberOf _
17995
+ * @since 2.4.0
17996
+ * @category Object
17997
+ * @param {Object} object The object to iterate over.
17998
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
17999
+ * @returns {Object} Returns the new mapped object.
18000
+ * @see _.mapKeys
18001
+ * @example
18002
+ *
18003
+ * var users = {
18004
+ * 'fred': { 'user': 'fred', 'age': 40 },
18005
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
18006
+ * };
18007
+ *
18008
+ * _.mapValues(users, function(o) { return o.age; });
18009
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
18010
+ *
18011
+ * // The `_.property` iteratee shorthand.
18012
+ * _.mapValues(users, 'age');
18013
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
18014
+ */
18015
+ function mapValues(object, iteratee) {
18016
+ var result = {};
18017
+ iteratee = getIteratee(iteratee, 3);
18018
+
18019
+ baseForOwn(object, function(value, key, object) {
18020
+ baseAssignValue(result, key, iteratee(value, key, object));
18021
+ });
18022
+ return result;
18023
+ }
18024
+
18025
+ /**
18026
+ * This method is like `_.assign` except that it recursively merges own and
18027
+ * inherited enumerable string keyed properties of source objects into the
18028
+ * destination object. Source properties that resolve to `undefined` are
18029
+ * skipped if a destination value exists. Array and plain object properties
18030
+ * are merged recursively. Other objects and value types are overridden by
18031
+ * assignment. Source objects are applied from left to right. Subsequent
18032
+ * sources overwrite property assignments of previous sources.
18033
+ *
18034
+ * **Note:** This method mutates `object`.
18035
+ *
18036
+ * @static
18037
+ * @memberOf _
18038
+ * @since 0.5.0
18039
+ * @category Object
18040
+ * @param {Object} object The destination object.
18041
+ * @param {...Object} [sources] The source objects.
18042
+ * @returns {Object} Returns `object`.
18043
+ * @example
18044
+ *
18045
+ * var object = {
18046
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
18047
+ * };
18048
+ *
18049
+ * var other = {
18050
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
18051
+ * };
18052
+ *
18053
+ * _.merge(object, other);
18054
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
18055
+ */
18056
+ var merge = createAssigner(function(object, source, srcIndex) {
18057
+ baseMerge(object, source, srcIndex);
18058
+ });
18059
+
18060
+ /**
18061
+ * This method is like `_.merge` except that it accepts `customizer` which
18062
+ * is invoked to produce the merged values of the destination and source
18063
+ * properties. If `customizer` returns `undefined`, merging is handled by the
18064
+ * method instead. The `customizer` is invoked with six arguments:
18065
+ * (objValue, srcValue, key, object, source, stack).
18066
+ *
18067
+ * **Note:** This method mutates `object`.
18068
+ *
18069
+ * @static
18070
+ * @memberOf _
18071
+ * @since 4.0.0
18072
+ * @category Object
18073
+ * @param {Object} object The destination object.
18074
+ * @param {...Object} sources The source objects.
18075
+ * @param {Function} customizer The function to customize assigned values.
18076
+ * @returns {Object} Returns `object`.
18077
+ * @example
18078
+ *
18079
+ * function customizer(objValue, srcValue) {
18080
+ * if (_.isArray(objValue)) {
18081
+ * return objValue.concat(srcValue);
18082
+ * }
18083
+ * }
18084
+ *
18085
+ * var object = { 'a': [1], 'b': [2] };
18086
+ * var other = { 'a': [3], 'b': [4] };
18087
+ *
18088
+ * _.mergeWith(object, other, customizer);
18089
+ * // => { 'a': [1, 3], 'b': [2, 4] }
18090
+ */
18091
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
18092
+ baseMerge(object, source, srcIndex, customizer);
18093
+ });
18094
+
18095
+ /**
18096
+ * The opposite of `_.pick`; this method creates an object composed of the
18097
+ * own and inherited enumerable property paths of `object` that are not omitted.
18098
+ *
18099
+ * **Note:** This method is considerably slower than `_.pick`.
18100
+ *
18101
+ * @static
18102
+ * @since 0.1.0
18103
+ * @memberOf _
18104
+ * @category Object
18105
+ * @param {Object} object The source object.
18106
+ * @param {...(string|string[])} [paths] The property paths to omit.
18107
+ * @returns {Object} Returns the new object.
18108
+ * @example
18109
+ *
18110
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
18111
+ *
18112
+ * _.omit(object, ['a', 'c']);
18113
+ * // => { 'b': '2' }
18114
+ */
18115
+ var omit = flatRest(function(object, paths) {
18116
+ var result = {};
18117
+ if (object == null) {
18118
+ return result;
18119
+ }
18120
+ var isDeep = false;
18121
+ paths = arrayMap(paths, function(path) {
18122
+ path = castPath(path, object);
18123
+ isDeep || (isDeep = path.length > 1);
18124
+ return path;
18125
+ });
18126
+ copyObject(object, getAllKeysIn(object), result);
18127
+ if (isDeep) {
18128
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
18129
+ }
18130
+ var length = paths.length;
18131
+ while (length--) {
18132
+ baseUnset(result, paths[length]);
18133
+ }
18134
+ return result;
18135
+ });
18136
+
18137
+ /**
18138
+ * The opposite of `_.pickBy`; this method creates an object composed of
18139
+ * the own and inherited enumerable string keyed properties of `object` that
18140
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
18141
+ * arguments: (value, key).
18142
+ *
18143
+ * @static
18144
+ * @memberOf _
18145
+ * @since 4.0.0
18146
+ * @category Object
18147
+ * @param {Object} object The source object.
18148
+ * @param {Function} [predicate=_.identity] The function invoked per property.
18149
+ * @returns {Object} Returns the new object.
18150
+ * @example
18151
+ *
18152
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
18153
+ *
18154
+ * _.omitBy(object, _.isNumber);
18155
+ * // => { 'b': '2' }
18156
+ */
18157
+ function omitBy(object, predicate) {
18158
+ return pickBy(object, negate(getIteratee(predicate)));
18159
+ }
18160
+
18161
+ /**
18162
+ * Creates an object composed of the picked `object` properties.
18163
+ *
18164
+ * @static
18165
+ * @since 0.1.0
18166
+ * @memberOf _
18167
+ * @category Object
18168
+ * @param {Object} object The source object.
18169
+ * @param {...(string|string[])} [paths] The property paths to pick.
18170
+ * @returns {Object} Returns the new object.
18171
+ * @example
18172
+ *
18173
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
18174
+ *
18175
+ * _.pick(object, ['a', 'c']);
18176
+ * // => { 'a': 1, 'c': 3 }
18177
+ */
18178
+ var pick = flatRest(function(object, paths) {
18179
+ return object == null ? {} : basePick(object, paths);
18180
+ });
18181
+
18182
+ /**
18183
+ * Creates an object composed of the `object` properties `predicate` returns
18184
+ * truthy for. The predicate is invoked with two arguments: (value, key).
18185
+ *
18186
+ * @static
18187
+ * @memberOf _
18188
+ * @since 4.0.0
18189
+ * @category Object
18190
+ * @param {Object} object The source object.
18191
+ * @param {Function} [predicate=_.identity] The function invoked per property.
18192
+ * @returns {Object} Returns the new object.
18193
+ * @example
18194
+ *
18195
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
18196
+ *
18197
+ * _.pickBy(object, _.isNumber);
18198
+ * // => { 'a': 1, 'c': 3 }
18199
+ */
18200
+ function pickBy(object, predicate) {
18201
+ if (object == null) {
18202
+ return {};
18203
+ }
18204
+ var props = arrayMap(getAllKeysIn(object), function(prop) {
18205
+ return [prop];
18206
+ });
18207
+ predicate = getIteratee(predicate);
18208
+ return basePickBy(object, props, function(value, path) {
18209
+ return predicate(value, path[0]);
18210
+ });
18211
+ }
18212
+
18213
+ /**
18214
+ * This method is like `_.get` except that if the resolved value is a
18215
+ * function it's invoked with the `this` binding of its parent object and
18216
+ * its result is returned.
18217
+ *
18218
+ * @static
18219
+ * @since 0.1.0
18220
+ * @memberOf _
18221
+ * @category Object
18222
+ * @param {Object} object The object to query.
18223
+ * @param {Array|string} path The path of the property to resolve.
18224
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
18225
+ * @returns {*} Returns the resolved value.
18226
+ * @example
18227
+ *
18228
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
18229
+ *
18230
+ * _.result(object, 'a[0].b.c1');
18231
+ * // => 3
18232
+ *
18233
+ * _.result(object, 'a[0].b.c2');
18234
+ * // => 4
18235
+ *
18236
+ * _.result(object, 'a[0].b.c3', 'default');
18237
+ * // => 'default'
18238
+ *
18239
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
18240
+ * // => 'default'
18241
+ */
18242
+ function result(object, path, defaultValue) {
18243
+ path = castPath(path, object);
18244
+
18245
+ var index = -1,
18246
+ length = path.length;
18247
+
18248
+ // Ensure the loop is entered when path is empty.
18249
+ if (!length) {
18250
+ length = 1;
18251
+ object = undefined;
18252
+ }
18253
+ while (++index < length) {
18254
+ var value = object == null ? undefined : object[toKey(path[index])];
18255
+ if (value === undefined) {
18256
+ index = length;
18257
+ value = defaultValue;
18258
+ }
18259
+ object = isFunction(value) ? value.call(object) : value;
18260
+ }
18261
+ return object;
18262
+ }
18263
+
18264
+ /**
18265
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
18266
+ * it's created. Arrays are created for missing index properties while objects
18267
+ * are created for all other missing properties. Use `_.setWith` to customize
18268
+ * `path` creation.
18269
+ *
18270
+ * **Note:** This method mutates `object`.
18271
+ *
18272
+ * @static
18273
+ * @memberOf _
18274
+ * @since 3.7.0
18275
+ * @category Object
18276
+ * @param {Object} object The object to modify.
18277
+ * @param {Array|string} path The path of the property to set.
18278
+ * @param {*} value The value to set.
18279
+ * @returns {Object} Returns `object`.
18280
+ * @example
18281
+ *
18282
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
18283
+ *
18284
+ * _.set(object, 'a[0].b.c', 4);
18285
+ * console.log(object.a[0].b.c);
18286
+ * // => 4
18287
+ *
18288
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
18289
+ * console.log(object.x[0].y.z);
18290
+ * // => 5
18291
+ */
18292
+ function set(object, path, value) {
18293
+ return object == null ? object : baseSet(object, path, value);
18294
+ }
18295
+
18296
+ /**
18297
+ * This method is like `_.set` except that it accepts `customizer` which is
18298
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
18299
+ * path creation is handled by the method instead. The `customizer` is invoked
18300
+ * with three arguments: (nsValue, key, nsObject).
18301
+ *
18302
+ * **Note:** This method mutates `object`.
18303
+ *
18304
+ * @static
18305
+ * @memberOf _
18306
+ * @since 4.0.0
18307
+ * @category Object
18308
+ * @param {Object} object The object to modify.
18309
+ * @param {Array|string} path The path of the property to set.
18310
+ * @param {*} value The value to set.
18311
+ * @param {Function} [customizer] The function to customize assigned values.
18312
+ * @returns {Object} Returns `object`.
18313
+ * @example
18314
+ *
18315
+ * var object = {};
18316
+ *
18317
+ * _.setWith(object, '[0][1]', 'a', Object);
18318
+ * // => { '0': { '1': 'a' } }
18319
+ */
18320
+ function setWith(object, path, value, customizer) {
18321
+ customizer = typeof customizer == 'function' ? customizer : undefined;
18322
+ return object == null ? object : baseSet(object, path, value, customizer);
18323
+ }
18324
+
18325
+ /**
18326
+ * Creates an array of own enumerable string keyed-value pairs for `object`
18327
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
18328
+ * entries are returned.
18329
+ *
18330
+ * @static
18331
+ * @memberOf _
18332
+ * @since 4.0.0
18333
+ * @alias entries
18334
+ * @category Object
18335
+ * @param {Object} object The object to query.
18336
+ * @returns {Array} Returns the key-value pairs.
18337
+ * @example
18338
+ *
18339
+ * function Foo() {
18340
+ * this.a = 1;
18341
+ * this.b = 2;
18342
+ * }
18343
+ *
18344
+ * Foo.prototype.c = 3;
18345
+ *
18346
+ * _.toPairs(new Foo);
18347
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
18348
+ */
18349
+ var toPairs = createToPairs(keys);
18350
+
18351
+ /**
18352
+ * Creates an array of own and inherited enumerable string keyed-value pairs
18353
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
18354
+ * or set, its entries are returned.
18355
+ *
18356
+ * @static
18357
+ * @memberOf _
18358
+ * @since 4.0.0
18359
+ * @alias entriesIn
18360
+ * @category Object
18361
+ * @param {Object} object The object to query.
18362
+ * @returns {Array} Returns the key-value pairs.
18363
+ * @example
18364
+ *
18365
+ * function Foo() {
18366
+ * this.a = 1;
18367
+ * this.b = 2;
18368
+ * }
18369
+ *
18370
+ * Foo.prototype.c = 3;
18371
+ *
18372
+ * _.toPairsIn(new Foo);
18373
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
18374
+ */
18375
+ var toPairsIn = createToPairs(keysIn);
18376
+
18377
+ /**
18378
+ * An alternative to `_.reduce`; this method transforms `object` to a new
18379
+ * `accumulator` object which is the result of running each of its own
18380
+ * enumerable string keyed properties thru `iteratee`, with each invocation
18381
+ * potentially mutating the `accumulator` object. If `accumulator` is not
18382
+ * provided, a new object with the same `[[Prototype]]` will be used. The
18383
+ * iteratee is invoked with four arguments: (accumulator, value, key, object).
18384
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
18385
+ *
18386
+ * @static
18387
+ * @memberOf _
18388
+ * @since 1.3.0
18389
+ * @category Object
18390
+ * @param {Object} object The object to iterate over.
18391
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
18392
+ * @param {*} [accumulator] The custom accumulator value.
18393
+ * @returns {*} Returns the accumulated value.
18394
+ * @example
18395
+ *
18396
+ * _.transform([2, 3, 4], function(result, n) {
18397
+ * result.push(n *= n);
18398
+ * return n % 2 == 0;
18399
+ * }, []);
18400
+ * // => [4, 9]
18401
+ *
18402
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
18403
+ * (result[value] || (result[value] = [])).push(key);
18404
+ * }, {});
18405
+ * // => { '1': ['a', 'c'], '2': ['b'] }
18406
+ */
18407
+ function transform(object, iteratee, accumulator) {
18408
+ var isArr = isArray(object),
18409
+ isArrLike = isArr || isBuffer(object) || isTypedArray(object);
18410
+
18411
+ iteratee = getIteratee(iteratee, 4);
18412
+ if (accumulator == null) {
18413
+ var Ctor = object && object.constructor;
18414
+ if (isArrLike) {
18415
+ accumulator = isArr ? new Ctor : [];
18416
+ }
18417
+ else if (isObject(object)) {
18418
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
18419
+ }
18420
+ else {
18421
+ accumulator = {};
18422
+ }
18423
+ }
18424
+ (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
18425
+ return iteratee(accumulator, value, index, object);
18426
+ });
18427
+ return accumulator;
18428
+ }
18429
+
18430
+ /**
18431
+ * Removes the property at `path` of `object`.
18432
+ *
18433
+ * **Note:** This method mutates `object`.
18434
+ *
18435
+ * @static
18436
+ * @memberOf _
18437
+ * @since 4.0.0
18438
+ * @category Object
18439
+ * @param {Object} object The object to modify.
18440
+ * @param {Array|string} path The path of the property to unset.
18441
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
18442
+ * @example
18443
+ *
18444
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
18445
+ * _.unset(object, 'a[0].b.c');
18446
+ * // => true
18447
+ *
18448
+ * console.log(object);
18449
+ * // => { 'a': [{ 'b': {} }] };
18450
+ *
18451
+ * _.unset(object, ['a', '0', 'b', 'c']);
18452
+ * // => true
18453
+ *
18454
+ * console.log(object);
18455
+ * // => { 'a': [{ 'b': {} }] };
18456
+ */
18457
+ function unset(object, path) {
18458
+ return object == null ? true : baseUnset(object, path);
18459
+ }
18460
+
18461
+ /**
18462
+ * This method is like `_.set` except that accepts `updater` to produce the
18463
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
18464
+ * is invoked with one argument: (value).
18465
+ *
18466
+ * **Note:** This method mutates `object`.
18467
+ *
18468
+ * @static
18469
+ * @memberOf _
18470
+ * @since 4.6.0
18471
+ * @category Object
18472
+ * @param {Object} object The object to modify.
18473
+ * @param {Array|string} path The path of the property to set.
18474
+ * @param {Function} updater The function to produce the updated value.
18475
+ * @returns {Object} Returns `object`.
18476
+ * @example
18477
+ *
18478
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
18479
+ *
18480
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
18481
+ * console.log(object.a[0].b.c);
18482
+ * // => 9
18483
+ *
18484
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
18485
+ * console.log(object.x[0].y.z);
18486
+ * // => 0
18487
+ */
18488
+ function update(object, path, updater) {
18489
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
18490
+ }
18491
+
18492
+ /**
18493
+ * This method is like `_.update` except that it accepts `customizer` which is
18494
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
18495
+ * path creation is handled by the method instead. The `customizer` is invoked
18496
+ * with three arguments: (nsValue, key, nsObject).
18497
+ *
18498
+ * **Note:** This method mutates `object`.
18499
+ *
18500
+ * @static
18501
+ * @memberOf _
18502
+ * @since 4.6.0
18503
+ * @category Object
18504
+ * @param {Object} object The object to modify.
18505
+ * @param {Array|string} path The path of the property to set.
18506
+ * @param {Function} updater The function to produce the updated value.
18507
+ * @param {Function} [customizer] The function to customize assigned values.
18508
+ * @returns {Object} Returns `object`.
18509
+ * @example
18510
+ *
18511
+ * var object = {};
18512
+ *
18513
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
18514
+ * // => { '0': { '1': 'a' } }
18515
+ */
18516
+ function updateWith(object, path, updater, customizer) {
18517
+ customizer = typeof customizer == 'function' ? customizer : undefined;
18518
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
18519
+ }
18520
+
18521
+ /**
18522
+ * Creates an array of the own enumerable string keyed property values of `object`.
18523
+ *
18524
+ * **Note:** Non-object values are coerced to objects.
18525
+ *
18526
+ * @static
18527
+ * @since 0.1.0
18528
+ * @memberOf _
18529
+ * @category Object
18530
+ * @param {Object} object The object to query.
18531
+ * @returns {Array} Returns the array of property values.
18532
+ * @example
18533
+ *
18534
+ * function Foo() {
18535
+ * this.a = 1;
18536
+ * this.b = 2;
18537
+ * }
18538
+ *
18539
+ * Foo.prototype.c = 3;
18540
+ *
18541
+ * _.values(new Foo);
18542
+ * // => [1, 2] (iteration order is not guaranteed)
18543
+ *
18544
+ * _.values('hi');
18545
+ * // => ['h', 'i']
18546
+ */
18547
+ function values(object) {
18548
+ return object == null ? [] : baseValues(object, keys(object));
18549
+ }
18550
+
18551
+ /**
18552
+ * Creates an array of the own and inherited enumerable string keyed property
18553
+ * values of `object`.
18554
+ *
18555
+ * **Note:** Non-object values are coerced to objects.
18556
+ *
18557
+ * @static
18558
+ * @memberOf _
18559
+ * @since 3.0.0
18560
+ * @category Object
18561
+ * @param {Object} object The object to query.
18562
+ * @returns {Array} Returns the array of property values.
18563
+ * @example
18564
+ *
18565
+ * function Foo() {
18566
+ * this.a = 1;
18567
+ * this.b = 2;
18568
+ * }
18569
+ *
18570
+ * Foo.prototype.c = 3;
18571
+ *
18572
+ * _.valuesIn(new Foo);
18573
+ * // => [1, 2, 3] (iteration order is not guaranteed)
18574
+ */
18575
+ function valuesIn(object) {
18576
+ return object == null ? [] : baseValues(object, keysIn(object));
18577
+ }
18578
+
18579
+ /*------------------------------------------------------------------------*/
18580
+
18581
+ /**
18582
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
18583
+ *
18584
+ * @static
18585
+ * @memberOf _
18586
+ * @since 4.0.0
18587
+ * @category Number
18588
+ * @param {number} number The number to clamp.
18589
+ * @param {number} [lower] The lower bound.
18590
+ * @param {number} upper The upper bound.
18591
+ * @returns {number} Returns the clamped number.
18592
+ * @example
18593
+ *
18594
+ * _.clamp(-10, -5, 5);
18595
+ * // => -5
18596
+ *
18597
+ * _.clamp(10, -5, 5);
18598
+ * // => 5
18599
+ */
18600
+ function clamp(number, lower, upper) {
18601
+ if (upper === undefined) {
18602
+ upper = lower;
18603
+ lower = undefined;
18604
+ }
18605
+ if (upper !== undefined) {
18606
+ upper = toNumber(upper);
18607
+ upper = upper === upper ? upper : 0;
18608
+ }
18609
+ if (lower !== undefined) {
18610
+ lower = toNumber(lower);
18611
+ lower = lower === lower ? lower : 0;
18612
+ }
18613
+ return baseClamp(toNumber(number), lower, upper);
18614
+ }
18615
+
18616
+ /**
18617
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
18618
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
18619
+ * If `start` is greater than `end` the params are swapped to support
18620
+ * negative ranges.
18621
+ *
18622
+ * @static
18623
+ * @memberOf _
18624
+ * @since 3.3.0
18625
+ * @category Number
18626
+ * @param {number} number The number to check.
18627
+ * @param {number} [start=0] The start of the range.
18628
+ * @param {number} end The end of the range.
18629
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
18630
+ * @see _.range, _.rangeRight
18631
+ * @example
18632
+ *
18633
+ * _.inRange(3, 2, 4);
18634
+ * // => true
18635
+ *
18636
+ * _.inRange(4, 8);
18637
+ * // => true
18638
+ *
18639
+ * _.inRange(4, 2);
18640
+ * // => false
18641
+ *
18642
+ * _.inRange(2, 2);
18643
+ * // => false
18644
+ *
18645
+ * _.inRange(1.2, 2);
18646
+ * // => true
18647
+ *
18648
+ * _.inRange(5.2, 4);
18649
+ * // => false
18650
+ *
18651
+ * _.inRange(-3, -2, -6);
18652
+ * // => true
18653
+ */
18654
+ function inRange(number, start, end) {
18655
+ start = toFinite(start);
18656
+ if (end === undefined) {
18657
+ end = start;
18658
+ start = 0;
18659
+ } else {
18660
+ end = toFinite(end);
18661
+ }
18662
+ number = toNumber(number);
18663
+ return baseInRange(number, start, end);
18664
+ }
18665
+
18666
+ /**
18667
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
18668
+ * If only one argument is provided a number between `0` and the given number
18669
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
18670
+ * floats, a floating-point number is returned instead of an integer.
18671
+ *
18672
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
18673
+ * floating-point values which can produce unexpected results.
18674
+ *
18675
+ * @static
18676
+ * @memberOf _
18677
+ * @since 0.7.0
18678
+ * @category Number
18679
+ * @param {number} [lower=0] The lower bound.
18680
+ * @param {number} [upper=1] The upper bound.
18681
+ * @param {boolean} [floating] Specify returning a floating-point number.
18682
+ * @returns {number} Returns the random number.
18683
+ * @example
18684
+ *
18685
+ * _.random(0, 5);
18686
+ * // => an integer between 0 and 5
18687
+ *
18688
+ * _.random(5);
18689
+ * // => also an integer between 0 and 5
18690
+ *
18691
+ * _.random(5, true);
18692
+ * // => a floating-point number between 0 and 5
18693
+ *
18694
+ * _.random(1.2, 5.2);
18695
+ * // => a floating-point number between 1.2 and 5.2
18696
+ */
18697
+ function random(lower, upper, floating) {
18698
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
18699
+ upper = floating = undefined;
18700
+ }
18701
+ if (floating === undefined) {
18702
+ if (typeof upper == 'boolean') {
18703
+ floating = upper;
18704
+ upper = undefined;
18705
+ }
18706
+ else if (typeof lower == 'boolean') {
18707
+ floating = lower;
18708
+ lower = undefined;
18709
+ }
18710
+ }
18711
+ if (lower === undefined && upper === undefined) {
18712
+ lower = 0;
18713
+ upper = 1;
18714
+ }
18715
+ else {
18716
+ lower = toFinite(lower);
18717
+ if (upper === undefined) {
18718
+ upper = lower;
18719
+ lower = 0;
18720
+ } else {
18721
+ upper = toFinite(upper);
18722
+ }
18723
+ }
18724
+ if (lower > upper) {
18725
+ var temp = lower;
18726
+ lower = upper;
18727
+ upper = temp;
18728
+ }
18729
+ if (floating || lower % 1 || upper % 1) {
18730
+ var rand = nativeRandom();
18731
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
18732
+ }
18733
+ return baseRandom(lower, upper);
18734
+ }
18735
+
18736
+ /*------------------------------------------------------------------------*/
18737
+
18738
+ /**
18739
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
18740
+ *
18741
+ * @static
18742
+ * @memberOf _
18743
+ * @since 3.0.0
18744
+ * @category String
18745
+ * @param {string} [string=''] The string to convert.
18746
+ * @returns {string} Returns the camel cased string.
18747
+ * @example
18748
+ *
18749
+ * _.camelCase('Foo Bar');
18750
+ * // => 'fooBar'
18751
+ *
18752
+ * _.camelCase('--foo-bar--');
18753
+ * // => 'fooBar'
18754
+ *
18755
+ * _.camelCase('__FOO_BAR__');
18756
+ * // => 'fooBar'
18757
+ */
18758
+ var camelCase = createCompounder(function(result, word, index) {
18759
+ word = word.toLowerCase();
18760
+ return result + (index ? capitalize(word) : word);
18761
+ });
18762
+
18763
+ /**
18764
+ * Converts the first character of `string` to upper case and the remaining
18765
+ * to lower case.
18766
+ *
18767
+ * @static
18768
+ * @memberOf _
18769
+ * @since 3.0.0
18770
+ * @category String
18771
+ * @param {string} [string=''] The string to capitalize.
18772
+ * @returns {string} Returns the capitalized string.
18773
+ * @example
18774
+ *
18775
+ * _.capitalize('FRED');
18776
+ * // => 'Fred'
18777
+ */
18778
+ function capitalize(string) {
18779
+ return upperFirst(toString(string).toLowerCase());
18780
+ }
18781
+
18782
+ /**
18783
+ * Deburrs `string` by converting
18784
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
18785
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
18786
+ * letters to basic Latin letters and removing
18787
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
18788
+ *
18789
+ * @static
18790
+ * @memberOf _
18791
+ * @since 3.0.0
18792
+ * @category String
18793
+ * @param {string} [string=''] The string to deburr.
18794
+ * @returns {string} Returns the deburred string.
18795
+ * @example
18796
+ *
18797
+ * _.deburr('déjà vu');
18798
+ * // => 'deja vu'
18799
+ */
18800
+ function deburr(string) {
18801
+ string = toString(string);
18802
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
18803
+ }
18804
+
18805
+ /**
18806
+ * Checks if `string` ends with the given target string.
18807
+ *
18808
+ * @static
18809
+ * @memberOf _
18810
+ * @since 3.0.0
18811
+ * @category String
18812
+ * @param {string} [string=''] The string to inspect.
18813
+ * @param {string} [target] The string to search for.
18814
+ * @param {number} [position=string.length] The position to search up to.
18815
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
18816
+ * else `false`.
18817
+ * @example
18818
+ *
18819
+ * _.endsWith('abc', 'c');
18820
+ * // => true
18821
+ *
18822
+ * _.endsWith('abc', 'b');
18823
+ * // => false
18824
+ *
18825
+ * _.endsWith('abc', 'b', 2);
18826
+ * // => true
18827
+ */
18828
+ function endsWith(string, target, position) {
18829
+ string = toString(string);
18830
+ target = baseToString(target);
18831
+
18832
+ var length = string.length;
18833
+ position = position === undefined
18834
+ ? length
18835
+ : baseClamp(toInteger(position), 0, length);
18836
+
18837
+ var end = position;
18838
+ position -= target.length;
18839
+ return position >= 0 && string.slice(position, end) == target;
18840
+ }
18841
+
18842
+ /**
18843
+ * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
18844
+ * corresponding HTML entities.
18845
+ *
18846
+ * **Note:** No other characters are escaped. To escape additional
18847
+ * characters use a third-party library like [_he_](https://mths.be/he).
18848
+ *
18849
+ * Though the ">" character is escaped for symmetry, characters like
18850
+ * ">" and "/" don't need escaping in HTML and have no special meaning
18851
+ * unless they're part of a tag or unquoted attribute value. See
18852
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
18853
+ * (under "semi-related fun fact") for more details.
18854
+ *
18855
+ * When working with HTML you should always
18856
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
18857
+ * XSS vectors.
18858
+ *
18859
+ * @static
18860
+ * @since 0.1.0
18861
+ * @memberOf _
18862
+ * @category String
18863
+ * @param {string} [string=''] The string to escape.
18864
+ * @returns {string} Returns the escaped string.
18865
+ * @example
18866
+ *
18867
+ * _.escape('fred, barney, & pebbles');
18868
+ * // => 'fred, barney, &amp; pebbles'
18869
+ */
18870
+ function escape(string) {
18871
+ string = toString(string);
18872
+ return (string && reHasUnescapedHtml.test(string))
18873
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
18874
+ : string;
18875
+ }
18876
+
18877
+ /**
18878
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
18879
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
18880
+ *
18881
+ * @static
18882
+ * @memberOf _
18883
+ * @since 3.0.0
18884
+ * @category String
18885
+ * @param {string} [string=''] The string to escape.
18886
+ * @returns {string} Returns the escaped string.
18887
+ * @example
18888
+ *
18889
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
18890
+ * // => '\[lodash\]\(https://lodash\.com/\)'
18891
+ */
18892
+ function escapeRegExp(string) {
18893
+ string = toString(string);
18894
+ return (string && reHasRegExpChar.test(string))
18895
+ ? string.replace(reRegExpChar, '\\$&')
18896
+ : string;
18897
+ }
18898
+
18899
+ /**
18900
+ * Converts `string` to
18901
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
18902
+ *
18903
+ * @static
18904
+ * @memberOf _
18905
+ * @since 3.0.0
18906
+ * @category String
18907
+ * @param {string} [string=''] The string to convert.
18908
+ * @returns {string} Returns the kebab cased string.
18909
+ * @example
18910
+ *
18911
+ * _.kebabCase('Foo Bar');
18912
+ * // => 'foo-bar'
18913
+ *
18914
+ * _.kebabCase('fooBar');
18915
+ * // => 'foo-bar'
18916
+ *
18917
+ * _.kebabCase('__FOO_BAR__');
18918
+ * // => 'foo-bar'
18919
+ */
18920
+ var kebabCase = createCompounder(function(result, word, index) {
18921
+ return result + (index ? '-' : '') + word.toLowerCase();
18922
+ });
18923
+
18924
+ /**
18925
+ * Converts `string`, as space separated words, to lower case.
18926
+ *
18927
+ * @static
18928
+ * @memberOf _
18929
+ * @since 4.0.0
18930
+ * @category String
18931
+ * @param {string} [string=''] The string to convert.
18932
+ * @returns {string} Returns the lower cased string.
18933
+ * @example
18934
+ *
18935
+ * _.lowerCase('--Foo-Bar--');
18936
+ * // => 'foo bar'
18937
+ *
18938
+ * _.lowerCase('fooBar');
18939
+ * // => 'foo bar'
18940
+ *
18941
+ * _.lowerCase('__FOO_BAR__');
18942
+ * // => 'foo bar'
18943
+ */
18944
+ var lowerCase = createCompounder(function(result, word, index) {
18945
+ return result + (index ? ' ' : '') + word.toLowerCase();
18946
+ });
18947
+
18948
+ /**
18949
+ * Converts the first character of `string` to lower case.
18950
+ *
18951
+ * @static
18952
+ * @memberOf _
18953
+ * @since 4.0.0
18954
+ * @category String
18955
+ * @param {string} [string=''] The string to convert.
18956
+ * @returns {string} Returns the converted string.
18957
+ * @example
18958
+ *
18959
+ * _.lowerFirst('Fred');
18960
+ * // => 'fred'
18961
+ *
18962
+ * _.lowerFirst('FRED');
18963
+ * // => 'fRED'
18964
+ */
18965
+ var lowerFirst = createCaseFirst('toLowerCase');
18966
+
18967
+ /**
18968
+ * Pads `string` on the left and right sides if it's shorter than `length`.
18969
+ * Padding characters are truncated if they can't be evenly divided by `length`.
18970
+ *
18971
+ * @static
18972
+ * @memberOf _
18973
+ * @since 3.0.0
18974
+ * @category String
18975
+ * @param {string} [string=''] The string to pad.
18976
+ * @param {number} [length=0] The padding length.
18977
+ * @param {string} [chars=' '] The string used as padding.
18978
+ * @returns {string} Returns the padded string.
18979
+ * @example
18980
+ *
18981
+ * _.pad('abc', 8);
18982
+ * // => ' abc '
18983
+ *
18984
+ * _.pad('abc', 8, '_-');
18985
+ * // => '_-abc_-_'
18986
+ *
18987
+ * _.pad('abc', 3);
18988
+ * // => 'abc'
18989
+ */
18990
+ function pad(string, length, chars) {
18991
+ string = toString(string);
18992
+ length = toInteger(length);
18993
+
18994
+ var strLength = length ? stringSize(string) : 0;
18995
+ if (!length || strLength >= length) {
18996
+ return string;
18997
+ }
18998
+ var mid = (length - strLength) / 2;
18999
+ return (
19000
+ createPadding(nativeFloor(mid), chars) +
19001
+ string +
19002
+ createPadding(nativeCeil(mid), chars)
19003
+ );
19004
+ }
19005
+
19006
+ /**
19007
+ * Pads `string` on the right side if it's shorter than `length`. Padding
19008
+ * characters are truncated if they exceed `length`.
19009
+ *
19010
+ * @static
19011
+ * @memberOf _
19012
+ * @since 4.0.0
19013
+ * @category String
19014
+ * @param {string} [string=''] The string to pad.
19015
+ * @param {number} [length=0] The padding length.
19016
+ * @param {string} [chars=' '] The string used as padding.
19017
+ * @returns {string} Returns the padded string.
19018
+ * @example
19019
+ *
19020
+ * _.padEnd('abc', 6);
19021
+ * // => 'abc '
19022
+ *
19023
+ * _.padEnd('abc', 6, '_-');
19024
+ * // => 'abc_-_'
19025
+ *
19026
+ * _.padEnd('abc', 3);
19027
+ * // => 'abc'
19028
+ */
19029
+ function padEnd(string, length, chars) {
19030
+ string = toString(string);
19031
+ length = toInteger(length);
19032
+
19033
+ var strLength = length ? stringSize(string) : 0;
19034
+ return (length && strLength < length)
19035
+ ? (string + createPadding(length - strLength, chars))
19036
+ : string;
19037
+ }
19038
+
19039
+ /**
19040
+ * Pads `string` on the left side if it's shorter than `length`. Padding
19041
+ * characters are truncated if they exceed `length`.
19042
+ *
19043
+ * @static
19044
+ * @memberOf _
19045
+ * @since 4.0.0
19046
+ * @category String
19047
+ * @param {string} [string=''] The string to pad.
19048
+ * @param {number} [length=0] The padding length.
19049
+ * @param {string} [chars=' '] The string used as padding.
19050
+ * @returns {string} Returns the padded string.
19051
+ * @example
19052
+ *
19053
+ * _.padStart('abc', 6);
19054
+ * // => ' abc'
19055
+ *
19056
+ * _.padStart('abc', 6, '_-');
19057
+ * // => '_-_abc'
19058
+ *
19059
+ * _.padStart('abc', 3);
19060
+ * // => 'abc'
19061
+ */
19062
+ function padStart(string, length, chars) {
19063
+ string = toString(string);
19064
+ length = toInteger(length);
19065
+
19066
+ var strLength = length ? stringSize(string) : 0;
19067
+ return (length && strLength < length)
19068
+ ? (createPadding(length - strLength, chars) + string)
19069
+ : string;
19070
+ }
19071
+
19072
+ /**
19073
+ * Converts `string` to an integer of the specified radix. If `radix` is
19074
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
19075
+ * hexadecimal, in which case a `radix` of `16` is used.
19076
+ *
19077
+ * **Note:** This method aligns with the
19078
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
19079
+ *
19080
+ * @static
19081
+ * @memberOf _
19082
+ * @since 1.1.0
19083
+ * @category String
19084
+ * @param {string} string The string to convert.
19085
+ * @param {number} [radix=10] The radix to interpret `value` by.
19086
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19087
+ * @returns {number} Returns the converted integer.
19088
+ * @example
19089
+ *
19090
+ * _.parseInt('08');
19091
+ * // => 8
19092
+ *
19093
+ * _.map(['6', '08', '10'], _.parseInt);
19094
+ * // => [6, 8, 10]
19095
+ */
19096
+ function parseInt(string, radix, guard) {
19097
+ if (guard || radix == null) {
19098
+ radix = 0;
19099
+ } else if (radix) {
19100
+ radix = +radix;
19101
+ }
19102
+ return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
19103
+ }
19104
+
19105
+ /**
19106
+ * Repeats the given string `n` times.
19107
+ *
19108
+ * @static
19109
+ * @memberOf _
19110
+ * @since 3.0.0
19111
+ * @category String
19112
+ * @param {string} [string=''] The string to repeat.
19113
+ * @param {number} [n=1] The number of times to repeat the string.
19114
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19115
+ * @returns {string} Returns the repeated string.
19116
+ * @example
19117
+ *
19118
+ * _.repeat('*', 3);
19119
+ * // => '***'
19120
+ *
19121
+ * _.repeat('abc', 2);
19122
+ * // => 'abcabc'
19123
+ *
19124
+ * _.repeat('abc', 0);
19125
+ * // => ''
19126
+ */
19127
+ function repeat(string, n, guard) {
19128
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
19129
+ n = 1;
19130
+ } else {
19131
+ n = toInteger(n);
19132
+ }
19133
+ return baseRepeat(toString(string), n);
19134
+ }
19135
+
19136
+ /**
19137
+ * Replaces matches for `pattern` in `string` with `replacement`.
19138
+ *
19139
+ * **Note:** This method is based on
19140
+ * [`String#replace`](https://mdn.io/String/replace).
19141
+ *
19142
+ * @static
19143
+ * @memberOf _
19144
+ * @since 4.0.0
19145
+ * @category String
19146
+ * @param {string} [string=''] The string to modify.
19147
+ * @param {RegExp|string} pattern The pattern to replace.
19148
+ * @param {Function|string} replacement The match replacement.
19149
+ * @returns {string} Returns the modified string.
19150
+ * @example
19151
+ *
19152
+ * _.replace('Hi Fred', 'Fred', 'Barney');
19153
+ * // => 'Hi Barney'
19154
+ */
19155
+ function replace() {
19156
+ var args = arguments,
19157
+ string = toString(args[0]);
19158
+
19159
+ return args.length < 3 ? string : string.replace(args[1], args[2]);
19160
+ }
19161
+
19162
+ /**
19163
+ * Converts `string` to
19164
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
19165
+ *
19166
+ * @static
19167
+ * @memberOf _
19168
+ * @since 3.0.0
19169
+ * @category String
19170
+ * @param {string} [string=''] The string to convert.
19171
+ * @returns {string} Returns the snake cased string.
19172
+ * @example
19173
+ *
19174
+ * _.snakeCase('Foo Bar');
19175
+ * // => 'foo_bar'
19176
+ *
19177
+ * _.snakeCase('fooBar');
19178
+ * // => 'foo_bar'
19179
+ *
19180
+ * _.snakeCase('--FOO-BAR--');
19181
+ * // => 'foo_bar'
19182
+ */
19183
+ var snakeCase = createCompounder(function(result, word, index) {
19184
+ return result + (index ? '_' : '') + word.toLowerCase();
19185
+ });
19186
+
19187
+ /**
19188
+ * Splits `string` by `separator`.
19189
+ *
19190
+ * **Note:** This method is based on
19191
+ * [`String#split`](https://mdn.io/String/split).
19192
+ *
19193
+ * @static
19194
+ * @memberOf _
19195
+ * @since 4.0.0
19196
+ * @category String
19197
+ * @param {string} [string=''] The string to split.
19198
+ * @param {RegExp|string} separator The separator pattern to split by.
19199
+ * @param {number} [limit] The length to truncate results to.
19200
+ * @returns {Array} Returns the string segments.
19201
+ * @example
19202
+ *
19203
+ * _.split('a-b-c', '-', 2);
19204
+ * // => ['a', 'b']
19205
+ */
19206
+ function split(string, separator, limit) {
19207
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
19208
+ separator = limit = undefined;
19209
+ }
19210
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
19211
+ if (!limit) {
19212
+ return [];
19213
+ }
19214
+ string = toString(string);
19215
+ if (string && (
19216
+ typeof separator == 'string' ||
19217
+ (separator != null && !isRegExp(separator))
19218
+ )) {
19219
+ separator = baseToString(separator);
19220
+ if (!separator && hasUnicode(string)) {
19221
+ return castSlice(stringToArray(string), 0, limit);
19222
+ }
19223
+ }
19224
+ return string.split(separator, limit);
19225
+ }
19226
+
19227
+ /**
19228
+ * Converts `string` to
19229
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
19230
+ *
19231
+ * @static
19232
+ * @memberOf _
19233
+ * @since 3.1.0
19234
+ * @category String
19235
+ * @param {string} [string=''] The string to convert.
19236
+ * @returns {string} Returns the start cased string.
19237
+ * @example
19238
+ *
19239
+ * _.startCase('--foo-bar--');
19240
+ * // => 'Foo Bar'
19241
+ *
19242
+ * _.startCase('fooBar');
19243
+ * // => 'Foo Bar'
19244
+ *
19245
+ * _.startCase('__FOO_BAR__');
19246
+ * // => 'FOO BAR'
19247
+ */
19248
+ var startCase = createCompounder(function(result, word, index) {
19249
+ return result + (index ? ' ' : '') + upperFirst(word);
19250
+ });
19251
+
19252
+ /**
19253
+ * Checks if `string` starts with the given target string.
19254
+ *
19255
+ * @static
19256
+ * @memberOf _
19257
+ * @since 3.0.0
19258
+ * @category String
19259
+ * @param {string} [string=''] The string to inspect.
19260
+ * @param {string} [target] The string to search for.
19261
+ * @param {number} [position=0] The position to search from.
19262
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
19263
+ * else `false`.
19264
+ * @example
19265
+ *
19266
+ * _.startsWith('abc', 'a');
19267
+ * // => true
19268
+ *
19269
+ * _.startsWith('abc', 'b');
19270
+ * // => false
19271
+ *
19272
+ * _.startsWith('abc', 'b', 1);
19273
+ * // => true
19274
+ */
19275
+ function startsWith(string, target, position) {
19276
+ string = toString(string);
19277
+ position = position == null
19278
+ ? 0
19279
+ : baseClamp(toInteger(position), 0, string.length);
19280
+
19281
+ target = baseToString(target);
19282
+ return string.slice(position, position + target.length) == target;
19283
+ }
19284
+
19285
+ /**
19286
+ * Creates a compiled template function that can interpolate data properties
19287
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
19288
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
19289
+ * properties may be accessed as free variables in the template. If a setting
19290
+ * object is given, it takes precedence over `_.templateSettings` values.
19291
+ *
19292
+ * **Note:** In the development build `_.template` utilizes
19293
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
19294
+ * for easier debugging.
19295
+ *
19296
+ * For more information on precompiling templates see
19297
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
19298
+ *
19299
+ * For more information on Chrome extension sandboxes see
19300
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
19301
+ *
19302
+ * @static
19303
+ * @since 0.1.0
19304
+ * @memberOf _
19305
+ * @category String
19306
+ * @param {string} [string=''] The template string.
19307
+ * @param {Object} [options={}] The options object.
19308
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
19309
+ * The HTML "escape" delimiter.
19310
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
19311
+ * The "evaluate" delimiter.
19312
+ * @param {Object} [options.imports=_.templateSettings.imports]
19313
+ * An object to import into the template as free variables.
19314
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
19315
+ * The "interpolate" delimiter.
19316
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
19317
+ * The sourceURL of the compiled template.
19318
+ * @param {string} [options.variable='obj']
19319
+ * The data object variable name.
19320
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19321
+ * @returns {Function} Returns the compiled template function.
19322
+ * @example
19323
+ *
19324
+ * // Use the "interpolate" delimiter to create a compiled template.
19325
+ * var compiled = _.template('hello <%= user %>!');
19326
+ * compiled({ 'user': 'fred' });
19327
+ * // => 'hello fred!'
19328
+ *
19329
+ * // Use the HTML "escape" delimiter to escape data property values.
19330
+ * var compiled = _.template('<b><%- value %></b>');
19331
+ * compiled({ 'value': '<script>' });
19332
+ * // => '<b>&lt;script&gt;</b>'
19333
+ *
19334
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
19335
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
19336
+ * compiled({ 'users': ['fred', 'barney'] });
19337
+ * // => '<li>fred</li><li>barney</li>'
19338
+ *
19339
+ * // Use the internal `print` function in "evaluate" delimiters.
19340
+ * var compiled = _.template('<% print("hello " + user); %>!');
19341
+ * compiled({ 'user': 'barney' });
19342
+ * // => 'hello barney!'
19343
+ *
19344
+ * // Use the ES template literal delimiter as an "interpolate" delimiter.
19345
+ * // Disable support by replacing the "interpolate" delimiter.
19346
+ * var compiled = _.template('hello ${ user }!');
19347
+ * compiled({ 'user': 'pebbles' });
19348
+ * // => 'hello pebbles!'
19349
+ *
19350
+ * // Use backslashes to treat delimiters as plain text.
19351
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
19352
+ * compiled({ 'value': 'ignored' });
19353
+ * // => '<%- value %>'
19354
+ *
19355
+ * // Use the `imports` option to import `jQuery` as `jq`.
19356
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
19357
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
19358
+ * compiled({ 'users': ['fred', 'barney'] });
19359
+ * // => '<li>fred</li><li>barney</li>'
19360
+ *
19361
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
19362
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
19363
+ * compiled(data);
19364
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
19365
+ *
19366
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
19367
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
19368
+ * compiled.source;
19369
+ * // => function(data) {
19370
+ * // var __t, __p = '';
19371
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
19372
+ * // return __p;
19373
+ * // }
19374
+ *
19375
+ * // Use custom template delimiters.
19376
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
19377
+ * var compiled = _.template('hello {{ user }}!');
19378
+ * compiled({ 'user': 'mustache' });
19379
+ * // => 'hello mustache!'
19380
+ *
19381
+ * // Use the `source` property to inline compiled templates for meaningful
19382
+ * // line numbers in error messages and stack traces.
19383
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
19384
+ * var JST = {\
19385
+ * "main": ' + _.template(mainText).source + '\
19386
+ * };\
19387
+ * ');
19388
+ */
19389
+ function template(string, options, guard) {
19390
+ // Based on John Resig's `tmpl` implementation
19391
+ // (http://ejohn.org/blog/javascript-micro-templating/)
19392
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
19393
+ var settings = lodash.templateSettings;
19394
+
19395
+ if (guard && isIterateeCall(string, options, guard)) {
19396
+ options = undefined;
19397
+ }
19398
+ string = toString(string);
19399
+ options = assignInWith({}, options, settings, customDefaultsAssignIn);
19400
+
19401
+ var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
19402
+ importsKeys = keys(imports),
19403
+ importsValues = baseValues(imports, importsKeys);
19404
+
19405
+ var isEscaping,
19406
+ isEvaluating,
19407
+ index = 0,
19408
+ interpolate = options.interpolate || reNoMatch,
19409
+ source = "__p += '";
19410
+
19411
+ // Compile the regexp to match each delimiter.
19412
+ var reDelimiters = RegExp(
19413
+ (options.escape || reNoMatch).source + '|' +
19414
+ interpolate.source + '|' +
19415
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
19416
+ (options.evaluate || reNoMatch).source + '|$'
19417
+ , 'g');
19418
+
19419
+ // Use a sourceURL for easier debugging.
19420
+ var sourceURL = '//# sourceURL=' +
19421
+ ('sourceURL' in options
19422
+ ? options.sourceURL
19423
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
19424
+ ) + '\n';
19425
+
19426
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
19427
+ interpolateValue || (interpolateValue = esTemplateValue);
19428
+
19429
+ // Escape characters that can't be included in string literals.
19430
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
19431
+
19432
+ // Replace delimiters with snippets.
19433
+ if (escapeValue) {
19434
+ isEscaping = true;
19435
+ source += "' +\n__e(" + escapeValue + ") +\n'";
19436
+ }
19437
+ if (evaluateValue) {
19438
+ isEvaluating = true;
19439
+ source += "';\n" + evaluateValue + ";\n__p += '";
19440
+ }
19441
+ if (interpolateValue) {
19442
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
19443
+ }
19444
+ index = offset + match.length;
19445
+
19446
+ // The JS engine embedded in Adobe products needs `match` returned in
19447
+ // order to produce the correct `offset` value.
19448
+ return match;
19449
+ });
19450
+
19451
+ source += "';\n";
19452
+
19453
+ // If `variable` is not specified wrap a with-statement around the generated
19454
+ // code to add the data object to the top of the scope chain.
19455
+ var variable = options.variable;
19456
+ if (!variable) {
19457
+ source = 'with (obj) {\n' + source + '\n}\n';
19458
+ }
19459
+ // Cleanup code by stripping empty strings.
19460
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
19461
+ .replace(reEmptyStringMiddle, '$1')
19462
+ .replace(reEmptyStringTrailing, '$1;');
19463
+
19464
+ // Frame code as the function body.
19465
+ source = 'function(' + (variable || 'obj') + ') {\n' +
19466
+ (variable
19467
+ ? ''
19468
+ : 'obj || (obj = {});\n'
19469
+ ) +
19470
+ "var __t, __p = ''" +
19471
+ (isEscaping
19472
+ ? ', __e = _.escape'
19473
+ : ''
19474
+ ) +
19475
+ (isEvaluating
19476
+ ? ', __j = Array.prototype.join;\n' +
19477
+ "function print() { __p += __j.call(arguments, '') }\n"
19478
+ : ';\n'
19479
+ ) +
19480
+ source +
19481
+ 'return __p\n}';
19482
+
19483
+ var result = attempt(function() {
19484
+ return Function(importsKeys, sourceURL + 'return ' + source)
19485
+ .apply(undefined, importsValues);
19486
+ });
19487
+
19488
+ // Provide the compiled function's source by its `toString` method or
19489
+ // the `source` property as a convenience for inlining compiled templates.
19490
+ result.source = source;
19491
+ if (isError(result)) {
19492
+ throw result;
19493
+ }
19494
+ return result;
19495
+ }
19496
+
19497
+ /**
19498
+ * Converts `string`, as a whole, to lower case just like
19499
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
19500
+ *
19501
+ * @static
19502
+ * @memberOf _
19503
+ * @since 4.0.0
19504
+ * @category String
19505
+ * @param {string} [string=''] The string to convert.
19506
+ * @returns {string} Returns the lower cased string.
19507
+ * @example
19508
+ *
19509
+ * _.toLower('--Foo-Bar--');
19510
+ * // => '--foo-bar--'
19511
+ *
19512
+ * _.toLower('fooBar');
19513
+ * // => 'foobar'
19514
+ *
19515
+ * _.toLower('__FOO_BAR__');
19516
+ * // => '__foo_bar__'
19517
+ */
19518
+ function toLower(value) {
19519
+ return toString(value).toLowerCase();
19520
+ }
19521
+
19522
+ /**
19523
+ * Converts `string`, as a whole, to upper case just like
19524
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
19525
+ *
19526
+ * @static
19527
+ * @memberOf _
19528
+ * @since 4.0.0
19529
+ * @category String
19530
+ * @param {string} [string=''] The string to convert.
19531
+ * @returns {string} Returns the upper cased string.
19532
+ * @example
19533
+ *
19534
+ * _.toUpper('--foo-bar--');
19535
+ * // => '--FOO-BAR--'
19536
+ *
19537
+ * _.toUpper('fooBar');
19538
+ * // => 'FOOBAR'
19539
+ *
19540
+ * _.toUpper('__foo_bar__');
19541
+ * // => '__FOO_BAR__'
19542
+ */
19543
+ function toUpper(value) {
19544
+ return toString(value).toUpperCase();
19545
+ }
19546
+
19547
+ /**
19548
+ * Removes leading and trailing whitespace or specified characters from `string`.
19549
+ *
19550
+ * @static
19551
+ * @memberOf _
19552
+ * @since 3.0.0
19553
+ * @category String
19554
+ * @param {string} [string=''] The string to trim.
19555
+ * @param {string} [chars=whitespace] The characters to trim.
19556
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19557
+ * @returns {string} Returns the trimmed string.
19558
+ * @example
19559
+ *
19560
+ * _.trim(' abc ');
19561
+ * // => 'abc'
19562
+ *
19563
+ * _.trim('-_-abc-_-', '_-');
19564
+ * // => 'abc'
19565
+ *
19566
+ * _.map([' foo ', ' bar '], _.trim);
19567
+ * // => ['foo', 'bar']
19568
+ */
19569
+ function trim(string, chars, guard) {
19570
+ string = toString(string);
19571
+ if (string && (guard || chars === undefined)) {
19572
+ return string.replace(reTrim, '');
19573
+ }
19574
+ if (!string || !(chars = baseToString(chars))) {
19575
+ return string;
19576
+ }
19577
+ var strSymbols = stringToArray(string),
19578
+ chrSymbols = stringToArray(chars),
19579
+ start = charsStartIndex(strSymbols, chrSymbols),
19580
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
19581
+
19582
+ return castSlice(strSymbols, start, end).join('');
19583
+ }
19584
+
19585
+ /**
19586
+ * Removes trailing whitespace or specified characters from `string`.
19587
+ *
19588
+ * @static
19589
+ * @memberOf _
19590
+ * @since 4.0.0
19591
+ * @category String
19592
+ * @param {string} [string=''] The string to trim.
19593
+ * @param {string} [chars=whitespace] The characters to trim.
19594
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19595
+ * @returns {string} Returns the trimmed string.
19596
+ * @example
19597
+ *
19598
+ * _.trimEnd(' abc ');
19599
+ * // => ' abc'
19600
+ *
19601
+ * _.trimEnd('-_-abc-_-', '_-');
19602
+ * // => '-_-abc'
19603
+ */
19604
+ function trimEnd(string, chars, guard) {
19605
+ string = toString(string);
19606
+ if (string && (guard || chars === undefined)) {
19607
+ return string.replace(reTrimEnd, '');
19608
+ }
19609
+ if (!string || !(chars = baseToString(chars))) {
19610
+ return string;
19611
+ }
19612
+ var strSymbols = stringToArray(string),
19613
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
19614
+
19615
+ return castSlice(strSymbols, 0, end).join('');
19616
+ }
19617
+
19618
+ /**
19619
+ * Removes leading whitespace or specified characters from `string`.
19620
+ *
19621
+ * @static
19622
+ * @memberOf _
19623
+ * @since 4.0.0
19624
+ * @category String
19625
+ * @param {string} [string=''] The string to trim.
19626
+ * @param {string} [chars=whitespace] The characters to trim.
19627
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19628
+ * @returns {string} Returns the trimmed string.
19629
+ * @example
19630
+ *
19631
+ * _.trimStart(' abc ');
19632
+ * // => 'abc '
19633
+ *
19634
+ * _.trimStart('-_-abc-_-', '_-');
19635
+ * // => 'abc-_-'
19636
+ */
19637
+ function trimStart(string, chars, guard) {
19638
+ string = toString(string);
19639
+ if (string && (guard || chars === undefined)) {
19640
+ return string.replace(reTrimStart, '');
19641
+ }
19642
+ if (!string || !(chars = baseToString(chars))) {
19643
+ return string;
19644
+ }
19645
+ var strSymbols = stringToArray(string),
19646
+ start = charsStartIndex(strSymbols, stringToArray(chars));
19647
+
19648
+ return castSlice(strSymbols, start).join('');
19649
+ }
19650
+
19651
+ /**
19652
+ * Truncates `string` if it's longer than the given maximum string length.
19653
+ * The last characters of the truncated string are replaced with the omission
19654
+ * string which defaults to "...".
19655
+ *
19656
+ * @static
19657
+ * @memberOf _
19658
+ * @since 4.0.0
19659
+ * @category String
19660
+ * @param {string} [string=''] The string to truncate.
19661
+ * @param {Object} [options={}] The options object.
19662
+ * @param {number} [options.length=30] The maximum string length.
19663
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
19664
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
19665
+ * @returns {string} Returns the truncated string.
19666
+ * @example
19667
+ *
19668
+ * _.truncate('hi-diddly-ho there, neighborino');
19669
+ * // => 'hi-diddly-ho there, neighbo...'
19670
+ *
19671
+ * _.truncate('hi-diddly-ho there, neighborino', {
19672
+ * 'length': 24,
19673
+ * 'separator': ' '
19674
+ * });
19675
+ * // => 'hi-diddly-ho there,...'
19676
+ *
19677
+ * _.truncate('hi-diddly-ho there, neighborino', {
19678
+ * 'length': 24,
19679
+ * 'separator': /,? +/
19680
+ * });
19681
+ * // => 'hi-diddly-ho there...'
19682
+ *
19683
+ * _.truncate('hi-diddly-ho there, neighborino', {
19684
+ * 'omission': ' [...]'
19685
+ * });
19686
+ * // => 'hi-diddly-ho there, neig [...]'
19687
+ */
19688
+ function truncate(string, options) {
19689
+ var length = DEFAULT_TRUNC_LENGTH,
19690
+ omission = DEFAULT_TRUNC_OMISSION;
19691
+
19692
+ if (isObject(options)) {
19693
+ var separator = 'separator' in options ? options.separator : separator;
19694
+ length = 'length' in options ? toInteger(options.length) : length;
19695
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
19696
+ }
19697
+ string = toString(string);
19698
+
19699
+ var strLength = string.length;
19700
+ if (hasUnicode(string)) {
19701
+ var strSymbols = stringToArray(string);
19702
+ strLength = strSymbols.length;
19703
+ }
19704
+ if (length >= strLength) {
19705
+ return string;
19706
+ }
19707
+ var end = length - stringSize(omission);
19708
+ if (end < 1) {
19709
+ return omission;
19710
+ }
19711
+ var result = strSymbols
19712
+ ? castSlice(strSymbols, 0, end).join('')
19713
+ : string.slice(0, end);
19714
+
19715
+ if (separator === undefined) {
19716
+ return result + omission;
19717
+ }
19718
+ if (strSymbols) {
19719
+ end += (result.length - end);
19720
+ }
19721
+ if (isRegExp(separator)) {
19722
+ if (string.slice(end).search(separator)) {
19723
+ var match,
19724
+ substring = result;
19725
+
19726
+ if (!separator.global) {
19727
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
19728
+ }
19729
+ separator.lastIndex = 0;
19730
+ while ((match = separator.exec(substring))) {
19731
+ var newEnd = match.index;
19732
+ }
19733
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
19734
+ }
19735
+ } else if (string.indexOf(baseToString(separator), end) != end) {
19736
+ var index = result.lastIndexOf(separator);
19737
+ if (index > -1) {
19738
+ result = result.slice(0, index);
19739
+ }
19740
+ }
19741
+ return result + omission;
19742
+ }
19743
+
19744
+ /**
19745
+ * The inverse of `_.escape`; this method converts the HTML entities
19746
+ * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
19747
+ * their corresponding characters.
19748
+ *
19749
+ * **Note:** No other HTML entities are unescaped. To unescape additional
19750
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
19751
+ *
19752
+ * @static
19753
+ * @memberOf _
19754
+ * @since 0.6.0
19755
+ * @category String
19756
+ * @param {string} [string=''] The string to unescape.
19757
+ * @returns {string} Returns the unescaped string.
19758
+ * @example
19759
+ *
19760
+ * _.unescape('fred, barney, &amp; pebbles');
19761
+ * // => 'fred, barney, & pebbles'
19762
+ */
19763
+ function unescape(string) {
19764
+ string = toString(string);
19765
+ return (string && reHasEscapedHtml.test(string))
19766
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
19767
+ : string;
19768
+ }
19769
+
19770
+ /**
19771
+ * Converts `string`, as space separated words, to upper case.
19772
+ *
19773
+ * @static
19774
+ * @memberOf _
19775
+ * @since 4.0.0
19776
+ * @category String
19777
+ * @param {string} [string=''] The string to convert.
19778
+ * @returns {string} Returns the upper cased string.
19779
+ * @example
19780
+ *
19781
+ * _.upperCase('--foo-bar');
19782
+ * // => 'FOO BAR'
19783
+ *
19784
+ * _.upperCase('fooBar');
19785
+ * // => 'FOO BAR'
19786
+ *
19787
+ * _.upperCase('__foo_bar__');
19788
+ * // => 'FOO BAR'
19789
+ */
19790
+ var upperCase = createCompounder(function(result, word, index) {
19791
+ return result + (index ? ' ' : '') + word.toUpperCase();
19792
+ });
19793
+
19794
+ /**
19795
+ * Converts the first character of `string` to upper case.
19796
+ *
19797
+ * @static
19798
+ * @memberOf _
19799
+ * @since 4.0.0
19800
+ * @category String
19801
+ * @param {string} [string=''] The string to convert.
19802
+ * @returns {string} Returns the converted string.
19803
+ * @example
19804
+ *
19805
+ * _.upperFirst('fred');
19806
+ * // => 'Fred'
19807
+ *
19808
+ * _.upperFirst('FRED');
19809
+ * // => 'FRED'
19810
+ */
19811
+ var upperFirst = createCaseFirst('toUpperCase');
19812
+
19813
+ /**
19814
+ * Splits `string` into an array of its words.
19815
+ *
19816
+ * @static
19817
+ * @memberOf _
19818
+ * @since 3.0.0
19819
+ * @category String
19820
+ * @param {string} [string=''] The string to inspect.
19821
+ * @param {RegExp|string} [pattern] The pattern to match words.
19822
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
19823
+ * @returns {Array} Returns the words of `string`.
19824
+ * @example
19825
+ *
19826
+ * _.words('fred, barney, & pebbles');
19827
+ * // => ['fred', 'barney', 'pebbles']
19828
+ *
19829
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
19830
+ * // => ['fred', 'barney', '&', 'pebbles']
19831
+ */
19832
+ function words(string, pattern, guard) {
19833
+ string = toString(string);
19834
+ pattern = guard ? undefined : pattern;
19835
+
19836
+ if (pattern === undefined) {
19837
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
19838
+ }
19839
+ return string.match(pattern) || [];
19840
+ }
19841
+
19842
+ /*------------------------------------------------------------------------*/
19843
+
19844
+ /**
19845
+ * Attempts to invoke `func`, returning either the result or the caught error
19846
+ * object. Any additional arguments are provided to `func` when it's invoked.
19847
+ *
19848
+ * @static
19849
+ * @memberOf _
19850
+ * @since 3.0.0
19851
+ * @category Util
19852
+ * @param {Function} func The function to attempt.
19853
+ * @param {...*} [args] The arguments to invoke `func` with.
19854
+ * @returns {*} Returns the `func` result or error object.
19855
+ * @example
19856
+ *
19857
+ * // Avoid throwing errors for invalid selectors.
19858
+ * var elements = _.attempt(function(selector) {
19859
+ * return document.querySelectorAll(selector);
19860
+ * }, '>_>');
19861
+ *
19862
+ * if (_.isError(elements)) {
19863
+ * elements = [];
19864
+ * }
19865
+ */
19866
+ var attempt = baseRest(function(func, args) {
19867
+ try {
19868
+ return apply(func, undefined, args);
19869
+ } catch (e) {
19870
+ return isError(e) ? e : new Error(e);
19871
+ }
19872
+ });
19873
+
19874
+ /**
19875
+ * Binds methods of an object to the object itself, overwriting the existing
19876
+ * method.
19877
+ *
19878
+ * **Note:** This method doesn't set the "length" property of bound functions.
19879
+ *
19880
+ * @static
19881
+ * @since 0.1.0
19882
+ * @memberOf _
19883
+ * @category Util
19884
+ * @param {Object} object The object to bind and assign the bound methods to.
19885
+ * @param {...(string|string[])} methodNames The object method names to bind.
19886
+ * @returns {Object} Returns `object`.
19887
+ * @example
19888
+ *
19889
+ * var view = {
19890
+ * 'label': 'docs',
19891
+ * 'click': function() {
19892
+ * console.log('clicked ' + this.label);
19893
+ * }
19894
+ * };
19895
+ *
19896
+ * _.bindAll(view, ['click']);
19897
+ * jQuery(element).on('click', view.click);
19898
+ * // => Logs 'clicked docs' when clicked.
19899
+ */
19900
+ var bindAll = flatRest(function(object, methodNames) {
19901
+ arrayEach(methodNames, function(key) {
19902
+ key = toKey(key);
19903
+ baseAssignValue(object, key, bind(object[key], object));
19904
+ });
19905
+ return object;
19906
+ });
19907
+
19908
+ /**
19909
+ * Creates a function that iterates over `pairs` and invokes the corresponding
19910
+ * function of the first predicate to return truthy. The predicate-function
19911
+ * pairs are invoked with the `this` binding and arguments of the created
19912
+ * function.
19913
+ *
19914
+ * @static
19915
+ * @memberOf _
19916
+ * @since 4.0.0
19917
+ * @category Util
19918
+ * @param {Array} pairs The predicate-function pairs.
19919
+ * @returns {Function} Returns the new composite function.
19920
+ * @example
19921
+ *
19922
+ * var func = _.cond([
19923
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
19924
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
19925
+ * [_.stubTrue, _.constant('no match')]
19926
+ * ]);
19927
+ *
19928
+ * func({ 'a': 1, 'b': 2 });
19929
+ * // => 'matches A'
19930
+ *
19931
+ * func({ 'a': 0, 'b': 1 });
19932
+ * // => 'matches B'
19933
+ *
19934
+ * func({ 'a': '1', 'b': '2' });
19935
+ * // => 'no match'
19936
+ */
19937
+ function cond(pairs) {
19938
+ var length = pairs == null ? 0 : pairs.length,
19939
+ toIteratee = getIteratee();
19940
+
19941
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
19942
+ if (typeof pair[1] != 'function') {
19943
+ throw new TypeError(FUNC_ERROR_TEXT);
19944
+ }
19945
+ return [toIteratee(pair[0]), pair[1]];
19946
+ });
19947
+
19948
+ return baseRest(function(args) {
19949
+ var index = -1;
19950
+ while (++index < length) {
19951
+ var pair = pairs[index];
19952
+ if (apply(pair[0], this, args)) {
19953
+ return apply(pair[1], this, args);
19954
+ }
19955
+ }
19956
+ });
19957
+ }
19958
+
19959
+ /**
19960
+ * Creates a function that invokes the predicate properties of `source` with
19961
+ * the corresponding property values of a given object, returning `true` if
19962
+ * all predicates return truthy, else `false`.
19963
+ *
19964
+ * **Note:** The created function is equivalent to `_.conformsTo` with
19965
+ * `source` partially applied.
19966
+ *
19967
+ * @static
19968
+ * @memberOf _
19969
+ * @since 4.0.0
19970
+ * @category Util
19971
+ * @param {Object} source The object of property predicates to conform to.
19972
+ * @returns {Function} Returns the new spec function.
19973
+ * @example
19974
+ *
19975
+ * var objects = [
19976
+ * { 'a': 2, 'b': 1 },
19977
+ * { 'a': 1, 'b': 2 }
19978
+ * ];
19979
+ *
19980
+ * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
19981
+ * // => [{ 'a': 1, 'b': 2 }]
19982
+ */
19983
+ function conforms(source) {
19984
+ return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
19985
+ }
19986
+
19987
+ /**
19988
+ * Creates a function that returns `value`.
19989
+ *
19990
+ * @static
19991
+ * @memberOf _
19992
+ * @since 2.4.0
19993
+ * @category Util
19994
+ * @param {*} value The value to return from the new function.
19995
+ * @returns {Function} Returns the new constant function.
19996
+ * @example
19997
+ *
19998
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
19999
+ *
20000
+ * console.log(objects);
20001
+ * // => [{ 'a': 1 }, { 'a': 1 }]
20002
+ *
20003
+ * console.log(objects[0] === objects[1]);
20004
+ * // => true
20005
+ */
20006
+ function constant(value) {
20007
+ return function() {
20008
+ return value;
20009
+ };
20010
+ }
20011
+
20012
+ /**
20013
+ * Checks `value` to determine whether a default value should be returned in
20014
+ * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
20015
+ * or `undefined`.
20016
+ *
20017
+ * @static
20018
+ * @memberOf _
20019
+ * @since 4.14.0
20020
+ * @category Util
20021
+ * @param {*} value The value to check.
20022
+ * @param {*} defaultValue The default value.
20023
+ * @returns {*} Returns the resolved value.
20024
+ * @example
20025
+ *
20026
+ * _.defaultTo(1, 10);
20027
+ * // => 1
20028
+ *
20029
+ * _.defaultTo(undefined, 10);
20030
+ * // => 10
20031
+ */
20032
+ function defaultTo(value, defaultValue) {
20033
+ return (value == null || value !== value) ? defaultValue : value;
20034
+ }
20035
+
20036
+ /**
20037
+ * Creates a function that returns the result of invoking the given functions
20038
+ * with the `this` binding of the created function, where each successive
20039
+ * invocation is supplied the return value of the previous.
20040
+ *
20041
+ * @static
20042
+ * @memberOf _
20043
+ * @since 3.0.0
20044
+ * @category Util
20045
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
20046
+ * @returns {Function} Returns the new composite function.
20047
+ * @see _.flowRight
20048
+ * @example
20049
+ *
20050
+ * function square(n) {
20051
+ * return n * n;
20052
+ * }
20053
+ *
20054
+ * var addSquare = _.flow([_.add, square]);
20055
+ * addSquare(1, 2);
20056
+ * // => 9
20057
+ */
20058
+ var flow = createFlow();
20059
+
20060
+ /**
20061
+ * This method is like `_.flow` except that it creates a function that
20062
+ * invokes the given functions from right to left.
20063
+ *
20064
+ * @static
20065
+ * @since 3.0.0
20066
+ * @memberOf _
20067
+ * @category Util
20068
+ * @param {...(Function|Function[])} [funcs] The functions to invoke.
20069
+ * @returns {Function} Returns the new composite function.
20070
+ * @see _.flow
20071
+ * @example
20072
+ *
20073
+ * function square(n) {
20074
+ * return n * n;
20075
+ * }
20076
+ *
20077
+ * var addSquare = _.flowRight([square, _.add]);
20078
+ * addSquare(1, 2);
20079
+ * // => 9
20080
+ */
20081
+ var flowRight = createFlow(true);
20082
+
20083
+ /**
20084
+ * This method returns the first argument it receives.
20085
+ *
20086
+ * @static
20087
+ * @since 0.1.0
20088
+ * @memberOf _
20089
+ * @category Util
20090
+ * @param {*} value Any value.
20091
+ * @returns {*} Returns `value`.
20092
+ * @example
20093
+ *
20094
+ * var object = { 'a': 1 };
20095
+ *
20096
+ * console.log(_.identity(object) === object);
20097
+ * // => true
20098
+ */
20099
+ function identity(value) {
20100
+ return value;
20101
+ }
20102
+
20103
+ /**
20104
+ * Creates a function that invokes `func` with the arguments of the created
20105
+ * function. If `func` is a property name, the created function returns the
20106
+ * property value for a given element. If `func` is an array or object, the
20107
+ * created function returns `true` for elements that contain the equivalent
20108
+ * source properties, otherwise it returns `false`.
20109
+ *
20110
+ * @static
20111
+ * @since 4.0.0
20112
+ * @memberOf _
20113
+ * @category Util
20114
+ * @param {*} [func=_.identity] The value to convert to a callback.
20115
+ * @returns {Function} Returns the callback.
20116
+ * @example
20117
+ *
20118
+ * var users = [
20119
+ * { 'user': 'barney', 'age': 36, 'active': true },
20120
+ * { 'user': 'fred', 'age': 40, 'active': false }
20121
+ * ];
20122
+ *
20123
+ * // The `_.matches` iteratee shorthand.
20124
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
20125
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
20126
+ *
20127
+ * // The `_.matchesProperty` iteratee shorthand.
20128
+ * _.filter(users, _.iteratee(['user', 'fred']));
20129
+ * // => [{ 'user': 'fred', 'age': 40 }]
20130
+ *
20131
+ * // The `_.property` iteratee shorthand.
20132
+ * _.map(users, _.iteratee('user'));
20133
+ * // => ['barney', 'fred']
20134
+ *
20135
+ * // Create custom iteratee shorthands.
20136
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
20137
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
20138
+ * return func.test(string);
20139
+ * };
20140
+ * });
20141
+ *
20142
+ * _.filter(['abc', 'def'], /ef/);
20143
+ * // => ['def']
20144
+ */
20145
+ function iteratee(func) {
20146
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
20147
+ }
20148
+
20149
+ /**
20150
+ * Creates a function that performs a partial deep comparison between a given
20151
+ * object and `source`, returning `true` if the given object has equivalent
20152
+ * property values, else `false`.
20153
+ *
20154
+ * **Note:** The created function is equivalent to `_.isMatch` with `source`
20155
+ * partially applied.
20156
+ *
20157
+ * Partial comparisons will match empty array and empty object `source`
20158
+ * values against any array or object value, respectively. See `_.isEqual`
20159
+ * for a list of supported value comparisons.
20160
+ *
20161
+ * @static
20162
+ * @memberOf _
20163
+ * @since 3.0.0
20164
+ * @category Util
20165
+ * @param {Object} source The object of property values to match.
20166
+ * @returns {Function} Returns the new spec function.
20167
+ * @example
20168
+ *
20169
+ * var objects = [
20170
+ * { 'a': 1, 'b': 2, 'c': 3 },
20171
+ * { 'a': 4, 'b': 5, 'c': 6 }
20172
+ * ];
20173
+ *
20174
+ * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
20175
+ * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
20176
+ */
20177
+ function matches(source) {
20178
+ return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
20179
+ }
20180
+
20181
+ /**
20182
+ * Creates a function that performs a partial deep comparison between the
20183
+ * value at `path` of a given object to `srcValue`, returning `true` if the
20184
+ * object value is equivalent, else `false`.
20185
+ *
20186
+ * **Note:** Partial comparisons will match empty array and empty object
20187
+ * `srcValue` values against any array or object value, respectively. See
20188
+ * `_.isEqual` for a list of supported value comparisons.
20189
+ *
20190
+ * @static
20191
+ * @memberOf _
20192
+ * @since 3.2.0
20193
+ * @category Util
20194
+ * @param {Array|string} path The path of the property to get.
20195
+ * @param {*} srcValue The value to match.
20196
+ * @returns {Function} Returns the new spec function.
20197
+ * @example
20198
+ *
20199
+ * var objects = [
20200
+ * { 'a': 1, 'b': 2, 'c': 3 },
20201
+ * { 'a': 4, 'b': 5, 'c': 6 }
20202
+ * ];
20203
+ *
20204
+ * _.find(objects, _.matchesProperty('a', 4));
20205
+ * // => { 'a': 4, 'b': 5, 'c': 6 }
20206
+ */
20207
+ function matchesProperty(path, srcValue) {
20208
+ return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
20209
+ }
20210
+
20211
+ /**
20212
+ * Creates a function that invokes the method at `path` of a given object.
20213
+ * Any additional arguments are provided to the invoked method.
20214
+ *
20215
+ * @static
20216
+ * @memberOf _
20217
+ * @since 3.7.0
20218
+ * @category Util
20219
+ * @param {Array|string} path The path of the method to invoke.
20220
+ * @param {...*} [args] The arguments to invoke the method with.
20221
+ * @returns {Function} Returns the new invoker function.
20222
+ * @example
20223
+ *
20224
+ * var objects = [
20225
+ * { 'a': { 'b': _.constant(2) } },
20226
+ * { 'a': { 'b': _.constant(1) } }
20227
+ * ];
20228
+ *
20229
+ * _.map(objects, _.method('a.b'));
20230
+ * // => [2, 1]
20231
+ *
20232
+ * _.map(objects, _.method(['a', 'b']));
20233
+ * // => [2, 1]
20234
+ */
20235
+ var method = baseRest(function(path, args) {
20236
+ return function(object) {
20237
+ return baseInvoke(object, path, args);
20238
+ };
20239
+ });
20240
+
20241
+ /**
20242
+ * The opposite of `_.method`; this method creates a function that invokes
20243
+ * the method at a given path of `object`. Any additional arguments are
20244
+ * provided to the invoked method.
20245
+ *
20246
+ * @static
20247
+ * @memberOf _
20248
+ * @since 3.7.0
20249
+ * @category Util
20250
+ * @param {Object} object The object to query.
20251
+ * @param {...*} [args] The arguments to invoke the method with.
20252
+ * @returns {Function} Returns the new invoker function.
20253
+ * @example
20254
+ *
20255
+ * var array = _.times(3, _.constant),
20256
+ * object = { 'a': array, 'b': array, 'c': array };
20257
+ *
20258
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
20259
+ * // => [2, 0]
20260
+ *
20261
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
20262
+ * // => [2, 0]
20263
+ */
20264
+ var methodOf = baseRest(function(object, args) {
20265
+ return function(path) {
20266
+ return baseInvoke(object, path, args);
20267
+ };
20268
+ });
20269
+
20270
+ /**
20271
+ * Adds all own enumerable string keyed function properties of a source
20272
+ * object to the destination object. If `object` is a function, then methods
20273
+ * are added to its prototype as well.
20274
+ *
20275
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
20276
+ * avoid conflicts caused by modifying the original.
20277
+ *
20278
+ * @static
20279
+ * @since 0.1.0
20280
+ * @memberOf _
20281
+ * @category Util
20282
+ * @param {Function|Object} [object=lodash] The destination object.
20283
+ * @param {Object} source The object of functions to add.
20284
+ * @param {Object} [options={}] The options object.
20285
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
20286
+ * @returns {Function|Object} Returns `object`.
20287
+ * @example
20288
+ *
20289
+ * function vowels(string) {
20290
+ * return _.filter(string, function(v) {
20291
+ * return /[aeiou]/i.test(v);
20292
+ * });
20293
+ * }
20294
+ *
20295
+ * _.mixin({ 'vowels': vowels });
20296
+ * _.vowels('fred');
20297
+ * // => ['e']
20298
+ *
20299
+ * _('fred').vowels().value();
20300
+ * // => ['e']
20301
+ *
20302
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
20303
+ * _('fred').vowels();
20304
+ * // => ['e']
20305
+ */
20306
+ function mixin(object, source, options) {
20307
+ var props = keys(source),
20308
+ methodNames = baseFunctions(source, props);
20309
+
20310
+ if (options == null &&
20311
+ !(isObject(source) && (methodNames.length || !props.length))) {
20312
+ options = source;
20313
+ source = object;
20314
+ object = this;
20315
+ methodNames = baseFunctions(source, keys(source));
20316
+ }
20317
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
20318
+ isFunc = isFunction(object);
20319
+
20320
+ arrayEach(methodNames, function(methodName) {
20321
+ var func = source[methodName];
20322
+ object[methodName] = func;
20323
+ if (isFunc) {
20324
+ object.prototype[methodName] = function() {
20325
+ var chainAll = this.__chain__;
20326
+ if (chain || chainAll) {
20327
+ var result = object(this.__wrapped__),
20328
+ actions = result.__actions__ = copyArray(this.__actions__);
20329
+
20330
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
20331
+ result.__chain__ = chainAll;
20332
+ return result;
20333
+ }
20334
+ return func.apply(object, arrayPush([this.value()], arguments));
20335
+ };
20336
+ }
20337
+ });
20338
+
20339
+ return object;
20340
+ }
20341
+
20342
+ /**
20343
+ * Reverts the `_` variable to its previous value and returns a reference to
20344
+ * the `lodash` function.
20345
+ *
20346
+ * @static
20347
+ * @since 0.1.0
20348
+ * @memberOf _
20349
+ * @category Util
20350
+ * @returns {Function} Returns the `lodash` function.
20351
+ * @example
20352
+ *
20353
+ * var lodash = _.noConflict();
20354
+ */
20355
+ function noConflict() {
20356
+ if (root._ === this) {
20357
+ root._ = oldDash;
20358
+ }
20359
+ return this;
20360
+ }
20361
+
20362
+ /**
20363
+ * This method returns `undefined`.
20364
+ *
20365
+ * @static
20366
+ * @memberOf _
20367
+ * @since 2.3.0
20368
+ * @category Util
20369
+ * @example
20370
+ *
20371
+ * _.times(2, _.noop);
20372
+ * // => [undefined, undefined]
20373
+ */
20374
+ function noop() {
20375
+ // No operation performed.
20376
+ }
20377
+
20378
+ /**
20379
+ * Creates a function that gets the argument at index `n`. If `n` is negative,
20380
+ * the nth argument from the end is returned.
20381
+ *
20382
+ * @static
20383
+ * @memberOf _
20384
+ * @since 4.0.0
20385
+ * @category Util
20386
+ * @param {number} [n=0] The index of the argument to return.
20387
+ * @returns {Function} Returns the new pass-thru function.
20388
+ * @example
20389
+ *
20390
+ * var func = _.nthArg(1);
20391
+ * func('a', 'b', 'c', 'd');
20392
+ * // => 'b'
20393
+ *
20394
+ * var func = _.nthArg(-2);
20395
+ * func('a', 'b', 'c', 'd');
20396
+ * // => 'c'
20397
+ */
20398
+ function nthArg(n) {
20399
+ n = toInteger(n);
20400
+ return baseRest(function(args) {
20401
+ return baseNth(args, n);
20402
+ });
20403
+ }
20404
+
20405
+ /**
20406
+ * Creates a function that invokes `iteratees` with the arguments it receives
20407
+ * and returns their results.
20408
+ *
20409
+ * @static
20410
+ * @memberOf _
20411
+ * @since 4.0.0
20412
+ * @category Util
20413
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
20414
+ * The iteratees to invoke.
20415
+ * @returns {Function} Returns the new function.
20416
+ * @example
20417
+ *
20418
+ * var func = _.over([Math.max, Math.min]);
20419
+ *
20420
+ * func(1, 2, 3, 4);
20421
+ * // => [4, 1]
20422
+ */
20423
+ var over = createOver(arrayMap);
20424
+
20425
+ /**
20426
+ * Creates a function that checks if **all** of the `predicates` return
20427
+ * truthy when invoked with the arguments it receives.
20428
+ *
20429
+ * @static
20430
+ * @memberOf _
20431
+ * @since 4.0.0
20432
+ * @category Util
20433
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
20434
+ * The predicates to check.
20435
+ * @returns {Function} Returns the new function.
20436
+ * @example
20437
+ *
20438
+ * var func = _.overEvery([Boolean, isFinite]);
20439
+ *
20440
+ * func('1');
20441
+ * // => true
20442
+ *
20443
+ * func(null);
20444
+ * // => false
20445
+ *
20446
+ * func(NaN);
20447
+ * // => false
20448
+ */
20449
+ var overEvery = createOver(arrayEvery);
20450
+
20451
+ /**
20452
+ * Creates a function that checks if **any** of the `predicates` return
20453
+ * truthy when invoked with the arguments it receives.
20454
+ *
20455
+ * @static
20456
+ * @memberOf _
20457
+ * @since 4.0.0
20458
+ * @category Util
20459
+ * @param {...(Function|Function[])} [predicates=[_.identity]]
20460
+ * The predicates to check.
20461
+ * @returns {Function} Returns the new function.
20462
+ * @example
20463
+ *
20464
+ * var func = _.overSome([Boolean, isFinite]);
20465
+ *
20466
+ * func('1');
20467
+ * // => true
20468
+ *
20469
+ * func(null);
20470
+ * // => true
20471
+ *
20472
+ * func(NaN);
20473
+ * // => false
20474
+ */
20475
+ var overSome = createOver(arraySome);
20476
+
20477
+ /**
20478
+ * Creates a function that returns the value at `path` of a given object.
20479
+ *
20480
+ * @static
20481
+ * @memberOf _
20482
+ * @since 2.4.0
20483
+ * @category Util
20484
+ * @param {Array|string} path The path of the property to get.
20485
+ * @returns {Function} Returns the new accessor function.
20486
+ * @example
20487
+ *
20488
+ * var objects = [
20489
+ * { 'a': { 'b': 2 } },
20490
+ * { 'a': { 'b': 1 } }
20491
+ * ];
20492
+ *
20493
+ * _.map(objects, _.property('a.b'));
20494
+ * // => [2, 1]
20495
+ *
20496
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
20497
+ * // => [1, 2]
20498
+ */
20499
+ function property(path) {
20500
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
20501
+ }
20502
+
20503
+ /**
20504
+ * The opposite of `_.property`; this method creates a function that returns
20505
+ * the value at a given path of `object`.
20506
+ *
20507
+ * @static
20508
+ * @memberOf _
20509
+ * @since 3.0.0
20510
+ * @category Util
20511
+ * @param {Object} object The object to query.
20512
+ * @returns {Function} Returns the new accessor function.
20513
+ * @example
20514
+ *
20515
+ * var array = [0, 1, 2],
20516
+ * object = { 'a': array, 'b': array, 'c': array };
20517
+ *
20518
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
20519
+ * // => [2, 0]
20520
+ *
20521
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
20522
+ * // => [2, 0]
20523
+ */
20524
+ function propertyOf(object) {
20525
+ return function(path) {
20526
+ return object == null ? undefined : baseGet(object, path);
20527
+ };
20528
+ }
20529
+
20530
+ /**
20531
+ * Creates an array of numbers (positive and/or negative) progressing from
20532
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
20533
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
20534
+ * it's set to `start` with `start` then set to `0`.
20535
+ *
20536
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
20537
+ * floating-point values which can produce unexpected results.
20538
+ *
20539
+ * @static
20540
+ * @since 0.1.0
20541
+ * @memberOf _
20542
+ * @category Util
20543
+ * @param {number} [start=0] The start of the range.
20544
+ * @param {number} end The end of the range.
20545
+ * @param {number} [step=1] The value to increment or decrement by.
20546
+ * @returns {Array} Returns the range of numbers.
20547
+ * @see _.inRange, _.rangeRight
20548
+ * @example
20549
+ *
20550
+ * _.range(4);
20551
+ * // => [0, 1, 2, 3]
20552
+ *
20553
+ * _.range(-4);
20554
+ * // => [0, -1, -2, -3]
20555
+ *
20556
+ * _.range(1, 5);
20557
+ * // => [1, 2, 3, 4]
20558
+ *
20559
+ * _.range(0, 20, 5);
20560
+ * // => [0, 5, 10, 15]
20561
+ *
20562
+ * _.range(0, -4, -1);
20563
+ * // => [0, -1, -2, -3]
20564
+ *
20565
+ * _.range(1, 4, 0);
20566
+ * // => [1, 1, 1]
20567
+ *
20568
+ * _.range(0);
20569
+ * // => []
20570
+ */
20571
+ var range = createRange();
20572
+
20573
+ /**
20574
+ * This method is like `_.range` except that it populates values in
20575
+ * descending order.
20576
+ *
20577
+ * @static
20578
+ * @memberOf _
20579
+ * @since 4.0.0
20580
+ * @category Util
20581
+ * @param {number} [start=0] The start of the range.
20582
+ * @param {number} end The end of the range.
20583
+ * @param {number} [step=1] The value to increment or decrement by.
20584
+ * @returns {Array} Returns the range of numbers.
20585
+ * @see _.inRange, _.range
20586
+ * @example
20587
+ *
20588
+ * _.rangeRight(4);
20589
+ * // => [3, 2, 1, 0]
20590
+ *
20591
+ * _.rangeRight(-4);
20592
+ * // => [-3, -2, -1, 0]
20593
+ *
20594
+ * _.rangeRight(1, 5);
20595
+ * // => [4, 3, 2, 1]
20596
+ *
20597
+ * _.rangeRight(0, 20, 5);
20598
+ * // => [15, 10, 5, 0]
20599
+ *
20600
+ * _.rangeRight(0, -4, -1);
20601
+ * // => [-3, -2, -1, 0]
20602
+ *
20603
+ * _.rangeRight(1, 4, 0);
20604
+ * // => [1, 1, 1]
20605
+ *
20606
+ * _.rangeRight(0);
20607
+ * // => []
20608
+ */
20609
+ var rangeRight = createRange(true);
20610
+
20611
+ /**
20612
+ * This method returns a new empty array.
20613
+ *
20614
+ * @static
20615
+ * @memberOf _
20616
+ * @since 4.13.0
20617
+ * @category Util
20618
+ * @returns {Array} Returns the new empty array.
20619
+ * @example
20620
+ *
20621
+ * var arrays = _.times(2, _.stubArray);
20622
+ *
20623
+ * console.log(arrays);
20624
+ * // => [[], []]
20625
+ *
20626
+ * console.log(arrays[0] === arrays[1]);
20627
+ * // => false
20628
+ */
20629
+ function stubArray() {
20630
+ return [];
20631
+ }
20632
+
20633
+ /**
20634
+ * This method returns `false`.
20635
+ *
20636
+ * @static
20637
+ * @memberOf _
20638
+ * @since 4.13.0
20639
+ * @category Util
20640
+ * @returns {boolean} Returns `false`.
20641
+ * @example
20642
+ *
20643
+ * _.times(2, _.stubFalse);
20644
+ * // => [false, false]
20645
+ */
20646
+ function stubFalse() {
20647
+ return false;
20648
+ }
20649
+
20650
+ /**
20651
+ * This method returns a new empty object.
20652
+ *
20653
+ * @static
20654
+ * @memberOf _
20655
+ * @since 4.13.0
20656
+ * @category Util
20657
+ * @returns {Object} Returns the new empty object.
20658
+ * @example
20659
+ *
20660
+ * var objects = _.times(2, _.stubObject);
20661
+ *
20662
+ * console.log(objects);
20663
+ * // => [{}, {}]
20664
+ *
20665
+ * console.log(objects[0] === objects[1]);
20666
+ * // => false
20667
+ */
20668
+ function stubObject() {
20669
+ return {};
20670
+ }
20671
+
20672
+ /**
20673
+ * This method returns an empty string.
20674
+ *
20675
+ * @static
20676
+ * @memberOf _
20677
+ * @since 4.13.0
20678
+ * @category Util
20679
+ * @returns {string} Returns the empty string.
20680
+ * @example
20681
+ *
20682
+ * _.times(2, _.stubString);
20683
+ * // => ['', '']
20684
+ */
20685
+ function stubString() {
20686
+ return '';
20687
+ }
20688
+
20689
+ /**
20690
+ * This method returns `true`.
20691
+ *
20692
+ * @static
20693
+ * @memberOf _
20694
+ * @since 4.13.0
20695
+ * @category Util
20696
+ * @returns {boolean} Returns `true`.
20697
+ * @example
20698
+ *
20699
+ * _.times(2, _.stubTrue);
20700
+ * // => [true, true]
20701
+ */
20702
+ function stubTrue() {
20703
+ return true;
20704
+ }
20705
+
20706
+ /**
20707
+ * Invokes the iteratee `n` times, returning an array of the results of
20708
+ * each invocation. The iteratee is invoked with one argument; (index).
20709
+ *
20710
+ * @static
20711
+ * @since 0.1.0
20712
+ * @memberOf _
20713
+ * @category Util
20714
+ * @param {number} n The number of times to invoke `iteratee`.
20715
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
20716
+ * @returns {Array} Returns the array of results.
20717
+ * @example
20718
+ *
20719
+ * _.times(3, String);
20720
+ * // => ['0', '1', '2']
20721
+ *
20722
+ * _.times(4, _.constant(0));
20723
+ * // => [0, 0, 0, 0]
20724
+ */
20725
+ function times(n, iteratee) {
20726
+ n = toInteger(n);
20727
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
20728
+ return [];
20729
+ }
20730
+ var index = MAX_ARRAY_LENGTH,
20731
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
20732
+
20733
+ iteratee = getIteratee(iteratee);
20734
+ n -= MAX_ARRAY_LENGTH;
20735
+
20736
+ var result = baseTimes(length, iteratee);
20737
+ while (++index < n) {
20738
+ iteratee(index);
20739
+ }
20740
+ return result;
20741
+ }
20742
+
20743
+ /**
20744
+ * Converts `value` to a property path array.
20745
+ *
20746
+ * @static
20747
+ * @memberOf _
20748
+ * @since 4.0.0
20749
+ * @category Util
20750
+ * @param {*} value The value to convert.
20751
+ * @returns {Array} Returns the new property path array.
20752
+ * @example
20753
+ *
20754
+ * _.toPath('a.b.c');
20755
+ * // => ['a', 'b', 'c']
20756
+ *
20757
+ * _.toPath('a[0].b.c');
20758
+ * // => ['a', '0', 'b', 'c']
20759
+ */
20760
+ function toPath(value) {
20761
+ if (isArray(value)) {
20762
+ return arrayMap(value, toKey);
20763
+ }
20764
+ return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
20765
+ }
20766
+
20767
+ /**
20768
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
20769
+ *
20770
+ * @static
20771
+ * @since 0.1.0
20772
+ * @memberOf _
20773
+ * @category Util
20774
+ * @param {string} [prefix=''] The value to prefix the ID with.
20775
+ * @returns {string} Returns the unique ID.
20776
+ * @example
20777
+ *
20778
+ * _.uniqueId('contact_');
20779
+ * // => 'contact_104'
20780
+ *
20781
+ * _.uniqueId();
20782
+ * // => '105'
20783
+ */
20784
+ function uniqueId(prefix) {
20785
+ var id = ++idCounter;
20786
+ return toString(prefix) + id;
20787
+ }
20788
+
20789
+ /*------------------------------------------------------------------------*/
20790
+
20791
+ /**
20792
+ * Adds two numbers.
20793
+ *
20794
+ * @static
20795
+ * @memberOf _
20796
+ * @since 3.4.0
20797
+ * @category Math
20798
+ * @param {number} augend The first number in an addition.
20799
+ * @param {number} addend The second number in an addition.
20800
+ * @returns {number} Returns the total.
20801
+ * @example
20802
+ *
20803
+ * _.add(6, 4);
20804
+ * // => 10
20805
+ */
20806
+ var add = createMathOperation(function(augend, addend) {
20807
+ return augend + addend;
20808
+ }, 0);
20809
+
20810
+ /**
20811
+ * Computes `number` rounded up to `precision`.
20812
+ *
20813
+ * @static
20814
+ * @memberOf _
20815
+ * @since 3.10.0
20816
+ * @category Math
20817
+ * @param {number} number The number to round up.
20818
+ * @param {number} [precision=0] The precision to round up to.
20819
+ * @returns {number} Returns the rounded up number.
20820
+ * @example
20821
+ *
20822
+ * _.ceil(4.006);
20823
+ * // => 5
20824
+ *
20825
+ * _.ceil(6.004, 2);
20826
+ * // => 6.01
20827
+ *
20828
+ * _.ceil(6040, -2);
20829
+ * // => 6100
20830
+ */
20831
+ var ceil = createRound('ceil');
20832
+
20833
+ /**
20834
+ * Divide two numbers.
20835
+ *
20836
+ * @static
20837
+ * @memberOf _
20838
+ * @since 4.7.0
20839
+ * @category Math
20840
+ * @param {number} dividend The first number in a division.
20841
+ * @param {number} divisor The second number in a division.
20842
+ * @returns {number} Returns the quotient.
20843
+ * @example
20844
+ *
20845
+ * _.divide(6, 4);
20846
+ * // => 1.5
20847
+ */
20848
+ var divide = createMathOperation(function(dividend, divisor) {
20849
+ return dividend / divisor;
20850
+ }, 1);
20851
+
20852
+ /**
20853
+ * Computes `number` rounded down to `precision`.
20854
+ *
20855
+ * @static
20856
+ * @memberOf _
20857
+ * @since 3.10.0
20858
+ * @category Math
20859
+ * @param {number} number The number to round down.
20860
+ * @param {number} [precision=0] The precision to round down to.
20861
+ * @returns {number} Returns the rounded down number.
20862
+ * @example
20863
+ *
20864
+ * _.floor(4.006);
20865
+ * // => 4
20866
+ *
20867
+ * _.floor(0.046, 2);
20868
+ * // => 0.04
20869
+ *
20870
+ * _.floor(4060, -2);
20871
+ * // => 4000
20872
+ */
20873
+ var floor = createRound('floor');
20874
+
20875
+ /**
20876
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
20877
+ * `undefined` is returned.
20878
+ *
20879
+ * @static
20880
+ * @since 0.1.0
20881
+ * @memberOf _
20882
+ * @category Math
20883
+ * @param {Array} array The array to iterate over.
20884
+ * @returns {*} Returns the maximum value.
20885
+ * @example
20886
+ *
20887
+ * _.max([4, 2, 8, 6]);
20888
+ * // => 8
20889
+ *
20890
+ * _.max([]);
20891
+ * // => undefined
20892
+ */
20893
+ function max(array) {
20894
+ return (array && array.length)
20895
+ ? baseExtremum(array, identity, baseGt)
20896
+ : undefined;
20897
+ }
20898
+
20899
+ /**
20900
+ * This method is like `_.max` except that it accepts `iteratee` which is
20901
+ * invoked for each element in `array` to generate the criterion by which
20902
+ * the value is ranked. The iteratee is invoked with one argument: (value).
20903
+ *
20904
+ * @static
20905
+ * @memberOf _
20906
+ * @since 4.0.0
20907
+ * @category Math
20908
+ * @param {Array} array The array to iterate over.
20909
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20910
+ * @returns {*} Returns the maximum value.
20911
+ * @example
20912
+ *
20913
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
20914
+ *
20915
+ * _.maxBy(objects, function(o) { return o.n; });
20916
+ * // => { 'n': 2 }
20917
+ *
20918
+ * // The `_.property` iteratee shorthand.
20919
+ * _.maxBy(objects, 'n');
20920
+ * // => { 'n': 2 }
20921
+ */
20922
+ function maxBy(array, iteratee) {
20923
+ return (array && array.length)
20924
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
20925
+ : undefined;
20926
+ }
20927
+
20928
+ /**
20929
+ * Computes the mean of the values in `array`.
20930
+ *
20931
+ * @static
20932
+ * @memberOf _
20933
+ * @since 4.0.0
20934
+ * @category Math
20935
+ * @param {Array} array The array to iterate over.
20936
+ * @returns {number} Returns the mean.
20937
+ * @example
20938
+ *
20939
+ * _.mean([4, 2, 8, 6]);
20940
+ * // => 5
20941
+ */
20942
+ function mean(array) {
20943
+ return baseMean(array, identity);
20944
+ }
20945
+
20946
+ /**
20947
+ * This method is like `_.mean` except that it accepts `iteratee` which is
20948
+ * invoked for each element in `array` to generate the value to be averaged.
20949
+ * The iteratee is invoked with one argument: (value).
20950
+ *
20951
+ * @static
20952
+ * @memberOf _
20953
+ * @since 4.7.0
20954
+ * @category Math
20955
+ * @param {Array} array The array to iterate over.
20956
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
20957
+ * @returns {number} Returns the mean.
20958
+ * @example
20959
+ *
20960
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
20961
+ *
20962
+ * _.meanBy(objects, function(o) { return o.n; });
20963
+ * // => 5
20964
+ *
20965
+ * // The `_.property` iteratee shorthand.
20966
+ * _.meanBy(objects, 'n');
20967
+ * // => 5
20968
+ */
20969
+ function meanBy(array, iteratee) {
20970
+ return baseMean(array, getIteratee(iteratee, 2));
20971
+ }
20972
+
20973
+ /**
20974
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
20975
+ * `undefined` is returned.
20976
+ *
20977
+ * @static
20978
+ * @since 0.1.0
20979
+ * @memberOf _
20980
+ * @category Math
20981
+ * @param {Array} array The array to iterate over.
20982
+ * @returns {*} Returns the minimum value.
20983
+ * @example
20984
+ *
20985
+ * _.min([4, 2, 8, 6]);
20986
+ * // => 2
20987
+ *
20988
+ * _.min([]);
20989
+ * // => undefined
20990
+ */
20991
+ function min(array) {
20992
+ return (array && array.length)
20993
+ ? baseExtremum(array, identity, baseLt)
20994
+ : undefined;
20995
+ }
20996
+
20997
+ /**
20998
+ * This method is like `_.min` except that it accepts `iteratee` which is
20999
+ * invoked for each element in `array` to generate the criterion by which
21000
+ * the value is ranked. The iteratee is invoked with one argument: (value).
21001
+ *
21002
+ * @static
21003
+ * @memberOf _
21004
+ * @since 4.0.0
21005
+ * @category Math
21006
+ * @param {Array} array The array to iterate over.
21007
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
21008
+ * @returns {*} Returns the minimum value.
21009
+ * @example
21010
+ *
21011
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
21012
+ *
21013
+ * _.minBy(objects, function(o) { return o.n; });
21014
+ * // => { 'n': 1 }
21015
+ *
21016
+ * // The `_.property` iteratee shorthand.
21017
+ * _.minBy(objects, 'n');
21018
+ * // => { 'n': 1 }
21019
+ */
21020
+ function minBy(array, iteratee) {
21021
+ return (array && array.length)
21022
+ ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
21023
+ : undefined;
21024
+ }
21025
+
21026
+ /**
21027
+ * Multiply two numbers.
21028
+ *
21029
+ * @static
21030
+ * @memberOf _
21031
+ * @since 4.7.0
21032
+ * @category Math
21033
+ * @param {number} multiplier The first number in a multiplication.
21034
+ * @param {number} multiplicand The second number in a multiplication.
21035
+ * @returns {number} Returns the product.
21036
+ * @example
21037
+ *
21038
+ * _.multiply(6, 4);
21039
+ * // => 24
21040
+ */
21041
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
21042
+ return multiplier * multiplicand;
21043
+ }, 1);
21044
+
21045
+ /**
21046
+ * Computes `number` rounded to `precision`.
21047
+ *
21048
+ * @static
21049
+ * @memberOf _
21050
+ * @since 3.10.0
21051
+ * @category Math
21052
+ * @param {number} number The number to round.
21053
+ * @param {number} [precision=0] The precision to round to.
21054
+ * @returns {number} Returns the rounded number.
21055
+ * @example
21056
+ *
21057
+ * _.round(4.006);
21058
+ * // => 4
21059
+ *
21060
+ * _.round(4.006, 2);
21061
+ * // => 4.01
21062
+ *
21063
+ * _.round(4060, -2);
21064
+ * // => 4100
21065
+ */
21066
+ var round = createRound('round');
21067
+
21068
+ /**
21069
+ * Subtract two numbers.
21070
+ *
21071
+ * @static
21072
+ * @memberOf _
21073
+ * @since 4.0.0
21074
+ * @category Math
21075
+ * @param {number} minuend The first number in a subtraction.
21076
+ * @param {number} subtrahend The second number in a subtraction.
21077
+ * @returns {number} Returns the difference.
21078
+ * @example
21079
+ *
21080
+ * _.subtract(6, 4);
21081
+ * // => 2
21082
+ */
21083
+ var subtract = createMathOperation(function(minuend, subtrahend) {
21084
+ return minuend - subtrahend;
21085
+ }, 0);
21086
+
21087
+ /**
21088
+ * Computes the sum of the values in `array`.
21089
+ *
21090
+ * @static
21091
+ * @memberOf _
21092
+ * @since 3.4.0
21093
+ * @category Math
21094
+ * @param {Array} array The array to iterate over.
21095
+ * @returns {number} Returns the sum.
21096
+ * @example
21097
+ *
21098
+ * _.sum([4, 2, 8, 6]);
21099
+ * // => 20
21100
+ */
21101
+ function sum(array) {
21102
+ return (array && array.length)
21103
+ ? baseSum(array, identity)
21104
+ : 0;
21105
+ }
21106
+
21107
+ /**
21108
+ * This method is like `_.sum` except that it accepts `iteratee` which is
21109
+ * invoked for each element in `array` to generate the value to be summed.
21110
+ * The iteratee is invoked with one argument: (value).
21111
+ *
21112
+ * @static
21113
+ * @memberOf _
21114
+ * @since 4.0.0
21115
+ * @category Math
21116
+ * @param {Array} array The array to iterate over.
21117
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
21118
+ * @returns {number} Returns the sum.
21119
+ * @example
21120
+ *
21121
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
21122
+ *
21123
+ * _.sumBy(objects, function(o) { return o.n; });
21124
+ * // => 20
21125
+ *
21126
+ * // The `_.property` iteratee shorthand.
21127
+ * _.sumBy(objects, 'n');
21128
+ * // => 20
21129
+ */
21130
+ function sumBy(array, iteratee) {
21131
+ return (array && array.length)
21132
+ ? baseSum(array, getIteratee(iteratee, 2))
21133
+ : 0;
21134
+ }
21135
+
21136
+ /*------------------------------------------------------------------------*/
21137
+
21138
+ // Add methods that return wrapped values in chain sequences.
21139
+ lodash.after = after;
21140
+ lodash.ary = ary;
21141
+ lodash.assign = assign;
21142
+ lodash.assignIn = assignIn;
21143
+ lodash.assignInWith = assignInWith;
21144
+ lodash.assignWith = assignWith;
21145
+ lodash.at = at;
21146
+ lodash.before = before;
21147
+ lodash.bind = bind;
21148
+ lodash.bindAll = bindAll;
21149
+ lodash.bindKey = bindKey;
21150
+ lodash.castArray = castArray;
21151
+ lodash.chain = chain;
21152
+ lodash.chunk = chunk;
21153
+ lodash.compact = compact;
21154
+ lodash.concat = concat;
21155
+ lodash.cond = cond;
21156
+ lodash.conforms = conforms;
21157
+ lodash.constant = constant;
21158
+ lodash.countBy = countBy;
21159
+ lodash.create = create;
21160
+ lodash.curry = curry;
21161
+ lodash.curryRight = curryRight;
21162
+ lodash.debounce = debounce;
21163
+ lodash.defaults = defaults;
21164
+ lodash.defaultsDeep = defaultsDeep;
21165
+ lodash.defer = defer;
21166
+ lodash.delay = delay;
21167
+ lodash.difference = difference;
21168
+ lodash.differenceBy = differenceBy;
21169
+ lodash.differenceWith = differenceWith;
21170
+ lodash.drop = drop;
21171
+ lodash.dropRight = dropRight;
21172
+ lodash.dropRightWhile = dropRightWhile;
21173
+ lodash.dropWhile = dropWhile;
21174
+ lodash.fill = fill;
21175
+ lodash.filter = filter;
21176
+ lodash.flatMap = flatMap;
21177
+ lodash.flatMapDeep = flatMapDeep;
21178
+ lodash.flatMapDepth = flatMapDepth;
21179
+ lodash.flatten = flatten;
21180
+ lodash.flattenDeep = flattenDeep;
21181
+ lodash.flattenDepth = flattenDepth;
21182
+ lodash.flip = flip;
21183
+ lodash.flow = flow;
21184
+ lodash.flowRight = flowRight;
21185
+ lodash.fromPairs = fromPairs;
21186
+ lodash.functions = functions;
21187
+ lodash.functionsIn = functionsIn;
21188
+ lodash.groupBy = groupBy;
21189
+ lodash.initial = initial;
21190
+ lodash.intersection = intersection;
21191
+ lodash.intersectionBy = intersectionBy;
21192
+ lodash.intersectionWith = intersectionWith;
21193
+ lodash.invert = invert;
21194
+ lodash.invertBy = invertBy;
21195
+ lodash.invokeMap = invokeMap;
21196
+ lodash.iteratee = iteratee;
21197
+ lodash.keyBy = keyBy;
21198
+ lodash.keys = keys;
21199
+ lodash.keysIn = keysIn;
21200
+ lodash.map = map;
21201
+ lodash.mapKeys = mapKeys;
21202
+ lodash.mapValues = mapValues;
21203
+ lodash.matches = matches;
21204
+ lodash.matchesProperty = matchesProperty;
21205
+ lodash.memoize = memoize;
21206
+ lodash.merge = merge;
21207
+ lodash.mergeWith = mergeWith;
21208
+ lodash.method = method;
21209
+ lodash.methodOf = methodOf;
21210
+ lodash.mixin = mixin;
21211
+ lodash.negate = negate;
21212
+ lodash.nthArg = nthArg;
21213
+ lodash.omit = omit;
21214
+ lodash.omitBy = omitBy;
21215
+ lodash.once = once;
21216
+ lodash.orderBy = orderBy;
21217
+ lodash.over = over;
21218
+ lodash.overArgs = overArgs;
21219
+ lodash.overEvery = overEvery;
21220
+ lodash.overSome = overSome;
21221
+ lodash.partial = partial;
21222
+ lodash.partialRight = partialRight;
21223
+ lodash.partition = partition;
21224
+ lodash.pick = pick;
21225
+ lodash.pickBy = pickBy;
21226
+ lodash.property = property;
21227
+ lodash.propertyOf = propertyOf;
21228
+ lodash.pull = pull;
21229
+ lodash.pullAll = pullAll;
21230
+ lodash.pullAllBy = pullAllBy;
21231
+ lodash.pullAllWith = pullAllWith;
21232
+ lodash.pullAt = pullAt;
21233
+ lodash.range = range;
21234
+ lodash.rangeRight = rangeRight;
21235
+ lodash.rearg = rearg;
21236
+ lodash.reject = reject;
21237
+ lodash.remove = remove;
21238
+ lodash.rest = rest;
21239
+ lodash.reverse = reverse;
21240
+ lodash.sampleSize = sampleSize;
21241
+ lodash.set = set;
21242
+ lodash.setWith = setWith;
21243
+ lodash.shuffle = shuffle;
21244
+ lodash.slice = slice;
21245
+ lodash.sortBy = sortBy;
21246
+ lodash.sortedUniq = sortedUniq;
21247
+ lodash.sortedUniqBy = sortedUniqBy;
21248
+ lodash.split = split;
21249
+ lodash.spread = spread;
21250
+ lodash.tail = tail;
21251
+ lodash.take = take;
21252
+ lodash.takeRight = takeRight;
21253
+ lodash.takeRightWhile = takeRightWhile;
21254
+ lodash.takeWhile = takeWhile;
21255
+ lodash.tap = tap;
21256
+ lodash.throttle = throttle;
21257
+ lodash.thru = thru;
21258
+ lodash.toArray = toArray;
21259
+ lodash.toPairs = toPairs;
21260
+ lodash.toPairsIn = toPairsIn;
21261
+ lodash.toPath = toPath;
21262
+ lodash.toPlainObject = toPlainObject;
21263
+ lodash.transform = transform;
21264
+ lodash.unary = unary;
21265
+ lodash.union = union;
21266
+ lodash.unionBy = unionBy;
21267
+ lodash.unionWith = unionWith;
21268
+ lodash.uniq = uniq;
21269
+ lodash.uniqBy = uniqBy;
21270
+ lodash.uniqWith = uniqWith;
21271
+ lodash.unset = unset;
21272
+ lodash.unzip = unzip;
21273
+ lodash.unzipWith = unzipWith;
21274
+ lodash.update = update;
21275
+ lodash.updateWith = updateWith;
21276
+ lodash.values = values;
21277
+ lodash.valuesIn = valuesIn;
21278
+ lodash.without = without;
21279
+ lodash.words = words;
21280
+ lodash.wrap = wrap;
21281
+ lodash.xor = xor;
21282
+ lodash.xorBy = xorBy;
21283
+ lodash.xorWith = xorWith;
21284
+ lodash.zip = zip;
21285
+ lodash.zipObject = zipObject;
21286
+ lodash.zipObjectDeep = zipObjectDeep;
21287
+ lodash.zipWith = zipWith;
21288
+
21289
+ // Add aliases.
21290
+ lodash.entries = toPairs;
21291
+ lodash.entriesIn = toPairsIn;
21292
+ lodash.extend = assignIn;
21293
+ lodash.extendWith = assignInWith;
21294
+
21295
+ // Add methods to `lodash.prototype`.
21296
+ mixin(lodash, lodash);
21297
+
21298
+ /*------------------------------------------------------------------------*/
21299
+
21300
+ // Add methods that return unwrapped values in chain sequences.
21301
+ lodash.add = add;
21302
+ lodash.attempt = attempt;
21303
+ lodash.camelCase = camelCase;
21304
+ lodash.capitalize = capitalize;
21305
+ lodash.ceil = ceil;
21306
+ lodash.clamp = clamp;
21307
+ lodash.clone = clone;
21308
+ lodash.cloneDeep = cloneDeep;
21309
+ lodash.cloneDeepWith = cloneDeepWith;
21310
+ lodash.cloneWith = cloneWith;
21311
+ lodash.conformsTo = conformsTo;
21312
+ lodash.deburr = deburr;
21313
+ lodash.defaultTo = defaultTo;
21314
+ lodash.divide = divide;
21315
+ lodash.endsWith = endsWith;
21316
+ lodash.eq = eq;
21317
+ lodash.escape = escape;
21318
+ lodash.escapeRegExp = escapeRegExp;
21319
+ lodash.every = every;
21320
+ lodash.find = find;
21321
+ lodash.findIndex = findIndex;
21322
+ lodash.findKey = findKey;
21323
+ lodash.findLast = findLast;
21324
+ lodash.findLastIndex = findLastIndex;
21325
+ lodash.findLastKey = findLastKey;
21326
+ lodash.floor = floor;
21327
+ lodash.forEach = forEach;
21328
+ lodash.forEachRight = forEachRight;
21329
+ lodash.forIn = forIn;
21330
+ lodash.forInRight = forInRight;
21331
+ lodash.forOwn = forOwn;
21332
+ lodash.forOwnRight = forOwnRight;
21333
+ lodash.get = get;
21334
+ lodash.gt = gt;
21335
+ lodash.gte = gte;
21336
+ lodash.has = has;
21337
+ lodash.hasIn = hasIn;
21338
+ lodash.head = head;
21339
+ lodash.identity = identity;
21340
+ lodash.includes = includes;
21341
+ lodash.indexOf = indexOf;
21342
+ lodash.inRange = inRange;
21343
+ lodash.invoke = invoke;
21344
+ lodash.isArguments = isArguments;
21345
+ lodash.isArray = isArray;
21346
+ lodash.isArrayBuffer = isArrayBuffer;
21347
+ lodash.isArrayLike = isArrayLike;
21348
+ lodash.isArrayLikeObject = isArrayLikeObject;
21349
+ lodash.isBoolean = isBoolean;
21350
+ lodash.isBuffer = isBuffer;
21351
+ lodash.isDate = isDate;
21352
+ lodash.isElement = isElement;
21353
+ lodash.isEmpty = isEmpty;
21354
+ lodash.isEqual = isEqual;
21355
+ lodash.isEqualWith = isEqualWith;
21356
+ lodash.isError = isError;
21357
+ lodash.isFinite = isFinite;
21358
+ lodash.isFunction = isFunction;
21359
+ lodash.isInteger = isInteger;
21360
+ lodash.isLength = isLength;
21361
+ lodash.isMap = isMap;
21362
+ lodash.isMatch = isMatch;
21363
+ lodash.isMatchWith = isMatchWith;
21364
+ lodash.isNaN = isNaN;
21365
+ lodash.isNative = isNative;
21366
+ lodash.isNil = isNil;
21367
+ lodash.isNull = isNull;
21368
+ lodash.isNumber = isNumber;
21369
+ lodash.isObject = isObject;
21370
+ lodash.isObjectLike = isObjectLike;
21371
+ lodash.isPlainObject = isPlainObject;
21372
+ lodash.isRegExp = isRegExp;
21373
+ lodash.isSafeInteger = isSafeInteger;
21374
+ lodash.isSet = isSet;
21375
+ lodash.isString = isString;
21376
+ lodash.isSymbol = isSymbol;
21377
+ lodash.isTypedArray = isTypedArray;
21378
+ lodash.isUndefined = isUndefined;
21379
+ lodash.isWeakMap = isWeakMap;
21380
+ lodash.isWeakSet = isWeakSet;
21381
+ lodash.join = join;
21382
+ lodash.kebabCase = kebabCase;
21383
+ lodash.last = last;
21384
+ lodash.lastIndexOf = lastIndexOf;
21385
+ lodash.lowerCase = lowerCase;
21386
+ lodash.lowerFirst = lowerFirst;
21387
+ lodash.lt = lt;
21388
+ lodash.lte = lte;
21389
+ lodash.max = max;
21390
+ lodash.maxBy = maxBy;
21391
+ lodash.mean = mean;
21392
+ lodash.meanBy = meanBy;
21393
+ lodash.min = min;
21394
+ lodash.minBy = minBy;
21395
+ lodash.stubArray = stubArray;
21396
+ lodash.stubFalse = stubFalse;
21397
+ lodash.stubObject = stubObject;
21398
+ lodash.stubString = stubString;
21399
+ lodash.stubTrue = stubTrue;
21400
+ lodash.multiply = multiply;
21401
+ lodash.nth = nth;
21402
+ lodash.noConflict = noConflict;
21403
+ lodash.noop = noop;
21404
+ lodash.now = now;
21405
+ lodash.pad = pad;
21406
+ lodash.padEnd = padEnd;
21407
+ lodash.padStart = padStart;
21408
+ lodash.parseInt = parseInt;
21409
+ lodash.random = random;
21410
+ lodash.reduce = reduce;
21411
+ lodash.reduceRight = reduceRight;
21412
+ lodash.repeat = repeat;
21413
+ lodash.replace = replace;
21414
+ lodash.result = result;
21415
+ lodash.round = round;
21416
+ lodash.runInContext = runInContext;
21417
+ lodash.sample = sample;
21418
+ lodash.size = size;
21419
+ lodash.snakeCase = snakeCase;
21420
+ lodash.some = some;
21421
+ lodash.sortedIndex = sortedIndex;
21422
+ lodash.sortedIndexBy = sortedIndexBy;
21423
+ lodash.sortedIndexOf = sortedIndexOf;
21424
+ lodash.sortedLastIndex = sortedLastIndex;
21425
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
21426
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
21427
+ lodash.startCase = startCase;
21428
+ lodash.startsWith = startsWith;
21429
+ lodash.subtract = subtract;
21430
+ lodash.sum = sum;
21431
+ lodash.sumBy = sumBy;
21432
+ lodash.template = template;
21433
+ lodash.times = times;
21434
+ lodash.toFinite = toFinite;
21435
+ lodash.toInteger = toInteger;
21436
+ lodash.toLength = toLength;
21437
+ lodash.toLower = toLower;
21438
+ lodash.toNumber = toNumber;
21439
+ lodash.toSafeInteger = toSafeInteger;
21440
+ lodash.toString = toString;
21441
+ lodash.toUpper = toUpper;
21442
+ lodash.trim = trim;
21443
+ lodash.trimEnd = trimEnd;
21444
+ lodash.trimStart = trimStart;
21445
+ lodash.truncate = truncate;
21446
+ lodash.unescape = unescape;
21447
+ lodash.uniqueId = uniqueId;
21448
+ lodash.upperCase = upperCase;
21449
+ lodash.upperFirst = upperFirst;
21450
+
21451
+ // Add aliases.
21452
+ lodash.each = forEach;
21453
+ lodash.eachRight = forEachRight;
21454
+ lodash.first = head;
21455
+
21456
+ mixin(lodash, (function() {
21457
+ var source = {};
21458
+ baseForOwn(lodash, function(func, methodName) {
21459
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
21460
+ source[methodName] = func;
21461
+ }
21462
+ });
21463
+ return source;
21464
+ }()), { 'chain': false });
21465
+
21466
+ /*------------------------------------------------------------------------*/
21467
+
21468
+ /**
21469
+ * The semantic version number.
21470
+ *
21471
+ * @static
21472
+ * @memberOf _
21473
+ * @type {string}
21474
+ */
21475
+ lodash.VERSION = VERSION;
21476
+
21477
+ // Assign default placeholders.
21478
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
21479
+ lodash[methodName].placeholder = lodash;
21480
+ });
21481
+
21482
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
21483
+ arrayEach(['drop', 'take'], function(methodName, index) {
21484
+ LazyWrapper.prototype[methodName] = function(n) {
21485
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
21486
+
21487
+ var result = (this.__filtered__ && !index)
21488
+ ? new LazyWrapper(this)
21489
+ : this.clone();
21490
+
21491
+ if (result.__filtered__) {
21492
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
21493
+ } else {
21494
+ result.__views__.push({
21495
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
21496
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
21497
+ });
21498
+ }
21499
+ return result;
21500
+ };
21501
+
21502
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
21503
+ return this.reverse()[methodName](n).reverse();
21504
+ };
21505
+ });
21506
+
21507
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
21508
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
21509
+ var type = index + 1,
21510
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
21511
+
21512
+ LazyWrapper.prototype[methodName] = function(iteratee) {
21513
+ var result = this.clone();
21514
+ result.__iteratees__.push({
21515
+ 'iteratee': getIteratee(iteratee, 3),
21516
+ 'type': type
21517
+ });
21518
+ result.__filtered__ = result.__filtered__ || isFilter;
21519
+ return result;
21520
+ };
21521
+ });
21522
+
21523
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
21524
+ arrayEach(['head', 'last'], function(methodName, index) {
21525
+ var takeName = 'take' + (index ? 'Right' : '');
21526
+
21527
+ LazyWrapper.prototype[methodName] = function() {
21528
+ return this[takeName](1).value()[0];
21529
+ };
21530
+ });
21531
+
21532
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
21533
+ arrayEach(['initial', 'tail'], function(methodName, index) {
21534
+ var dropName = 'drop' + (index ? '' : 'Right');
21535
+
21536
+ LazyWrapper.prototype[methodName] = function() {
21537
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
21538
+ };
21539
+ });
21540
+
21541
+ LazyWrapper.prototype.compact = function() {
21542
+ return this.filter(identity);
21543
+ };
21544
+
21545
+ LazyWrapper.prototype.find = function(predicate) {
21546
+ return this.filter(predicate).head();
21547
+ };
21548
+
21549
+ LazyWrapper.prototype.findLast = function(predicate) {
21550
+ return this.reverse().find(predicate);
21551
+ };
21552
+
21553
+ LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
21554
+ if (typeof path == 'function') {
21555
+ return new LazyWrapper(this);
21556
+ }
21557
+ return this.map(function(value) {
21558
+ return baseInvoke(value, path, args);
21559
+ });
21560
+ });
21561
+
21562
+ LazyWrapper.prototype.reject = function(predicate) {
21563
+ return this.filter(negate(getIteratee(predicate)));
21564
+ };
21565
+
21566
+ LazyWrapper.prototype.slice = function(start, end) {
21567
+ start = toInteger(start);
21568
+
21569
+ var result = this;
21570
+ if (result.__filtered__ && (start > 0 || end < 0)) {
21571
+ return new LazyWrapper(result);
21572
+ }
21573
+ if (start < 0) {
21574
+ result = result.takeRight(-start);
21575
+ } else if (start) {
21576
+ result = result.drop(start);
21577
+ }
21578
+ if (end !== undefined) {
21579
+ end = toInteger(end);
21580
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
21581
+ }
21582
+ return result;
21583
+ };
21584
+
21585
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
21586
+ return this.reverse().takeWhile(predicate).reverse();
21587
+ };
21588
+
21589
+ LazyWrapper.prototype.toArray = function() {
21590
+ return this.take(MAX_ARRAY_LENGTH);
21591
+ };
21592
+
21593
+ // Add `LazyWrapper` methods to `lodash.prototype`.
21594
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
21595
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
21596
+ isTaker = /^(?:head|last)$/.test(methodName),
21597
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
21598
+ retUnwrapped = isTaker || /^find/.test(methodName);
21599
+
21600
+ if (!lodashFunc) {
21601
+ return;
21602
+ }
21603
+ lodash.prototype[methodName] = function() {
21604
+ var value = this.__wrapped__,
21605
+ args = isTaker ? [1] : arguments,
21606
+ isLazy = value instanceof LazyWrapper,
21607
+ iteratee = args[0],
21608
+ useLazy = isLazy || isArray(value);
21609
+
21610
+ var interceptor = function(value) {
21611
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
21612
+ return (isTaker && chainAll) ? result[0] : result;
21613
+ };
21614
+
21615
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
21616
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
21617
+ isLazy = useLazy = false;
21618
+ }
21619
+ var chainAll = this.__chain__,
21620
+ isHybrid = !!this.__actions__.length,
21621
+ isUnwrapped = retUnwrapped && !chainAll,
21622
+ onlyLazy = isLazy && !isHybrid;
21623
+
21624
+ if (!retUnwrapped && useLazy) {
21625
+ value = onlyLazy ? value : new LazyWrapper(this);
21626
+ var result = func.apply(value, args);
21627
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
21628
+ return new LodashWrapper(result, chainAll);
21629
+ }
21630
+ if (isUnwrapped && onlyLazy) {
21631
+ return func.apply(this, args);
21632
+ }
21633
+ result = this.thru(interceptor);
21634
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
21635
+ };
21636
+ });
21637
+
21638
+ // Add `Array` methods to `lodash.prototype`.
21639
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
21640
+ var func = arrayProto[methodName],
21641
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
21642
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
21643
+
21644
+ lodash.prototype[methodName] = function() {
21645
+ var args = arguments;
21646
+ if (retUnwrapped && !this.__chain__) {
21647
+ var value = this.value();
21648
+ return func.apply(isArray(value) ? value : [], args);
21649
+ }
21650
+ return this[chainName](function(value) {
21651
+ return func.apply(isArray(value) ? value : [], args);
21652
+ });
21653
+ };
21654
+ });
21655
+
21656
+ // Map minified method names to their real names.
21657
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
21658
+ var lodashFunc = lodash[methodName];
21659
+ if (lodashFunc) {
21660
+ var key = (lodashFunc.name + ''),
21661
+ names = realNames[key] || (realNames[key] = []);
21662
+
21663
+ names.push({ 'name': methodName, 'func': lodashFunc });
21664
+ }
21665
+ });
21666
+
21667
+ realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
21668
+ 'name': 'wrapper',
21669
+ 'func': undefined
21670
+ }];
21671
+
21672
+ // Add methods to `LazyWrapper`.
21673
+ LazyWrapper.prototype.clone = lazyClone;
21674
+ LazyWrapper.prototype.reverse = lazyReverse;
21675
+ LazyWrapper.prototype.value = lazyValue;
21676
+
21677
+ // Add chain sequence methods to the `lodash` wrapper.
21678
+ lodash.prototype.at = wrapperAt;
21679
+ lodash.prototype.chain = wrapperChain;
21680
+ lodash.prototype.commit = wrapperCommit;
21681
+ lodash.prototype.next = wrapperNext;
21682
+ lodash.prototype.plant = wrapperPlant;
21683
+ lodash.prototype.reverse = wrapperReverse;
21684
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
21685
+
21686
+ // Add lazy aliases.
21687
+ lodash.prototype.first = lodash.prototype.head;
21688
+
21689
+ if (symIterator) {
21690
+ lodash.prototype[symIterator] = wrapperToIterator;
21691
+ }
21692
+ return lodash;
21693
+ });
21694
+
21695
+ /*--------------------------------------------------------------------------*/
21696
+
21697
+ // Export lodash.
21698
+ var _ = runInContext();
21699
+
21700
+ // Some AMD build optimizers, like r.js, check for condition patterns like:
21701
+ if (true) {
21702
+ // Expose Lodash on the global object to prevent errors when Lodash is
21703
+ // loaded by a script tag in the presence of an AMD loader.
21704
+ // See http://requirejs.org/docs/errors.html#mismatch for more details.
21705
+ // Use `_.noConflict` to remove Lodash from the global object.
21706
+ root._ = _;
21707
+
21708
+ // Define as an anonymous module so, through path mapping, it can be
21709
+ // referenced as the "underscore" module.
21710
+ !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
21711
+ return _;
21712
+ }).call(exports, __webpack_require__, exports, module),
21713
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
21714
+ }
21715
+ // Check for `exports` after `define` in case a build optimizer adds it.
21716
+ else if (freeModule) {
21717
+ // Export for Node.js.
21718
+ (freeModule.exports = _)._ = _;
21719
+ // Export for CommonJS support.
21720
+ freeExports._ = _;
21721
+ }
21722
+ else {
21723
+ // Export to the global object.
21724
+ root._ = _;
21725
+ }
21726
+ }.call(this));
21727
+
21728
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(34), __webpack_require__(106)(module)))
21729
+
21730
+ /***/ }),
21731
+ /* 3 */
21732
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21733
+
21734
+ "use strict";
21735
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _classCallCheck;
21736
+ function _classCallCheck(instance, Constructor) {
21737
+ if (!(instance instanceof Constructor)) {
21738
+ throw new TypeError("Cannot call a class as a function");
21739
+ }
21740
+ }
21741
+
21742
+ /***/ }),
21743
+ /* 4 */
21744
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21745
+
21746
+ "use strict";
21747
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _createClass;
21748
+ function _defineProperties(target, props) {
21749
+ for (var i = 0; i < props.length; i++) {
21750
+ var descriptor = props[i];
21751
+ descriptor.enumerable = descriptor.enumerable || false;
21752
+ descriptor.configurable = true;
21753
+ if ("value" in descriptor) descriptor.writable = true;
21754
+ Object.defineProperty(target, descriptor.key, descriptor);
21755
+ }
21756
+ }
21757
+
21758
+ function _createClass(Constructor, protoProps, staticProps) {
21759
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
21760
+ if (staticProps) _defineProperties(Constructor, staticProps);
21761
+ return Constructor;
21762
+ }
21763
+
21764
+ /***/ }),
21765
+ /* 5 */
21766
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21767
+
21768
+ "use strict";
21769
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _possibleConstructorReturn;
21770
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers_esm_typeof__ = __webpack_require__(41);
21771
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assertThisInitialized__ = __webpack_require__(9);
21772
+
21773
+
21774
+ function _possibleConstructorReturn(self, call) {
21775
+ if (call && (Object(__WEBPACK_IMPORTED_MODULE_0__helpers_esm_typeof__["a" /* default */])(call) === "object" || typeof call === "function")) {
21776
+ return call;
21777
+ }
21778
+
21779
+ return Object(__WEBPACK_IMPORTED_MODULE_1__assertThisInitialized__["a" /* default */])(self);
21780
+ }
21781
+
21782
+ /***/ }),
21783
+ /* 6 */
21784
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21785
+
21786
+ "use strict";
21787
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _getPrototypeOf;
21788
+ function _getPrototypeOf(o) {
21789
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
21790
+ return o.__proto__ || Object.getPrototypeOf(o);
21791
+ };
21792
+ return _getPrototypeOf(o);
21793
+ }
21794
+
21795
+ /***/ }),
21796
+ /* 7 */
21797
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21798
+
21799
+ "use strict";
21800
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _inherits;
21801
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__setPrototypeOf__ = __webpack_require__(368);
21802
+
21803
+ function _inherits(subClass, superClass) {
21804
+ if (typeof superClass !== "function" && superClass !== null) {
21805
+ throw new TypeError("Super expression must either be null or a function");
21806
+ }
21807
+
21808
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
21809
+ constructor: {
21810
+ value: subClass,
21811
+ writable: true,
21812
+ configurable: true
21813
+ }
21814
+ });
21815
+ if (superClass) Object(__WEBPACK_IMPORTED_MODULE_0__setPrototypeOf__["a" /* default */])(subClass, superClass);
21816
+ }
21817
+
21818
+ /***/ }),
21819
+ /* 8 */
21820
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21821
+
21822
+ "use strict";
21823
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
21824
+ function _extends() {
21825
+ _extends = Object.assign || function (target) {
21826
+ for (var i = 1; i < arguments.length; i++) {
21827
+ var source = arguments[i];
21828
+
21829
+ for (var key in source) {
21830
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
21831
+ target[key] = source[key];
21832
+ }
21833
+ }
21834
+ }
21835
+
21836
+ return target;
21837
+ };
21838
+
21839
+ return _extends.apply(this, arguments);
21840
+ }
21841
+
21842
+ /***/ }),
21843
+ /* 9 */
21844
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21845
+
21846
+ "use strict";
21847
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _assertThisInitialized;
21848
+ function _assertThisInitialized(self) {
21849
+ if (self === void 0) {
21850
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
21851
+ }
21852
+
21853
+ return self;
21854
+ }
21855
+
21856
+ /***/ }),
21857
+ /* 10 */
21858
+ /***/ (function(module, exports, __webpack_require__) {
21859
+
21860
+ /* WEBPACK VAR INJECTION */(function(process) {/**
21861
+ * Copyright (c) 2013-present, Facebook, Inc.
21862
+ *
21863
+ * This source code is licensed under the MIT license found in the
21864
+ * LICENSE file in the root directory of this source tree.
21865
+ */
21866
+
21867
+ if (process.env.NODE_ENV !== 'production') {
21868
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
21869
+ Symbol.for &&
21870
+ Symbol.for('react.element')) ||
21871
+ 0xeac7;
21872
+
21873
+ var isValidElement = function(object) {
21874
+ return typeof object === 'object' &&
21875
+ object !== null &&
21876
+ object.$$typeof === REACT_ELEMENT_TYPE;
21877
+ };
21878
+
21879
+ // By explicitly using `prop-types` you are opting into new development behavior.
21880
+ // http://fb.me/prop-types-in-prod
21881
+ var throwOnDirectAccess = true;
21882
+ module.exports = __webpack_require__(506)(isValidElement, throwOnDirectAccess);
21883
+ } else {
21884
+ // By explicitly using `prop-types` you are opting into new production behavior.
21885
+ // http://fb.me/prop-types-in-prod
21886
+ module.exports = __webpack_require__(507)();
21887
+ }
21888
+
21889
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
21890
+
21891
+ /***/ }),
21892
+ /* 11 */
21893
+ /***/ (function(module, exports, __webpack_require__) {
21894
+
21895
+ "use strict";
21896
+ /* WEBPACK VAR INJECTION */(function(process) {
21897
+
21898
+ if (process.env.NODE_ENV === 'production') {
21899
+ module.exports = __webpack_require__(355);
21900
+ } else {
21901
+ module.exports = __webpack_require__(356);
21902
+ }
21903
+
21904
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
21905
+
21906
+ /***/ }),
21907
+ /* 12 */
21908
+ /***/ (function(module, exports, __webpack_require__) {
21909
+
21910
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
21911
+ Copyright (c) 2017 Jed Watson.
21912
+ Licensed under the MIT License (MIT), see
21913
+ http://jedwatson.github.io/classnames
21914
+ */
21915
+ /* global define */
21916
+
21917
+ (function () {
21918
+ 'use strict';
21919
+
21920
+ var hasOwn = {}.hasOwnProperty;
21921
+
21922
+ function classNames () {
21923
+ var classes = [];
21924
+
21925
+ for (var i = 0; i < arguments.length; i++) {
21926
+ var arg = arguments[i];
21927
+ if (!arg) continue;
21928
+
21929
+ var argType = typeof arg;
21930
+
21931
+ if (argType === 'string' || argType === 'number') {
21932
+ classes.push(arg);
21933
+ } else if (Array.isArray(arg) && arg.length) {
21934
+ var inner = classNames.apply(null, arg);
21935
+ if (inner) {
21936
+ classes.push(inner);
21937
+ }
21938
+ } else if (argType === 'object') {
21939
+ for (var key in arg) {
21940
+ if (hasOwn.call(arg, key) && arg[key]) {
21941
+ classes.push(key);
21942
+ }
21943
+ }
21944
+ }
21945
+ }
21946
+
21947
+ return classes.join(' ');
21948
+ }
21949
+
21950
+ if (typeof module !== 'undefined' && module.exports) {
21951
+ classNames.default = classNames;
21952
+ module.exports = classNames;
21953
+ } else if (true) {
21954
+ // register as 'classnames', consistent with npm package name
21955
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
21956
+ return classNames;
21957
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
21958
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
21959
+ } else {
21960
+ window.classNames = classNames;
21961
+ }
21962
+ }());
21963
+
21964
+
21965
+ /***/ }),
21966
+ /* 13 */
21967
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21968
+
21969
+ "use strict";
21970
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _objectWithoutProperties;
21971
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__objectWithoutPropertiesLoose__ = __webpack_require__(354);
21972
+
21973
+ function _objectWithoutProperties(source, excluded) {
21974
+ if (source == null) return {};
21975
+ var target = Object(__WEBPACK_IMPORTED_MODULE_0__objectWithoutPropertiesLoose__["a" /* default */])(source, excluded);
21976
+ var key, i;
21977
+
21978
+ if (Object.getOwnPropertySymbols) {
21979
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
21980
+
21981
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
21982
+ key = sourceSymbolKeys[i];
21983
+ if (excluded.indexOf(key) >= 0) continue;
21984
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
21985
+ target[key] = source[key];
21986
+ }
21987
+ }
21988
+
21989
+ return target;
21990
+ }
21991
+
21992
+ /***/ }),
21993
+ /* 14 */
21994
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
21995
+
21996
+ "use strict";
21997
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(2);
21998
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);
21999
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_higher_order_component__ = __webpack_require__(35);
22000
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__create_higher_order_component__["a"]; });
22001
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__if_condition__ = __webpack_require__(379);
22002
+ /* unused harmony reexport ifCondition */
22003
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__pure__ = __webpack_require__(380);
22004
+ /* unused harmony reexport pure */
22005
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__with_global_events__ = __webpack_require__(383);
22006
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__with_global_events__["a"]; });
22007
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__with_instance_id__ = __webpack_require__(385);
22008
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_5__with_instance_id__["a"]; });
22009
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__with_safe_timeout__ = __webpack_require__(386);
22010
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_6__with_safe_timeout__["a"]; });
22011
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__with_state__ = __webpack_require__(387);
22012
+ /* unused harmony reexport withState */
22013
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_0_lodash__, "flowRight")) __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0_lodash__["flowRight"]; });
22014
+ /**
22015
+ * External dependencies
22016
+ */
22017
+
22018
+
22019
+
22020
+
22021
+
22022
+
22023
+
22024
+
22025
+ /**
22026
+ * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
22027
+ * composition, where each successive invocation is supplied the return value of the previous.
22028
+ *
22029
+ * @param {...Function} hocs The HOC functions to invoke.
22030
+ *
22031
+ * @return {Function} Returns the new composite function.
22032
+ */
22033
+
22034
+
22035
+ //# sourceMappingURL=index.js.map
22036
+
22037
+ /***/ }),
22038
+ /* 15 */
22039
+ /***/ (function(module, exports, __webpack_require__) {
22040
+
22041
+ "use strict";
22042
+
22043
+
22044
+ Object.defineProperty(exports, "__esModule", {
22045
+ value: true
22046
+ });
22047
+ var DISPLAY_FORMAT = exports.DISPLAY_FORMAT = 'L';
22048
+ var ISO_FORMAT = exports.ISO_FORMAT = 'YYYY-MM-DD';
22049
+ var ISO_MONTH_FORMAT = exports.ISO_MONTH_FORMAT = 'YYYY-MM';
22050
+
22051
+ var START_DATE = exports.START_DATE = 'startDate';
22052
+ var END_DATE = exports.END_DATE = 'endDate';
22053
+
22054
+ var HORIZONTAL_ORIENTATION = exports.HORIZONTAL_ORIENTATION = 'horizontal';
22055
+ var VERTICAL_ORIENTATION = exports.VERTICAL_ORIENTATION = 'vertical';
22056
+ var VERTICAL_SCROLLABLE = exports.VERTICAL_SCROLLABLE = 'verticalScrollable';
22057
+
22058
+ var ICON_BEFORE_POSITION = exports.ICON_BEFORE_POSITION = 'before';
22059
+ var ICON_AFTER_POSITION = exports.ICON_AFTER_POSITION = 'after';
22060
+
22061
+ var INFO_POSITION_TOP = exports.INFO_POSITION_TOP = 'top';
22062
+ var INFO_POSITION_BOTTOM = exports.INFO_POSITION_BOTTOM = 'bottom';
22063
+ var INFO_POSITION_BEFORE = exports.INFO_POSITION_BEFORE = 'before';
22064
+ var INFO_POSITION_AFTER = exports.INFO_POSITION_AFTER = 'after';
22065
+
22066
+ var ANCHOR_LEFT = exports.ANCHOR_LEFT = 'left';
22067
+ var ANCHOR_RIGHT = exports.ANCHOR_RIGHT = 'right';
22068
+
22069
+ var OPEN_DOWN = exports.OPEN_DOWN = 'down';
22070
+ var OPEN_UP = exports.OPEN_UP = 'up';
22071
+
22072
+ var DAY_SIZE = exports.DAY_SIZE = 39;
22073
+ var BLOCKED_MODIFIER = exports.BLOCKED_MODIFIER = 'blocked';
22074
+ var WEEKDAYS = exports.WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
22075
+
22076
+ var FANG_WIDTH_PX = exports.FANG_WIDTH_PX = 20;
22077
+ var FANG_HEIGHT_PX = exports.FANG_HEIGHT_PX = 10;
22078
+ var DEFAULT_VERTICAL_SPACING = exports.DEFAULT_VERTICAL_SPACING = 22;
22079
+
22080
+ var MODIFIER_KEY_NAMES = exports.MODIFIER_KEY_NAMES = new Set(['Shift', 'Control', 'Alt', 'Meta']);
22081
+
22082
+ /***/ }),
22083
+ /* 16 */
22084
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22085
+
22086
+ "use strict";
22087
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _objectSpread;
22088
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty__ = __webpack_require__(32);
22089
+
22090
+ function _objectSpread(target) {
22091
+ for (var i = 1; i < arguments.length; i++) {
22092
+ var source = arguments[i] != null ? arguments[i] : {};
22093
+ var ownKeys = Object.keys(source);
22094
+
22095
+ if (typeof Object.getOwnPropertySymbols === 'function') {
22096
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
22097
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22098
+ }));
22099
+ }
22100
+
22101
+ ownKeys.forEach(function (key) {
22102
+ Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty__["a" /* default */])(target, key, source[key]);
22103
+ });
22104
+ }
22105
+
22106
+ return target;
22107
+ }
22108
+
22109
+ /***/ }),
22110
+ /* 17 */
22111
+ /***/ (function(module, exports, __webpack_require__) {
22112
+
22113
+ Object.defineProperty(exports, "__esModule", {
22114
+ value: true
22115
+ });
22116
+ exports["default"] = wrapValidator;
22117
+
22118
+ var _object = __webpack_require__(18);
22119
+
22120
+ var _object2 = _interopRequireDefault(_object);
22121
+
22122
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
22123
+
22124
+ function wrapValidator(validator, typeName) {
22125
+ var typeChecker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
22126
+
22127
+ return (0, _object2["default"])(validator.bind(), {
22128
+ typeName: typeName,
22129
+ typeChecker: typeChecker,
22130
+ isRequired: (0, _object2["default"])(validator.isRequired.bind(), {
22131
+ typeName: typeName,
22132
+ typeChecker: typeChecker,
22133
+ typeRequired: true
22134
+ })
22135
+ });
22136
+ }
22137
+ //# sourceMappingURL=wrapValidator.js.map
22138
+
22139
+ /***/ }),
22140
+ /* 18 */
22141
+ /***/ (function(module, exports, __webpack_require__) {
22142
+
22143
+ "use strict";
22144
+
22145
+
22146
+ var defineProperties = __webpack_require__(25);
22147
+
22148
+ var implementation = __webpack_require__(277);
22149
+ var getPolyfill = __webpack_require__(278);
22150
+ var shim = __webpack_require__(505);
22151
+
22152
+ var polyfill = getPolyfill();
22153
+
22154
+ defineProperties(polyfill, {
22155
+ getPolyfill: getPolyfill,
22156
+ implementation: implementation,
22157
+ shim: shim
22158
+ });
22159
+
22160
+ module.exports = polyfill;
22161
+
22162
+
22163
+ /***/ }),
22164
+ /* 19 */
22165
+ /***/ (function(module, exports, __webpack_require__) {
22166
+
22167
+ /* WEBPACK VAR INJECTION */(function(process) {module.exports = process.env.NODE_ENV === 'production' ? __webpack_require__(511) : __webpack_require__(512);
22168
+
22169
+ //# sourceMappingURL=index.js.map
22170
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
22171
+
22172
+ /***/ }),
22173
+ /* 20 */
22174
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22175
+
22176
+ "use strict";
22177
+ /* unused harmony export setLocaleData */
22178
+ /* harmony export (immutable) */ __webpack_exports__["a"] = __;
22179
+ /* harmony export (immutable) */ __webpack_exports__["c"] = _x;
22180
+ /* harmony export (immutable) */ __webpack_exports__["b"] = _n;
22181
+ /* unused harmony export _nx */
22182
+ /* harmony export (immutable) */ __webpack_exports__["d"] = sprintf;
22183
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__ = __webpack_require__(16);
22184
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tannin__ = __webpack_require__(372);
22185
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_memize__ = __webpack_require__(110);
22186
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_memize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_memize__);
22187
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_sprintf_js__ = __webpack_require__(377);
22188
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_sprintf_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_sprintf_js__);
22189
+
22190
+
22191
+ /**
22192
+ * External dependencies
22193
+ */
22194
+
22195
+
22196
+
22197
+ /**
22198
+ * Default locale data to use for Tannin domain when not otherwise provided.
22199
+ * Assumes an English plural forms expression.
22200
+ *
22201
+ * @type {Object}
22202
+ */
22203
+
22204
+ var DEFAULT_LOCALE_DATA = {
22205
+ '': {
22206
+ plural_forms: 'plural=(n!=1)'
22207
+ }
22208
+ };
22209
+ /**
22210
+ * Log to console, once per message; or more precisely, per referentially equal
22211
+ * argument set. Because Jed throws errors, we log these to the console instead
22212
+ * to avoid crashing the application.
22213
+ *
22214
+ * @param {...*} args Arguments to pass to `console.error`
22215
+ */
22216
+
22217
+ var logErrorOnce = __WEBPACK_IMPORTED_MODULE_2_memize___default()(console.error); // eslint-disable-line no-console
22218
+
22219
+ /**
22220
+ * The underlying instance of Tannin to which exported functions interface.
22221
+ *
22222
+ * @type {Tannin}
22223
+ */
22224
+
22225
+ var i18n = new __WEBPACK_IMPORTED_MODULE_1_tannin__["a" /* default */]({});
22226
+ /**
22227
+ * Merges locale data into the Tannin instance by domain. Accepts data in a
22228
+ * Jed-formatted JSON object shape.
22229
+ *
22230
+ * @see http://messageformat.github.io/Jed/
22231
+ *
22232
+ * @param {?Object} data Locale data configuration.
22233
+ * @param {?string} domain Domain for which configuration applies.
22234
+ */
22235
+
22236
+ function setLocaleData(data) {
22237
+ var domain = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
22238
+ i18n.data[domain] = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__["a" /* default */])({}, DEFAULT_LOCALE_DATA, i18n.data[domain], data); // Populate default domain configuration (supported locale date which omits
22239
+ // a plural forms expression).
22240
+
22241
+ i18n.data[domain][''] = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__["a" /* default */])({}, DEFAULT_LOCALE_DATA[''], i18n.data[domain]['']);
22242
+ }
22243
+ /**
22244
+ * Wrapper for Tannin's `dcnpgettext`. Populates default locale data if not
22245
+ * otherwise previously assigned.
22246
+ *
22247
+ * @param {?string} domain Domain to retrieve the translated text.
22248
+ * @param {?string} context Context information for the translators.
22249
+ * @param {string} single Text to translate if non-plural. Used as fallback
22250
+ * return value on a caught error.
22251
+ * @param {?string} plural The text to be used if the number is plural.
22252
+ * @param {?number} number The number to compare against to use either the
22253
+ * singular or plural form.
22254
+ *
22255
+ * @return {string} The translated string.
22256
+ */
22257
+
22258
+ function dcnpgettext() {
22259
+ var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';
22260
+ var context = arguments.length > 1 ? arguments[1] : undefined;
22261
+ var single = arguments.length > 2 ? arguments[2] : undefined;
22262
+ var plural = arguments.length > 3 ? arguments[3] : undefined;
22263
+ var number = arguments.length > 4 ? arguments[4] : undefined;
22264
+
22265
+ if (!i18n.data[domain]) {
22266
+ setLocaleData(undefined, domain);
22267
+ }
22268
+
22269
+ return i18n.dcnpgettext(domain, context, single, plural, number);
22270
+ }
22271
+ /**
22272
+ * Retrieve the translation of text.
22273
+ *
22274
+ * @see https://developer.wordpress.org/reference/functions/__/
22275
+ *
22276
+ * @param {string} text Text to translate.
22277
+ * @param {?string} domain Domain to retrieve the translated text.
22278
+ *
22279
+ * @return {string} Translated text.
22280
+ */
22281
+
22282
+
22283
+ function __(text, domain) {
22284
+ return dcnpgettext(domain, undefined, text);
22285
+ }
22286
+ /**
22287
+ * Retrieve translated string with gettext context.
22288
+ *
22289
+ * @see https://developer.wordpress.org/reference/functions/_x/
22290
+ *
22291
+ * @param {string} text Text to translate.
22292
+ * @param {string} context Context information for the translators.
22293
+ * @param {?string} domain Domain to retrieve the translated text.
22294
+ *
22295
+ * @return {string} Translated context string without pipe.
22296
+ */
22297
+
22298
+ function _x(text, context, domain) {
22299
+ return dcnpgettext(domain, context, text);
22300
+ }
22301
+ /**
22302
+ * Translates and retrieves the singular or plural form based on the supplied
22303
+ * number.
22304
+ *
22305
+ * @see https://developer.wordpress.org/reference/functions/_n/
22306
+ *
22307
+ * @param {string} single The text to be used if the number is singular.
22308
+ * @param {string} plural The text to be used if the number is plural.
22309
+ * @param {number} number The number to compare against to use either the
22310
+ * singular or plural form.
22311
+ * @param {?string} domain Domain to retrieve the translated text.
22312
+ *
22313
+ * @return {string} The translated singular or plural form.
22314
+ */
22315
+
22316
+ function _n(single, plural, number, domain) {
22317
+ return dcnpgettext(domain, undefined, single, plural, number);
22318
+ }
22319
+ /**
22320
+ * Translates and retrieves the singular or plural form based on the supplied
22321
+ * number, with gettext context.
22322
+ *
22323
+ * @see https://developer.wordpress.org/reference/functions/_nx/
22324
+ *
22325
+ * @param {string} single The text to be used if the number is singular.
22326
+ * @param {string} plural The text to be used if the number is plural.
22327
+ * @param {number} number The number to compare against to use either the
22328
+ * singular or plural form.
22329
+ * @param {string} context Context information for the translators.
22330
+ * @param {?string} domain Domain to retrieve the translated text.
22331
+ *
22332
+ * @return {string} The translated singular or plural form.
22333
+ */
22334
+
22335
+ function _nx(single, plural, number, context, domain) {
22336
+ return dcnpgettext(domain, context, single, plural, number);
22337
+ }
22338
+ /**
22339
+ * Returns a formatted string. If an error occurs in applying the format, the
22340
+ * original format string is returned.
22341
+ *
22342
+ * @param {string} format The format of the string to generate.
22343
+ * @param {string[]} ...args Arguments to apply to the format.
22344
+ *
22345
+ * @see http://www.diveintojavascript.com/projects/javascript-sprintf
22346
+ *
22347
+ * @return {string} The formatted string.
22348
+ */
22349
+
22350
+ function sprintf(format) {
22351
+ try {
22352
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
22353
+ args[_key - 1] = arguments[_key];
22354
+ }
22355
+
22356
+ return __WEBPACK_IMPORTED_MODULE_3_sprintf_js___default.a.sprintf.apply(__WEBPACK_IMPORTED_MODULE_3_sprintf_js___default.a, [format].concat(args));
22357
+ } catch (error) {
22358
+ logErrorOnce('sprintf error: \n\n' + error.toString());
22359
+ return format;
22360
+ }
22361
+ }
22362
+ //# sourceMappingURL=index.js.map
22363
+
22364
+ /***/ }),
22365
+ /* 21 */
22366
+ /***/ (function(module, exports) {
22367
+
22368
+ // shim for using process in browser
22369
+ var process = module.exports = {};
22370
+
22371
+ // cached from whatever global is present so that test runners that stub it
22372
+ // don't break things. But we need to wrap it in a try catch in case it is
22373
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
22374
+ // function because try/catches deoptimize in certain engines.
22375
+
22376
+ var cachedSetTimeout;
22377
+ var cachedClearTimeout;
22378
+
22379
+ function defaultSetTimout() {
22380
+ throw new Error('setTimeout has not been defined');
22381
+ }
22382
+ function defaultClearTimeout () {
22383
+ throw new Error('clearTimeout has not been defined');
22384
+ }
22385
+ (function () {
22386
+ try {
22387
+ if (typeof setTimeout === 'function') {
22388
+ cachedSetTimeout = setTimeout;
22389
+ } else {
22390
+ cachedSetTimeout = defaultSetTimout;
22391
+ }
22392
+ } catch (e) {
22393
+ cachedSetTimeout = defaultSetTimout;
22394
+ }
22395
+ try {
22396
+ if (typeof clearTimeout === 'function') {
22397
+ cachedClearTimeout = clearTimeout;
22398
+ } else {
22399
+ cachedClearTimeout = defaultClearTimeout;
22400
+ }
22401
+ } catch (e) {
22402
+ cachedClearTimeout = defaultClearTimeout;
22403
+ }
22404
+ } ())
22405
+ function runTimeout(fun) {
22406
+ if (cachedSetTimeout === setTimeout) {
22407
+ //normal enviroments in sane situations
22408
+ return setTimeout(fun, 0);
22409
+ }
22410
+ // if setTimeout wasn't available but was latter defined
22411
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
22412
+ cachedSetTimeout = setTimeout;
22413
+ return setTimeout(fun, 0);
22414
+ }
22415
+ try {
22416
+ // when when somebody has screwed with setTimeout but no I.E. maddness
22417
+ return cachedSetTimeout(fun, 0);
22418
+ } catch(e){
22419
+ try {
22420
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
22421
+ return cachedSetTimeout.call(null, fun, 0);
22422
+ } catch(e){
22423
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
22424
+ return cachedSetTimeout.call(this, fun, 0);
22425
+ }
22426
+ }
22427
+
22428
+
22429
+ }
22430
+ function runClearTimeout(marker) {
22431
+ if (cachedClearTimeout === clearTimeout) {
22432
+ //normal enviroments in sane situations
22433
+ return clearTimeout(marker);
22434
+ }
22435
+ // if clearTimeout wasn't available but was latter defined
22436
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
22437
+ cachedClearTimeout = clearTimeout;
22438
+ return clearTimeout(marker);
22439
+ }
22440
+ try {
22441
+ // when when somebody has screwed with setTimeout but no I.E. maddness
22442
+ return cachedClearTimeout(marker);
22443
+ } catch (e){
22444
+ try {
22445
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
22446
+ return cachedClearTimeout.call(null, marker);
22447
+ } catch (e){
22448
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
22449
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
22450
+ return cachedClearTimeout.call(this, marker);
22451
+ }
22452
+ }
22453
+
22454
+
22455
+
22456
+ }
22457
+ var queue = [];
22458
+ var draining = false;
22459
+ var currentQueue;
22460
+ var queueIndex = -1;
22461
+
22462
+ function cleanUpNextTick() {
22463
+ if (!draining || !currentQueue) {
22464
+ return;
22465
+ }
22466
+ draining = false;
22467
+ if (currentQueue.length) {
22468
+ queue = currentQueue.concat(queue);
22469
+ } else {
22470
+ queueIndex = -1;
22471
+ }
22472
+ if (queue.length) {
22473
+ drainQueue();
22474
+ }
22475
+ }
22476
+
22477
+ function drainQueue() {
22478
+ if (draining) {
22479
+ return;
22480
+ }
22481
+ var timeout = runTimeout(cleanUpNextTick);
22482
+ draining = true;
22483
+
22484
+ var len = queue.length;
22485
+ while(len) {
22486
+ currentQueue = queue;
22487
+ queue = [];
22488
+ while (++queueIndex < len) {
22489
+ if (currentQueue) {
22490
+ currentQueue[queueIndex].run();
22491
+ }
22492
+ }
22493
+ queueIndex = -1;
22494
+ len = queue.length;
22495
+ }
22496
+ currentQueue = null;
22497
+ draining = false;
22498
+ runClearTimeout(timeout);
22499
+ }
22500
+
22501
+ process.nextTick = function (fun) {
22502
+ var args = new Array(arguments.length - 1);
22503
+ if (arguments.length > 1) {
22504
+ for (var i = 1; i < arguments.length; i++) {
22505
+ args[i - 1] = arguments[i];
22506
+ }
22507
+ }
22508
+ queue.push(new Item(fun, args));
22509
+ if (queue.length === 1 && !draining) {
22510
+ runTimeout(drainQueue);
22511
+ }
22512
+ };
22513
+
22514
+ // v8 likes predictible objects
22515
+ function Item(fun, array) {
22516
+ this.fun = fun;
22517
+ this.array = array;
22518
+ }
22519
+ Item.prototype.run = function () {
22520
+ this.fun.apply(null, this.array);
22521
+ };
22522
+ process.title = 'browser';
22523
+ process.browser = true;
22524
+ process.env = {};
22525
+ process.argv = [];
22526
+ process.version = ''; // empty string to avoid regexp issues
22527
+ process.versions = {};
22528
+
22529
+ function noop() {}
22530
+
22531
+ process.on = noop;
22532
+ process.addListener = noop;
22533
+ process.once = noop;
22534
+ process.off = noop;
22535
+ process.removeListener = noop;
22536
+ process.removeAllListeners = noop;
22537
+ process.emit = noop;
22538
+ process.prependListener = noop;
22539
+ process.prependOnceListener = noop;
22540
+
22541
+ process.listeners = function (name) { return [] }
22542
+
22543
+ process.binding = function (name) {
22544
+ throw new Error('process.binding is not supported');
22545
+ };
22546
+
22547
+ process.cwd = function () { return '/' };
22548
+ process.chdir = function (dir) {
22549
+ throw new Error('process.chdir is not supported');
22550
+ };
22551
+ process.umask = function() { return 0; };
22552
+
22553
+
22554
+ /***/ }),
22555
+ /* 22 */
22556
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22557
+
22558
+ "use strict";
22559
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _toConsumableArray;
22560
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayWithoutHoles__ = __webpack_require__(369);
22561
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__iterableToArray__ = __webpack_require__(370);
22562
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nonIterableSpread__ = __webpack_require__(371);
22563
+
22564
+
22565
+
22566
+ function _toConsumableArray(arr) {
22567
+ return Object(__WEBPACK_IMPORTED_MODULE_0__arrayWithoutHoles__["a" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__iterableToArray__["a" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_2__nonIterableSpread__["a" /* default */])();
22568
+ }
22569
+
22570
+ /***/ }),
22571
+ /* 23 */
22572
+ /***/ (function(module, exports, __webpack_require__) {
22573
+
22574
+ "use strict";
22575
+
22576
+
22577
+ Object.defineProperty(exports, "__esModule", {
22578
+ value: true
22579
+ });
22580
+ var calendarLabel = 'Calendar';
22581
+ var closeDatePicker = 'Close';
22582
+ var focusStartDate = 'Interact with the calendar and add the check-in date for your trip.';
22583
+ var clearDate = 'Clear Date';
22584
+ var clearDates = 'Clear Dates';
22585
+ var jumpToPrevMonth = 'Move backward to switch to the previous month.';
22586
+ var jumpToNextMonth = 'Move forward to switch to the next month.';
22587
+ var keyboardShortcuts = 'Keyboard Shortcuts';
22588
+ var showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';
22589
+ var hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';
22590
+ var openThisPanel = 'Open this panel.';
22591
+ var enterKey = 'Enter key';
22592
+ var leftArrowRightArrow = 'Right and left arrow keys';
22593
+ var upArrowDownArrow = 'up and down arrow keys';
22594
+ var pageUpPageDown = 'page up and page down keys';
22595
+ var homeEnd = 'Home and end keys';
22596
+ var escape = 'Escape key';
22597
+ var questionMark = 'Question mark';
22598
+ var selectFocusedDate = 'Select the date in focus.';
22599
+ var moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.';
22600
+ var moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';
22601
+ var moveFocusByOneMonth = 'Switch months.';
22602
+ var moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';
22603
+ var returnFocusToInput = 'Return to the date input field.';
22604
+ var keyboardNavigationInstructions = 'Press the down arrow key to interact with the calendar and\n select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';
22605
+
22606
+ var chooseAvailableStartDate = function chooseAvailableStartDate(_ref) {
22607
+ var date = _ref.date;
22608
+ return 'Choose ' + String(date) + ' as your check-in date. It\u2019s available.';
22609
+ };
22610
+ var chooseAvailableEndDate = function chooseAvailableEndDate(_ref2) {
22611
+ var date = _ref2.date;
22612
+ return 'Choose ' + String(date) + ' as your check-out date. It\u2019s available.';
22613
+ };
22614
+ var chooseAvailableDate = function chooseAvailableDate(_ref3) {
22615
+ var date = _ref3.date;
22616
+ return date;
22617
+ };
22618
+ var dateIsUnavailable = function dateIsUnavailable(_ref4) {
22619
+ var date = _ref4.date;
22620
+ return 'Not available. ' + String(date);
22621
+ };
22622
+ var dateIsSelected = function dateIsSelected(_ref5) {
22623
+ var date = _ref5.date;
22624
+ return 'Selected. ' + String(date);
22625
+ };
22626
+
22627
+ exports['default'] = {
22628
+ calendarLabel: calendarLabel,
22629
+ closeDatePicker: closeDatePicker,
22630
+ focusStartDate: focusStartDate,
22631
+ clearDate: clearDate,
22632
+ clearDates: clearDates,
22633
+ jumpToPrevMonth: jumpToPrevMonth,
22634
+ jumpToNextMonth: jumpToNextMonth,
22635
+ keyboardShortcuts: keyboardShortcuts,
22636
+ showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
22637
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
22638
+ openThisPanel: openThisPanel,
22639
+ enterKey: enterKey,
22640
+ leftArrowRightArrow: leftArrowRightArrow,
22641
+ upArrowDownArrow: upArrowDownArrow,
22642
+ pageUpPageDown: pageUpPageDown,
22643
+ homeEnd: homeEnd,
22644
+ escape: escape,
22645
+ questionMark: questionMark,
22646
+ selectFocusedDate: selectFocusedDate,
22647
+ moveFocusByOneDay: moveFocusByOneDay,
22648
+ moveFocusByOneWeek: moveFocusByOneWeek,
22649
+ moveFocusByOneMonth: moveFocusByOneMonth,
22650
+ moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
22651
+ returnFocusToInput: returnFocusToInput,
22652
+ keyboardNavigationInstructions: keyboardNavigationInstructions,
22653
+
22654
+ chooseAvailableStartDate: chooseAvailableStartDate,
22655
+ chooseAvailableEndDate: chooseAvailableEndDate,
22656
+ dateIsUnavailable: dateIsUnavailable,
22657
+ dateIsSelected: dateIsSelected
22658
+ };
22659
+ var DateRangePickerPhrases = exports.DateRangePickerPhrases = {
22660
+ calendarLabel: calendarLabel,
22661
+ closeDatePicker: closeDatePicker,
22662
+ clearDates: clearDates,
22663
+ focusStartDate: focusStartDate,
22664
+ jumpToPrevMonth: jumpToPrevMonth,
22665
+ jumpToNextMonth: jumpToNextMonth,
22666
+ keyboardShortcuts: keyboardShortcuts,
22667
+ showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
22668
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
22669
+ openThisPanel: openThisPanel,
22670
+ enterKey: enterKey,
22671
+ leftArrowRightArrow: leftArrowRightArrow,
22672
+ upArrowDownArrow: upArrowDownArrow,
22673
+ pageUpPageDown: pageUpPageDown,
22674
+ homeEnd: homeEnd,
22675
+ escape: escape,
22676
+ questionMark: questionMark,
22677
+ selectFocusedDate: selectFocusedDate,
22678
+ moveFocusByOneDay: moveFocusByOneDay,
22679
+ moveFocusByOneWeek: moveFocusByOneWeek,
22680
+ moveFocusByOneMonth: moveFocusByOneMonth,
22681
+ moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
22682
+ returnFocusToInput: returnFocusToInput,
22683
+ keyboardNavigationInstructions: keyboardNavigationInstructions,
22684
+ chooseAvailableStartDate: chooseAvailableStartDate,
22685
+ chooseAvailableEndDate: chooseAvailableEndDate,
22686
+ dateIsUnavailable: dateIsUnavailable,
22687
+ dateIsSelected: dateIsSelected
22688
+ };
22689
+
22690
+ var DateRangePickerInputPhrases = exports.DateRangePickerInputPhrases = {
22691
+ focusStartDate: focusStartDate,
22692
+ clearDates: clearDates,
22693
+ keyboardNavigationInstructions: keyboardNavigationInstructions
22694
+ };
22695
+
22696
+ var SingleDatePickerPhrases = exports.SingleDatePickerPhrases = {
22697
+ calendarLabel: calendarLabel,
22698
+ closeDatePicker: closeDatePicker,
22699
+ clearDate: clearDate,
22700
+ jumpToPrevMonth: jumpToPrevMonth,
22701
+ jumpToNextMonth: jumpToNextMonth,
22702
+ keyboardShortcuts: keyboardShortcuts,
22703
+ showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
22704
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
22705
+ openThisPanel: openThisPanel,
22706
+ enterKey: enterKey,
22707
+ leftArrowRightArrow: leftArrowRightArrow,
22708
+ upArrowDownArrow: upArrowDownArrow,
22709
+ pageUpPageDown: pageUpPageDown,
22710
+ homeEnd: homeEnd,
22711
+ escape: escape,
22712
+ questionMark: questionMark,
22713
+ selectFocusedDate: selectFocusedDate,
22714
+ moveFocusByOneDay: moveFocusByOneDay,
22715
+ moveFocusByOneWeek: moveFocusByOneWeek,
22716
+ moveFocusByOneMonth: moveFocusByOneMonth,
22717
+ moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
22718
+ returnFocusToInput: returnFocusToInput,
22719
+ keyboardNavigationInstructions: keyboardNavigationInstructions,
22720
+ chooseAvailableDate: chooseAvailableDate,
22721
+ dateIsUnavailable: dateIsUnavailable,
22722
+ dateIsSelected: dateIsSelected
22723
+ };
22724
+
22725
+ var SingleDatePickerInputPhrases = exports.SingleDatePickerInputPhrases = {
22726
+ clearDate: clearDate,
22727
+ keyboardNavigationInstructions: keyboardNavigationInstructions
22728
+ };
22729
+
22730
+ var DayPickerPhrases = exports.DayPickerPhrases = {
22731
+ calendarLabel: calendarLabel,
22732
+ jumpToPrevMonth: jumpToPrevMonth,
22733
+ jumpToNextMonth: jumpToNextMonth,
22734
+ keyboardShortcuts: keyboardShortcuts,
22735
+ showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
22736
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
22737
+ openThisPanel: openThisPanel,
22738
+ enterKey: enterKey,
22739
+ leftArrowRightArrow: leftArrowRightArrow,
22740
+ upArrowDownArrow: upArrowDownArrow,
22741
+ pageUpPageDown: pageUpPageDown,
22742
+ homeEnd: homeEnd,
22743
+ escape: escape,
22744
+ questionMark: questionMark,
22745
+ selectFocusedDate: selectFocusedDate,
22746
+ moveFocusByOneDay: moveFocusByOneDay,
22747
+ moveFocusByOneWeek: moveFocusByOneWeek,
22748
+ moveFocusByOneMonth: moveFocusByOneMonth,
22749
+ moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
22750
+ returnFocusToInput: returnFocusToInput,
22751
+ chooseAvailableStartDate: chooseAvailableStartDate,
22752
+ chooseAvailableEndDate: chooseAvailableEndDate,
22753
+ chooseAvailableDate: chooseAvailableDate,
22754
+ dateIsUnavailable: dateIsUnavailable,
22755
+ dateIsSelected: dateIsSelected
22756
+ };
22757
+
22758
+ var DayPickerKeyboardShortcutsPhrases = exports.DayPickerKeyboardShortcutsPhrases = {
22759
+ keyboardShortcuts: keyboardShortcuts,
22760
+ showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
22761
+ hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
22762
+ openThisPanel: openThisPanel,
22763
+ enterKey: enterKey,
22764
+ leftArrowRightArrow: leftArrowRightArrow,
22765
+ upArrowDownArrow: upArrowDownArrow,
22766
+ pageUpPageDown: pageUpPageDown,
22767
+ homeEnd: homeEnd,
22768
+ escape: escape,
22769
+ questionMark: questionMark,
22770
+ selectFocusedDate: selectFocusedDate,
22771
+ moveFocusByOneDay: moveFocusByOneDay,
22772
+ moveFocusByOneWeek: moveFocusByOneWeek,
22773
+ moveFocusByOneMonth: moveFocusByOneMonth,
22774
+ moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
22775
+ returnFocusToInput: returnFocusToInput
22776
+ };
22777
+
22778
+ var DayPickerNavigationPhrases = exports.DayPickerNavigationPhrases = {
22779
+ jumpToPrevMonth: jumpToPrevMonth,
22780
+ jumpToNextMonth: jumpToNextMonth
22781
+ };
22782
+
22783
+ var CalendarDayPhrases = exports.CalendarDayPhrases = {
22784
+ chooseAvailableDate: chooseAvailableDate,
22785
+ dateIsUnavailable: dateIsUnavailable,
22786
+ dateIsSelected: dateIsSelected
22787
+ };
22788
+
22789
+ /***/ }),
22790
+ /* 24 */
22791
+ /***/ (function(module, exports, __webpack_require__) {
22792
+
22793
+ "use strict";
22794
+
22795
+
22796
+ Object.defineProperty(exports, "__esModule", {
22797
+ value: true
22798
+ });
22799
+ exports['default'] = getPhrasePropTypes;
22800
+
22801
+ var _object = __webpack_require__(18);
22802
+
22803
+ var _object2 = _interopRequireDefault(_object);
22804
+
22805
+ var _propTypes = __webpack_require__(10);
22806
+
22807
+ var _propTypes2 = _interopRequireDefault(_propTypes);
22808
+
22809
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22810
+
22811
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22812
+
22813
+ function getPhrasePropTypes(defaultPhrases) {
22814
+ return Object.keys(defaultPhrases).reduce(function (phrases, key) {
22815
+ return (0, _object2['default'])({}, phrases, _defineProperty({}, key, _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].func, _propTypes2['default'].node])));
22816
+ }, {});
22817
+ }
22818
+
22819
+ /***/ }),
22820
+ /* 25 */
22821
+ /***/ (function(module, exports, __webpack_require__) {
22822
+
22823
+ "use strict";
22824
+
22825
+
22826
+ var keys = __webpack_require__(90);
22827
+ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
22828
+
22829
+ var toStr = Object.prototype.toString;
22830
+ var concat = Array.prototype.concat;
22831
+ var origDefineProperty = Object.defineProperty;
22832
+
22833
+ var isFunction = function (fn) {
22834
+ return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
22835
+ };
22836
+
22837
+ var arePropertyDescriptorsSupported = function () {
22838
+ var obj = {};
22839
+ try {
22840
+ origDefineProperty(obj, 'x', { enumerable: false, value: obj });
22841
+ // eslint-disable-next-line no-unused-vars, no-restricted-syntax
22842
+ for (var _ in obj) { // jscs:ignore disallowUnusedVariables
22843
+ return false;
22844
+ }
22845
+ return obj.x === obj;
22846
+ } catch (e) { /* this is IE 8. */
22847
+ return false;
22848
+ }
22849
+ };
22850
+ var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
22851
+
22852
+ var defineProperty = function (object, name, value, predicate) {
22853
+ if (name in object && (!isFunction(predicate) || !predicate())) {
22854
+ return;
22855
+ }
22856
+ if (supportsDescriptors) {
22857
+ origDefineProperty(object, name, {
22858
+ configurable: true,
22859
+ enumerable: false,
22860
+ value: value,
22861
+ writable: true
22862
+ });
22863
+ } else {
22864
+ object[name] = value;
22865
+ }
22866
+ };
22867
+
22868
+ var defineProperties = function (object, map) {
22869
+ var predicates = arguments.length > 2 ? arguments[2] : {};
22870
+ var props = keys(map);
22871
+ if (hasSymbols) {
22872
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
22873
+ }
22874
+ for (var i = 0; i < props.length; i += 1) {
22875
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
22876
+ }
22877
+ };
22878
+
22879
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
22880
+
22881
+ module.exports = defineProperties;
22882
+
22883
+
22884
+ /***/ }),
22885
+ /* 26 */
22886
+ /***/ (function(module, exports, __webpack_require__) {
22887
+
22888
+ /* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(exports, "__esModule", {
22889
+ value: true
22890
+ });
22891
+ exports.withStylesPropTypes = exports.css = undefined;
22892
+
22893
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
22894
+
22895
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
22896
+
22897
+ exports.withStyles = withStyles;
22898
+
22899
+ var _react = __webpack_require__(11);
22900
+
22901
+ var _react2 = _interopRequireDefault(_react);
22902
+
22903
+ var _propTypes = __webpack_require__(10);
22904
+
22905
+ var _propTypes2 = _interopRequireDefault(_propTypes);
22906
+
22907
+ var _hoistNonReactStatics = __webpack_require__(131);
22908
+
22909
+ var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
22910
+
22911
+ var _deepmerge = __webpack_require__(539);
22912
+
22913
+ var _deepmerge2 = _interopRequireDefault(_deepmerge);
22914
+
22915
+ var _constants = __webpack_require__(540);
22916
+
22917
+ var _brcast = __webpack_require__(541);
22918
+
22919
+ var _brcast2 = _interopRequireDefault(_brcast);
22920
+
22921
+ var _ThemedStyleSheet = __webpack_require__(151);
22922
+
22923
+ var _ThemedStyleSheet2 = _interopRequireDefault(_ThemedStyleSheet);
22924
+
22925
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22926
+
22927
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22928
+
22929
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
22930
+
22931
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
22932
+
22933
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22934
+
22935
+ // Add some named exports to assist in upgrading and for convenience
22936
+ var css = exports.css = _ThemedStyleSheet2['default'].resolveLTR;
22937
+ var withStylesPropTypes = exports.withStylesPropTypes = {
22938
+ styles: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
22939
+ theme: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
22940
+ css: _propTypes2['default'].func.isRequired
22941
+ };
22942
+
22943
+ var EMPTY_STYLES = {};
22944
+ var EMPTY_STYLES_FN = function EMPTY_STYLES_FN() {
22945
+ return EMPTY_STYLES;
22946
+ };
22947
+
22948
+ function baseClass(pureComponent) {
22949
+ if (pureComponent) {
22950
+ if (!_react2['default'].PureComponent) {
22951
+ throw new ReferenceError('withStyles() pureComponent option requires React 15.3.0 or later');
22952
+ }
22953
+
22954
+ return _react2['default'].PureComponent;
22955
+ }
22956
+
22957
+ return _react2['default'].Component;
22958
+ }
22959
+
22960
+ var contextTypes = _defineProperty({}, _constants.CHANNEL, _brcast2['default']);
22961
+
22962
+ var defaultDirection = _constants.DIRECTIONS.LTR;
22963
+
22964
+ function withStyles(styleFn) {
22965
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
22966
+ _ref$stylesPropName = _ref.stylesPropName,
22967
+ stylesPropName = _ref$stylesPropName === undefined ? 'styles' : _ref$stylesPropName,
22968
+ _ref$themePropName = _ref.themePropName,
22969
+ themePropName = _ref$themePropName === undefined ? 'theme' : _ref$themePropName,
22970
+ _ref$cssPropName = _ref.cssPropName,
22971
+ cssPropName = _ref$cssPropName === undefined ? 'css' : _ref$cssPropName,
22972
+ _ref$flushBefore = _ref.flushBefore,
22973
+ flushBefore = _ref$flushBefore === undefined ? false : _ref$flushBefore,
22974
+ _ref$pureComponent = _ref.pureComponent,
22975
+ pureComponent = _ref$pureComponent === undefined ? false : _ref$pureComponent;
22976
+
22977
+ var styleDefLTR = void 0;
22978
+ var styleDefRTL = void 0;
22979
+ var currentThemeLTR = void 0;
22980
+ var currentThemeRTL = void 0;
22981
+ var BaseClass = baseClass(pureComponent);
22982
+
22983
+ function getResolveMethod(direction) {
22984
+ return direction === _constants.DIRECTIONS.LTR ? _ThemedStyleSheet2['default'].resolveLTR : _ThemedStyleSheet2['default'].resolveRTL;
22985
+ }
22986
+
22987
+ function getCurrentTheme(direction) {
22988
+ return direction === _constants.DIRECTIONS.LTR ? currentThemeLTR : currentThemeRTL;
22989
+ }
22990
+
22991
+ function getStyleDef(direction, wrappedComponentName) {
22992
+ var currentTheme = getCurrentTheme(direction);
22993
+ var styleDef = direction === _constants.DIRECTIONS.LTR ? styleDefLTR : styleDefRTL;
22994
+
22995
+ var registeredTheme = _ThemedStyleSheet2['default'].get();
22996
+
22997
+ // Return the existing styles if they've already been defined
22998
+ // and if the theme used to create them corresponds to the theme
22999
+ // registered with ThemedStyleSheet
23000
+ if (styleDef && currentTheme === registeredTheme) {
23001
+ return styleDef;
23002
+ }
23003
+
23004
+ if (process.env.NODE_ENV !== 'production' && typeof performance !== 'undefined' && performance.mark !== undefined) {
23005
+ performance.mark('react-with-styles.createStyles.start');
23006
+ }
23007
+
23008
+ var isRTL = direction === _constants.DIRECTIONS.RTL;
23009
+
23010
+ if (isRTL) {
23011
+ styleDefRTL = styleFn ? _ThemedStyleSheet2['default'].createRTL(styleFn) : EMPTY_STYLES_FN;
23012
+
23013
+ currentThemeRTL = registeredTheme;
23014
+ styleDef = styleDefRTL;
23015
+ } else {
23016
+ styleDefLTR = styleFn ? _ThemedStyleSheet2['default'].createLTR(styleFn) : EMPTY_STYLES_FN;
23017
+
23018
+ currentThemeLTR = registeredTheme;
23019
+ styleDef = styleDefLTR;
23020
+ }
23021
+
23022
+ if (process.env.NODE_ENV !== 'production' && typeof performance !== 'undefined' && performance.mark !== undefined) {
23023
+ performance.mark('react-with-styles.createStyles.end');
23024
+
23025
+ performance.measure('\uD83D\uDC69\u200D\uD83C\uDFA8 withStyles(' + String(wrappedComponentName) + ') [create styles]', 'react-with-styles.createStyles.start', 'react-with-styles.createStyles.end');
23026
+ }
23027
+
23028
+ return styleDef;
23029
+ }
23030
+
23031
+ function getState(direction, wrappedComponentName) {
23032
+ return {
23033
+ resolveMethod: getResolveMethod(direction),
23034
+ styleDef: getStyleDef(direction, wrappedComponentName)
23035
+ };
23036
+ }
23037
+
23038
+ return function () {
23039
+ function withStylesHOC(WrappedComponent) {
23040
+ var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
23041
+
23042
+ // NOTE: Use a class here so components are ref-able if need be:
23043
+ // eslint-disable-next-line react/prefer-stateless-function
23044
+
23045
+ var WithStyles = function (_BaseClass) {
23046
+ _inherits(WithStyles, _BaseClass);
23047
+
23048
+ function WithStyles(props, context) {
23049
+ _classCallCheck(this, WithStyles);
23050
+
23051
+ var _this = _possibleConstructorReturn(this, (WithStyles.__proto__ || Object.getPrototypeOf(WithStyles)).call(this, props, context));
23052
+
23053
+ var direction = _this.context[_constants.CHANNEL] ? _this.context[_constants.CHANNEL].getState() : defaultDirection;
23054
+
23055
+ _this.state = getState(direction, wrappedComponentName);
23056
+ return _this;
23057
+ }
23058
+
23059
+ _createClass(WithStyles, [{
23060
+ key: 'componentDidMount',
23061
+ value: function () {
23062
+ function componentDidMount() {
23063
+ var _this2 = this;
23064
+
23065
+ if (this.context[_constants.CHANNEL]) {
23066
+ // subscribe to future direction changes
23067
+ this.channelUnsubscribe = this.context[_constants.CHANNEL].subscribe(function (direction) {
23068
+ _this2.setState(getState(direction, wrappedComponentName));
23069
+ });
23070
+ }
23071
+ }
23072
+
23073
+ return componentDidMount;
23074
+ }()
23075
+ }, {
23076
+ key: 'componentWillUnmount',
23077
+ value: function () {
23078
+ function componentWillUnmount() {
23079
+ if (this.channelUnsubscribe) {
23080
+ this.channelUnsubscribe();
23081
+ }
23082
+ }
23083
+
23084
+ return componentWillUnmount;
23085
+ }()
23086
+ }, {
23087
+ key: 'render',
23088
+ value: function () {
23089
+ function render() {
23090
+ var _ref2;
23091
+
23092
+ // As some components will depend on previous styles in
23093
+ // the component tree, we provide the option of flushing the
23094
+ // buffered styles (i.e. to a style tag) **before** the rendering
23095
+ // cycle begins.
23096
+ //
23097
+ // The interfaces provide the optional "flush" method which
23098
+ // is run in turn by ThemedStyleSheet.flush.
23099
+ if (flushBefore) {
23100
+ _ThemedStyleSheet2['default'].flush();
23101
+ }
23102
+
23103
+ var _state = this.state,
23104
+ resolveMethod = _state.resolveMethod,
23105
+ styleDef = _state.styleDef;
23106
+
23107
+
23108
+ return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, (_ref2 = {}, _defineProperty(_ref2, themePropName, _ThemedStyleSheet2['default'].get()), _defineProperty(_ref2, stylesPropName, styleDef()), _defineProperty(_ref2, cssPropName, resolveMethod), _ref2)));
23109
+ }
23110
+
23111
+ return render;
23112
+ }()
23113
+ }]);
23114
+
23115
+ return WithStyles;
23116
+ }(BaseClass);
23117
+
23118
+ WithStyles.WrappedComponent = WrappedComponent;
23119
+ WithStyles.displayName = 'withStyles(' + String(wrappedComponentName) + ')';
23120
+ WithStyles.contextTypes = contextTypes;
23121
+ if (WrappedComponent.propTypes) {
23122
+ WithStyles.propTypes = (0, _deepmerge2['default'])({}, WrappedComponent.propTypes);
23123
+ delete WithStyles.propTypes[stylesPropName];
23124
+ delete WithStyles.propTypes[themePropName];
23125
+ delete WithStyles.propTypes[cssPropName];
23126
+ }
23127
+ if (WrappedComponent.defaultProps) {
23128
+ WithStyles.defaultProps = (0, _deepmerge2['default'])({}, WrappedComponent.defaultProps);
23129
+ }
23130
+
23131
+ return (0, _hoistNonReactStatics2['default'])(WithStyles, WrappedComponent);
23132
+ }
23133
+
23134
+ return withStylesHOC;
23135
+ }();
23136
+ }
23137
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
23138
+
23139
+ /***/ }),
23140
+ /* 27 */
23141
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23142
+
23143
+ "use strict";
23144
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BACKSPACE; });
23145
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return TAB; });
23146
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ENTER; });
23147
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ESCAPE; });
23148
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return SPACE; });
23149
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return LEFT; });
23150
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return UP; });
23151
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return RIGHT; });
23152
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return DOWN; });
23153
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return DELETE; });
23154
+ /* unused harmony export F10 */
23155
+ /* unused harmony export ALT */
23156
+ /* unused harmony export CTRL */
23157
+ /* unused harmony export COMMAND */
23158
+ /* unused harmony export SHIFT */
23159
+ /* unused harmony export modifiers */
23160
+ /* unused harmony export rawShortcut */
23161
+ /* unused harmony export displayShortcutList */
23162
+ /* unused harmony export displayShortcut */
23163
+ /* unused harmony export shortcutAriaLabel */
23164
+ /* unused harmony export isKeyboardEvent */
23165
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__ = __webpack_require__(32);
23166
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__ = __webpack_require__(22);
23167
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash__ = __webpack_require__(2);
23168
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_lodash__);
23169
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_i18n__ = __webpack_require__(20);
23170
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__platform__ = __webpack_require__(378);
23171
+
23172
+
23173
+
23174
+ /**
23175
+ * Note: The order of the modifier keys in many of the [foo]Shortcut()
23176
+ * functions in this file are intentional and should not be changed. They're
23177
+ * designed to fit with the standard menu keyboard shortcuts shown in the
23178
+ * user's platform.
23179
+ *
23180
+ * For example, on MacOS menu shortcuts will place Shift before Command, but
23181
+ * on Windows Control will usually come first. So don't provide your own
23182
+ * shortcut combos directly to keyboardShortcut().
23183
+ */
23184
+
23185
+ /**
23186
+ * External dependencies
23187
+ */
23188
+
23189
+ /**
23190
+ * WordPress dependencies
23191
+ */
23192
+
23193
+
23194
+ /**
23195
+ * Internal dependencies
23196
+ */
23197
+
23198
+
23199
+ var BACKSPACE = 8;
23200
+ var TAB = 9;
23201
+ var ENTER = 13;
23202
+ var ESCAPE = 27;
23203
+ var SPACE = 32;
23204
+ var LEFT = 37;
23205
+ var UP = 38;
23206
+ var RIGHT = 39;
23207
+ var DOWN = 40;
23208
+ var DELETE = 46;
23209
+ var F10 = 121;
23210
+ var ALT = 'alt';
23211
+ var CTRL = 'ctrl'; // Understood in both Mousetrap and TinyMCE.
23212
+
23213
+ var COMMAND = 'meta';
23214
+ var SHIFT = 'shift';
23215
+ var modifiers = {
23216
+ primary: function primary(_isApple) {
23217
+ return _isApple() ? [COMMAND] : [CTRL];
23218
+ },
23219
+ primaryShift: function primaryShift(_isApple) {
23220
+ return _isApple() ? [SHIFT, COMMAND] : [CTRL, SHIFT];
23221
+ },
23222
+ primaryAlt: function primaryAlt(_isApple) {
23223
+ return _isApple() ? [ALT, COMMAND] : [CTRL, ALT];
23224
+ },
23225
+ secondary: function secondary(_isApple) {
23226
+ return _isApple() ? [SHIFT, ALT, COMMAND] : [CTRL, SHIFT, ALT];
23227
+ },
23228
+ access: function access(_isApple) {
23229
+ return _isApple() ? [CTRL, ALT] : [SHIFT, ALT];
23230
+ },
23231
+ ctrl: function ctrl() {
23232
+ return [CTRL];
23233
+ },
23234
+ alt: function alt() {
23235
+ return [ALT];
23236
+ },
23237
+ ctrlShift: function ctrlShift() {
23238
+ return [CTRL, SHIFT];
23239
+ },
23240
+ shift: function shift() {
23241
+ return [SHIFT];
23242
+ },
23243
+ shiftAlt: function shiftAlt() {
23244
+ return [SHIFT, ALT];
23245
+ }
23246
+ };
23247
+ /**
23248
+ * An object that contains functions to get raw shortcuts.
23249
+ * E.g. rawShortcut.primary( 'm' ) will return 'meta+m' on Mac.
23250
+ * These are intended for user with the KeyboardShortcuts component or TinyMCE.
23251
+ *
23252
+ * @type {Object} Keyed map of functions to raw shortcuts.
23253
+ */
23254
+
23255
+ var rawShortcut = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["mapValues"])(modifiers, function (modifier) {
23256
+ return function (character) {
23257
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : __WEBPACK_IMPORTED_MODULE_4__platform__["a" /* isAppleOS */];
23258
+
23259
+ return Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(modifier(_isApple)).concat([character.toLowerCase()]).join('+');
23260
+ };
23261
+ });
23262
+ /**
23263
+ * Return an array of the parts of a keyboard shortcut chord for display
23264
+ * E.g displayShortcutList.primary( 'm' ) will return [ '⌘', 'M' ] on Mac.
23265
+ *
23266
+ * @type {Object} keyed map of functions to shortcut sequences
23267
+ */
23268
+
23269
+ var displayShortcutList = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["mapValues"])(modifiers, function (modifier) {
23270
+ return function (character) {
23271
+ var _replacementKeyMap;
23272
+
23273
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : __WEBPACK_IMPORTED_MODULE_4__platform__["a" /* isAppleOS */];
23274
+
23275
+ var isApple = _isApple();
23276
+
23277
+ var replacementKeyMap = (_replacementKeyMap = {}, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap, ALT, isApple ? '⌥' : 'Alt'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap, CTRL, isApple ? '^' : 'Ctrl'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap, COMMAND, '⌘'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap, SHIFT, isApple ? '⇧' : 'Shift'), _replacementKeyMap);
23278
+ var modifierKeys = modifier(_isApple).reduce(function (accumulator, key) {
23279
+ var replacementKey = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["get"])(replacementKeyMap, key, key); // If on the Mac, adhere to platform convention and don't show plus between keys.
23280
+
23281
+ if (isApple) {
23282
+ return Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(accumulator).concat([replacementKey]);
23283
+ }
23284
+
23285
+ return Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(accumulator).concat([replacementKey, '+']);
23286
+ }, []);
23287
+ var capitalizedCharacter = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["capitalize"])(character);
23288
+ return Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(modifierKeys).concat([capitalizedCharacter]);
23289
+ };
23290
+ });
23291
+ /**
23292
+ * An object that contains functions to display shortcuts.
23293
+ * E.g. displayShortcut.primary( 'm' ) will return '⌘M' on Mac.
23294
+ *
23295
+ * @type {Object} Keyed map of functions to display shortcuts.
23296
+ */
23297
+
23298
+ var displayShortcut = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["mapValues"])(displayShortcutList, function (shortcutList) {
23299
+ return function (character) {
23300
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : __WEBPACK_IMPORTED_MODULE_4__platform__["a" /* isAppleOS */];
23301
+
23302
+ return shortcutList(character, _isApple).join('');
23303
+ };
23304
+ });
23305
+ /**
23306
+ * An object that contains functions to return an aria label for a keyboard shortcut.
23307
+ * E.g. shortcutAriaLabel.primary( '.' ) will return 'Command + Period' on Mac.
23308
+ */
23309
+
23310
+ var shortcutAriaLabel = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["mapValues"])(modifiers, function (modifier) {
23311
+ return function (character) {
23312
+ var _replacementKeyMap2;
23313
+
23314
+ var _isApple = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : __WEBPACK_IMPORTED_MODULE_4__platform__["a" /* isAppleOS */];
23315
+
23316
+ var isApple = _isApple();
23317
+
23318
+ var replacementKeyMap = (_replacementKeyMap2 = {}, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, SHIFT, 'Shift'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, COMMAND, isApple ? 'Command' : 'Control'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, CTRL, 'Control'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, ALT, isApple ? 'Option' : 'Alt'), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, ',', Object(__WEBPACK_IMPORTED_MODULE_3__wordpress_i18n__["a" /* __ */])('Comma')), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, '.', Object(__WEBPACK_IMPORTED_MODULE_3__wordpress_i18n__["a" /* __ */])('Period')), Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_defineProperty__["a" /* default */])(_replacementKeyMap2, '`', Object(__WEBPACK_IMPORTED_MODULE_3__wordpress_i18n__["a" /* __ */])('Backtick')), _replacementKeyMap2);
23319
+ return Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(modifier(_isApple)).concat([character]).map(function (key) {
23320
+ return Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["capitalize"])(Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["get"])(replacementKeyMap, key, key));
23321
+ }).join(isApple ? ' ' : ' + ');
23322
+ };
23323
+ });
23324
+ /**
23325
+ * An object that contains functions to check if a keyboard event matches a
23326
+ * predefined shortcut combination.
23327
+ * E.g. isKeyboardEvent.primary( event, 'm' ) will return true if the event
23328
+ * signals pressing ⌘M.
23329
+ *
23330
+ * @type {Object} Keyed map of functions to match events.
23331
+ */
23332
+
23333
+ var isKeyboardEvent = Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["mapValues"])(modifiers, function (getModifiers) {
23334
+ return function (event, character) {
23335
+ var _isApple = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : __WEBPACK_IMPORTED_MODULE_4__platform__["a" /* isAppleOS */];
23336
+
23337
+ var mods = getModifiers(_isApple);
23338
+
23339
+ if (!mods.every(function (key) {
23340
+ return event["".concat(key, "Key")];
23341
+ })) {
23342
+ return false;
23343
+ }
23344
+
23345
+ if (!character) {
23346
+ return Object(__WEBPACK_IMPORTED_MODULE_2_lodash__["includes"])(mods, event.key.toLowerCase());
23347
+ }
23348
+
23349
+ return event.key === character;
23350
+ };
23351
+ });
23352
+ //# sourceMappingURL=index.js.map
23353
+
23354
+ /***/ }),
23355
+ /* 28 */
23356
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23357
+
23358
+ "use strict";
23359
+ /* unused harmony export Button */
23360
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__ = __webpack_require__(16);
23361
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__ = __webpack_require__(13);
23362
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames__ = __webpack_require__(12);
23363
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_classnames__);
23364
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__wordpress_element__ = __webpack_require__(0);
23365
+
23366
+
23367
+
23368
+ /**
23369
+ * External dependencies
23370
+ */
23371
+
23372
+ /**
23373
+ * WordPress dependencies
23374
+ */
23375
+
23376
+
23377
+ function Button(props, ref) {
23378
+ var href = props.href,
23379
+ target = props.target,
23380
+ isPrimary = props.isPrimary,
23381
+ isLarge = props.isLarge,
23382
+ isSmall = props.isSmall,
23383
+ isTertiary = props.isTertiary,
23384
+ isToggled = props.isToggled,
23385
+ isBusy = props.isBusy,
23386
+ isDefault = props.isDefault,
23387
+ isLink = props.isLink,
23388
+ isDestructive = props.isDestructive,
23389
+ className = props.className,
23390
+ disabled = props.disabled,
23391
+ additionalProps = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__["a" /* default */])(props, ["href", "target", "isPrimary", "isLarge", "isSmall", "isTertiary", "isToggled", "isBusy", "isDefault", "isLink", "isDestructive", "className", "disabled"]);
23392
+
23393
+ var classes = __WEBPACK_IMPORTED_MODULE_2_classnames___default()('components-button', className, {
23394
+ 'is-button': isDefault || isPrimary || isLarge || isSmall,
23395
+ 'is-default': isDefault || isLarge || isSmall,
23396
+ 'is-primary': isPrimary,
23397
+ 'is-large': isLarge,
23398
+ 'is-small': isSmall,
23399
+ 'is-tertiary': isTertiary,
23400
+ 'is-toggled': isToggled,
23401
+ 'is-busy': isBusy,
23402
+ 'is-link': isLink,
23403
+ 'is-destructive': isDestructive
23404
+ });
23405
+ var tag = href !== undefined && !disabled ? 'a' : 'button';
23406
+ var tagProps = tag === 'a' ? {
23407
+ href: href,
23408
+ target: target
23409
+ } : {
23410
+ type: 'button',
23411
+ disabled: disabled
23412
+ };
23413
+ return Object(__WEBPACK_IMPORTED_MODULE_3__wordpress_element__["h" /* createElement */])(tag, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__["a" /* default */])({}, tagProps, additionalProps, {
23414
+ className: classes,
23415
+ ref: ref
23416
+ }));
23417
+ }
23418
+ /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_3__wordpress_element__["k" /* forwardRef */])(Button));
23419
+ //# sourceMappingURL=index.js.map
23420
+
23421
+ /***/ }),
23422
+ /* 29 */
23423
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23424
+
23425
+ "use strict";
23426
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(8);
23427
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__ = __webpack_require__(13);
23428
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
23429
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
23430
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
23431
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
23432
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
23433
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__wordpress_element__ = __webpack_require__(0);
23434
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames__ = __webpack_require__(12);
23435
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_classnames__);
23436
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash__ = __webpack_require__(2);
23437
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash__);
23438
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__tooltip__ = __webpack_require__(86);
23439
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__button__ = __webpack_require__(28);
23440
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__dashicon__ = __webpack_require__(45);
23441
+
23442
+
23443
+
23444
+
23445
+
23446
+
23447
+
23448
+
23449
+
23450
+ /**
23451
+ * External dependencies
23452
+ */
23453
+
23454
+
23455
+ /**
23456
+ * WordPress dependencies
23457
+ */
23458
+
23459
+
23460
+ /**
23461
+ * Internal dependencies
23462
+ */
23463
+
23464
+
23465
+
23466
+ // This is intentionally a Component class, not a function component because it
23467
+ // is common to apply a ref to the button element (only supported in class)
23468
+
23469
+ var IconButton =
23470
+ /*#__PURE__*/
23471
+ function (_Component) {
23472
+ Object(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__["a" /* default */])(IconButton, _Component);
23473
+
23474
+ function IconButton() {
23475
+ Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, IconButton);
23476
+
23477
+ return Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(IconButton).apply(this, arguments));
23478
+ }
23479
+
23480
+ Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__["a" /* default */])(IconButton, [{
23481
+ key: "render",
23482
+ value: function render() {
23483
+ var _this$props = this.props,
23484
+ icon = _this$props.icon,
23485
+ children = _this$props.children,
23486
+ label = _this$props.label,
23487
+ className = _this$props.className,
23488
+ tooltip = _this$props.tooltip,
23489
+ shortcut = _this$props.shortcut,
23490
+ additionalProps = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__["a" /* default */])(_this$props, ["icon", "children", "label", "className", "tooltip", "shortcut"]);
23491
+
23492
+ var classes = __WEBPACK_IMPORTED_MODULE_8_classnames___default()('components-icon-button', className);
23493
+ var tooltipText = tooltip || label; // Should show the tooltip if...
23494
+
23495
+ var showTooltip = !additionalProps.disabled && ( // an explicit tooltip is passed or...
23496
+ tooltip || // there's a shortcut or...
23497
+ shortcut || // there's a label and...
23498
+ !!label && ( // the children are empty and...
23499
+ !children || Object(__WEBPACK_IMPORTED_MODULE_9_lodash__["isArray"])(children) && !children.length) && // the tooltip is not explicitly disabled.
23500
+ false !== tooltip);
23501
+ var element = Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_11__button__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({
23502
+ "aria-label": label
23503
+ }, additionalProps, {
23504
+ className: classes
23505
+ }), Object(__WEBPACK_IMPORTED_MODULE_9_lodash__["isString"])(icon) ? Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_12__dashicon__["a" /* default */], {
23506
+ icon: icon
23507
+ }) : icon, children);
23508
+
23509
+ if (showTooltip) {
23510
+ element = Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_10__tooltip__["a" /* default */], {
23511
+ text: tooltipText,
23512
+ shortcut: shortcut
23513
+ }, element);
23514
+ }
23515
+
23516
+ return element;
23517
+ }
23518
+ }]);
23519
+
23520
+ return IconButton;
23521
+ }(__WEBPACK_IMPORTED_MODULE_7__wordpress_element__["b" /* Component */]);
23522
+
23523
+ /* harmony default export */ __webpack_exports__["a"] = (IconButton);
23524
+ //# sourceMappingURL=index.js.map
23525
+
23526
+ /***/ }),
23527
+ /* 30 */
23528
+ /***/ (function(module, exports, __webpack_require__) {
23529
+
23530
+ "use strict";
23531
+
23532
+
23533
+ var implementation = __webpack_require__(485);
23534
+
23535
+ module.exports = Function.prototype.bind || implementation;
23536
+
23537
+
23538
+ /***/ }),
23539
+ /* 31 */
23540
+ /***/ (function(module, exports, __webpack_require__) {
23541
+
23542
+ var moment = __webpack_require__(1);
23543
+ var momentValidationWrapper = __webpack_require__(509);
23544
+ var core = __webpack_require__(510);
23545
+
23546
+ module.exports = {
23547
+
23548
+ momentObj : core.createMomentChecker(
23549
+ 'object',
23550
+ function(obj) {
23551
+ return typeof obj === 'object';
23552
+ },
23553
+ function isValid(value) {
23554
+ return momentValidationWrapper.isValidMoment(value);
23555
+ },
23556
+ 'Moment'
23557
+ ),
23558
+
23559
+ momentString : core.createMomentChecker(
23560
+ 'string',
23561
+ function(str) {
23562
+ return typeof str === 'string';
23563
+ },
23564
+ function isValid(value) {
23565
+ return momentValidationWrapper.isValidMoment(moment(value));
23566
+ },
23567
+ 'Moment'
23568
+ ),
23569
+
23570
+ momentDurationObj : core.createMomentChecker(
23571
+ 'object',
23572
+ function(obj) {
23573
+ return typeof obj === 'object';
23574
+ },
23575
+ function isValid(value) {
23576
+ return moment.isDuration(value);
23577
+ },
23578
+ 'Duration'
23579
+ ),
23580
+
23581
+ };
23582
+
23583
+
23584
+ /***/ }),
23585
+ /* 32 */
23586
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23587
+
23588
+ "use strict";
23589
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _defineProperty;
23590
+ function _defineProperty(obj, key, value) {
23591
+ if (key in obj) {
23592
+ Object.defineProperty(obj, key, {
23593
+ value: value,
23594
+ enumerable: true,
23595
+ configurable: true,
23596
+ writable: true
23597
+ });
23598
+ } else {
23599
+ obj[key] = value;
23600
+ }
23601
+
23602
+ return obj;
23603
+ }
23604
+
23605
+ /***/ }),
23606
+ /* 33 */
23607
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23608
+
23609
+ "use strict";
23610
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_element__ = __webpack_require__(0);
23611
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames__ = __webpack_require__(12);
23612
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_classnames__);
23613
+
23614
+
23615
+ /**
23616
+ * External dependencies
23617
+ */
23618
+
23619
+
23620
+ function BaseControl(_ref) {
23621
+ var id = _ref.id,
23622
+ label = _ref.label,
23623
+ help = _ref.help,
23624
+ className = _ref.className,
23625
+ children = _ref.children;
23626
+ return Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["h" /* createElement */])("div", {
23627
+ className: __WEBPACK_IMPORTED_MODULE_1_classnames___default()('components-base-control', className)
23628
+ }, Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["h" /* createElement */])("div", {
23629
+ className: "components-base-control__field"
23630
+ }, label && id && Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["h" /* createElement */])("label", {
23631
+ className: "components-base-control__label",
23632
+ htmlFor: id
23633
+ }, label), label && !id && Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["h" /* createElement */])("span", {
23634
+ className: "components-base-control__label"
23635
+ }, label), children), !!help && Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["h" /* createElement */])("p", {
23636
+ id: id + '__help',
23637
+ className: "components-base-control__help"
23638
+ }, help));
23639
+ }
23640
+
23641
+ /* harmony default export */ __webpack_exports__["a"] = (BaseControl);
23642
+ //# sourceMappingURL=index.js.map
23643
+
23644
+ /***/ }),
23645
+ /* 34 */
23646
+ /***/ (function(module, exports) {
23647
+
23648
+ var g;
23649
+
23650
+ // This works in non-strict mode
23651
+ g = (function() {
23652
+ return this;
23653
+ })();
23654
+
23655
+ try {
23656
+ // This works if eval is allowed (see CSP)
23657
+ g = g || Function("return this")() || (1,eval)("this");
23658
+ } catch(e) {
23659
+ // This works if the window reference is available
23660
+ if(typeof window === "object")
23661
+ g = window;
23662
+ }
23663
+
23664
+ // g can still be undefined, but nothing to do about it...
23665
+ // We return undefined, instead of nothing here, so it's
23666
+ // easier to handle this case. if(!global) { ...}
23667
+
23668
+ module.exports = g;
23669
+
23670
+
23671
+ /***/ }),
23672
+ /* 35 */
23673
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23674
+
23675
+ "use strict";
23676
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(2);
23677
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);
23678
+ /**
23679
+ * External dependencies
23680
+ */
23681
+
23682
+ /**
23683
+ * Given a function mapping a component to an enhanced component and modifier
23684
+ * name, returns the enhanced component augmented with a generated displayName.
23685
+ *
23686
+ * @param {Function} mapComponentToEnhancedComponent Function mapping component
23687
+ * to enhanced component.
23688
+ * @param {string} modifierName Seed name from which to
23689
+ * generated display name.
23690
+ *
23691
+ * @return {WPComponent} Component class with generated display name assigned.
23692
+ */
23693
+
23694
+ function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
23695
+ return function (OriginalComponent) {
23696
+ var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
23697
+ var _OriginalComponent$di = OriginalComponent.displayName,
23698
+ displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
23699
+ EnhancedComponent.displayName = "".concat(Object(__WEBPACK_IMPORTED_MODULE_0_lodash__["upperFirst"])(Object(__WEBPACK_IMPORTED_MODULE_0_lodash__["camelCase"])(modifierName)), "(").concat(displayName, ")");
23700
+ return EnhancedComponent;
23701
+ };
23702
+ }
23703
+
23704
+ /* harmony default export */ __webpack_exports__["a"] = (createHigherOrderComponent);
23705
+ //# sourceMappingURL=index.js.map
23706
+
23707
+ /***/ }),
23708
+ /* 36 */
23709
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23710
+
23711
+ "use strict";
23712
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addAction; });
23713
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addFilter; });
23714
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return removeAction; });
23715
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return removeFilter; });
23716
+ /* unused harmony export hasAction */
23717
+ /* unused harmony export hasFilter */
23718
+ /* unused harmony export removeAllActions */
23719
+ /* unused harmony export removeAllFilters */
23720
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return doAction; });
23721
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return applyFilters; });
23722
+ /* unused harmony export currentAction */
23723
+ /* unused harmony export currentFilter */
23724
+ /* unused harmony export doingAction */
23725
+ /* unused harmony export doingFilter */
23726
+ /* unused harmony export didAction */
23727
+ /* unused harmony export didFilter */
23728
+ /* unused harmony export actions */
23729
+ /* unused harmony export filters */
23730
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createHooks__ = __webpack_require__(435);
23731
+ /* unused harmony reexport createHooks */
23732
+
23733
+
23734
+ var _createHooks = Object(__WEBPACK_IMPORTED_MODULE_0__createHooks__["a" /* default */])(),
23735
+ addAction = _createHooks.addAction,
23736
+ addFilter = _createHooks.addFilter,
23737
+ removeAction = _createHooks.removeAction,
23738
+ removeFilter = _createHooks.removeFilter,
23739
+ hasAction = _createHooks.hasAction,
23740
+ hasFilter = _createHooks.hasFilter,
23741
+ removeAllActions = _createHooks.removeAllActions,
23742
+ removeAllFilters = _createHooks.removeAllFilters,
23743
+ doAction = _createHooks.doAction,
23744
+ applyFilters = _createHooks.applyFilters,
23745
+ currentAction = _createHooks.currentAction,
23746
+ currentFilter = _createHooks.currentFilter,
23747
+ doingAction = _createHooks.doingAction,
23748
+ doingFilter = _createHooks.doingFilter,
23749
+ didAction = _createHooks.didAction,
23750
+ didFilter = _createHooks.didFilter,
23751
+ actions = _createHooks.actions,
23752
+ filters = _createHooks.filters;
23753
+
23754
+
23755
+ //# sourceMappingURL=index.js.map
23756
+
23757
+ /***/ }),
23758
+ /* 37 */
23759
+ /***/ (function(module, exports, __webpack_require__) {
23760
+
23761
+ "use strict";
23762
+
23763
+
23764
+ var bind = __webpack_require__(30);
23765
+
23766
+ module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
23767
+
23768
+
23769
+ /***/ }),
23770
+ /* 38 */
23771
+ /***/ (function(module, exports, __webpack_require__) {
23772
+
23773
+ Object.defineProperty(exports, "__esModule", {
23774
+ value: true
23775
+ });
23776
+ exports['default'] = andValidator;
23777
+
23778
+ var _wrapValidator = __webpack_require__(17);
23779
+
23780
+ var _wrapValidator2 = _interopRequireDefault(_wrapValidator);
23781
+
23782
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23783
+
23784
+ function andValidator(validators) {
23785
+ var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'and';
23786
+
23787
+ if (!Array.isArray(validators)) {
23788
+ throw new TypeError('and: 2 or more validators are required');
23789
+ }
23790
+ if (validators.length <= 1) {
23791
+ throw new RangeError('and: 2 or more validators are required');
23792
+ }
23793
+
23794
+ var validator = function () {
23795
+ function and() {
23796
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
23797
+ args[_key] = arguments[_key];
23798
+ }
23799
+
23800
+ var firstError = null;
23801
+ validators.some(function (validatorFn) {
23802
+ firstError = validatorFn.apply(undefined, args);
23803
+ return firstError != null;
23804
+ });
23805
+ return firstError == null ? null : firstError;
23806
+ }
23807
+
23808
+ return and;
23809
+ }();
23810
+
23811
+ validator.isRequired = function () {
23812
+ function andIsRequired() {
23813
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
23814
+ args[_key2] = arguments[_key2];
23815
+ }
23816
+
23817
+ var firstError = null;
23818
+ validators.some(function (validatorFn) {
23819
+ firstError = validatorFn.isRequired.apply(validatorFn, args);
23820
+ return firstError != null;
23821
+ });
23822
+ return firstError == null ? null : firstError;
23823
+ }
23824
+
23825
+ return andIsRequired;
23826
+ }();
23827
+
23828
+ return (0, _wrapValidator2['default'])(validator, name, validators);
23829
+ }
23830
+ //# sourceMappingURL=and.js.map
23831
+
23832
+ /***/ }),
23833
+ /* 39 */
23834
+ /***/ (function(module, exports, __webpack_require__) {
23835
+
23836
+ "use strict";
23837
+
23838
+
23839
+ Object.defineProperty(exports, "__esModule", {
23840
+ value: true
23841
+ });
23842
+
23843
+ var _propTypes = __webpack_require__(10);
23844
+
23845
+ var _propTypes2 = _interopRequireDefault(_propTypes);
23846
+
23847
+ var _constants = __webpack_require__(15);
23848
+
23849
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23850
+
23851
+ exports['default'] = _propTypes2['default'].oneOf(_constants.WEEKDAYS);
23852
+
23853
+ /***/ }),
23854
+ /* 40 */
23855
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
23856
+
23857
+ "use strict";
23858
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__primitives__ = __webpack_require__(63);
23859
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__primitives__["c"]; });
23860
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__autocomplete__ = __webpack_require__(367);
23861
+ /* unused harmony reexport Autocomplete */
23862
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__base_control__ = __webpack_require__(33);
23863
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__base_control__["a"]; });
23864
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__button__ = __webpack_require__(28);
23865
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__button__["a"]; });
23866
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__button_group__ = __webpack_require__(463);
23867
+ /* unused harmony reexport ButtonGroup */
23868
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__checkbox_control__ = __webpack_require__(464);
23869
+ /* unused harmony reexport CheckboxControl */
23870
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__clipboard_button__ = __webpack_require__(465);
23871
+ /* unused harmony reexport ClipboardButton */
23872
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__color_indicator__ = __webpack_require__(467);
23873
+ /* unused harmony reexport ColorIndicator */
23874
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__color_palette__ = __webpack_require__(468);
23875
+ /* unused harmony reexport ColorPalette */
23876
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__color_picker__ = __webpack_require__(136);
23877
+ /* unused harmony reexport ColorPicker */
23878
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__dashicon__ = __webpack_require__(45);
23879
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_10__dashicon__["a"]; });
23880
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__date_time__ = __webpack_require__(477);
23881
+ /* unused harmony reexport DateTimePicker */
23882
+ /* unused harmony reexport DatePicker */
23883
+ /* unused harmony reexport TimePicker */
23884
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__disabled__ = __webpack_require__(577);
23885
+ /* unused harmony reexport Disabled */
23886
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__draggable__ = __webpack_require__(578);
23887
+ /* unused harmony reexport Draggable */
23888
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__drop_zone__ = __webpack_require__(579);
23889
+ /* unused harmony reexport DropZone */
23890
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__drop_zone_provider__ = __webpack_require__(334);
23891
+ /* unused harmony reexport DropZoneProvider */
23892
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__dropdown__ = __webpack_require__(70);
23893
+ /* unused harmony reexport Dropdown */
23894
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__dropdown_menu__ = __webpack_require__(335);
23895
+ /* unused harmony reexport DropdownMenu */
23896
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__external_link__ = __webpack_require__(582);
23897
+ /* unused harmony reexport ExternalLink */
23898
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__focusable_iframe__ = __webpack_require__(337);
23899
+ /* unused harmony reexport FocusableIframe */
23900
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__font_size_picker__ = __webpack_require__(583);
23901
+ /* unused harmony reexport FontSizePicker */
23902
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__form_file_upload__ = __webpack_require__(584);
23903
+ /* unused harmony reexport FormFileUpload */
23904
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__form_toggle__ = __webpack_require__(339);
23905
+ /* unused harmony reexport FormToggle */
23906
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__form_token_field__ = __webpack_require__(585);
23907
+ /* unused harmony reexport FormTokenField */
23908
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__icon__ = __webpack_require__(340);
23909
+ /* unused harmony reexport Icon */
23910
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__icon_button__ = __webpack_require__(29);
23911
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_25__icon_button__["a"]; });
23912
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__keyboard_shortcuts__ = __webpack_require__(56);
23913
+ /* unused harmony reexport KeyboardShortcuts */
23914
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__menu_group__ = __webpack_require__(592);
23915
+ /* unused harmony reexport MenuGroup */
23916
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__menu_item__ = __webpack_require__(341);
23917
+ /* unused harmony reexport MenuItem */
23918
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__menu_items_choice__ = __webpack_require__(593);
23919
+ /* unused harmony reexport MenuItemsChoice */
23920
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__modal__ = __webpack_require__(594);
23921
+ /* unused harmony reexport Modal */
23922
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__scroll_lock__ = __webpack_require__(133);
23923
+ /* unused harmony reexport ScrollLock */
23924
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__navigable_container__ = __webpack_require__(62);
23925
+ /* unused harmony reexport NavigableMenu */
23926
+ /* unused harmony reexport TabbableContainer */
23927
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__notice__ = __webpack_require__(342);
23928
+ /* unused harmony reexport Notice */
23929
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__notice_list__ = __webpack_require__(343);
23930
+ /* unused harmony reexport NoticeList */
23931
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__panel__ = __webpack_require__(598);
23932
+ /* unused harmony reexport Panel */
23933
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__panel_body__ = __webpack_require__(599);
23934
+ /* unused harmony reexport PanelBody */
23935
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__panel_header__ = __webpack_require__(344);
23936
+ /* unused harmony reexport PanelHeader */
23937
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__panel_row__ = __webpack_require__(600);
23938
+ /* unused harmony reexport PanelRow */
23939
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__placeholder__ = __webpack_require__(345);
23940
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_39__placeholder__["a"]; });
23941
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__popover__ = __webpack_require__(69);
23942
+ /* unused harmony reexport Popover */
23943
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__query_controls__ = __webpack_require__(601);
23944
+ /* unused harmony reexport QueryControls */
23945
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__radio_control__ = __webpack_require__(604);
23946
+ /* unused harmony reexport RadioControl */
23947
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__range_control__ = __webpack_require__(338);
23948
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_43__range_control__["a"]; });
23949
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__resizable_box__ = __webpack_require__(605);
23950
+ /* unused harmony reexport ResizableBox */
23951
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__responsive_wrapper__ = __webpack_require__(607);
23952
+ /* unused harmony reexport ResponsiveWrapper */
23953
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__sandbox__ = __webpack_require__(608);
23954
+ /* unused harmony reexport SandBox */
23955
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__select_control__ = __webpack_require__(609);
23956
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_47__select_control__["a"]; });
23957
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__spinner__ = __webpack_require__(347);
23958
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_48__spinner__["a"]; });
23959
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__server_side_render__ = __webpack_require__(610);
23960
+ /* unused harmony reexport ServerSideRender */
23961
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__tab_panel__ = __webpack_require__(621);
23962
+ /* unused harmony reexport TabPanel */
23963
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__text_control__ = __webpack_require__(137);
23964
+ /* unused harmony reexport TextControl */
23965
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__textarea_control__ = __webpack_require__(622);
23966
+ /* unused harmony reexport TextareaControl */
23967
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__toggle_control__ = __webpack_require__(623);
23968
+ /* unused harmony reexport ToggleControl */
23969
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__toolbar__ = __webpack_require__(624);
23970
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_54__toolbar__["a"]; });
23971
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__toolbar_button__ = __webpack_require__(351);
23972
+ /* unused harmony reexport ToolbarButton */
23973
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__tooltip__ = __webpack_require__(86);
23974
+ /* unused harmony reexport Tooltip */
23975
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__tree_select__ = __webpack_require__(346);
23976
+ /* unused harmony reexport TreeSelect */
23977
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__isolated_event_container__ = __webpack_require__(87);
23978
+ /* unused harmony reexport IsolatedEventContainer */
23979
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__slot_fill__ = __webpack_require__(134);
23980
+ /* unused harmony reexport createSlotFill */
23981
+ /* unused harmony reexport Slot */
23982
+ /* unused harmony reexport Fill */
23983
+ /* unused harmony reexport SlotFillProvider */
23984
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__higher_order_navigate_regions__ = __webpack_require__(627);
23985
+ /* unused harmony reexport navigateRegions */
23986
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__higher_order_with_constrained_tabbing__ = __webpack_require__(85);
23987
+ /* unused harmony reexport withConstrainedTabbing */
23988
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__higher_order_with_fallback_styles__ = __webpack_require__(628);
23989
+ /* unused harmony reexport withFallbackStyles */
23990
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__higher_order_with_filters__ = __webpack_require__(629);
23991
+ /* unused harmony reexport withFilters */
23992
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__higher_order_with_focus_outside__ = __webpack_require__(129);
23993
+ /* unused harmony reexport withFocusOutside */
23994
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__higher_order_with_focus_return__ = __webpack_require__(84);
23995
+ /* unused harmony reexport withFocusReturn */
23996
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__higher_order_with_notices__ = __webpack_require__(630);
23997
+ /* unused harmony reexport withNotices */
23998
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__higher_order_with_spoken_messages__ = __webpack_require__(89);
23999
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_67__higher_order_with_spoken_messages__["a"]; });
24000
+ // Components
24001
+ // eslint-disable-next-line camelcase
24002
+
24003
+
24004
+
24005
+
24006
+
24007
+
24008
+
24009
+
24010
+
24011
+
24012
+
24013
+
24014
+
24015
+
24016
+
24017
+
24018
+
24019
+
24020
+
24021
+
24022
+
24023
+
24024
+
24025
+
24026
+
24027
+
24028
+
24029
+
24030
+
24031
+
24032
+
24033
+
24034
+
24035
+
24036
+
24037
+
24038
+
24039
+
24040
+
24041
+
24042
+
24043
+
24044
+
24045
+
24046
+
24047
+
24048
+
24049
+
24050
+
24051
+
24052
+
24053
+
24054
+
24055
+
24056
+
24057
+
24058
+
24059
+
24060
+
24061
+ // Higher-Order Components
24062
+
24063
+
24064
+
24065
+
24066
+
24067
+
24068
+
24069
+
24070
+
24071
+ //# sourceMappingURL=index.js.map
24072
+
24073
+ /***/ }),
24074
+ /* 41 */
24075
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24076
+
24077
+ "use strict";
24078
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _typeof;
24079
+ function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
24080
+
24081
+ function _typeof(obj) {
24082
+ if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
24083
+ _typeof = function _typeof(obj) {
24084
+ return _typeof2(obj);
24085
+ };
24086
+ } else {
24087
+ _typeof = function _typeof(obj) {
24088
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
24089
+ };
24090
+ }
24091
+
24092
+ return _typeof(obj);
24093
+ }
24094
+
24095
+ /***/ }),
24096
+ /* 42 */
24097
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24098
+
24099
+ "use strict";
24100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return select; });
24101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return dispatch; });
24102
+ /* unused harmony export subscribe */
24103
+ /* unused harmony export registerGenericStore */
24104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return registerStore; });
24105
+ /* unused harmony export use */
24106
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_turbo_combine_reducers__ = __webpack_require__(390);
24107
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_turbo_combine_reducers___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_turbo_combine_reducers__);
24108
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__default_registry__ = __webpack_require__(111);
24109
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__plugins__ = __webpack_require__(406);
24110
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_with_select__ = __webpack_require__(422);
24111
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_3__components_with_select__["a"]; });
24112
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__components_with_dispatch__ = __webpack_require__(423);
24113
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_4__components_with_dispatch__["a"]; });
24114
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_registry_provider__ = __webpack_require__(82);
24115
+ /* unused harmony reexport RegistryProvider */
24116
+ /* unused harmony reexport RegistryConsumer */
24117
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__registry__ = __webpack_require__(112);
24118
+ /* unused harmony reexport createRegistry */
24119
+ /* unused harmony reexport plugins */
24120
+ /* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0_turbo_combine_reducers___default.a; });
24121
+ /**
24122
+ * External dependencies
24123
+ */
24124
+
24125
+ /**
24126
+ * Internal dependencies
24127
+ */
24128
+
24129
+
24130
+
24131
+
24132
+
24133
+
24134
+
24135
+
24136
+ /**
24137
+ * The combineReducers helper function turns an object whose values are different
24138
+ * reducing functions into a single reducing function you can pass to registerReducer.
24139
+ *
24140
+ * @param {Object} reducers An object whose values correspond to different reducing
24141
+ * functions that need to be combined into one.
24142
+ *
24143
+ * @return {Function} A reducer that invokes every reducer inside the reducers
24144
+ * object, and constructs a state object with the same shape.
24145
+ */
24146
+
24147
+
24148
+ var select = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].select;
24149
+ var dispatch = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].dispatch;
24150
+ var subscribe = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].subscribe;
24151
+ var registerGenericStore = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].registerGenericStore;
24152
+ var registerStore = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].registerStore;
24153
+ var use = __WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */].use;
24154
+ //# sourceMappingURL=index.js.map
24155
+
24156
+ /***/ }),
24157
+ /* 43 */
24158
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24159
+
24160
+ "use strict";
24161
+ /* harmony export (immutable) */ __webpack_exports__["a"] = normaliseFormats;
24162
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_format_equal__ = __webpack_require__(119);
24163
+ /**
24164
+ * Internal dependencies
24165
+ */
24166
+
24167
+ /**
24168
+ * Normalises formats: ensures subsequent equal formats have the same reference.
24169
+ *
24170
+ * @param {Object} value Value to normalise formats of.
24171
+ *
24172
+ * @return {Object} New value with normalised formats.
24173
+ */
24174
+
24175
+ function normaliseFormats(_ref) {
24176
+ var formats = _ref.formats,
24177
+ text = _ref.text,
24178
+ start = _ref.start,
24179
+ end = _ref.end;
24180
+ var newFormats = formats.slice(0);
24181
+ newFormats.forEach(function (formatsAtIndex, index) {
24182
+ var lastFormatsAtIndex = newFormats[index - 1];
24183
+
24184
+ if (lastFormatsAtIndex) {
24185
+ var newFormatsAtIndex = formatsAtIndex.slice(0);
24186
+ newFormatsAtIndex.forEach(function (format, formatIndex) {
24187
+ var lastFormat = lastFormatsAtIndex[formatIndex];
24188
+
24189
+ if (Object(__WEBPACK_IMPORTED_MODULE_0__is_format_equal__["a" /* isFormatEqual */])(format, lastFormat)) {
24190
+ newFormatsAtIndex[formatIndex] = lastFormat;
24191
+ }
24192
+ });
24193
+ newFormats[index] = newFormatsAtIndex;
24194
+ }
24195
+ });
24196
+ return {
24197
+ formats: newFormats,
24198
+ text: text,
24199
+ start: start,
24200
+ end: end
24201
+ };
24202
+ }
24203
+ //# sourceMappingURL=normalise-formats.js.map
24204
+
24205
+ /***/ }),
24206
+ /* 44 */
24207
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24208
+
24209
+ "use strict";
24210
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return focus; });
24211
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__focusable__ = __webpack_require__(128);
24212
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tabbable__ = __webpack_require__(453);
24213
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__dom__ = __webpack_require__(454);
24214
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__dom__["a"]; });
24215
+ /**
24216
+ * Internal dependencies
24217
+ */
24218
+
24219
+
24220
+ var focus = {
24221
+ focusable: __WEBPACK_IMPORTED_MODULE_0__focusable__,
24222
+ tabbable: __WEBPACK_IMPORTED_MODULE_1__tabbable__
24223
+ };
24224
+
24225
+ //# sourceMappingURL=index.js.map
24226
+
24227
+ /***/ }),
24228
+ /* 45 */
24229
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24230
+
24231
+ "use strict";
24232
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Dashicon; });
24233
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
24234
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
24235
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
24236
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
24237
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
24238
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_element__ = __webpack_require__(0);
24239
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__primitives__ = __webpack_require__(63);
24240
+
24241
+
24242
+
24243
+
24244
+
24245
+
24246
+
24247
+ /* !!!
24248
+ IF YOU ARE EDITING dashicon/index.jsx
24249
+ THEN YOU ARE EDITING A FILE THAT GETS OUTPUT FROM THE DASHICONS REPO!
24250
+ DO NOT EDIT THAT FILE! EDIT index-header.jsx and index-footer.jsx instead
24251
+ OR if you're looking to change now SVGs get output, you'll need to edit strings in the Gruntfile :)
24252
+ !!! */
24253
+
24254
+ /**
24255
+ * WordPress dependencies
24256
+ */
24257
+
24258
+ /**
24259
+ * Internal dependencies
24260
+ */
24261
+
24262
+
24263
+
24264
+ var Dashicon =
24265
+ /*#__PURE__*/
24266
+ function (_Component) {
24267
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(Dashicon, _Component);
24268
+
24269
+ function Dashicon() {
24270
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, Dashicon);
24271
+
24272
+ return Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(Dashicon).apply(this, arguments));
24273
+ }
24274
+
24275
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(Dashicon, [{
24276
+ key: "shouldComponentUpdate",
24277
+ value: function shouldComponentUpdate(nextProps) {
24278
+ return this.props.icon !== nextProps.icon || this.props.size !== nextProps.size || this.props.className !== nextProps.className;
24279
+ }
24280
+ }, {
24281
+ key: "render",
24282
+ value: function render() {
24283
+ var _this$props = this.props,
24284
+ icon = _this$props.icon,
24285
+ className = _this$props.className,
24286
+ _this$props$size = _this$props.size,
24287
+ size = _this$props$size === void 0 ? 20 : _this$props$size;
24288
+ var path;
24289
+
24290
+ switch (icon) {
24291
+ case 'admin-appearance':
24292
+ path = 'M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z';
24293
+ break;
24294
+
24295
+ case 'admin-collapse':
24296
+ path = 'M10 2.16c4.33 0 7.84 3.51 7.84 7.84s-3.51 7.84-7.84 7.84S2.16 14.33 2.16 10 5.71 2.16 10 2.16zm2 11.72V6.12L6.18 9.97z';
24297
+ break;
24298
+
24299
+ case 'admin-comments':
24300
+ path = 'M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z';
24301
+ break;
24302
+
24303
+ case 'admin-customizer':
24304
+ path = 'M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z';
24305
+ break;
24306
+
24307
+ case 'admin-generic':
24308
+ path = 'M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z';
24309
+ break;
24310
+
24311
+ case 'admin-home':
24312
+ path = 'M16 8.5l1.53 1.53-1.06 1.06L10 4.62l-6.47 6.47-1.06-1.06L10 2.5l4 4v-2h2v4zm-6-2.46l6 5.99V18H4v-5.97zM12 17v-5H8v5h4z';
24313
+ break;
24314
+
24315
+ case 'admin-links':
24316
+ path = 'M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z';
24317
+ break;
24318
+
24319
+ case 'admin-media':
24320
+ path = 'M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z';
24321
+ break;
24322
+
24323
+ case 'admin-multisite':
24324
+ path = 'M14.27 6.87L10 3.14 5.73 6.87 5 6.14l5-4.38 5 4.38zM14 8.42l-4.05 3.43L6 8.38v-.74l4-3.5 4 3.5v.78zM11 9.7V8H9v1.7h2zm-1.73 4.03L5 10 .73 13.73 0 13l5-4.38L10 13zm10 0L15 10l-4.27 3.73L10 13l5-4.38L20 13zM5 11l4 3.5V18H1v-3.5zm10 0l4 3.5V18h-8v-3.5zm-9 6v-2H4v2h2zm10 0v-2h-2v2h2z';
24325
+ break;
24326
+
24327
+ case 'admin-network':
24328
+ path = 'M16.95 2.58c1.96 1.95 1.96 5.12 0 7.07-1.51 1.51-3.75 1.84-5.59 1.01l-1.87 3.31-2.99.31L5 18H2l-1-2 7.95-7.69c-.92-1.87-.62-4.18.93-5.73 1.95-1.96 5.12-1.96 7.07 0zm-2.51 3.79c.74 0 1.33-.6 1.33-1.34 0-.73-.59-1.33-1.33-1.33-.73 0-1.33.6-1.33 1.33 0 .74.6 1.34 1.33 1.34z';
24329
+ break;
24330
+
24331
+ case 'admin-page':
24332
+ path = 'M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z';
24333
+ break;
24334
+
24335
+ case 'admin-plugins':
24336
+ path = 'M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z';
24337
+ break;
24338
+
24339
+ case 'admin-post':
24340
+ path = 'M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z';
24341
+ break;
24342
+
24343
+ case 'admin-settings':
24344
+ path = 'M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z';
24345
+ break;
24346
+
24347
+ case 'admin-site-alt':
24348
+ path = 'M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm7.5 6.48c-.274.896-.908 1.64-1.75 2.05-.45-1.69-1.658-3.074-3.27-3.75.13-.444.41-.83.79-1.09-.43-.28-1-.42-1.34.07-.53.69 0 1.61.21 2v.14c-.555-.337-.99-.84-1.24-1.44-.966-.03-1.922.208-2.76.69-.087-.565-.032-1.142.16-1.68.733.07 1.453-.23 1.92-.8.46-.52-.13-1.18-.59-1.58h.36c1.36-.01 2.702.335 3.89 1 1.36 1.005 2.194 2.57 2.27 4.26.24 0 .7-.55.91-.92.172.34.32.69.44 1.05zM9 16.84c-2.05-2.08.25-3.75-1-5.24-.92-.85-2.29-.26-3.11-1.23-.282-1.473.267-2.982 1.43-3.93.52-.44 4-1 5.42.22.83.715 1.415 1.674 1.67 2.74.46.035.918-.066 1.32-.29.41 2.98-3.15 6.74-5.73 7.73zM5.15 2.09c.786-.3 1.676-.028 2.16.66-.42.38-.94.63-1.5.72.02-.294.085-.584.19-.86l-.85-.52z';
24349
+ break;
24350
+
24351
+ case 'admin-site-alt2':
24352
+ path = 'M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm2.92 12.34c0 .35.14.63.36.66.22.03.47-.22.58-.6l.2.08c.718.384 1.07 1.22.84 2-.15.69-.743 1.198-1.45 1.24-.49-1.21-2.11.06-3.56-.22-.612-.154-1.11-.6-1.33-1.19 1.19-.11 2.85-1.73 4.36-1.97zM8 11.27c.918 0 1.695-.68 1.82-1.59.44.54.41 1.324-.07 1.83-.255.223-.594.325-.93.28-.335-.047-.635-.236-.82-.52zm3-.76c.41.39 3-.06 3.52 1.09-.95-.2-2.95.61-3.47-1.08l-.05-.01zM9.73 5.45v.27c-.65-.77-1.33-1.07-1.61-.57-.28.5 1 1.11.76 1.88-.24.77-1.27.56-1.88 1.61-.61 1.05-.49 2.42 1.24 3.67-1.192-.132-2.19-.962-2.54-2.11-.4-1.2-.09-2.26-.78-2.46C4 7.46 3 8.71 3 9.8c-1.26-1.26.05-2.86-1.2-4.18C3.5 1.998 7.644.223 11.44 1.49c-1.1 1.02-1.722 2.458-1.71 3.96z';
24353
+ break;
24354
+
24355
+ case 'admin-site-alt3':
24356
+ path = 'M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z';
24357
+ break;
24358
+
24359
+ case 'admin-site':
24360
+ path = 'M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zm3.46 11.95c0 1.47-.8 3.3-4.06 4.7.3-4.17-2.52-3.69-3.2-5 .126-1.1.804-2.063 1.8-2.55-1.552-.266-3-.96-4.18-2 .05.47.28.904.64 1.21-.782-.295-1.458-.817-1.94-1.5.977-3.225 3.883-5.482 7.25-5.63-.84 1.38-1.5 4.13 0 5.57C7.23 7 6.26 5 5.41 5.79c-1.13 1.06.33 2.51 3.42 3.08 3.29.59 3.66 1.58 3.63 3.08zm1.34-4c-.32-1.11.62-2.23 1.69-3.14 1.356 1.955 1.67 4.45.84 6.68-.77-1.89-2.17-2.32-2.53-3.57v.03z';
24361
+ break;
24362
+
24363
+ case 'admin-tools':
24364
+ path = 'M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z';
24365
+ break;
24366
+
24367
+ case 'admin-users':
24368
+ path = 'M10 9.25c-2.27 0-2.73-3.44-2.73-3.44C7 4.02 7.82 2 9.97 2c2.16 0 2.98 2.02 2.71 3.81 0 0-.41 3.44-2.68 3.44zm0 2.57L12.72 10c2.39 0 4.52 2.33 4.52 4.53v2.49s-3.65 1.13-7.24 1.13c-3.65 0-7.24-1.13-7.24-1.13v-2.49c0-2.25 1.94-4.48 4.47-4.48z';
24369
+ break;
24370
+
24371
+ case 'album':
24372
+ path = 'M0 18h10v-.26c1.52.4 3.17.35 4.76-.24 4.14-1.52 6.27-6.12 4.75-10.26-1.43-3.89-5.58-6-9.51-4.98V2H0v16zM9 3v14H1V3h8zm5.45 8.22c-.68 1.35-2.32 1.9-3.67 1.23-.31-.15-.57-.35-.78-.59V8.13c.8-.86 2.11-1.13 3.22-.58 1.35.68 1.9 2.32 1.23 3.67zm-2.75-.82c.22.16.53.12.7-.1.16-.22.12-.53-.1-.7s-.53-.12-.7.1c-.16.21-.12.53.1.7zm3.01 3.67c-1.17.78-2.56.99-3.83.69-.27-.06-.44-.34-.37-.61s.34-.43.62-.36l.17.04c.96.17 1.98-.01 2.86-.59.47-.32.86-.72 1.14-1.18.15-.23.45-.3.69-.16.23.15.3.46.16.69-.36.57-.84 1.08-1.44 1.48zm1.05 1.57c-1.48.99-3.21 1.32-4.84 1.06-.28-.05-.47-.32-.41-.6.05-.27.32-.45.61-.39l.22.04c1.31.15 2.68-.14 3.87-.94.71-.47 1.27-1.07 1.7-1.74.14-.24.45-.31.68-.16.24.14.31.45.16.69-.49.79-1.16 1.49-1.99 2.04z';
24373
+ break;
24374
+
24375
+ case 'align-center':
24376
+ path = 'M3 5h14V3H3v2zm12 8V7H5v6h10zM3 17h14v-2H3v2z';
24377
+ break;
24378
+
24379
+ case 'align-full-width':
24380
+ path = 'M17 13V3H3v10h14zM5 17h10v-2H5v2z';
24381
+ break;
24382
+
24383
+ case 'align-left':
24384
+ path = 'M3 5h14V3H3v2zm9 8V7H3v6h9zm2-4h3V7h-3v2zm0 4h3v-2h-3v2zM3 17h14v-2H3v2z';
24385
+ break;
24386
+
24387
+ case 'align-none':
24388
+ path = 'M3 5h14V3H3v2zm10 8V7H3v6h10zM3 17h14v-2H3v2z';
24389
+ break;
24390
+
24391
+ case 'align-pull-left':
24392
+ path = 'M9 16V4H3v12h6zm2-7h6V7h-6v2zm0 4h6v-2h-6v2z';
24393
+ break;
24394
+
24395
+ case 'align-pull-right':
24396
+ path = 'M17 16V4h-6v12h6zM9 7H3v2h6V7zm0 4H3v2h6v-2z';
24397
+ break;
24398
+
24399
+ case 'align-right':
24400
+ path = 'M3 5h14V3H3v2zm0 4h3V7H3v2zm14 4V7H8v6h9zM3 13h3v-2H3v2zm0 4h14v-2H3v2z';
24401
+ break;
24402
+
24403
+ case 'align-wide':
24404
+ path = 'M5 5h10V3H5v2zm12 8V7H3v6h14zM5 17h10v-2H5v2z';
24405
+ break;
24406
+
24407
+ case 'analytics':
24408
+ path = 'M18 18V2H2v16h16zM16 5H4V4h12v1zM7 7v3h3c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3zm1 2V7c1.1 0 2 .9 2 2H8zm8-1h-4V7h4v1zm0 3h-4V9h4v2zm0 2h-4v-1h4v1zm0 3H4v-1h12v1z';
24409
+ break;
24410
+
24411
+ case 'archive':
24412
+ path = 'M19 4v2H1V4h18zM2 7h16v10H2V7zm11 3V9H7v1h6z';
24413
+ break;
24414
+
24415
+ case 'arrow-down-alt':
24416
+ path = 'M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4V2z';
24417
+ break;
24418
+
24419
+ case 'arrow-down-alt2':
24420
+ path = 'M5 6l5 5 5-5 2 1-7 7-7-7z';
24421
+ break;
24422
+
24423
+ case 'arrow-down':
24424
+ path = 'M15 8l-4.03 6L7 8h8z';
24425
+ break;
24426
+
24427
+ case 'arrow-left-alt':
24428
+ path = 'M18 9v2H6l4 4-1 2-7-7 7-7 1 2-4 4h12z';
24429
+ break;
24430
+
24431
+ case 'arrow-left-alt2':
24432
+ path = 'M14 5l-5 5 5 5-1 2-7-7 7-7z';
24433
+ break;
24434
+
24435
+ case 'arrow-left':
24436
+ path = 'M13 14L7 9.97 13 6v8z';
24437
+ break;
24438
+
24439
+ case 'arrow-right-alt':
24440
+ path = 'M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z';
24441
+ break;
24442
+
24443
+ case 'arrow-right-alt2':
24444
+ path = 'M6 15l5-5-5-5 1-2 7 7-7 7z';
24445
+ break;
24446
+
24447
+ case 'arrow-right':
24448
+ path = 'M8 6l6 4.03L8 14V6z';
24449
+ break;
24450
+
24451
+ case 'arrow-up-alt':
24452
+ path = 'M11 18H9V6l-4 4-2-1 7-7 7 7-2 1-4-4v12z';
24453
+ break;
24454
+
24455
+ case 'arrow-up-alt2':
24456
+ path = 'M15 14l-5-5-5 5-2-1 7-7 7 7z';
24457
+ break;
24458
+
24459
+ case 'arrow-up':
24460
+ path = 'M7 13l4.03-6L15 13H7z';
24461
+ break;
24462
+
24463
+ case 'art':
24464
+ path = 'M8.55 3.06c1.01.34-1.95 2.01-.1 3.13 1.04.63 3.31-2.22 4.45-2.86.97-.54 2.67-.65 3.53 1.23 1.09 2.38.14 8.57-3.79 11.06-3.97 2.5-8.97 1.23-10.7-2.66-2.01-4.53 3.12-11.09 6.61-9.9zm1.21 6.45c.73 1.64 4.7-.5 3.79-2.8-.59-1.49-4.48 1.25-3.79 2.8z';
24465
+ break;
24466
+
24467
+ case 'awards':
24468
+ path = 'M4.46 5.16L5 7.46l-.54 2.29 2.01 1.24L7.7 13l2.3-.54 2.3.54 1.23-2.01 2.01-1.24L15 7.46l.54-2.3-2-1.24-1.24-2.01-2.3.55-2.29-.54-1.25 2zm5.55 6.34C7.79 11.5 6 9.71 6 7.49c0-2.2 1.79-3.99 4.01-3.99 2.2 0 3.99 1.79 3.99 3.99 0 2.22-1.79 4.01-3.99 4.01zm-.02-1C8.33 10.5 7 9.16 7 7.5c0-1.65 1.33-3 2.99-3S13 5.85 13 7.5c0 1.66-1.35 3-3.01 3zm3.84 1.1l-1.28 2.24-2.08-.47L13 19.2l1.4-2.2h2.5zm-7.7.07l1.25 2.25 2.13-.51L7 19.2 5.6 17H3.1z';
24469
+ break;
24470
+
24471
+ case 'backup':
24472
+ path = 'M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z';
24473
+ break;
24474
+
24475
+ case 'block-default':
24476
+ path = 'M15 6V4h-3v2H8V4H5v2H4c-.6 0-1 .4-1 1v8h14V7c0-.6-.4-1-1-1h-1z';
24477
+ break;
24478
+
24479
+ case 'book-alt':
24480
+ path = 'M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z';
24481
+ break;
24482
+
24483
+ case 'book':
24484
+ path = 'M16 3h2v16H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h9v14H5c-.55 0-1 .45-1 1s.45 1 1 1h11V3z';
24485
+ break;
24486
+
24487
+ case 'buddicons-activity':
24488
+ path = 'M8 1v7h2V6c0-1.52 1.45-3 3-3v.86c.55-.52 1.26-.86 2-.86v3h1c1.1 0 2 .9 2 2s-.9 2-2 2h-1v6c0 .55-.45 1-1 1s-1-.45-1-1v-2.18c-.31.11-.65.18-1 .18v2c0 .55-.45 1-1 1s-1-.45-1-1v-2H8v2c0 .55-.45 1-1 1s-1-.45-1-1v-2c-.35 0-.69-.07-1-.18V16c0 .55-.45 1-1 1s-1-.45-1-1v-4H2v-1c0-1.66 1.34-3 3-3h2V1h1zm5 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z';
24489
+ break;
24490
+
24491
+ case 'buddicons-bbpress-logo':
24492
+ path = 'M8.5 12.6c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.3 1.7c-.3 1 .3 1.5 1 1.5 1.2 0 1.9-1.1 2.2-2.4zm-4-6.4C3.7 7.3 3.3 8.6 3.3 10c0 1 .2 1.9.6 2.8l1-4.6c.3-1.7.4-2-.4-2zm9.3 6.4c.3-1.3 0-2.3-1.1-2.3-.8 0-1.6.6-1.8 1.5l-.4 1.7c-.2 1.1.4 1.6 1.1 1.6 1.1-.1 1.9-1.2 2.2-2.5zM10 3.3c-2 0-3.9.9-5.1 2.3.6-.1 1.4-.2 1.8-.3.2 0 .2.1.2.2 0 .2-1 4.8-1 4.8.5-.3 1.2-.7 1.8-.7.9 0 1.5.4 1.9.9l.5-2.4c.4-1.6.4-1.9-.4-1.9-.4 0-.4-.5 0-.6.6-.1 1.8-.2 2.3-.3.2 0 .2.1.2.2l-1 4.8c.5-.4 1.2-.7 1.9-.7 1.7 0 2.5 1.3 2.1 3-.3 1.7-2 3-3.8 3-1.3 0-2.1-.7-2.3-1.4-.7.8-1.7 1.3-2.8 1.4 1.1.7 2.4 1.1 3.7 1.1 3.7 0 6.7-3 6.7-6.7s-3-6.7-6.7-6.7zM10 2c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 15.5c-2.1 0-4-.8-5.3-2.2-.3-.4-.7-.8-1-1.2-.7-1.2-1.2-2.6-1.2-4.1 0-4.1 3.4-7.5 7.5-7.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5z';
24493
+ break;
24494
+
24495
+ case 'buddicons-buddypress-logo':
24496
+ path = 'M10 0c5.52 0 10 4.48 10 10s-4.48 10-10 10S0 15.52 0 10 4.48 0 10 0zm0 .5C4.75.5.5 4.75.5 10s4.25 9.5 9.5 9.5 9.5-4.25 9.5-9.5S15.25.5 10 .5zm0 1c4.7 0 8.5 3.8 8.5 8.5s-3.8 8.5-8.5 8.5-8.5-3.8-8.5-8.5S5.3 1.5 10 1.5zm1.8 1.71c-.57 0-1.1.17-1.55.45 1.56.37 2.73 1.77 2.73 3.45 0 .69-.21 1.33-.55 1.87 1.31-.29 2.29-1.45 2.29-2.85 0-1.61-1.31-2.92-2.92-2.92zm-2.38 1c-1.61 0-2.92 1.31-2.92 2.93 0 1.61 1.31 2.92 2.92 2.92 1.62 0 2.93-1.31 2.93-2.92 0-1.62-1.31-2.93-2.93-2.93zm4.25 5.01l-.51.59c2.34.69 2.45 3.61 2.45 3.61h1.28c0-4.71-3.22-4.2-3.22-4.2zm-2.1.8l-2.12 2.09-2.12-2.09C3.12 10.24 3.89 15 3.89 15h11.08c.47-4.98-3.4-4.98-3.4-4.98z';
24497
+ break;
24498
+
24499
+ case 'buddicons-community':
24500
+ path = 'M9 3c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zm4 0c0-.67-.47-1.43-1-2-.5.5-1 1.38-1 2 0 .48.45 1 1 1s1-.47 1-1zM9 9V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 0V5.5c0-.55-.45-1-1-1-.57 0-1 .49-1 1V9c0 .55.45 1 1 1 .57 0 1-.49 1-1zm4 1c0-1.48-1.41-2.77-3.5-3.46V9c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5V6.01c-.17 0-.33-.01-.5-.01s-.33.01-.5.01V9c0 .83-.67 1.5-1.5 1.5S6.5 9.83 6.5 9V6.54C4.41 7.23 3 8.52 3 10c0 1.41.95 2.65 3.21 3.37 1.11.35 2.39 1.12 3.79 1.12s2.69-.78 3.79-1.13C16.04 12.65 17 11.41 17 10zm-7 5.43c1.43 0 2.74-.79 3.88-1.11 1.9-.53 2.49-1.34 3.12-2.32v3c0 2.21-3.13 4-7 4s-7-1.79-7-4v-3c.64.99 1.32 1.8 3.15 2.33 1.13.33 2.44 1.1 3.85 1.1z';
24501
+ break;
24502
+
24503
+ case 'buddicons-forums':
24504
+ path = 'M13.5 7h-7C5.67 7 5 6.33 5 5.5S5.67 4 6.5 4h1.59C8.04 3.84 8 3.68 8 3.5 8 2.67 8.67 2 9.5 2h1c.83 0 1.5.67 1.5 1.5 0 .18-.04.34-.09.5h1.59c.83 0 1.5.67 1.5 1.5S14.33 7 13.5 7zM4 8h12c.55 0 1 .45 1 1s-.45 1-1 1H4c-.55 0-1-.45-1-1s.45-1 1-1zm1 3h10c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1s.45-1 1-1zm2 3h6c.55 0 1 .45 1 1s-.45 1-1 1h-1.09c.05.16.09.32.09.5 0 .83-.67 1.5-1.5 1.5h-1c-.83 0-1.5-.67-1.5-1.5 0-.18.04-.34.09-.5H7c-.55 0-1-.45-1-1s.45-1 1-1z';
24505
+ break;
24506
+
24507
+ case 'buddicons-friends':
24508
+ path = 'M8.75 5.77C8.75 4.39 7 2 7 2S5.25 4.39 5.25 5.77 5.9 7.5 7 7.5s1.75-.35 1.75-1.73zm6 0C14.75 4.39 13 2 13 2s-1.75 2.39-1.75 3.77S11.9 7.5 13 7.5s1.75-.35 1.75-1.73zM9 17V9c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm6 0V9c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-9-6l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2zm-6 3l2-1v2l-2 1v-2zm6 0l2-1v2l-2 1v-2z';
24509
+ break;
24510
+
24511
+ case 'buddicons-groups':
24512
+ path = 'M15.45 6.25c1.83.94 1.98 3.18.7 4.98-.8 1.12-2.33 1.88-3.46 1.78L10.05 18H9l-2.65-4.99c-1.13.16-2.73-.63-3.55-1.79-1.28-1.8-1.13-4.04.71-4.97.48-.24.96-.33 1.43-.31-.01.4.01.8.07 1.21.26 1.69 1.41 3.53 2.86 4.37-.19.55-.49.99-.88 1.25L9 16.58v-5.66C7.64 10.55 6.26 8.76 6 7c-.4-2.65 1-5 3.5-5s3.9 2.35 3.5 5c-.26 1.76-1.64 3.55-3 3.92v5.77l2.07-3.84c-.44-.23-.77-.71-.99-1.3 1.48-.83 2.65-2.69 2.91-4.4.06-.41.08-.82.07-1.22.46-.01.92.08 1.39.32z';
24513
+ break;
24514
+
24515
+ case 'buddicons-pm':
24516
+ path = 'M10 2c3 0 8 5 8 5v11H2V7s5-5 8-5zm7 14.72l-3.73-2.92L17 11l-.43-.37-2.26 1.3.24-4.31-8.77-.52-.46 4.54-1.99-.95L3 11l3.73 2.8-3.44 2.85.4.43L10 13l6.53 4.15z';
24517
+ break;
24518
+
24519
+ case 'buddicons-replies':
24520
+ path = 'M17.54 10.29c1.17 1.17 1.17 3.08 0 4.25-1.18 1.17-3.08 1.17-4.25 0l-.34-.52c0 3.66-2 4.38-2.95 4.98-.82-.6-2.95-1.28-2.95-4.98l-.34.52c-1.17 1.17-3.07 1.17-4.25 0-1.17-1.17-1.17-3.08 0-4.25 0 0 1.02-.67 2.1-1.3C3.71 7.84 3.2 6.42 3.2 4.88c0-.34.03-.67.08-1C3.53 5.66 4.47 7.22 5.8 8.3c.67-.35 1.85-.83 2.37-.92H8c-1.1 0-2-.9-2-2s.9-2 2-2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5h2v-.5c0-.28.22-.5.5-.5s.5.22.5.5v.5c1.1 0 2 .9 2 2s-.9 2-2 2h-.17c.51.09 1.78.61 2.38.92 1.33-1.08 2.27-2.64 2.52-4.42.05.33.08.66.08 1 0 1.54-.51 2.96-1.36 4.11 1.08.63 2.09 1.3 2.09 1.3zM8.5 6.38c.5 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm3-2c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-2.3 5.73c-.12.11-.19.26-.19.43.02.25.23.46.49.46h1c.26 0 .47-.21.49-.46 0-.15-.07-.29-.19-.43-.08-.06-.18-.11-.3-.11h-1c-.12 0-.22.05-.3.11zM12 12.5c0-.12-.06-.28-.19-.38-.09-.07-.19-.12-.31-.12h-3c-.12 0-.22.05-.31.12-.11.1-.19.25-.19.38 0 .28.22.5.5.5h3c.28 0 .5-.22.5-.5zM8.5 15h3c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-3c-.28 0-.5.22-.5.5s.22.5.5.5zm1 2h1c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-1c-.28 0-.5.22-.5.5s.22.5.5.5z';
24521
+ break;
24522
+
24523
+ case 'buddicons-topics':
24524
+ path = 'M10.44 1.66c-.59-.58-1.54-.58-2.12 0L2.66 7.32c-.58.58-.58 1.53 0 2.12.6.6 1.56.56 2.12 0l5.66-5.66c.58-.58.59-1.53 0-2.12zm2.83 2.83c-.59-.59-1.54-.59-2.12 0l-5.66 5.66c-.59.58-.59 1.53 0 2.12.6.6 1.56.55 2.12 0l5.66-5.66c.58-.58.58-1.53 0-2.12zm1.06 6.72l4.18 4.18c.59.58.59 1.53 0 2.12s-1.54.59-2.12 0l-4.18-4.18-1.77 1.77c-.59.58-1.54.58-2.12 0-.59-.59-.59-1.54 0-2.13l5.66-5.65c.58-.59 1.53-.59 2.12 0 .58.58.58 1.53 0 2.12zM5 15c0-1.59-1.66-4-1.66-4S2 13.78 2 15s.6 2 1.34 2h.32C4.4 17 5 16.59 5 15z';
24525
+ break;
24526
+
24527
+ case 'buddicons-tracking':
24528
+ path = 'M10.98 6.78L15.5 15c-1 2-3.5 3-5.5 3s-4.5-1-5.5-3L9 6.82c-.75-1.23-2.28-1.98-4.29-2.03l2.46-2.92c1.68 1.19 2.46 2.32 2.97 3.31.56-.87 1.2-1.68 2.7-2.12l1.83 2.86c-1.42-.34-2.64.08-3.69.86zM8.17 10.4l-.93 1.69c.49.11 1 .16 1.54.16 1.35 0 2.58-.36 3.55-.95l-1.01-1.82c-.87.53-1.96.86-3.15.92zm.86 5.38c1.99 0 3.73-.74 4.74-1.86l-.98-1.76c-1 1.12-2.74 1.87-4.74 1.87-.62 0-1.21-.08-1.76-.21l-.63 1.15c.94.5 2.1.81 3.37.81z';
24529
+ break;
24530
+
24531
+ case 'building':
24532
+ path = 'M3 20h14V0H3v20zM7 3H5V1h2v2zm4 0H9V1h2v2zm4 0h-2V1h2v2zM7 6H5V4h2v2zm4 0H9V4h2v2zm4 0h-2V4h2v2zM7 9H5V7h2v2zm4 0H9V7h2v2zm4 0h-2V7h2v2zm-8 3H5v-2h2v2zm4 0H9v-2h2v2zm4 0h-2v-2h2v2zm-4 7H5v-6h6v6zm4-4h-2v-2h2v2zm0 3h-2v-2h2v2z';
24533
+ break;
24534
+
24535
+ case 'businessman':
24536
+ path = 'M7.3 6l-.03-.19c-.04-.37-.05-.73-.03-1.08.02-.36.1-.71.25-1.04.14-.32.31-.61.52-.86s.49-.46.83-.6c.34-.15.72-.23 1.13-.23.69 0 1.26.2 1.71.59s.76.87.91 1.44.18 1.16.09 1.78l-.03.19c-.01.09-.05.25-.11.48-.05.24-.12.47-.2.69-.08.21-.19.45-.34.72-.14.27-.3.49-.47.69-.18.19-.4.34-.67.48-.27.13-.55.19-.86.19s-.59-.06-.87-.19c-.26-.13-.49-.29-.67-.5-.18-.2-.34-.42-.49-.66-.15-.25-.26-.49-.34-.73-.09-.25-.16-.47-.21-.67-.06-.21-.1-.37-.12-.5zm9.2 6.24c.41.7.5 1.41.5 2.14v2.49c0 .03-.12.08-.29.13-.18.04-.42.13-.97.27-.55.12-1.1.24-1.65.34s-1.19.19-1.95.27c-.75.08-1.46.12-2.13.12-.68 0-1.39-.04-2.14-.12-.75-.07-1.4-.17-1.98-.27-.58-.11-1.08-.23-1.56-.34-.49-.11-.8-.21-1.06-.29L3 16.87v-2.49c0-.75.07-1.46.46-2.15s.81-1.25 1.5-1.68C5.66 10.12 7.19 10 8 10l1.67 1.67L9 13v3l1.02 1.08L11 16v-3l-.68-1.33L11.97 10c.77 0 2.2.07 2.9.52.71.45 1.21 1.02 1.63 1.72z';
24537
+ break;
24538
+
24539
+ case 'button':
24540
+ path = 'M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z';
24541
+ break;
24542
+
24543
+ case 'calendar-alt':
24544
+ path = 'M15 4h3v15H2V4h3V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1h4V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1zM6 3v2.5c0 .14.05.26.15.36.09.09.21.14.35.14s.26-.05.35-.14c.1-.1.15-.22.15-.36V3c0-.14-.05-.26-.15-.35-.09-.1-.21-.15-.35-.15s-.26.05-.35.15c-.1.09-.15.21-.15.35zm7 0v2.5c0 .14.05.26.14.36.1.09.22.14.36.14s.26-.05.36-.14c.09-.1.14-.22.14-.36V3c0-.14-.05-.26-.14-.35-.1-.1-.22-.15-.36-.15s-.26.05-.36.15c-.09.09-.14.21-.14.35zm4 15V8H3v10h14zM7 9v2H5V9h2zm2 0h2v2H9V9zm4 2V9h2v2h-2zm-6 1v2H5v-2h2zm2 0h2v2H9v-2zm4 2v-2h2v2h-2zm-6 1v2H5v-2h2zm4 2H9v-2h2v2zm4 0h-2v-2h2v2z';
24545
+ break;
24546
+
24547
+ case 'calendar':
24548
+ path = 'M15 4h3v14H2V4h3V3c0-.83.67-1.5 1.5-1.5S8 2.17 8 3v1h4V3c0-.83.67-1.5 1.5-1.5S15 2.17 15 3v1zM6 3v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5S6 2.72 6 3zm7 0v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5s-.5.22-.5.5zm4 14V8H3v9h14zM7 16V9H5v7h2zm4 0V9H9v7h2zm4 0V9h-2v7h2z';
24549
+ break;
24550
+
24551
+ case 'camera':
24552
+ path = 'M6 5V3H3v2h3zm12 10V4H9L7 6H2v9h16zm-7-8c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z';
24553
+ break;
24554
+
24555
+ case 'carrot':
24556
+ path = 'M2 18.43c1.51 1.36 11.64-4.67 13.14-7.21.72-1.22-.13-3.01-1.52-4.44C15.2 5.73 16.59 9 17.91 8.31c.6-.32.99-1.31.7-1.92-.52-1.08-2.25-1.08-3.42-1.21.83-.2 2.82-1.05 2.86-2.25.04-.92-1.13-1.97-2.05-1.86-1.21.14-1.65 1.88-2.06 3-.05-.71-.2-2.27-.98-2.95-1.04-.91-2.29-.05-2.32 1.05-.04 1.33 2.82 2.07 1.92 3.67C11.04 4.67 9.25 4.03 8.1 4.7c-.49.31-1.05.91-1.63 1.69.89.94 2.12 2.07 3.09 2.72.2.14.26.42.11.62-.14.21-.42.26-.62.12-.99-.67-2.2-1.78-3.1-2.71-.45.67-.91 1.43-1.34 2.23.85.86 1.93 1.83 2.79 2.41.2.14.25.42.11.62-.14.21-.42.26-.63.12-.85-.58-1.86-1.48-2.71-2.32C2.4 13.69 1.1 17.63 2 18.43z';
24557
+ break;
24558
+
24559
+ case 'cart':
24560
+ path = 'M6 13h9c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1V4H2c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1v2h13l-4 7H6v1zm-.5 3c.83 0 1.5.67 1.5 1.5S6.33 19 5.5 19 4 18.33 4 17.5 4.67 16 5.5 16zm9 0c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z';
24561
+ break;
24562
+
24563
+ case 'category':
24564
+ path = 'M5 7h13v10H2V4h7l2 2H4v9h1V7z';
24565
+ break;
24566
+
24567
+ case 'chart-area':
24568
+ path = 'M18 18l.01-12.28c.59-.35.99-.99.99-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.47 1.48 1.14 1.8l-4.13 6.58c-.33-.24-.73-.38-1.16-.38-.84 0-1.55.51-1.85 1.24l-2.14-1.53c.09-.22.14-.46.14-.71 0-1.11-.89-2-2-2-1.1 0-2 .89-2 2 0 .73.4 1.36.98 1.71L1 18h17zM17 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM5 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5.85 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z';
24569
+ break;
24570
+
24571
+ case 'chart-bar':
24572
+ path = 'M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-8H2v8h4z';
24573
+ break;
24574
+
24575
+ case 'chart-line':
24576
+ path = 'M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z';
24577
+ break;
24578
+
24579
+ case 'chart-pie':
24580
+ path = 'M10 10V3c3.87 0 7 3.13 7 7h-7zM9 4v7h7c0 3.87-3.13 7-7 7s-7-3.13-7-7 3.13-7 7-7z';
24581
+ break;
24582
+
24583
+ case 'clipboard':
24584
+ path = 'M11.9.39l1.4 1.4c1.61.19 3.5-.74 4.61.37s.18 3 .37 4.61l1.4 1.4c.39.39.39 1.02 0 1.41l-9.19 9.2c-.4.39-1.03.39-1.42 0L1.29 11c-.39-.39-.39-1.02 0-1.42l9.2-9.19c.39-.39 1.02-.39 1.41 0zm.58 2.25l-.58.58 4.95 4.95.58-.58c-.19-.6-.2-1.22-.15-1.82.02-.31.05-.62.09-.92.12-1 .18-1.63-.17-1.98s-.98-.29-1.98-.17c-.3.04-.61.07-.92.09-.6.05-1.22.04-1.82-.15zm4.02.93c.39.39.39 1.03 0 1.42s-1.03.39-1.42 0-.39-1.03 0-1.42 1.03-.39 1.42 0zm-6.72.36l-.71.7L15.44 11l.7-.71zM8.36 5.34l-.7.71 6.36 6.36.71-.7zM6.95 6.76l-.71.7 6.37 6.37.7-.71zM5.54 8.17l-.71.71 6.36 6.36.71-.71zM4.12 9.58l-.71.71 6.37 6.37.71-.71z';
24585
+ break;
24586
+
24587
+ case 'clock':
24588
+ path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 14c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm-.71-5.29c.07.05.14.1.23.15l-.02.02L14 13l-3.03-3.19L10 5l-.97 4.81h.01c0 .02-.01.05-.02.09S9 9.97 9 10c0 .28.1.52.29.71z';
24589
+ break;
24590
+
24591
+ case 'cloud-saved':
24592
+ path = 'M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16h10c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5zm-6.3 5.9l-3.2-3.2 1.4-1.4 1.8 1.8 3.8-3.8 1.4 1.4-5.2 5.2z';
24593
+ break;
24594
+
24595
+ case 'cloud-upload':
24596
+ path = 'M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z';
24597
+ break;
24598
+
24599
+ case 'cloud':
24600
+ path = 'M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z';
24601
+ break;
24602
+
24603
+ case 'columns':
24604
+ path = 'M3 15h6V5H3v10zm8 0h6V5h-6v10z';
24605
+ break;
24606
+
24607
+ case 'controls-back':
24608
+ path = 'M2 10l10-6v3.6L18 4v12l-6-3.6V16z';
24609
+ break;
24610
+
24611
+ case 'controls-forward':
24612
+ path = 'M18 10L8 16v-3.6L2 16V4l6 3.6V4z';
24613
+ break;
24614
+
24615
+ case 'controls-pause':
24616
+ path = 'M5 16V4h3v12H5zm7-12h3v12h-3V4z';
24617
+ break;
24618
+
24619
+ case 'controls-play':
24620
+ path = 'M5 4l10 6-10 6V4z';
24621
+ break;
24622
+
24623
+ case 'controls-repeat':
24624
+ path = 'M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z';
24625
+ break;
24626
+
24627
+ case 'controls-skipback':
24628
+ path = 'M11.98 7.63l6-3.6v12l-6-3.6v3.6l-8-4.8v4.8h-2v-12h2v4.8l8-4.8v3.6z';
24629
+ break;
24630
+
24631
+ case 'controls-skipforward':
24632
+ path = 'M8 12.4L2 16V4l6 3.6V4l8 4.8V4h2v12h-2v-4.8L8 16v-3.6z';
24633
+ break;
24634
+
24635
+ case 'controls-volumeoff':
24636
+ path = 'M2 7h4l5-4v14l-5-4H2V7z';
24637
+ break;
24638
+
24639
+ case 'controls-volumeon':
24640
+ path = 'M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z';
24641
+ break;
24642
+
24643
+ case 'cover-image':
24644
+ path = 'M2.2 1h15.5c.7 0 1.3.6 1.3 1.2v11.5c0 .7-.6 1.2-1.2 1.2H2.2c-.6.1-1.2-.5-1.2-1.1V2.2C1 1.6 1.6 1 2.2 1zM17 13V3H3v10h14zm-4-4s0-5 3-5v7c0 .6-.4 1-1 1H5c-.6 0-1-.4-1-1V7c2 0 3 4 3 4s1-4 3-4 3 2 3 2zM4 17h12v2H4z';
24645
+ break;
24646
+
24647
+ case 'dashboard':
24648
+ path = 'M3.76 16h12.48c1.1-1.37 1.76-3.11 1.76-5 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 1.89.66 3.63 1.76 5zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 6c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5.37 5.55L12 7v6c0 1.1-.9 2-2 2s-2-.9-2-2c0-.57.24-1.08.63-1.45zM4 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm12 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5 3c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1z';
24649
+ break;
24650
+
24651
+ case 'desktop':
24652
+ path = 'M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z';
24653
+ break;
24654
+
24655
+ case 'dismiss':
24656
+ path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm5 11l-3-3 3-3-2-2-3 3-3-3-2 2 3 3-3 3 2 2 3-3 3 3z';
24657
+ break;
24658
+
24659
+ case 'download':
24660
+ path = 'M14.01 4v6h2V2H4v8h2.01V4h8zm-2 2v6h3l-5 6-5-6h3V6h4z';
24661
+ break;
24662
+
24663
+ case 'edit':
24664
+ path = 'M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z';
24665
+ break;
24666
+
24667
+ case 'editor-aligncenter':
24668
+ path = 'M14 5V3H6v2h8zm3 4V7H3v2h14zm-3 4v-2H6v2h8zm3 4v-2H3v2h14z';
24669
+ break;
24670
+
24671
+ case 'editor-alignleft':
24672
+ path = 'M12 5V3H3v2h9zm5 4V7H3v2h14zm-5 4v-2H3v2h9zm5 4v-2H3v2h14z';
24673
+ break;
24674
+
24675
+ case 'editor-alignright':
24676
+ path = 'M17 5V3H8v2h9zm0 4V7H3v2h14zm0 4v-2H8v2h9zm0 4v-2H3v2h14z';
24677
+ break;
24678
+
24679
+ case 'editor-bold':
24680
+ path = 'M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z';
24681
+ break;
24682
+
24683
+ case 'editor-break':
24684
+ path = 'M16 4h2v9H7v3l-5-4 5-4v3h9V4z';
24685
+ break;
24686
+
24687
+ case 'editor-code':
24688
+ path = 'M9 6l-4 4 4 4-1 2-6-6 6-6zm2 8l4-4-4-4 1-2 6 6-6 6z';
24689
+ break;
24690
+
24691
+ case 'editor-contract':
24692
+ path = 'M15.75 6.75L18 3v14l-2.25-3.75L17 12h-4v4l1.25-1.25L18 17H2l3.75-2.25L7 16v-4H3l1.25 1.25L2 17V3l2.25 3.75L3 8h4V4L5.75 5.25 2 3h16l-3.75 2.25L13 4v4h4z';
24693
+ break;
24694
+
24695
+ case 'editor-customchar':
24696
+ path = 'M10 5.4c1.27 0 2.24.36 2.91 1.08.66.71 1 1.76 1 3.13 0 1.28-.23 2.37-.69 3.27-.47.89-1.27 1.52-2.22 2.12v2h6v-2h-3.69c.92-.64 1.62-1.34 2.12-2.34.49-1.01.74-2.13.74-3.35 0-1.78-.55-3.19-1.65-4.22S11.92 3.54 10 3.54s-3.43.53-4.52 1.57c-1.1 1.04-1.65 2.44-1.65 4.2 0 1.21.24 2.31.73 3.33.48 1.01 1.19 1.71 2.1 2.36H3v2h6v-2c-.98-.64-1.8-1.28-2.24-2.17-.45-.89-.67-1.96-.67-3.22 0-1.37.33-2.41 1-3.13C7.75 5.76 8.72 5.4 10 5.4z';
24697
+ break;
24698
+
24699
+ case 'editor-expand':
24700
+ path = 'M7 8h6v4H7zm-5 5v4h4l-1.2-1.2L7 12l-3.8 2.2M14 17h4v-4l-1.2 1.2L13 12l2.2 3.8M14 3l1.3 1.3L13 8l3.8-2.2L18 7V3M6 3H2v4l1.2-1.2L7 8 4.7 4.3';
24701
+ break;
24702
+
24703
+ case 'editor-help':
24704
+ path = 'M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z';
24705
+ break;
24706
+
24707
+ case 'editor-indent':
24708
+ path = 'M3 5V3h9v2H3zm10-1V3h4v1h-4zm0 3h2V5l4 3.5-4 3.5v-2h-2V7zM3 8V6h9v2H3zm2 3V9h7v2H5zm-2 3v-2h9v2H3zm10 0v-1h4v1h-4zm-4 3v-2h3v2H9z';
24709
+ break;
24710
+
24711
+ case 'editor-insertmore':
24712
+ path = 'M17 7V3H3v4h14zM6 11V9H3v2h3zm6 0V9H8v2h4zm5 0V9h-3v2h3zm0 6v-4H3v4h14z';
24713
+ break;
24714
+
24715
+ case 'editor-italic':
24716
+ path = 'M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z';
24717
+ break;
24718
+
24719
+ case 'editor-justify':
24720
+ path = 'M2 3h16v2H2V3zm0 4h16v2H2V7zm0 4h16v2H2v-2zm0 4h16v2H2v-2z';
24721
+ break;
24722
+
24723
+ case 'editor-kitchensink':
24724
+ path = 'M19 2v6H1V2h18zm-1 5V3H2v4h16zM5 4v2H3V4h2zm3 0v2H6V4h2zm3 0v2H9V4h2zm3 0v2h-2V4h2zm3 0v2h-2V4h2zm2 5v9H1V9h18zm-1 8v-7H2v7h16zM5 11v2H3v-2h2zm3 0v2H6v-2h2zm3 0v2H9v-2h2zm6 0v2h-5v-2h5zm-6 3v2H3v-2h8zm3 0v2h-2v-2h2zm3 0v2h-2v-2h2z';
24725
+ break;
24726
+
24727
+ case 'editor-ltr':
24728
+ path = 'M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z';
24729
+ break;
24730
+
24731
+ case 'editor-ol-rtl':
24732
+ path = 'M15.025 8.75a1.048 1.048 0 0 1 .45-.1.507.507 0 0 1 .35.11.455.455 0 0 1 .13.36.803.803 0 0 1-.06.3 1.448 1.448 0 0 1-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76v-.7h-1.72v-.04l.51-.48a7.276 7.276 0 0 0 .7-.71 1.75 1.75 0 0 0 .3-.49 1.254 1.254 0 0 0 .1-.51.968.968 0 0 0-.16-.56 1.007 1.007 0 0 0-.44-.37 1.512 1.512 0 0 0-.65-.14 1.98 1.98 0 0 0-.51.06 1.9 1.9 0 0 0-.42.15 3.67 3.67 0 0 0-.48.35l.45.54a2.505 2.505 0 0 1 .45-.3zM16.695 15.29a1.29 1.29 0 0 0-.74-.3v-.02a1.203 1.203 0 0 0 .65-.37.973.973 0 0 0 .23-.65.81.81 0 0 0-.37-.71 1.72 1.72 0 0 0-1-.26 2.185 2.185 0 0 0-1.33.4l.4.6a1.79 1.79 0 0 1 .46-.23 1.18 1.18 0 0 1 .41-.07c.38 0 .58.15.58.46a.447.447 0 0 1-.22.43 1.543 1.543 0 0 1-.7.12h-.31v.66h.31a1.764 1.764 0 0 1 .75.12.433.433 0 0 1 .23.41.55.55 0 0 1-.2.47 1.084 1.084 0 0 1-.63.15 2.24 2.24 0 0 1-.57-.08 2.671 2.671 0 0 1-.52-.2v.74a2.923 2.923 0 0 0 1.18.22 1.948 1.948 0 0 0 1.22-.33 1.077 1.077 0 0 0 .43-.92.836.836 0 0 0-.26-.64zM15.005 4.17c.06-.05.16-.14.3-.28l-.02.42V7h.84V3h-.69l-1.29 1.03.4.51zM4.02 5h9v1h-9zM4.02 10h9v1h-9zM4.02 15h9v1h-9z';
24733
+ break;
24734
+
24735
+ case 'editor-ol':
24736
+ path = 'M6 7V3h-.69L4.02 4.03l.4.51.46-.37c.06-.05.16-.14.3-.28l-.02.42V7H6zm2-2h9v1H8V5zm-1.23 6.95v-.7H5.05v-.04l.51-.48c.33-.31.57-.54.7-.71.14-.17.24-.33.3-.49.07-.16.1-.33.1-.51 0-.21-.05-.4-.16-.56-.1-.16-.25-.28-.44-.37s-.41-.14-.65-.14c-.19 0-.36.02-.51.06-.15.03-.29.09-.42.15-.12.07-.29.19-.48.35l.45.54c.16-.13.31-.23.45-.3.15-.07.3-.1.45-.1.14 0 .26.03.35.11s.13.2.13.36c0 .1-.02.2-.06.3s-.1.21-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76zM8 10h9v1H8v-1zm-1.29 3.95c0-.3-.12-.54-.37-.71-.24-.17-.58-.26-1-.26-.52 0-.96.13-1.33.4l.4.6c.17-.11.32-.19.46-.23.14-.05.27-.07.41-.07.38 0 .58.15.58.46 0 .2-.07.35-.22.43s-.38.12-.7.12h-.31v.66h.31c.34 0 .59.04.75.12.15.08.23.22.23.41 0 .22-.07.37-.2.47-.14.1-.35.15-.63.15-.19 0-.38-.03-.57-.08s-.36-.12-.52-.2v.74c.34.15.74.22 1.18.22.53 0 .94-.11 1.22-.33.29-.22.43-.52.43-.92 0-.27-.09-.48-.26-.64s-.42-.26-.74-.3v-.02c.27-.06.49-.19.65-.37.15-.18.23-.39.23-.65zM8 15h9v1H8v-1z';
24737
+ break;
24738
+
24739
+ case 'editor-outdent':
24740
+ path = 'M7 4V3H3v1h4zm10 1V3H8v2h9zM7 7H5V5L1 8.5 5 12v-2h2V7zm10 1V6H8v2h9zm-2 3V9H8v2h7zm2 3v-2H8v2h9zM7 14v-1H3v1h4zm4 3v-2H8v2h3z';
24741
+ break;
24742
+
24743
+ case 'editor-paragraph':
24744
+ path = 'M15 2H7.54c-.83 0-1.59.2-2.28.6-.7.41-1.25.96-1.65 1.65C3.2 4.94 3 5.7 3 6.52s.2 1.58.61 2.27c.4.69.95 1.24 1.65 1.64.69.41 1.45.61 2.28.61h.43V17c0 .27.1.51.29.71.2.19.44.29.71.29.28 0 .51-.1.71-.29.2-.2.3-.44.3-.71V5c0-.27.09-.51.29-.71.2-.19.44-.29.71-.29s.51.1.71.29c.19.2.29.44.29.71v12c0 .27.1.51.3.71.2.19.43.29.71.29.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71V4H15c.27 0 .5-.1.7-.3.2-.19.3-.43.3-.7s-.1-.51-.3-.71C15.5 2.1 15.27 2 15 2z';
24745
+ break;
24746
+
24747
+ case 'editor-paste-text':
24748
+ path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.44 1-1 0-.55-.45-1-1-1s-1 .45-1 1c0 .56.45 1 1 1zm5.45-1H17c.55 0 1 .45 1 1v12c0 .56-.45 1-1 1H3c-.55 0-1-.44-1-1V5c0-.55.45-1 1-1h1.55L4 4.63V7h12V4.63zM14 11V9H6v2h3v5h2v-5h3z';
24749
+ break;
24750
+
24751
+ case 'editor-paste-word':
24752
+ path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 12V5c0-.55-.45-1-1-1h-1.54l.54.63V7H4V4.62L4.55 4H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-3-8l-2 7h-2l-1-5-1 5H6.92L5 9h2l1 5 1-5h2l1 5 1-5h2z';
24753
+ break;
24754
+
24755
+ case 'editor-quote':
24756
+ path = 'M9.49 13.22c0-.74-.2-1.38-.61-1.9-.62-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L7.88 4c-2.73 1.3-5.42 4.28-4.96 8.05C3.21 14.43 4.59 16 6.54 16c.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03zm8.05 0c0-.74-.2-1.38-.61-1.9-.63-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L15.93 4c-2.73 1.3-5.41 4.28-4.95 8.05.29 2.38 1.66 3.95 3.61 3.95.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03z';
24757
+ break;
24758
+
24759
+ case 'editor-removeformatting':
24760
+ path = 'M14.29 4.59l1.1 1.11c.41.4.61.94.61 1.47v2.12c0 .53-.2 1.07-.61 1.47l-6.63 6.63c-.4.41-.94.61-1.47.61s-1.07-.2-1.47-.61l-1.11-1.1-1.1-1.11c-.41-.4-.61-.94-.61-1.47v-2.12c0-.54.2-1.07.61-1.48l6.63-6.62c.4-.41.94-.61 1.47-.61s1.06.2 1.47.61zm-6.21 9.7l6.42-6.42c.39-.39.39-1.03 0-1.43L12.36 4.3c-.19-.19-.45-.29-.72-.29s-.52.1-.71.29l-6.42 6.42c-.39.4-.39 1.04 0 1.43l2.14 2.14c.38.38 1.04.38 1.43 0z';
24761
+ break;
24762
+
24763
+ case 'editor-rtl':
24764
+ path = 'M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM19 6l-5 4 5 4V6z';
24765
+ break;
24766
+
24767
+ case 'editor-spellcheck':
24768
+ path = 'M15.84 2.76c.25 0 .49.04.71.11.23.07.44.16.64.25l.35-.81c-.52-.26-1.08-.39-1.69-.39-.58 0-1.09.13-1.52.37-.43.25-.76.61-.99 1.08C13.11 3.83 13 4.38 13 5c0 .99.23 1.75.7 2.28s1.15.79 2.02.79c.6 0 1.13-.09 1.6-.26v-.84c-.26.08-.51.14-.74.19-.24.05-.49.08-.74.08-.59 0-1.04-.19-1.34-.57-.32-.37-.47-.93-.47-1.66 0-.7.16-1.25.48-1.65.33-.4.77-.6 1.33-.6zM6.5 8h1.04L5.3 2H4.24L2 8h1.03l.58-1.66H5.9zM8 2v6h2.17c.67 0 1.19-.15 1.57-.46.38-.3.56-.72.56-1.26 0-.4-.1-.72-.3-.95-.19-.24-.5-.39-.93-.47v-.04c.35-.06.6-.21.78-.44.18-.24.28-.53.28-.88 0-.52-.19-.9-.56-1.14-.36-.24-.96-.36-1.79-.36H8zm.98 2.48V2.82h.85c.44 0 .77.06.97.19.21.12.31.33.31.61 0 .31-.1.53-.29.66-.18.13-.48.2-.89.2h-.95zM5.64 5.5H3.9l.54-1.56c.14-.4.25-.76.32-1.1l.15.52c.07.23.13.4.17.51zm3.34-.23h.99c.44 0 .76.08.98.23.21.15.32.38.32.69 0 .34-.11.59-.32.75s-.52.24-.93.24H8.98V5.27zM4 13l5 5 9-8-1-1-8 6-4-3z';
24769
+ break;
24770
+
24771
+ case 'editor-strikethrough':
24772
+ path = 'M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z';
24773
+ break;
24774
+
24775
+ case 'editor-table':
24776
+ path = 'M18 17V3H2v14h16zM16 7H4V5h12v2zm-7 4H4V9h5v2zm7 0h-5V9h5v2zm-7 4H4v-2h5v2zm7 0h-5v-2h5v2z';
24777
+ break;
24778
+
24779
+ case 'editor-textcolor':
24780
+ path = 'M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z';
24781
+ break;
24782
+
24783
+ case 'editor-ul':
24784
+ path = 'M5.5 7C4.67 7 4 6.33 4 5.5 4 4.68 4.67 4 5.5 4 6.32 4 7 4.68 7 5.5 7 6.33 6.32 7 5.5 7zM8 5h9v1H8V5zm-2.5 7c-.83 0-1.5-.67-1.5-1.5C4 9.68 4.67 9 5.5 9c.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 10h9v1H8v-1zm-2.5 7c-.83 0-1.5-.67-1.5-1.5 0-.82.67-1.5 1.5-1.5.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 15h9v1H8v-1z';
24785
+ break;
24786
+
24787
+ case 'editor-underline':
24788
+ path = 'M14 5h-2v5.71c0 1.99-1.12 2.98-2.45 2.98-1.32 0-2.55-1-2.55-2.96V5H5v5.87c0 1.91 1 4.54 4.48 4.54 3.49 0 4.52-2.58 4.52-4.5V5zm0 13v-2H5v2h9z';
24789
+ break;
24790
+
24791
+ case 'editor-unlink':
24792
+ path = 'M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z';
24793
+ break;
24794
+
24795
+ case 'editor-video':
24796
+ path = 'M16 2h-3v1H7V2H4v15h3v-1h6v1h3V2zM6 3v1H5V3h1zm9 0v1h-1V3h1zm-2 1v5H7V4h6zM6 5v1H5V5h1zm9 0v1h-1V5h1zM6 7v1H5V7h1zm9 0v1h-1V7h1zM6 9v1H5V9h1zm9 0v1h-1V9h1zm-2 1v5H7v-5h6zm-7 1v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1z';
24797
+ break;
24798
+
24799
+ case 'ellipsis':
24800
+ path = 'M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z';
24801
+ break;
24802
+
24803
+ case 'email-alt':
24804
+ path = 'M19 14.5v-9c0-.83-.67-1.5-1.5-1.5H3.49c-.83 0-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5H17.5c.83 0 1.5-.67 1.5-1.5zm-1.31-9.11c.33.33.15.67-.03.84L13.6 9.95l3.9 4.06c.12.14.2.36.06.51-.13.16-.43.15-.56.05l-4.37-3.73-2.14 1.95-2.13-1.95-4.37 3.73c-.13.1-.43.11-.56-.05-.14-.15-.06-.37.06-.51l3.9-4.06-4.06-3.72c-.18-.17-.36-.51-.03-.84s.67-.17.95.07l6.24 5.04 6.25-5.04c.28-.24.62-.4.95-.07z';
24805
+ break;
24806
+
24807
+ case 'email-alt2':
24808
+ path = 'M18.01 11.18V2.51c0-1.19-.9-1.81-2-1.37L4 5.91c-1.1.44-2 1.77-2 2.97v8.66c0 1.2.9 1.81 2 1.37l12.01-4.77c1.1-.44 2-1.76 2-2.96zm-1.43-7.46l-6.04 9.33-6.65-4.6c-.1-.07-.36-.32-.17-.64.21-.36.65-.21.65-.21l6.3 2.32s4.83-6.34 5.11-6.7c.13-.17.43-.34.73-.13.29.2.16.49.07.63z';
24809
+ break;
24810
+
24811
+ case 'email':
24812
+ path = 'M3.87 4h13.25C18.37 4 19 4.59 19 5.79v8.42c0 1.19-.63 1.79-1.88 1.79H3.87c-1.25 0-1.88-.6-1.88-1.79V5.79c0-1.2.63-1.79 1.88-1.79zm6.62 8.6l6.74-5.53c.24-.2.43-.66.13-1.07-.29-.41-.82-.42-1.17-.17l-5.7 3.86L4.8 5.83c-.35-.25-.88-.24-1.17.17-.3.41-.11.87.13 1.07z';
24813
+ break;
24814
+
24815
+ case 'embed-audio':
24816
+ path = 'M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 3H7v4c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.4 0 .7.1 1 .3V5h4v2zm4 3.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z';
24817
+ break;
24818
+
24819
+ case 'embed-generic':
24820
+ path = 'M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3 6.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z';
24821
+ break;
24822
+
24823
+ case 'embed-photo':
24824
+ path = 'M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 8H3V6h7v6zm4-1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3zm-6-4V8.5L7.2 10 6 9.2 4 11h5zM4.6 8.6c.6 0 1-.4 1-1s-.4-1-1-1-1 .4-1 1 .4 1 1 1z';
24825
+ break;
24826
+
24827
+ case 'embed-post':
24828
+ path = 'M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.6 9l-.4.3c-.4.4-.5 1.1-.2 1.6l-.8.8-1.1-1.1-1.3 1.3c-.2.2-1.6 1.3-1.8 1.1-.2-.2.9-1.6 1.1-1.8l1.3-1.3-1.1-1.1.8-.8c.5.3 1.2.3 1.6-.2l.3-.3c.5-.5.5-1.2.2-1.7L8 5l3 2.9-.8.8c-.5-.2-1.2-.2-1.6.3zm5.4 1.5L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z';
24829
+ break;
24830
+
24831
+ case 'embed-video':
24832
+ path = 'M17 4H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 6.5L8 9.1V11H3V6h5v1.8l2-1.3v4zm4 0L12.5 12l1.5 1.5V15l-3-3 3-3v1.5zm1 4.5v-1.5l1.5-1.5-1.5-1.5V9l3 3-3 3z';
24833
+ break;
24834
+
24835
+ case 'excerpt-view':
24836
+ path = 'M19 18V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6V3h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6v-6h11z';
24837
+ break;
24838
+
24839
+ case 'exit':
24840
+ path = 'M13 3v2h2v10h-2v2h4V3h-4zm0 8V9H5.4l4.3-4.3-1.4-1.4L1.6 10l6.7 6.7 1.4-1.4L5.4 11H13z';
24841
+ break;
24842
+
24843
+ case 'external':
24844
+ path = 'M9 3h8v8l-2-1V6.92l-5.6 5.59-1.41-1.41L14.08 5H10zm3 12v-3l2-2v7H3V6h8L9 8H5v7h7z';
24845
+ break;
24846
+
24847
+ case 'facebook-alt':
24848
+ path = 'M8.46 18h2.93v-7.3h2.45l.37-2.84h-2.82V6.04c0-.82.23-1.38 1.41-1.38h1.51V2.11c-.26-.03-1.15-.11-2.19-.11-2.18 0-3.66 1.33-3.66 3.76v2.1H6v2.84h2.46V18z';
24849
+ break;
24850
+
24851
+ case 'facebook':
24852
+ path = 'M2.89 2h14.23c.49 0 .88.39.88.88v14.24c0 .48-.39.88-.88.88h-4.08v-6.2h2.08l.31-2.41h-2.39V7.85c0-.7.2-1.18 1.2-1.18h1.28V4.51c-.22-.03-.98-.09-1.86-.09-1.85 0-3.11 1.12-3.11 3.19v1.78H8.46v2.41h2.09V18H2.89c-.49 0-.89-.4-.89-.88V2.88c0-.49.4-.88.89-.88z';
24853
+ break;
24854
+
24855
+ case 'feedback':
24856
+ path = 'M2 2h16c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm15 14V7H3v9h14zM4 8v1h3V8H4zm4 0v3h8V8H8zm-4 4v1h3v-1H4zm4 0v3h8v-3H8z';
24857
+ break;
24858
+
24859
+ case 'filter':
24860
+ path = 'M3 4.5v-2s3.34-1 7-1 7 1 7 1v2l-5 7.03v6.97s-1.22-.09-2.25-.59S8 16.5 8 16.5v-4.97z';
24861
+ break;
24862
+
24863
+ case 'flag':
24864
+ path = 'M5 18V3H3v15h2zm1-6V4c3-1 7 1 11 0v8c-3 1.27-8-1-11 0z';
24865
+ break;
24866
+
24867
+ case 'format-aside':
24868
+ path = 'M1 1h18v12l-6 6H1V1zm3 3v1h12V4H4zm0 4v1h12V8H4zm6 5v-1H4v1h6zm2 4l5-5h-5v5z';
24869
+ break;
24870
+
24871
+ case 'format-audio':
24872
+ path = 'M6.99 3.08l11.02-2c.55-.08.99.45.99 1V14.5c0 1.94-1.57 3.5-3.5 3.5S12 16.44 12 14.5c0-1.93 1.57-3.5 3.5-3.5.54 0 1.04.14 1.5.35V5.08l-9 2V16c-.24 1.7-1.74 3-3.5 3C2.57 19 1 17.44 1 15.5 1 13.57 2.57 12 4.5 12c.54 0 1.04.14 1.5.35V4.08c0-.55.44-.91.99-1z';
24873
+ break;
24874
+
24875
+ case 'format-chat':
24876
+ path = 'M11 6h-.82C9.07 6 8 7.2 8 8.16V10l-3 3v-3H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v3zm0 1h6c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2h-2v3l-3-3h-1c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2z';
24877
+ break;
24878
+
24879
+ case 'format-gallery':
24880
+ path = 'M16 4h1.96c.57 0 1.04.47 1.04 1.04v12.92c0 .57-.47 1.04-1.04 1.04H5.04C4.47 19 4 18.53 4 17.96V16H2.04C1.47 16 1 15.53 1 14.96V2.04C1 1.47 1.47 1 2.04 1h12.92c.57 0 1.04.47 1.04 1.04V4zM3 14h11V3H3v11zm5-8.5C8 4.67 7.33 4 6.5 4S5 4.67 5 5.5 5.67 7 6.5 7 8 6.33 8 5.5zm2 4.5s1-5 3-5v8H4V7c2 0 2 3 2 3s.33-2 2-2 2 2 2 2zm7 7V6h-1v8.96c0 .57-.47 1.04-1.04 1.04H6v1h11z';
24881
+ break;
24882
+
24883
+ case 'format-image':
24884
+ path = 'M2.25 1h15.5c.69 0 1.25.56 1.25 1.25v15.5c0 .69-.56 1.25-1.25 1.25H2.25C1.56 19 1 18.44 1 17.75V2.25C1 1.56 1.56 1 2.25 1zM17 17V3H3v14h14zM10 6c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm3 5s0-6 3-6v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V8c2 0 3 4 3 4s1-3 3-3 3 2 3 2z';
24885
+ break;
24886
+
24887
+ case 'format-quote':
24888
+ path = 'M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z';
24889
+ break;
24890
+
24891
+ case 'format-status':
24892
+ path = 'M10 1c7 0 9 2.91 9 6.5S17 14 10 14s-9-2.91-9-6.5S3 1 10 1zM5.5 9C6.33 9 7 8.33 7 7.5S6.33 6 5.5 6 4 6.67 4 7.5 4.67 9 5.5 9zM10 9c.83 0 1.5-.67 1.5-1.5S10.83 6 10 6s-1.5.67-1.5 1.5S9.17 9 10 9zm4.5 0c.83 0 1.5-.67 1.5-1.5S15.33 6 14.5 6 13 6.67 13 7.5 13.67 9 14.5 9zM6 14.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-3 2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z';
24893
+ break;
24894
+
24895
+ case 'format-video':
24896
+ path = 'M2 1h16c.55 0 1 .45 1 1v16l-18-.02V2c0-.55.45-1 1-1zm4 1L4 5h1l2-3H6zm4 0H9L7 5h1zm3 0h-1l-2 3h1zm3 0h-1l-2 3h1zm1 14V6H3v10h14zM8 7l6 4-6 4V7z';
24897
+ break;
24898
+
24899
+ case 'forms':
24900
+ path = 'M2 2h7v7H2V2zm9 0v7h7V2h-7zM5.5 4.5L7 3H4zM12 8V3h5v5h-5zM4.5 5.5L3 4v3zM8 4L6.5 5.5 8 7V4zM5.5 6.5L4 8h3zM9 18v-7H2v7h7zm9 0h-7v-7h7v7zM8 12v5H3v-5h5zm6.5 1.5L16 12h-3zM12 16l1.5-1.5L12 13v3zm3.5-1.5L17 16v-3zm-1 1L13 17h3z';
24901
+ break;
24902
+
24903
+ case 'googleplus':
24904
+ path = 'M6.73 10h5.4c.05.29.09.57.09.95 0 3.27-2.19 5.6-5.49 5.6-3.17 0-5.73-2.57-5.73-5.73 0-3.17 2.56-5.73 5.73-5.73 1.54 0 2.84.57 3.83 1.5l-1.55 1.5c-.43-.41-1.17-.89-2.28-.89-1.96 0-3.55 1.62-3.55 3.62 0 1.99 1.59 3.61 3.55 3.61 2.26 0 3.11-1.62 3.24-2.47H6.73V10zM19 10v1.64h-1.64v1.63h-1.63v-1.63h-1.64V10h1.64V8.36h1.63V10H19z';
24905
+ break;
24906
+
24907
+ case 'grid-view':
24908
+ path = 'M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z';
24909
+ break;
24910
+
24911
+ case 'groups':
24912
+ path = 'M8.03 4.46c-.29 1.28.55 3.46 1.97 3.46 1.41 0 2.25-2.18 1.96-3.46-.22-.98-1.08-1.63-1.96-1.63-.89 0-1.74.65-1.97 1.63zm-4.13.9c-.25 1.08.47 2.93 1.67 2.93s1.92-1.85 1.67-2.93c-.19-.83-.92-1.39-1.67-1.39s-1.48.56-1.67 1.39zm8.86 0c-.25 1.08.47 2.93 1.66 2.93 1.2 0 1.92-1.85 1.67-2.93-.19-.83-.92-1.39-1.67-1.39-.74 0-1.47.56-1.66 1.39zm-.59 11.43l1.25-4.3C14.2 10 12.71 8.47 10 8.47c-2.72 0-4.21 1.53-3.44 4.02l1.26 4.3C8.05 17.51 9 18 10 18c.98 0 1.94-.49 2.17-1.21zm-6.1-7.63c-.49.67-.96 1.83-.42 3.59l1.12 3.79c-.34.2-.77.31-1.2.31-.85 0-1.65-.41-1.85-1.03l-1.07-3.65c-.65-2.11.61-3.4 2.92-3.4.27 0 .54.02.79.06-.1.1-.2.22-.29.33zm8.35-.39c2.31 0 3.58 1.29 2.92 3.4l-1.07 3.65c-.2.62-1 1.03-1.85 1.03-.43 0-.86-.11-1.2-.31l1.11-3.77c.55-1.78.08-2.94-.42-3.61-.08-.11-.18-.23-.28-.33.25-.04.51-.06.79-.06z';
24913
+ break;
24914
+
24915
+ case 'hammer':
24916
+ path = 'M17.7 6.32l1.41 1.42-3.47 3.41-1.42-1.42.84-.82c-.32-.76-.81-1.57-1.51-2.31l-4.61 6.59-5.26 4.7c-.39.39-1.02.39-1.42 0l-1.2-1.21c-.39-.39-.39-1.02 0-1.41l10.97-9.92c-1.37-.86-3.21-1.46-5.67-1.48 2.7-.82 4.95-.93 6.58-.3 1.7.66 2.82 2.2 3.91 3.58z';
24917
+ break;
24918
+
24919
+ case 'heading':
24920
+ path = 'M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4';
24921
+ break;
24922
+
24923
+ case 'heart':
24924
+ path = 'M10 17.12c3.33-1.4 5.74-3.79 7.04-6.21 1.28-2.41 1.46-4.81.32-6.25-1.03-1.29-2.37-1.78-3.73-1.74s-2.68.63-3.63 1.46c-.95-.83-2.27-1.42-3.63-1.46s-2.7.45-3.73 1.74c-1.14 1.44-.96 3.84.34 6.25 1.28 2.42 3.69 4.81 7.02 6.21z';
24925
+ break;
24926
+
24927
+ case 'hidden':
24928
+ path = 'M17.2 3.3l.16.17c.39.39.39 1.02 0 1.41L4.55 17.7c-.39.39-1.03.39-1.41 0l-.17-.17c-.39-.39-.39-1.02 0-1.41l1.59-1.6c-1.57-1-2.76-2.3-3.56-3.93.81-1.65 2.03-2.98 3.64-3.99S8.04 5.09 10 5.09c1.2 0 2.33.21 3.4.6l2.38-2.39c.39-.39 1.03-.39 1.42 0zm-7.09 4.01c-.23.25-.34.54-.34.88 0 .31.12.58.31.81l1.8-1.79c-.13-.12-.28-.21-.45-.26-.11-.01-.28-.03-.49-.04-.33.03-.6.16-.83.4zM2.4 10.59c.69 1.23 1.71 2.25 3.05 3.05l1.28-1.28c-.51-.69-.77-1.47-.77-2.36 0-1.06.36-1.98 1.09-2.76-1.04.27-1.96.7-2.76 1.26-.8.58-1.43 1.27-1.89 2.09zm13.22-2.13l.96-.96c1.02.86 1.83 1.89 2.42 3.09-.81 1.65-2.03 2.98-3.64 3.99s-3.4 1.51-5.36 1.51c-.63 0-1.24-.07-1.83-.18l1.07-1.07c.25.02.5.05.76.05 1.63 0 3.13-.4 4.5-1.21s2.4-1.84 3.1-3.09c-.46-.82-1.09-1.51-1.89-2.09-.03-.01-.06-.03-.09-.04zm-5.58 5.58l4-4c-.01 1.1-.41 2.04-1.18 2.81-.78.78-1.72 1.18-2.82 1.19z';
24929
+ break;
24930
+
24931
+ case 'html':
24932
+ path = 'M4 16v-2H2v2H1v-5h1v2h2v-2h1v5H4zM7 16v-4H5.6v-1h3.7v1H8v4H7zM10 16v-5h1l1.4 3.4h.1L14 11h1v5h-1v-3.1h-.1l-1.1 2.5h-.6l-1.1-2.5H11V16h-1zM19 16h-3v-5h1v4h2v1zM9.4 4.2L7.1 6.5l2.3 2.3-.6 1.2-3.5-3.5L8.8 3l.6 1.2zm1.2 4.6l2.3-2.3-2.3-2.3.6-1.2 3.5 3.5-3.5 3.5-.6-1.2z';
24933
+ break;
24934
+
24935
+ case 'id-alt':
24936
+ path = 'M18 18H2V2h16v16zM8.05 7.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L8.95 6c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C8.23 4.1 7.95 4 7.6 4c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM16 5V4h-5v1h5zm0 2V6h-5v1h5zM7.62 8.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM16 9V8h-3v1h3zm0 2v-1h-3v1h3zm0 3v-1H4v1h12zm0 2v-1H4v1h12z';
24937
+ break;
24938
+
24939
+ case 'id':
24940
+ path = 'M18 16H2V4h16v12zM7.05 8.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L7.95 7c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C7.23 5.1 6.95 5 6.6 5c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM17 9V5h-5v4h5zm-10.38.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM17 11v-1h-5v1h5zm0 2v-1h-5v1h5zm0 2v-1H3v1h14z';
24941
+ break;
24942
+
24943
+ case 'image-crop':
24944
+ path = 'M19 12v3h-4v4h-3v-4H4V7H0V4h4V0h3v4h7l3-3 1 1-3 3v7h4zm-8-5H7v4zm-3 5h4V8z';
24945
+ break;
24946
+
24947
+ case 'image-filter':
24948
+ path = 'M14 5.87c0-2.2-1.79-4-4-4s-4 1.8-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4zM3.24 10.66c-1.92 1.1-2.57 3.55-1.47 5.46 1.11 1.92 3.55 2.57 5.47 1.47 1.91-1.11 2.57-3.55 1.46-5.47-1.1-1.91-3.55-2.56-5.46-1.46zm9.52 6.93c1.92 1.1 4.36.45 5.47-1.46 1.1-1.92.45-4.36-1.47-5.47-1.91-1.1-4.36-.45-5.46 1.46-1.11 1.92-.45 4.36 1.46 5.47z';
24949
+ break;
24950
+
24951
+ case 'image-flip-horizontal':
24952
+ path = 'M19 3v14h-8v3H9v-3H1V3h8V0h2v3h8zm-8.5 14V3h-1v14h1zM7 6.5L3 10l4 3.5v-7zM17 10l-4-3.5v7z';
24953
+ break;
24954
+
24955
+ case 'image-flip-vertical':
24956
+ path = 'M20 9v2h-3v8H3v-8H0V9h3V1h14v8h3zM6.5 7h7L10 3zM17 9.5H3v1h14v-1zM13.5 13h-7l3.5 4z';
24957
+ break;
24958
+
24959
+ case 'image-rotate-left':
24960
+ path = 'M7 5H5.05c0-1.74.85-2.9 2.95-2.9V0C4.85 0 2.96 2.11 2.96 5H1.18L3.8 8.39zm13-4v14h-5v5H1V10h9V1h10zm-2 2h-6v7h3v3h3V3zm-5 9H3v6h10v-6z';
24961
+ break;
24962
+
24963
+ case 'image-rotate-right':
24964
+ path = 'M15.95 5H14l3.2 3.39L19.82 5h-1.78c0-2.89-1.89-5-5.04-5v2.1c2.1 0 2.95 1.16 2.95 2.9zM1 1h10v9h9v10H6v-5H1V1zm2 2v10h3v-3h3V3H3zm5 9v6h10v-6H8z';
24965
+ break;
24966
+
24967
+ case 'image-rotate':
24968
+ path = 'M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z';
24969
+ break;
24970
+
24971
+ case 'images-alt':
24972
+ path = 'M4 15v-3H2V2h12v3h2v3h2v10H6v-3H4zm7-12c-1.1 0-2 .9-2 2h4c0-1.1-.89-2-2-2zm-7 8V6H3v5h1zm7-3h4c0-1.1-.89-2-2-2-1.1 0-2 .9-2 2zm-5 6V9H5v5h1zm9-1c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2s-2 .9-2 2c0 1.11.9 2 2 2zm2 4v-2c-5 0-5-3-10-3v5h10z';
24973
+ break;
24974
+
24975
+ case 'images-alt2':
24976
+ path = 'M5 3h14v11h-2v2h-2v2H1V7h2V5h2V3zm13 10V4H6v9h12zm-3-4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm1 6v-1H5V6H4v9h12zM7 6l10 6H7V6zm7 11v-1H3V8H2v9h12z';
24977
+ break;
24978
+
24979
+ case 'index-card':
24980
+ path = 'M1 3.17V18h18V4H8v-.83c0-.32-.12-.6-.35-.83S7.14 2 6.82 2H2.18c-.33 0-.6.11-.83.34-.24.23-.35.51-.35.83zM10 6v2H3V6h7zm7 0v10h-5V6h5zm-7 4v2H3v-2h7zm0 4v2H3v-2h7z';
24981
+ break;
24982
+
24983
+ case 'info-outline':
24984
+ path = 'M9 15h2V9H9v6zm1-10c-.5 0-1 .5-1 1s.5 1 1 1 1-.5 1-1-.5-1-1-1zm0-4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z';
24985
+ break;
24986
+
24987
+ case 'info':
24988
+ path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1 4c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zm0 9V9H9v6h2z';
24989
+ break;
24990
+
24991
+ case 'insert-after':
24992
+ path = 'M9 12h2v-2h2V8h-2V6H9v2H7v2h2v2zm1 4c3.9 0 7-3.1 7-7s-3.1-7-7-7-7 3.1-7 7 3.1 7 7 7zm0-12c2.8 0 5 2.2 5 5s-2.2 5-5 5-5-2.2-5-5 2.2-5 5-5zM3 19h14v-2H3v2z';
24993
+ break;
24994
+
24995
+ case 'insert-before':
24996
+ path = 'M11 8H9v2H7v2h2v2h2v-2h2v-2h-2V8zm-1-4c-3.9 0-7 3.1-7 7s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 12c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zM3 1v2h14V1H3z';
24997
+ break;
24998
+
24999
+ case 'insert':
25000
+ path = 'M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z';
25001
+ break;
25002
+
25003
+ case 'instagram':
25004
+ path = 'M12.67 10A2.67 2.67 0 1 0 10 12.67 2.68 2.68 0 0 0 12.67 10zm1.43 0A4.1 4.1 0 1 1 10 5.9a4.09 4.09 0 0 1 4.1 4.1zm1.13-4.27a1 1 0 1 1-1-1 1 1 0 0 1 1 1zM10 3.44c-1.17 0-3.67-.1-4.72.32a2.67 2.67 0 0 0-1.52 1.52c-.42 1-.32 3.55-.32 4.72s-.1 3.67.32 4.72a2.74 2.74 0 0 0 1.52 1.52c1 .42 3.55.32 4.72.32s3.67.1 4.72-.32a2.83 2.83 0 0 0 1.52-1.52c.42-1.05.32-3.55.32-4.72s.1-3.67-.32-4.72a2.74 2.74 0 0 0-1.52-1.52c-1.05-.42-3.55-.32-4.72-.32zM18 10c0 1.1 0 2.2-.05 3.3a4.84 4.84 0 0 1-1.29 3.36A4.8 4.8 0 0 1 13.3 18H6.7a4.84 4.84 0 0 1-3.36-1.29 4.84 4.84 0 0 1-1.29-3.41C2 12.2 2 11.1 2 10V6.7a4.84 4.84 0 0 1 1.34-3.36A4.8 4.8 0 0 1 6.7 2.05C7.8 2 8.9 2 10 2h3.3a4.84 4.84 0 0 1 3.36 1.29A4.8 4.8 0 0 1 18 6.7V10z';
25005
+ break;
25006
+
25007
+ case 'laptop':
25008
+ path = 'M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z';
25009
+ break;
25010
+
25011
+ case 'layout':
25012
+ path = 'M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z';
25013
+ break;
25014
+
25015
+ case 'leftright':
25016
+ path = 'M3 10.03L9 6v8zM11 6l6 4.03L11 14V6z';
25017
+ break;
25018
+
25019
+ case 'lightbulb':
25020
+ path = 'M10 1c3.11 0 5.63 2.52 5.63 5.62 0 1.84-2.03 4.58-2.03 4.58-.33.44-.6 1.25-.6 1.8v1c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-1c0-.55-.27-1.36-.6-1.8 0 0-2.02-2.74-2.02-4.58C4.38 3.52 6.89 1 10 1zM7 16.87V16h6v.87c0 .62-.13 1.13-.75 1.13H12c0 .62-.4 1-1.02 1h-2c-.61 0-.98-.38-.98-1h-.25c-.62 0-.75-.51-.75-1.13z';
25021
+ break;
25022
+
25023
+ case 'list-view':
25024
+ path = 'M2 19h16c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V3h11zM4 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V7h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11zM4 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11z';
25025
+ break;
25026
+
25027
+ case 'location-alt':
25028
+ path = 'M13 13.14l1.17-5.94c.79-.43 1.33-1.25 1.33-2.2 0-1.38-1.12-2.5-2.5-2.5S10.5 3.62 10.5 5c0 .95.54 1.77 1.33 2.2zm0-9.64c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm1.72 4.8L18 6.97v9L13.12 18 7 15.97l-5 2v-9l5-2 4.27 1.41 1.73 7.3z';
25029
+ break;
25030
+
25031
+ case 'location':
25032
+ path = 'M10 2C6.69 2 4 4.69 4 8c0 2.02 1.17 3.71 2.53 4.89.43.37 1.18.96 1.85 1.83.74.97 1.41 2.01 1.62 2.71.21-.7.88-1.74 1.62-2.71.67-.87 1.42-1.46 1.85-1.83C14.83 11.71 16 10.02 16 8c0-3.31-2.69-6-6-6zm0 2.56c1.9 0 3.44 1.54 3.44 3.44S11.9 11.44 10 11.44 6.56 9.9 6.56 8 8.1 4.56 10 4.56z';
25033
+ break;
25034
+
25035
+ case 'lock':
25036
+ path = 'M14 9h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h1V6c0-2.21 1.79-4 4-4s4 1.79 4 4v3zm-2 0V6c0-1.1-.9-2-2-2s-2 .9-2 2v3h4zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z';
25037
+ break;
25038
+
25039
+ case 'marker':
25040
+ path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z';
25041
+ break;
25042
+
25043
+ case 'media-archive':
25044
+ path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zM8 3.5v2l1.8-1zM11 5L9.2 6 11 7V5zM8 6.5v2l1.8-1zM11 8L9.2 9l1.8 1V8zM8 9.5v2l1.8-1zm3 1.5l-1.8 1 1.8 1v-2zm-1.5 6c.83 0 1.62-.72 1.5-1.63-.05-.38-.49-1.61-.49-1.61l-1.99-1.1s-.45 1.95-.52 2.71c-.07.77.67 1.63 1.5 1.63zm0-2.39c.42 0 .76.34.76.76 0 .43-.34.77-.76.77s-.76-.34-.76-.77c0-.42.34-.76.76-.76z';
25045
+ break;
25046
+
25047
+ case 'media-audio':
25048
+ path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm1 7.26V8.09c0-.11-.04-.21-.12-.29-.07-.08-.16-.11-.27-.1 0 0-3.97.71-4.25.78C8.07 8.54 8 8.8 8 9v3.37c-.2-.09-.42-.07-.6-.07-.38 0-.7.13-.96.39-.26.27-.4.58-.4.96 0 .37.14.69.4.95.26.27.58.4.96.4.34 0 .7-.04.96-.26.26-.23.64-.65.64-1.12V10.3l3-.6V12c-.67-.2-1.17.04-1.44.31-.26.26-.39.58-.39.95 0 .38.13.69.39.96.27.26.71.39 1.08.39.38 0 .7-.13.96-.39.26-.27.4-.58.4-.96z';
25049
+ break;
25050
+
25051
+ case 'media-code':
25052
+ path = 'M12 2l4 4v12H4V2h8zM9 13l-2-2 2-2-1-1-3 3 3 3zm3 1l3-3-3-3-1 1 2 2-2 2z';
25053
+ break;
25054
+
25055
+ case 'media-default':
25056
+ path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3z';
25057
+ break;
25058
+
25059
+ case 'media-document':
25060
+ path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zM5 9v1h4V9H5zm10 3V9h-5v3h5zM5 11v1h4v-1H5zm10 3v-1H5v1h10zm-3 2v-1H5v1h7z';
25061
+ break;
25062
+
25063
+ case 'media-interactive':
25064
+ path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm2 8V8H6v6h3l-1 2h1l1-2 1 2h1l-1-2h3zm-6-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm5-2v2h-3V9h3zm0 3v1H7v-1h6z';
25065
+ break;
25066
+
25067
+ case 'media-spreadsheet':
25068
+ path = 'M12 2l4 4v12H4V2h8zm-1 4V3H5v3h6zM8 8V7H5v1h3zm3 0V7H9v1h2zm4 0V7h-3v1h3zm-7 2V9H5v1h3zm3 0V9H9v1h2zm4 0V9h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2z';
25069
+ break;
25070
+
25071
+ case 'media-text':
25072
+ path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zm0 2V9H5v1h10zm0 2v-1H5v1h10zm-4 2v-1H5v1h6z';
25073
+ break;
25074
+
25075
+ case 'media-video':
25076
+ path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm-1 8v-3c0-.27-.1-.51-.29-.71-.2-.19-.44-.29-.71-.29H7c-.27 0-.51.1-.71.29-.19.2-.29.44-.29.71v3c0 .27.1.51.29.71.2.19.44.29.71.29h3c.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71zm3 1v-5l-2 2v1z';
25077
+ break;
25078
+
25079
+ case 'megaphone':
25080
+ path = 'M18.15 5.94c.46 1.62.38 3.22-.02 4.48-.42 1.28-1.26 2.18-2.3 2.48-.16.06-.26.06-.4.06-.06.02-.12.02-.18.02-.06.02-.14.02-.22.02h-6.8l2.22 5.5c.02.14-.06.26-.14.34-.08.1-.24.16-.34.16H6.95c-.1 0-.26-.06-.34-.16-.08-.08-.16-.2-.14-.34l-1-5.5H4.25l-.02-.02c-.5.06-1.08-.18-1.54-.62s-.88-1.08-1.06-1.88c-.24-.8-.2-1.56-.02-2.2.18-.62.58-1.08 1.06-1.3l.02-.02 9-5.4c.1-.06.18-.1.24-.16.06-.04.14-.08.24-.12.16-.08.28-.12.5-.18 1.04-.3 2.24.1 3.22.98s1.84 2.24 2.26 3.86zm-2.58 5.98h-.02c.4-.1.74-.34 1.04-.7.58-.7.86-1.76.86-3.04 0-.64-.1-1.3-.28-1.98-.34-1.36-1.02-2.5-1.78-3.24s-1.68-1.1-2.46-.88c-.82.22-1.4.96-1.7 2-.32 1.04-.28 2.36.06 3.72.38 1.36 1 2.5 1.8 3.24.78.74 1.62 1.1 2.48.88zm-2.54-7.08c.22-.04.42-.02.62.04.38.16.76.48 1.02 1s.42 1.2.42 1.78c0 .3-.04.56-.12.8-.18.48-.44.84-.86.94-.34.1-.8-.06-1.14-.4s-.64-.86-.78-1.5c-.18-.62-.12-1.24.02-1.72s.48-.84.82-.94z';
25081
+ break;
25082
+
25083
+ case 'menu-alt':
25084
+ path = 'M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h14v2H3v-2z';
25085
+ break;
25086
+
25087
+ case 'menu':
25088
+ path = 'M17 7V5H3v2h14zm0 4V9H3v2h14zm0 4v-2H3v2h14z';
25089
+ break;
25090
+
25091
+ case 'microphone':
25092
+ path = 'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z';
25093
+ break;
25094
+
25095
+ case 'migrate':
25096
+ path = 'M4 6h6V4H2v12.01h8V14H4V6zm2 2h6V5l6 5-6 5v-3H6V8z';
25097
+ break;
25098
+
25099
+ case 'minus':
25100
+ path = 'M4 9h12v2H4V9z';
25101
+ break;
25102
+
25103
+ case 'money':
25104
+ path = 'M0 3h20v12h-.75c0-1.79-1.46-3.25-3.25-3.25-1.31 0-2.42.79-2.94 1.91-.25-.1-.52-.16-.81-.16-.98 0-1.8.63-2.11 1.5H0V3zm8.37 3.11c-.06.15-.1.31-.11.47s-.01.33.01.5l.02.08c.01.06.02.14.05.23.02.1.06.2.1.31.03.11.09.22.15.33.07.12.15.22.23.31s.18.17.31.23c.12.06.25.09.4.09.14 0 .27-.03.39-.09s.22-.14.3-.22c.09-.09.16-.2.22-.32.07-.12.12-.23.16-.33s.07-.2.09-.31c.03-.11.04-.18.05-.22s.01-.07.01-.09c.05-.29.03-.56-.04-.82s-.21-.48-.41-.66c-.21-.18-.47-.27-.79-.27-.19 0-.36.03-.52.1-.15.07-.28.16-.38.28-.09.11-.17.25-.24.4zm4.48 6.04v-1.14c0-.33-.1-.66-.29-.98s-.45-.59-.77-.79c-.32-.21-.66-.31-1.02-.31l-1.24.84-1.28-.82c-.37 0-.72.1-1.04.3-.31.2-.56.46-.74.77-.18.32-.27.65-.27.99v1.14l.18.05c.12.04.29.08.51.14.23.05.47.1.74.15.26.05.57.09.91.13.34.03.67.05.99.05.3 0 .63-.02.98-.05.34-.04.64-.08.89-.13.25-.04.5-.1.76-.16l.5-.12c.08-.02.14-.04.19-.06zm3.15.1c1.52 0 2.75 1.23 2.75 2.75s-1.23 2.75-2.75 2.75c-.73 0-1.38-.3-1.87-.77.23-.35.37-.78.37-1.23 0-.77-.39-1.46-.99-1.86.43-.96 1.37-1.64 2.49-1.64zm-5.5 3.5c0-.96.79-1.75 1.75-1.75s1.75.79 1.75 1.75-.79 1.75-1.75 1.75-1.75-.79-1.75-1.75z';
25105
+ break;
25106
+
25107
+ case 'move':
25108
+ path = 'M19 10l-4 4v-3h-4v4h3l-4 4-4-4h3v-4H5v3l-4-4 4-4v3h4V5H6l4-4 4 4h-3v4h4V6z';
25109
+ break;
25110
+
25111
+ case 'nametag':
25112
+ path = 'M12 5V2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-2-3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 13V7c0-1.1-.9-2-2-2h-3v.33C13 6.25 12.25 7 11.33 7H8.67C7.75 7 7 6.25 7 5.33V5H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-1-6v6H3V9h14zm-8 2c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm3 0c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm-5.96 1.21c.92.48 2.34.79 3.96.79s3.04-.31 3.96-.79c-.21 1-1.89 1.79-3.96 1.79s-3.75-.79-3.96-1.79z';
25113
+ break;
25114
+
25115
+ case 'networking':
25116
+ path = 'M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z';
25117
+ break;
25118
+
25119
+ case 'no-alt':
25120
+ path = 'M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z';
25121
+ break;
25122
+
25123
+ case 'no':
25124
+ path = 'M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z';
25125
+ break;
25126
+
25127
+ case 'palmtree':
25128
+ path = 'M8.58 2.39c.32 0 .59.05.81.14 1.25.55 1.69 2.24 1.7 3.97.59-.82 2.15-2.29 3.41-2.29s2.94.73 3.53 3.55c-1.13-.65-2.42-.94-3.65-.94-1.26 0-2.45.32-3.29.89.4-.11.86-.16 1.33-.16 1.39 0 2.9.45 3.4 1.31.68 1.16.47 3.38-.76 4.14-.14-2.1-1.69-4.12-3.47-4.12-.44 0-.88.12-1.33.38C8 10.62 7 14.56 7 19H2c0-5.53 4.21-9.65 7.68-10.79-.56-.09-1.17-.15-1.82-.15C6.1 8.06 4.05 8.5 2 10c.76-2.96 2.78-4.1 4.69-4.1 1.25 0 2.45.5 3.2 1.29-.66-2.24-2.49-2.86-4.08-2.86-.8 0-1.55.16-2.05.35.91-1.29 3.31-2.29 4.82-2.29zM13 11.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5.67 1.5 1.5 1.5 1.5-.67 1.5-1.5z';
25129
+ break;
25130
+
25131
+ case 'paperclip':
25132
+ path = 'M17.05 2.7c1.93 1.94 1.93 5.13 0 7.07L10 16.84c-1.88 1.89-4.91 1.93-6.86.15-.06-.05-.13-.09-.19-.15-1.93-1.94-1.93-5.12 0-7.07l4.94-4.95c.91-.92 2.28-1.1 3.39-.58.3.15.59.33.83.58 1.17 1.17 1.17 3.07 0 4.24l-4.93 4.95c-.39.39-1.02.39-1.41 0s-.39-1.02 0-1.41l4.93-4.95c.39-.39.39-1.02 0-1.41-.38-.39-1.02-.39-1.4 0l-4.94 4.95c-.91.92-1.1 2.29-.57 3.4.14.3.32.59.57.84s.54.43.84.57c1.11.53 2.47.35 3.39-.57l7.05-7.07c1.16-1.17 1.16-3.08 0-4.25-.56-.55-1.28-.83-2-.86-.08.01-.16.01-.24 0-.22-.03-.43-.11-.6-.27-.39-.4-.38-1.05.02-1.45.16-.16.36-.24.56-.28.14-.02.27-.01.4.02 1.19.06 2.36.52 3.27 1.43z';
25133
+ break;
25134
+
25135
+ case 'performance':
25136
+ path = 'M3.76 17.01h12.48C17.34 15.63 18 13.9 18 12c0-4.41-3.58-8-8-8s-8 3.59-8 8c0 1.9.66 3.63 1.76 5.01zM9 6c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zM4 8c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm4.52 3.4c.84-.83 6.51-3.5 6.51-3.5s-2.66 5.68-3.49 6.51c-.84.84-2.18.84-3.02 0-.83-.83-.83-2.18 0-3.01zM3 13c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1z';
25137
+ break;
25138
+
25139
+ case 'phone':
25140
+ path = 'M12.06 6l-.21-.2c-.52-.54-.43-.79.08-1.3l2.72-2.75c.81-.82.96-1.21 1.73-.48l.21.2zm.53.45l4.4-4.4c.7.94 2.34 3.47 1.53 5.34-.73 1.67-1.09 1.75-2 3-1.85 2.11-4.18 4.37-6 6.07-1.26.91-1.31 1.33-3 2-1.8.71-4.4-.89-5.38-1.56l4.4-4.4 1.18 1.62c.34.46 1.2-.06 1.8-.66 1.04-1.05 3.18-3.18 4-4.07.59-.59 1.12-1.45.66-1.8zM1.57 16.5l-.21-.21c-.68-.74-.29-.9.52-1.7l2.74-2.72c.51-.49.75-.6 1.27-.11l.2.21z';
25141
+ break;
25142
+
25143
+ case 'playlist-audio':
25144
+ path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zm-7 4V9H2v2h8zm7.45-1.96l-6 1.12c-.16.02-.19.03-.29.13-.11.09-.16.22-.16.37v4.59c-.29-.13-.66-.14-.93-.14-.54 0-1 .19-1.38.57s-.56.84-.56 1.38c0 .53.18.99.56 1.37s.84.57 1.38.57c.49 0 .92-.16 1.29-.48s.59-.71.65-1.19v-4.95L17 11.27v3.48c-.29-.13-.56-.19-.83-.19-.54 0-1.11.19-1.49.57-.38.37-.57.83-.57 1.37s.19.99.57 1.37.84.57 1.38.57c.53 0 .99-.19 1.37-.57s.57-.83.57-1.37V9.6c0-.16-.05-.3-.16-.41-.11-.12-.24-.17-.39-.15zM8 15v-2H2v2h6zm-2 4v-2H2v2h4z';
25145
+ break;
25146
+
25147
+ case 'playlist-video':
25148
+ path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zM6 11V9H2v2h4zm2-2h9c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm3 7l3.33-2L11 12v4zm-5-1v-2H2v2h4zm0 4v-2H2v2h4z';
25149
+ break;
25150
+
25151
+ case 'plus-alt':
25152
+ path = 'M15.8 4.2c3.2 3.21 3.2 8.39 0 11.6-3.21 3.2-8.39 3.2-11.6 0C1 12.59 1 7.41 4.2 4.2 7.41 1 12.59 1 15.8 4.2zm-4.3 11.3v-4h4v-3h-4v-4h-3v4h-4v3h4v4h3z';
25153
+ break;
25154
+
25155
+ case 'plus-light':
25156
+ path = 'M17 9v2h-6v6H9v-6H3V9h6V3h2v6h6z';
25157
+ break;
25158
+
25159
+ case 'plus':
25160
+ path = 'M17 7v3h-5v5H9v-5H4V7h5V2h3v5h5z';
25161
+ break;
25162
+
25163
+ case 'portfolio':
25164
+ path = 'M4 5H.78c-.37 0-.74.32-.69.84l1.56 9.99S3.5 8.47 3.86 6.7c.11-.53.61-.7.98-.7H10s-.7-2.08-.77-2.31C9.11 3.25 8.89 3 8.45 3H5.14c-.36 0-.7.23-.8.64C4.25 4.04 4 5 4 5zm4.88 0h-4s.42-1 .87-1h2.13c.48 0 1 1 1 1zM2.67 16.25c-.31.47-.76.75-1.26.75h15.73c.54 0 .92-.31 1.03-.83.44-2.19 1.68-8.44 1.68-8.44.07-.5-.3-.73-.62-.73H16V5.53c0-.16-.26-.53-.66-.53h-3.76c-.52 0-.87.58-.87.58L10 7H5.59c-.32 0-.63.19-.69.5 0 0-1.59 6.7-1.72 7.33-.07.37-.22.99-.51 1.42zM15.38 7H11s.58-1 1.13-1h2.29c.71 0 .96 1 .96 1z';
25165
+ break;
25166
+
25167
+ case 'post-status':
25168
+ path = 'M14 6c0 1.86-1.28 3.41-3 3.86V16c0 1-2 2-2 2V9.86c-1.72-.45-3-2-3-3.86 0-2.21 1.79-4 4-4s4 1.79 4 4zM8 5c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z';
25169
+ break;
25170
+
25171
+ case 'pressthis':
25172
+ path = 'M14.76 1C16.55 1 18 2.46 18 4.25c0 1.78-1.45 3.24-3.24 3.24-.23 0-.47-.03-.7-.08L13 8.47V19H2V4h9.54c.13-2 1.52-3 3.22-3zm0 5.49C16 6.49 17 5.48 17 4.25 17 3.01 16 2 14.76 2s-2.24 1.01-2.24 2.25c0 .37.1.72.27 1.03L9.57 8.5c-.28.28-1.77 2.22-1.5 2.49.02.03.06.04.1.04.49 0 2.14-1.28 2.39-1.53l3.24-3.24c.29.14.61.23.96.23z';
25173
+ break;
25174
+
25175
+ case 'products':
25176
+ path = 'M17 8h1v11H2V8h1V6c0-2.76 2.24-5 5-5 .71 0 1.39.15 2 .42.61-.27 1.29-.42 2-.42 2.76 0 5 2.24 5 5v2zM5 6v2h2V6c0-1.13.39-2.16 1.02-3H8C6.35 3 5 4.35 5 6zm10 2V6c0-1.65-1.35-3-3-3h-.02c.63.84 1.02 1.87 1.02 3v2h2zm-5-4.22C9.39 4.33 9 5.12 9 6v2h2V6c0-.88-.39-1.67-1-2.22z';
25177
+ break;
25178
+
25179
+ case 'randomize':
25180
+ path = 'M18 6.01L14 9V7h-4l-5 8H2v-2h2l5-8h5V3zM2 5h3l1.15 2.17-1.12 1.8L4 7H2V5zm16 9.01L14 17v-2H9l-1.15-2.17 1.12-1.8L10 13h4v-2z';
25181
+ break;
25182
+
25183
+ case 'redo':
25184
+ path = 'M8 5h5V2l6 4-6 4V7H8c-2.2 0-4 1.8-4 4s1.8 4 4 4h5v2H8c-3.3 0-6-2.7-6-6s2.7-6 6-6z';
25185
+ break;
25186
+
25187
+ case 'rest-api':
25188
+ path = 'M3 4h2v12H3z';
25189
+ break;
25190
+
25191
+ case 'rss':
25192
+ path = 'M14.92 18H18C18 9.32 10.82 2.25 2 2.25v3.02c7.12 0 12.92 5.71 12.92 12.73zm-5.44 0h3.08C12.56 12.27 7.82 7.6 2 7.6v3.02c2 0 3.87.77 5.29 2.16C8.7 14.17 9.48 16.03 9.48 18zm-5.35-.02c1.17 0 2.13-.93 2.13-2.09 0-1.15-.96-2.09-2.13-2.09-1.18 0-2.13.94-2.13 2.09 0 1.16.95 2.09 2.13 2.09z';
25193
+ break;
25194
+
25195
+ case 'saved':
25196
+ path = 'M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2';
25197
+ break;
25198
+
25199
+ case 'schedule':
25200
+ path = 'M2 2h16v4H2V2zm0 10V8h4v4H2zm6-2V8h4v2H8zm6 3V8h4v5h-4zm-6 5v-6h4v6H8zm-6 0v-4h4v4H2zm12 0v-3h4v3h-4z';
25201
+ break;
25202
+
25203
+ case 'screenoptions':
25204
+ path = 'M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z';
25205
+ break;
25206
+
25207
+ case 'search':
25208
+ path = 'M12.14 4.18c1.87 1.87 2.11 4.75.72 6.89.12.1.22.21.36.31.2.16.47.36.81.59.34.24.56.39.66.47.42.31.73.57.94.78.32.32.6.65.84 1 .25.35.44.69.59 1.04.14.35.21.68.18 1-.02.32-.14.59-.36.81s-.49.34-.81.36c-.31.02-.65-.04-.99-.19-.35-.14-.7-.34-1.04-.59-.35-.24-.68-.52-1-.84-.21-.21-.47-.52-.77-.93-.1-.13-.25-.35-.47-.66-.22-.32-.4-.57-.56-.78-.16-.2-.29-.35-.44-.5-2.07 1.09-4.69.76-6.44-.98-2.14-2.15-2.14-5.64 0-7.78 2.15-2.15 5.63-2.15 7.78 0zm-1.41 6.36c1.36-1.37 1.36-3.58 0-4.95-1.37-1.37-3.59-1.37-4.95 0-1.37 1.37-1.37 3.58 0 4.95 1.36 1.37 3.58 1.37 4.95 0z';
25209
+ break;
25210
+
25211
+ case 'share-alt':
25212
+ path = 'M16.22 5.8c.47.69.29 1.62-.4 2.08-.69.47-1.62.29-2.08-.4-.16-.24-.35-.46-.55-.67-.21-.2-.43-.39-.67-.55s-.5-.3-.77-.41c-.27-.12-.55-.21-.84-.26-.59-.13-1.23-.13-1.82-.01-.29.06-.57.15-.84.27-.27.11-.53.25-.77.41s-.46.35-.66.55c-.21.21-.4.43-.56.67s-.3.5-.41.76c-.01.02-.01.03-.01.04-.1.24-.17.48-.23.72H1V6h2.66c.04-.07.07-.13.12-.2.27-.4.57-.77.91-1.11s.72-.65 1.11-.91c.4-.27.83-.51 1.28-.7s.93-.34 1.41-.43c.99-.21 2.03-.21 3.02 0 .48.09.96.24 1.41.43s.88.43 1.28.7c.39.26.77.57 1.11.91s.64.71.91 1.11zM12.5 10c0-1.38-1.12-2.5-2.5-2.5S7.5 8.62 7.5 10s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5zm-8.72 4.2c-.47-.69-.29-1.62.4-2.09.69-.46 1.62-.28 2.08.41.16.24.35.46.55.67.21.2.43.39.67.55s.5.3.77.41c.27.12.55.2.84.26.59.13 1.23.12 1.82 0 .29-.06.57-.14.84-.26.27-.11.53-.25.77-.41s.46-.35.66-.55c.21-.21.4-.44.56-.67.16-.25.3-.5.41-.76.01-.02.01-.03.01-.04.1-.24.17-.48.23-.72H19v3h-2.66c-.04.06-.07.13-.12.2-.27.4-.57.77-.91 1.11s-.72.65-1.11.91c-.4.27-.83.51-1.28.7s-.93.33-1.41.43c-.99.21-2.03.21-3.02 0-.48-.1-.96-.24-1.41-.43s-.88-.43-1.28-.7c-.39-.26-.77-.57-1.11-.91s-.64-.71-.91-1.11z';
25213
+ break;
25214
+
25215
+ case 'share-alt2':
25216
+ path = 'M18 8l-5 4V9.01c-2.58.06-4.88.45-7 2.99.29-3.57 2.66-5.66 7-5.94V3zM4 14h11v-2l2-1.6V16H2V5h9.43c-1.83.32-3.31 1-4.41 2H4v7z';
25217
+ break;
25218
+
25219
+ case 'share':
25220
+ path = 'M14.5 12c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.24.03-.46.09-.69l-4.38-2.3c-.55.61-1.33.99-2.21.99-1.66 0-3-1.34-3-3s1.34-3 3-3c.88 0 1.66.39 2.21.99l4.38-2.3c-.06-.23-.09-.45-.09-.69 0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-.88 0-1.66-.39-2.21-.99l-4.38 2.3c.06.23.09.45.09.69s-.03.46-.09.69l4.38 2.3c.55-.61 1.33-.99 2.21-.99z';
25221
+ break;
25222
+
25223
+ case 'shield-alt':
25224
+ path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2z';
25225
+ break;
25226
+
25227
+ case 'shield':
25228
+ path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2zm0 8h5s1-1 1-5c0 0-5-1-6-2v7H5c1 4 5 7 5 7v-7z';
25229
+ break;
25230
+
25231
+ case 'shortcode':
25232
+ path = 'M6 14H4V6h2V4H2v12h4M7.1 17h2.1l3.7-14h-2.1M14 4v2h2v8h-2v2h4V4';
25233
+ break;
25234
+
25235
+ case 'slides':
25236
+ path = 'M5 14V6h10v8H5zm-3-1V7h2v6H2zm4-6v6h8V7H6zm10 0h2v6h-2V7zm-3 2V8H7v1h6zm0 3v-2H7v2h6z';
25237
+ break;
25238
+
25239
+ case 'smartphone':
25240
+ path = 'M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z';
25241
+ break;
25242
+
25243
+ case 'smiley':
25244
+ path = 'M7 5.2c1.1 0 2 .89 2 2 0 .37-.11.71-.28 1C8.72 8.2 8 8 7 8s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.9-2 2-2zm6 0c1.11 0 2 .89 2 2 0 .37-.11.71-.28 1 0 0-.72-.2-1.72-.2s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.89-2 2-2zm-3 13.7c3.72 0 7.03-2.36 8.23-5.88l-1.32-.46C15.9 15.52 13.12 17.5 10 17.5s-5.9-1.98-6.91-4.94l-1.32.46c1.2 3.52 4.51 5.88 8.23 5.88z';
25245
+ break;
25246
+
25247
+ case 'sort':
25248
+ path = 'M11 7H1l5 7zm-2 7h10l-5-7z';
25249
+ break;
25250
+
25251
+ case 'sos':
25252
+ path = 'M18 10c0-4.42-3.58-8-8-8s-8 3.58-8 8 3.58 8 8 8 8-3.58 8-8zM7.23 3.57L8.72 7.3c-.62.29-1.13.8-1.42 1.42L3.57 7.23c.71-1.64 2.02-2.95 3.66-3.66zm9.2 3.66L12.7 8.72c-.29-.62-.8-1.13-1.42-1.42l1.49-3.73c1.64.71 2.95 2.02 3.66 3.66zM10 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-6.43.77l3.73-1.49c.29.62.8 1.13 1.42 1.42l-1.49 3.73c-1.64-.71-2.95-2.02-3.66-3.66zm9.2 3.66l-1.49-3.73c.62-.29 1.13-.8 1.42-1.42l3.73 1.49c-.71 1.64-2.02 2.95-3.66 3.66z';
25253
+ break;
25254
+
25255
+ case 'star-empty':
25256
+ path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88l-4.68 2.34.87-5.15-3.18-3.56 4.65-.58z';
25257
+ break;
25258
+
25259
+ case 'star-filled':
25260
+ path = 'M10 1l3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z';
25261
+ break;
25262
+
25263
+ case 'star-half':
25264
+ path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88V3.24z';
25265
+ break;
25266
+
25267
+ case 'sticky':
25268
+ path = 'M5 3.61V1.04l8.99-.01-.01 2.58c-1.22.26-2.16 1.35-2.16 2.67v.5c.01 1.31.93 2.4 2.17 2.66l-.01 2.58h-3.41l-.01 2.57c0 .6-.47 4.41-1.06 4.41-.6 0-1.08-3.81-1.08-4.41v-2.56L5 12.02l.01-2.58c1.23-.25 2.15-1.35 2.15-2.66v-.5c0-1.31-.92-2.41-2.16-2.67z';
25269
+ break;
25270
+
25271
+ case 'store':
25272
+ path = 'M1 10c.41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.51.43.54 0 1.08-.14 1.49-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.63-.46 1-1.17 1-2V7l-3-7H4L0 7v1c0 .83.37 1.54 1 2zm2 8.99h5v-5h4v5h5v-7c-.37-.05-.72-.22-1-.43-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.49.44-.55 0-1.1-.14-1.51-.44-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.5.44-.54 0-1.09-.14-1.5-.44-.63-.45-1-.73-1-1.57 0 .84-.38 1.12-1 1.57-.29.21-.63.38-1 .44v6.99z';
25273
+ break;
25274
+
25275
+ case 'table-col-after':
25276
+ path = 'M14.08 12.864V9.216h3.648V7.424H14.08V3.776h-1.728v3.648H8.64v1.792h3.712v3.648zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm0 5.12H1.28v3.84H6.4V6.4zm0 5.12H1.28v3.84H6.4v-3.84zM19.2 1.28H7.68v14.08H19.2V1.28z';
25277
+ break;
25278
+
25279
+ case 'table-col-before':
25280
+ path = 'M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z';
25281
+ break;
25282
+
25283
+ case 'table-col-delete':
25284
+ path = 'M6.4 9.98L7.68 8.7v-.256L6.4 7.164V9.98zm6.4-1.532l1.28-1.28V9.92L12.8 8.64v-.192zm7.68 9.472V0H0v17.92h20.48zm-1.28-2.56h-5.12v-1.024l-.256.256-1.024-1.024v1.792H7.68v-1.792l-1.024 1.024-.256-.256v1.024H1.28V1.28H6.4v2.368l.704-.704.576.576V1.216h5.12V3.52l.96-.96.32.32V1.216h5.12V15.36zm-5.76-2.112l-3.136-3.136-3.264 3.264-1.536-1.536 3.264-3.264L5.632 5.44l1.536-1.536 3.136 3.136 3.2-3.2 1.536 1.536-3.2 3.2 3.136 3.136-1.536 1.536z';
25285
+ break;
25286
+
25287
+ case 'table-row-after':
25288
+ path = 'M13.824 10.176h-2.88v-2.88H9.536v2.88h-2.88v1.344h2.88v2.88h1.408v-2.88h2.88zM0 17.92V0h20.48v17.92H0zM6.4 1.28H1.28v3.84H6.4V1.28zm6.4 0H7.68v3.84h5.12V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.056H1.28v9.024H19.2V6.336z';
25289
+ break;
25290
+
25291
+ case 'table-row-before':
25292
+ path = 'M6.656 6.464h2.88v2.88h1.408v-2.88h2.88V5.12h-2.88V2.24H9.536v2.88h-2.88zM0 17.92V0h20.48v17.92H0zm7.68-2.56h5.12v-3.84H7.68v3.84zm-6.4 0H6.4v-3.84H1.28v3.84zM19.2 1.28H1.28v9.024H19.2V1.28zm0 10.24h-5.12v3.84h5.12v-3.84z';
25293
+ break;
25294
+
25295
+ case 'table-row-delete':
25296
+ path = 'M17.728 11.456L14.592 8.32l3.2-3.2-1.536-1.536-3.2 3.2L9.92 3.648 8.384 5.12l3.2 3.2-3.264 3.264 1.536 1.536 3.264-3.264 3.136 3.136 1.472-1.536zM0 17.92V0h20.48v17.92H0zm19.2-6.4h-.448l-1.28-1.28H19.2V6.4h-1.792l1.28-1.28h.512V1.28H1.28v3.84h6.208l1.28 1.28H1.28v3.84h7.424l-1.28 1.28H1.28v3.84H19.2v-3.84z';
25297
+ break;
25298
+
25299
+ case 'tablet':
25300
+ path = 'M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z';
25301
+ break;
25302
+
25303
+ case 'tag':
25304
+ path = 'M11 2h7v7L8 19l-7-7zm3 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z';
25305
+ break;
25306
+
25307
+ case 'tagcloud':
25308
+ path = 'M11 3v4H1V3h10zm8 0v4h-7V3h7zM7 8v3H1V8h6zm12 0v3H8V8h11zM9 12v2H1v-2h8zm10 0v2h-9v-2h9zM6 15v1H1v-1h5zm5 0v1H7v-1h4zm3 0v1h-2v-1h2zm5 0v1h-4v-1h4z';
25309
+ break;
25310
+
25311
+ case 'testimonial':
25312
+ path = 'M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z';
25313
+ break;
25314
+
25315
+ case 'text':
25316
+ path = 'M18 3v2H2V3h16zm-6 4v2H2V7h10zm6 0v2h-4V7h4zM8 11v2H2v-2h6zm10 0v2h-8v-2h8zm-4 4v2H2v-2h12z';
25317
+ break;
25318
+
25319
+ case 'thumbs-down':
25320
+ path = 'M7.28 18c-.15.02-.26-.02-.41-.07-.56-.19-.83-.79-.66-1.35.17-.55 1-3.04 1-3.58 0-.53-.75-1-1.35-1h-3c-.6 0-1-.4-1-1s2-7 2-7c.17-.39.55-1 1-1H14v9h-2.14c-.41.41-3.3 4.71-3.58 5.27-.21.41-.6.68-1 .73zM18 12h-2V3h2v9z';
25321
+ break;
25322
+
25323
+ case 'thumbs-up':
25324
+ path = 'M12.72 2c.15-.02.26.02.41.07.56.19.83.79.66 1.35-.17.55-1 3.04-1 3.58 0 .53.75 1 1.35 1h3c.6 0 1 .4 1 1s-2 7-2 7c-.17.39-.55 1-1 1H6V8h2.14c.41-.41 3.3-4.71 3.58-5.27.21-.41.6-.68 1-.73zM2 8h2v9H2V8z';
25325
+ break;
25326
+
25327
+ case 'tickets-alt':
25328
+ path = 'M20 6.38L18.99 9.2v-.01c-.52-.19-1.03-.16-1.53.08s-.85.62-1.04 1.14-.16 1.03.07 1.53c.24.5.62.84 1.15 1.03v.01l-1.01 2.82-15.06-5.38.99-2.79c.52.19 1.03.16 1.53-.08.5-.23.84-.61 1.03-1.13s.16-1.03-.08-1.53c-.23-.49-.61-.83-1.13-1.02L4.93 1zm-4.97 5.69l1.37-3.76c.12-.31.1-.65-.04-.95s-.39-.53-.7-.65L8.14 3.98c-.64-.23-1.37.12-1.6.74L5.17 8.48c-.24.65.1 1.37.74 1.6l7.52 2.74c.14.05.28.08.43.08.52 0 1-.33 1.17-.83zM7.97 4.45l7.51 2.73c.19.07.34.21.43.39.08.18.09.38.02.57l-1.37 3.76c-.13.38-.58.59-.96.45L6.09 9.61c-.39-.14-.59-.57-.45-.96l1.37-3.76c.1-.29.39-.49.7-.49.09 0 .17.02.26.05zm6.82 12.14c.35.27.75.41 1.2.41H16v3H0v-2.96c.55 0 1.03-.2 1.41-.59.39-.38.59-.86.59-1.41s-.2-1.02-.59-1.41-.86-.59-1.41-.59V10h1.05l-.28.8 2.87 1.02c-.51.16-.89.62-.89 1.18v4c0 .69.56 1.25 1.25 1.25h8c.69 0 1.25-.56 1.25-1.25v-1.75l.83.3c.12.43.36.78.71 1.04zM3.25 17v-4c0-.41.34-.75.75-.75h.83l7.92 2.83V17c0 .41-.34.75-.75.75H4c-.41 0-.75-.34-.75-.75z';
25329
+ break;
25330
+
25331
+ case 'tickets':
25332
+ path = 'M20 5.38L18.99 8.2v-.01c-1.04-.37-2.19.18-2.57 1.22-.37 1.04.17 2.19 1.22 2.56v.01l-1.01 2.82L1.57 9.42l.99-2.79c1.04.38 2.19-.17 2.56-1.21s-.17-2.18-1.21-2.55L4.93 0zm-5.45 3.37c.74-2.08-.34-4.37-2.42-5.12-2.08-.74-4.37.35-5.11 2.42-.74 2.08.34 4.38 2.42 5.12 2.07.74 4.37-.35 5.11-2.42zm-2.56-4.74c.89.32 1.57.94 1.97 1.71-.01-.01-.02-.01-.04-.02-.33-.12-.67.09-.78.4-.1.28-.03.57.05.91.04.27.09.62-.06 1.04-.1.29-.33.58-.65 1l-.74 1.01.08-4.08.4.11c.19.04.26-.24.08-.29 0 0-.57-.15-.92-.28-.34-.12-.88-.36-.88-.36-.18-.08-.3.19-.12.27 0 0 .16.08.34.16l.01 1.63L9.2 9.18l.08-4.11c.2.06.4.11.4.11.19.04.26-.23.07-.29 0 0-.56-.15-.91-.28-.07-.02-.14-.05-.22-.08.93-.7 2.19-.94 3.37-.52zM7.4 6.19c.17-.49.44-.92.78-1.27l.04 5c-.94-.95-1.3-2.39-.82-3.73zm4.04 4.75l2.1-2.63c.37-.41.57-.77.69-1.12.05-.12.08-.24.11-.35.09.57.04 1.18-.17 1.77-.45 1.25-1.51 2.1-2.73 2.33zm-.7-3.22l.02 3.22c0 .02 0 .04.01.06-.4 0-.8-.07-1.2-.21-.33-.12-.63-.28-.9-.48zm1.24 6.08l2.1.75c.24.84 1 1.45 1.91 1.45H16v3H0v-2.96c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2V9h1.05l-.28.8 4.28 1.52C4.4 12.03 4 12.97 4 14c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.07-.02-.13-.02-.2zm-6.53-2.33l1.48.53c-.14.04-.15.27.03.28 0 0 .18.02.37.03l.56 1.54-.78 2.36-1.31-3.9c.21-.01.41-.03.41-.03.19-.02.17-.31-.02-.3 0 0-.59.05-.96.05-.07 0-.15 0-.23-.01.13-.2.28-.38.45-.55zM4.4 14c0-.52.12-1.02.32-1.46l1.71 4.7C5.23 16.65 4.4 15.42 4.4 14zm4.19-1.41l1.72.62c.07.17.12.37.12.61 0 .31-.12.66-.28 1.16l-.35 1.2zM11.6 14c0 1.33-.72 2.49-1.79 3.11l1.1-3.18c.06-.17.1-.31.14-.46l.52.19c.02.11.03.22.03.34zm-4.62 3.45l1.08-3.14 1.11 3.03c.01.02.01.04.02.05-.37.13-.77.21-1.19.21-.35 0-.69-.06-1.02-.15z';
25333
+ break;
25334
+
25335
+ case 'tide':
25336
+ path = 'M17 7.2V3H3v7.1c2.6-.5 4.5-1.5 6.4-2.6.2-.2.4-.3.6-.5v3c-1.9 1.1-4 2.2-7 2.8V17h14V9.9c-2.6.5-4.4 1.5-6.2 2.6-.3.1-.5.3-.8.4V10c2-1.1 4-2.2 7-2.8z';
25337
+ break;
25338
+
25339
+ case 'translation':
25340
+ path = 'M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z';
25341
+ break;
25342
+
25343
+ case 'trash':
25344
+ path = 'M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z';
25345
+ break;
25346
+
25347
+ case 'twitter':
25348
+ path = 'M18.94 4.46c-.49.73-1.11 1.38-1.83 1.9.01.15.01.31.01.47 0 4.85-3.69 10.44-10.43 10.44-2.07 0-4-.61-5.63-1.65.29.03.58.05.88.05 1.72 0 3.3-.59 4.55-1.57-1.6-.03-2.95-1.09-3.42-2.55.22.04.45.07.69.07.33 0 .66-.05.96-.13-1.67-.34-2.94-1.82-2.94-3.6v-.04c.5.27 1.06.44 1.66.46-.98-.66-1.63-1.78-1.63-3.06 0-.67.18-1.3.5-1.84 1.81 2.22 4.51 3.68 7.56 3.83-.06-.27-.1-.55-.1-.84 0-2.02 1.65-3.66 3.67-3.66 1.06 0 2.01.44 2.68 1.16.83-.17 1.62-.47 2.33-.89-.28.85-.86 1.57-1.62 2.02.75-.08 1.45-.28 2.11-.57z';
25349
+ break;
25350
+
25351
+ case 'undo':
25352
+ path = 'M12 5H7V2L1 6l6 4V7h5c2.2 0 4 1.8 4 4s-1.8 4-4 4H7v2h5c3.3 0 6-2.7 6-6s-2.7-6-6-6z';
25353
+ break;
25354
+
25355
+ case 'universal-access-alt':
25356
+ path = 'M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-9-7.4c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z';
25357
+ break;
25358
+
25359
+ case 'universal-access':
25360
+ path = 'M10 2.6c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z';
25361
+ break;
25362
+
25363
+ case 'unlock':
25364
+ path = 'M12 9V6c0-1.1-.9-2-2-2s-2 .9-2 2H6c0-2.21 1.79-4 4-4s4 1.79 4 4v3h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h7zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z';
25365
+ break;
25366
+
25367
+ case 'update':
25368
+ path = 'M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z';
25369
+ break;
25370
+
25371
+ case 'upload':
25372
+ path = 'M8 14V8H5l5-6 5 6h-3v6H8zm-2 2v-6H4v8h12.01v-8H14v6H6z';
25373
+ break;
25374
+
25375
+ case 'vault':
25376
+ path = 'M18 17V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-1 0H3V3h14v14zM4.75 4h10.5c.41 0 .75.34.75.75V6h-1v3h1v2h-1v3h1v1.25c0 .41-.34.75-.75.75H4.75c-.41 0-.75-.34-.75-.75V4.75c0-.41.34-.75.75-.75zM13 10c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4 4-1.79 4-4zM9 7l.77 1.15C10.49 8.46 11 9.17 11 10c0 1.1-.9 2-2 2s-2-.9-2-2c0-.83.51-1.54 1.23-1.85z';
25377
+ break;
25378
+
25379
+ case 'video-alt':
25380
+ path = 'M8 5c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1 0 .57.49 1 1 1h5c.55 0 1-.45 1-1zm6 5l4-4v10l-4-4v-2zm-1 4V8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z';
25381
+ break;
25382
+
25383
+ case 'video-alt2':
25384
+ path = 'M12 13V7c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2zm1-2.5l6 4.5V5l-6 4.5v1z';
25385
+ break;
25386
+
25387
+ case 'video-alt3':
25388
+ path = 'M19 15V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2zM8 14V6l6 4z';
25389
+ break;
25390
+
25391
+ case 'visibility':
25392
+ path = 'M19.7 9.4C17.7 6 14 3.9 10 3.9S2.3 6 .3 9.4L0 10l.3.6c2 3.4 5.7 5.5 9.7 5.5s7.7-2.1 9.7-5.5l.3-.6-.3-.6zM10 14.1c-3.1 0-6-1.6-7.7-4.1C3.6 8 5.7 6.6 8 6.1c-.9.6-1.5 1.7-1.5 2.9 0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5c0-1.2-.6-2.3-1.5-2.9 2.3.5 4.4 1.9 5.7 3.9-1.7 2.5-4.6 4.1-7.7 4.1z';
25393
+ break;
25394
+
25395
+ case 'warning':
25396
+ path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z';
25397
+ break;
25398
+
25399
+ case 'welcome-add-page':
25400
+ path = 'M17 7V4h-2V2h-3v1H3v15h11V9h1V7h2zm-1-2v1h-2v2h-1V6h-2V5h2V3h1v2h2z';
25401
+ break;
25402
+
25403
+ case 'welcome-comments':
25404
+ path = 'M5 2h10c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2zm8.5 8.5L11 8l2.5-2.5-1-1L10 7 7.5 4.5l-1 1L9 8l-2.5 2.5 1 1L10 9l2.5 2.5z';
25405
+ break;
25406
+
25407
+ case 'welcome-learn-more':
25408
+ path = 'M10 10L2.54 7.02 3 18H1l.48-11.41L0 6l10-4 10 4zm0-5c-.55 0-1 .22-1 .5s.45.5 1 .5 1-.22 1-.5-.45-.5-1-.5zm0 6l5.57-2.23c.71.94 1.2 2.07 1.36 3.3-.3-.04-.61-.07-.93-.07-2.55 0-4.78 1.37-6 3.41C8.78 13.37 6.55 12 4 12c-.32 0-.63.03-.93.07.16-1.23.65-2.36 1.36-3.3z';
25409
+ break;
25410
+
25411
+ case 'welcome-view-site':
25412
+ path = 'M18 14V4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-8-8c2.3 0 4.4 1.14 6 3-1.6 1.86-3.7 3-6 3s-4.4-1.14-6-3c1.6-1.86 3.7-3 6-3zm2 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm2 8h3v1H3v-1h3v-1h8v1z';
25413
+ break;
25414
+
25415
+ case 'welcome-widgets-menus':
25416
+ path = 'M19 16V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h15c.55 0 1-.45 1-1zM4 4h13v4H4V4zm1 1v2h3V5H5zm4 0v2h3V5H9zm4 0v2h3V5h-3zm-8.5 5c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 10h4v1H6v-1zm6 0h5v5h-5v-5zm-7.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 12h4v1H6v-1zm7 0v2h3v-2h-3zm-8.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 14h4v1H6v-1z';
25417
+ break;
25418
+
25419
+ case 'welcome-write-blog':
25420
+ path = 'M16.89 1.2l1.41 1.41c.39.39.39 1.02 0 1.41L14 8.33V18H3V3h10.67l1.8-1.8c.4-.39 1.03-.4 1.42 0zm-5.66 8.48l5.37-5.36-1.42-1.42-5.36 5.37-.71 2.12z';
25421
+ break;
25422
+
25423
+ case 'wordpress-alt':
25424
+ path = 'M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z';
25425
+ break;
25426
+
25427
+ case 'wordpress':
25428
+ path = 'M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z';
25429
+ break;
25430
+
25431
+ case 'yes-alt':
25432
+ path = 'M10 2c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm-.615 12.66h-1.34l-3.24-4.54 1.34-1.25 2.57 2.4 5.14-5.93 1.34.94-5.81 8.38z';
25433
+ break;
25434
+
25435
+ case 'yes':
25436
+ path = 'M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z';
25437
+ break;
25438
+ }
25439
+
25440
+ if (!path) {
25441
+ return null;
25442
+ }
25443
+
25444
+ var iconClass = ['dashicon', 'dashicons-' + icon, className].filter(Boolean).join(' ');
25445
+ return Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_6__primitives__["c" /* SVG */], {
25446
+ "aria-hidden": true,
25447
+ role: "img",
25448
+ focusable: "false",
25449
+ className: iconClass,
25450
+ xmlns: "http://www.w3.org/2000/svg",
25451
+ width: size,
25452
+ height: size,
25453
+ viewBox: "0 0 20 20"
25454
+ }, Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_6__primitives__["b" /* Path */], {
25455
+ d: path
25456
+ }));
25457
+ }
25458
+ }]);
25459
+
25460
+ return Dashicon;
25461
+ }(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["b" /* Component */]);
25462
+
25463
+
25464
+ //# sourceMappingURL=index.js.map
25465
+
25466
+ /***/ }),
25467
+ /* 46 */
25468
+ /***/ (function(module, exports, __webpack_require__) {
25469
+
25470
+ "use strict";
25471
+ /**
25472
+ * Copyright (c) 2013-present, Facebook, Inc.
25473
+ *
25474
+ * This source code is licensed under the MIT license found in the
25475
+ * LICENSE file in the root directory of this source tree.
25476
+ *
25477
+ * @providesModule shallowCompare
25478
+ */
25479
+
25480
+
25481
+
25482
+ var shallowEqual = __webpack_require__(508);
25483
+
25484
+ /**
25485
+ * Does a shallow comparison for props and state.
25486
+ * See ReactComponentWithPureRenderMixin
25487
+ * See also https://facebook.github.io/react/docs/shallow-compare.html
25488
+ */
25489
+ function shallowCompare(instance, nextProps, nextState) {
25490
+ return (
25491
+ !shallowEqual(instance.props, nextProps) ||
25492
+ !shallowEqual(instance.state, nextState)
25493
+ );
25494
+ }
25495
+
25496
+ module.exports = shallowCompare;
25497
+
25498
+
25499
+ /***/ }),
25500
+ /* 47 */
25501
+ /***/ (function(module, exports, __webpack_require__) {
25502
+
25503
+ "use strict";
25504
+
25505
+
25506
+ Object.defineProperty(exports, "__esModule", {
25507
+ value: true
25508
+ });
25509
+ exports['default'] = isSameDay;
25510
+
25511
+ var _moment = __webpack_require__(1);
25512
+
25513
+ var _moment2 = _interopRequireDefault(_moment);
25514
+
25515
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25516
+
25517
+ function isSameDay(a, b) {
25518
+ if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;
25519
+ // Compare least significant, most likely to change units first
25520
+ // Moment's isSame clones moment inputs and is a tad slow
25521
+ return a.date() === b.date() && a.month() === b.month() && a.year() === b.year();
25522
+ }
25523
+
25524
+ /***/ }),
25525
+ /* 48 */
25526
+ /***/ (function(module, exports, __webpack_require__) {
25527
+
25528
+ "use strict";
25529
+
25530
+
25531
+ Object.defineProperty(exports, "__esModule", {
25532
+ value: true
25533
+ });
25534
+ exports['default'] = toMomentObject;
25535
+
25536
+ var _moment = __webpack_require__(1);
25537
+
25538
+ var _moment2 = _interopRequireDefault(_moment);
25539
+
25540
+ var _constants = __webpack_require__(15);
25541
+
25542
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25543
+
25544
+ function toMomentObject(dateString, customFormat) {
25545
+ var dateFormats = customFormat ? [customFormat, _constants.DISPLAY_FORMAT, _constants.ISO_FORMAT] : [_constants.DISPLAY_FORMAT, _constants.ISO_FORMAT];
25546
+
25547
+ var date = (0, _moment2['default'])(dateString, dateFormats, true);
25548
+ return date.isValid() ? date.hour(12) : null;
25549
+ }
25550
+
25551
+ /***/ }),
25552
+ /* 49 */
25553
+ /***/ (function(module, exports, __webpack_require__) {
25554
+
25555
+ "use strict";
25556
+
25557
+
25558
+ Object.defineProperty(exports, "__esModule", {
25559
+ value: true
25560
+ });
25561
+
25562
+ var _propTypes = __webpack_require__(10);
25563
+
25564
+ var _propTypes2 = _interopRequireDefault(_propTypes);
25565
+
25566
+ var _constants = __webpack_require__(15);
25567
+
25568
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25569
+
25570
+ exports['default'] = _propTypes2['default'].oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION, _constants.VERTICAL_SCROLLABLE]);
25571
+
25572
+ /***/ }),
25573
+ /* 50 */
25574
+ /***/ (function(module, exports) {
25575
+
25576
+ Object.defineProperty(exports, "__esModule", {
25577
+ value: true
25578
+ });
25579
+ exports['default'] = isTouchDevice;
25580
+ function isTouchDevice() {
25581
+ return !!(typeof window !== 'undefined' && ('ontouchstart' in window || window.DocumentTouch && typeof document !== 'undefined' && document instanceof window.DocumentTouch)) || !!(typeof navigator !== 'undefined' && (navigator.maxTouchPoints || navigator.msMaxTouchPoints));
25582
+ }
25583
+ module.exports = exports['default'];
25584
+
25585
+ /***/ }),
25586
+ /* 51 */
25587
+ /***/ (function(module, exports, __webpack_require__) {
25588
+
25589
+ "use strict";
25590
+
25591
+
25592
+ Object.defineProperty(exports, "__esModule", {
25593
+ value: true
25594
+ });
25595
+
25596
+ var _propTypes = __webpack_require__(10);
25597
+
25598
+ var _propTypes2 = _interopRequireDefault(_propTypes);
25599
+
25600
+ var _constants = __webpack_require__(15);
25601
+
25602
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
25603
+
25604
+ exports['default'] = _propTypes2['default'].oneOf([_constants.OPEN_DOWN, _constants.OPEN_UP]);
25605
+
25606
+ /***/ }),
25607
+ /* 52 */
25608
+ /***/ (function(module, exports, __webpack_require__) {
25609
+
25610
+ "use strict";
25611
+ /*
25612
+ object-assign
25613
+ (c) Sindre Sorhus
25614
+ @license MIT
25615
+ */
25616
+
25617
+
25618
+ /* eslint-disable no-unused-vars */
25619
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
25620
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
25621
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
25622
+
25623
+ function toObject(val) {
25624
+ if (val === null || val === undefined) {
25625
+ throw new TypeError('Object.assign cannot be called with null or undefined');
25626
+ }
25627
+
25628
+ return Object(val);
25629
+ }
25630
+
25631
+ function shouldUseNative() {
25632
+ try {
25633
+ if (!Object.assign) {
25634
+ return false;
25635
+ }
25636
+
25637
+ // Detect buggy property enumeration order in older V8 versions.
25638
+
25639
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
25640
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
25641
+ test1[5] = 'de';
25642
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
25643
+ return false;
25644
+ }
25645
+
25646
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
25647
+ var test2 = {};
25648
+ for (var i = 0; i < 10; i++) {
25649
+ test2['_' + String.fromCharCode(i)] = i;
25650
+ }
25651
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
25652
+ return test2[n];
25653
+ });
25654
+ if (order2.join('') !== '0123456789') {
25655
+ return false;
25656
+ }
25657
+
25658
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
25659
+ var test3 = {};
25660
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
25661
+ test3[letter] = letter;
25662
+ });
25663
+ if (Object.keys(Object.assign({}, test3)).join('') !==
25664
+ 'abcdefghijklmnopqrst') {
25665
+ return false;
25666
+ }
25667
+
25668
+ return true;
25669
+ } catch (err) {
25670
+ // We don't expect any of the above to throw, but better to be safe.
25671
+ return false;
25672
+ }
25673
+ }
25674
+
25675
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
25676
+ var from;
25677
+ var to = toObject(target);
25678
+ var symbols;
25679
+
25680
+ for (var s = 1; s < arguments.length; s++) {
25681
+ from = Object(arguments[s]);
25682
+
25683
+ for (var key in from) {
25684
+ if (hasOwnProperty.call(from, key)) {
25685
+ to[key] = from[key];
25686
+ }
25687
+ }
25688
+
25689
+ if (getOwnPropertySymbols) {
25690
+ symbols = getOwnPropertySymbols(from);
25691
+ for (var i = 0; i < symbols.length; i++) {
25692
+ if (propIsEnumerable.call(from, symbols[i])) {
25693
+ to[symbols[i]] = from[symbols[i]];
25694
+ }
25695
+ }
25696
+ }
25697
+ }
25698
+
25699
+ return to;
25700
+ };
25701
+
25702
+
25703
+ /***/ }),
25704
+ /* 53 */
25705
+ /***/ (function(module, exports, __webpack_require__) {
25706
+
25707
+ "use strict";
25708
+ /* WEBPACK VAR INJECTION */(function(process) {
25709
+
25710
+ function checkDCE() {
25711
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
25712
+ if (
25713
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
25714
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
25715
+ ) {
25716
+ return;
25717
+ }
25718
+ if (process.env.NODE_ENV !== 'production') {
25719
+ // This branch is unreachable because this function is only called
25720
+ // in production, but the condition is true only in development.
25721
+ // Therefore if the branch is still here, dead code elimination wasn't
25722
+ // properly applied.
25723
+ // Don't change the message. React DevTools relies on it. Also make sure
25724
+ // this message doesn't occur elsewhere in this function, or it will cause
25725
+ // a false positive.
25726
+ throw new Error('^_^');
25727
+ }
25728
+ try {
25729
+ // Verify that the code above has been dead code eliminated (DCE'd).
25730
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
25731
+ } catch (err) {
25732
+ // DevTools shouldn't crash React, no matter what.
25733
+ // We should still report in case we break this code.
25734
+ console.error(err);
25735
+ }
25736
+ }
25737
+
25738
+ if (process.env.NODE_ENV === 'production') {
25739
+ // DCE check should happen before ReactDOM bundle executes so that
25740
+ // DevTools can report bad minification during injection.
25741
+ checkDCE();
25742
+ module.exports = __webpack_require__(358);
25743
+ } else {
25744
+ module.exports = __webpack_require__(361);
25745
+ }
25746
+
25747
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
25748
+
25749
+ /***/ }),
25750
+ /* 54 */
25751
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
25752
+
25753
+ "use strict";
25754
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LINE_SEPARATOR; });
25755
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return OBJECT_REPLACEMENT_CHARACTER; });
25756
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ZERO_WIDTH_NO_BREAK_SPACE; });
25757
+ var LINE_SEPARATOR = "\u2028";
25758
+ var OBJECT_REPLACEMENT_CHARACTER = "\uFFFC";
25759
+ var ZERO_WIDTH_NO_BREAK_SPACE = "\uFEFF";
25760
+ //# sourceMappingURL=special-characters.js.map
25761
+
25762
+ /***/ }),
25763
+ /* 55 */
25764
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
25765
+
25766
+ "use strict";
25767
+ /* harmony export (immutable) */ __webpack_exports__["d"] = colorToState;
25768
+ /* harmony export (immutable) */ __webpack_exports__["e"] = isValidHex;
25769
+ /* harmony export (immutable) */ __webpack_exports__["f"] = simpleCheckForValidColor;
25770
+ /* harmony export (immutable) */ __webpack_exports__["a"] = calculateAlphaChange;
25771
+ /* harmony export (immutable) */ __webpack_exports__["b"] = calculateHueChange;
25772
+ /* harmony export (immutable) */ __webpack_exports__["c"] = calculateSaturationChange;
25773
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash__ = __webpack_require__(2);
25774
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_lodash__);
25775
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tinycolor2__ = __webpack_require__(471);
25776
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tinycolor2___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_tinycolor2__);
25777
+ /**
25778
+ * Parts of this source were derived and modified from react-color,
25779
+ * released under the MIT license.
25780
+ *
25781
+ * https://github.com/casesandberg/react-color/
25782
+ *
25783
+ * Copyright (c) 2015 Case Sandberg
25784
+ *
25785
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
25786
+ * of this software and associated documentation files (the "Software"), to deal
25787
+ * in the Software without restriction, including without limitation the rights
25788
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
25789
+ * copies of the Software, and to permit persons to whom the Software is
25790
+ * furnished to do so, subject to the following conditions:
25791
+ *
25792
+ * The above copyright notice and this permission notice shall be included in
25793
+ * all copies or substantial portions of the Software.
25794
+ *
25795
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25796
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25797
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25798
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25799
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25800
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25801
+ * THE SOFTWARE.
25802
+ */
25803
+
25804
+ /**
25805
+ * External dependencies
25806
+ */
25807
+
25808
+
25809
+ /**
25810
+ * Given a hex color, get all other color properties (rgb, alpha, etc).
25811
+ *
25812
+ * @param {Object|string} data A hex color string or an object with a hex property
25813
+ * @param {string} oldHue A reference to the hue of the previous color, otherwise dragging the saturation to zero will reset the current hue to zero as well. See https://github.com/casesandberg/react-color/issues/29#issuecomment-132686909.
25814
+ * @return {Object} An object of different color representations.
25815
+ */
25816
+
25817
+ function colorToState() {
25818
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
25819
+ var oldHue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
25820
+ var color = data.hex ? __WEBPACK_IMPORTED_MODULE_1_tinycolor2___default()(data.hex) : __WEBPACK_IMPORTED_MODULE_1_tinycolor2___default()(data);
25821
+ var hsl = color.toHsl();
25822
+ hsl.h = Math.round(hsl.h);
25823
+ hsl.s = Math.round(hsl.s * 100);
25824
+ hsl.l = Math.round(hsl.l * 100);
25825
+ var hsv = color.toHsv();
25826
+ hsv.h = Math.round(hsv.h);
25827
+ hsv.s = Math.round(hsv.s * 100);
25828
+ hsv.v = Math.round(hsv.v * 100);
25829
+ var rgb = color.toRgb();
25830
+ var hex = color.toHex();
25831
+
25832
+ if (hsl.s === 0) {
25833
+ hsl.h = oldHue || 0;
25834
+ hsv.h = oldHue || 0;
25835
+ }
25836
+
25837
+ var transparent = hex === '000000' && rgb.a === 0;
25838
+ return {
25839
+ color: color,
25840
+ hex: transparent ? 'transparent' : "#".concat(hex),
25841
+ hsl: hsl,
25842
+ hsv: hsv,
25843
+ oldHue: data.h || oldHue || hsl.h,
25844
+ rgb: rgb,
25845
+ source: data.source
25846
+ };
25847
+ }
25848
+ /**
25849
+ * Get the top/left offsets of a point in a container, also returns the container width/height.
25850
+ *
25851
+ * @param {Event} e Mouse or touch event with a location coordinate.
25852
+ * @param {HTMLElement} container The container div, returned point is relative to this container.
25853
+ * @return {Object} An object of the offset positions & container size.
25854
+ */
25855
+
25856
+ function getPointOffset(e, container) {
25857
+ e.preventDefault();
25858
+
25859
+ var _container$getBoundin = container.getBoundingClientRect(),
25860
+ containerLeft = _container$getBoundin.left,
25861
+ containerTop = _container$getBoundin.top,
25862
+ width = _container$getBoundin.width,
25863
+ height = _container$getBoundin.height;
25864
+
25865
+ var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;
25866
+ var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;
25867
+ var left = x - (containerLeft + window.pageXOffset);
25868
+ var top = y - (containerTop + window.pageYOffset);
25869
+
25870
+ if (left < 0) {
25871
+ left = 0;
25872
+ } else if (left > width) {
25873
+ left = width;
25874
+ } else if (top < 0) {
25875
+ top = 0;
25876
+ } else if (top > height) {
25877
+ top = height;
25878
+ }
25879
+
25880
+ return {
25881
+ top: top,
25882
+ left: left,
25883
+ width: width,
25884
+ height: height
25885
+ };
25886
+ }
25887
+ /**
25888
+ * Check if a string is a valid hex color code.
25889
+ *
25890
+ * @param {string} hex A possible hex color.
25891
+ * @return {boolean} True if the color is a valid hex color.
25892
+ */
25893
+
25894
+
25895
+ function isValidHex(hex) {
25896
+ // disable hex4 and hex8
25897
+ var lh = String(hex).charAt(0) === '#' ? 1 : 0;
25898
+ return hex.length !== 4 + lh && hex.length < 7 + lh && __WEBPACK_IMPORTED_MODULE_1_tinycolor2___default()(hex).isValid();
25899
+ }
25900
+ /**
25901
+ * Check an object for any valid color properties.
25902
+ *
25903
+ * @param {Object} data A possible object representing a color.
25904
+ * @return {Object|boolean} If a valid representation of color, returns the data object. Otherwise returns false.
25905
+ */
25906
+
25907
+ function simpleCheckForValidColor(data) {
25908
+ var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];
25909
+ var checked = 0;
25910
+ var passed = 0;
25911
+ Object(__WEBPACK_IMPORTED_MODULE_0_lodash__["each"])(keysToCheck, function (letter) {
25912
+ if (data[letter]) {
25913
+ checked += 1;
25914
+
25915
+ if (!isNaN(data[letter])) {
25916
+ passed += 1;
25917
+ }
25918
+ }
25919
+ });
25920
+ return checked === passed ? data : false;
25921
+ }
25922
+ /**
25923
+ * Calculate the current alpha based on a mouse or touch event
25924
+ *
25925
+ * @param {Event} e A mouse or touch event on the alpha bar.
25926
+ * @param {Object} props The current component props
25927
+ * @param {HTMLElement} container The container div for the alpha bar graph.
25928
+ * @return {Object|null} If the alpha value has changed, returns a new color object.
25929
+ */
25930
+
25931
+ function calculateAlphaChange(e, props, container) {
25932
+ var _getPointOffset = getPointOffset(e, container),
25933
+ left = _getPointOffset.left,
25934
+ width = _getPointOffset.width;
25935
+
25936
+ var a = left < 0 ? 0 : Math.round(left * 100 / width) / 100;
25937
+
25938
+ if (props.hsl.a !== a) {
25939
+ return {
25940
+ h: props.hsl.h,
25941
+ s: props.hsl.s,
25942
+ l: props.hsl.l,
25943
+ a: a,
25944
+ source: 'rgb'
25945
+ };
25946
+ }
25947
+
25948
+ return null;
25949
+ }
25950
+ /**
25951
+ * Calculate the current hue based on a mouse or touch event
25952
+ *
25953
+ * @param {Event} e A mouse or touch event on the hue bar.
25954
+ * @param {Object} props The current component props
25955
+ * @param {HTMLElement} container The container div for the hue bar graph.
25956
+ * @return {Object|null} If the hue value has changed, returns a new color object.
25957
+ */
25958
+
25959
+ function calculateHueChange(e, props, container) {
25960
+ var _getPointOffset2 = getPointOffset(e, container),
25961
+ left = _getPointOffset2.left,
25962
+ width = _getPointOffset2.width;
25963
+
25964
+ var percent = left * 100 / width;
25965
+ var h = left >= width ? 359 : 360 * percent / 100;
25966
+
25967
+ if (props.hsl.h !== h) {
25968
+ return {
25969
+ h: h,
25970
+ s: props.hsl.s,
25971
+ l: props.hsl.l,
25972
+ a: props.hsl.a,
25973
+ source: 'rgb'
25974
+ };
25975
+ }
25976
+
25977
+ return null;
25978
+ }
25979
+ /**
25980
+ * Calculate the current saturation & brightness based on a mouse or touch event
25981
+ *
25982
+ * @param {Event} e A mouse or touch event on the saturation graph.
25983
+ * @param {Object} props The current component props
25984
+ * @param {HTMLElement} container The container div for the 2D saturation graph.
25985
+ * @return {Object} Returns a new color object.
25986
+ */
25987
+
25988
+ function calculateSaturationChange(e, props, container) {
25989
+ var _getPointOffset3 = getPointOffset(e, container),
25990
+ top = _getPointOffset3.top,
25991
+ left = _getPointOffset3.left,
25992
+ width = _getPointOffset3.width,
25993
+ height = _getPointOffset3.height;
25994
+
25995
+ var saturation = left < 0 ? 0 : left * 100 / width;
25996
+ var bright = top >= height ? 0 : -(top * 100 / height) + 100; // `v` values less than 1 are considered in the [0,1] range, causing unexpected behavior at the bottom
25997
+ // of the chart. To fix this, we assume any value less than 1 should be 0 brightness.
25998
+
25999
+ if (bright < 1) {
26000
+ bright = 0;
26001
+ }
26002
+
26003
+ return {
26004
+ h: props.hsl.h,
26005
+ s: saturation,
26006
+ v: bright,
26007
+ a: props.hsl.a,
26008
+ source: 'rgb'
26009
+ };
26010
+ }
26011
+ //# sourceMappingURL=utils.js.map
26012
+
26013
+ /***/ }),
26014
+ /* 56 */
26015
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26016
+
26017
+ "use strict";
26018
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
26019
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
26020
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
26021
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
26022
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
26023
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
26024
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__wordpress_element__ = __webpack_require__(0);
26025
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mousetrap__ = __webpack_require__(472);
26026
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mousetrap___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mousetrap__);
26027
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_mousetrap_plugins_global_bind_mousetrap_global_bind__ = __webpack_require__(473);
26028
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_mousetrap_plugins_global_bind_mousetrap_global_bind___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_mousetrap_plugins_global_bind_mousetrap_global_bind__);
26029
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash__ = __webpack_require__(2);
26030
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_lodash__);
26031
+
26032
+
26033
+
26034
+
26035
+
26036
+
26037
+
26038
+
26039
+ /**
26040
+ * External dependencies
26041
+ */
26042
+
26043
+
26044
+
26045
+ /**
26046
+ * WordPress dependencies
26047
+ */
26048
+
26049
+
26050
+
26051
+ var KeyboardShortcuts =
26052
+ /*#__PURE__*/
26053
+ function (_Component) {
26054
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(KeyboardShortcuts, _Component);
26055
+
26056
+ function KeyboardShortcuts() {
26057
+ var _this;
26058
+
26059
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, KeyboardShortcuts);
26060
+
26061
+ _this = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(KeyboardShortcuts).apply(this, arguments));
26062
+ _this.bindKeyTarget = _this.bindKeyTarget.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
26063
+ return _this;
26064
+ }
26065
+
26066
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(KeyboardShortcuts, [{
26067
+ key: "componentDidMount",
26068
+ value: function componentDidMount() {
26069
+ var _this2 = this;
26070
+
26071
+ var _this$keyTarget = this.keyTarget,
26072
+ keyTarget = _this$keyTarget === void 0 ? document : _this$keyTarget;
26073
+ this.mousetrap = new __WEBPACK_IMPORTED_MODULE_7_mousetrap___default.a(keyTarget);
26074
+ Object(__WEBPACK_IMPORTED_MODULE_9_lodash__["forEach"])(this.props.shortcuts, function (callback, key) {
26075
+ var _this2$props = _this2.props,
26076
+ bindGlobal = _this2$props.bindGlobal,
26077
+ eventName = _this2$props.eventName;
26078
+ var bindFn = bindGlobal ? 'bindGlobal' : 'bind';
26079
+
26080
+ _this2.mousetrap[bindFn](key, callback, eventName);
26081
+ });
26082
+ }
26083
+ }, {
26084
+ key: "componentWillUnmount",
26085
+ value: function componentWillUnmount() {
26086
+ this.mousetrap.reset();
26087
+ }
26088
+ /**
26089
+ * When rendering with children, binds the wrapper node on which events
26090
+ * will be bound.
26091
+ *
26092
+ * @param {Element} node Key event target.
26093
+ */
26094
+
26095
+ }, {
26096
+ key: "bindKeyTarget",
26097
+ value: function bindKeyTarget(node) {
26098
+ this.keyTarget = node;
26099
+ }
26100
+ }, {
26101
+ key: "render",
26102
+ value: function render() {
26103
+ // Render as non-visual if there are no children pressed. Keyboard
26104
+ // events will be bound to the document instead.
26105
+ var children = this.props.children;
26106
+
26107
+ if (!__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["a" /* Children */].count(children)) {
26108
+ return null;
26109
+ }
26110
+
26111
+ return Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["h" /* createElement */])("div", {
26112
+ ref: this.bindKeyTarget
26113
+ }, children);
26114
+ }
26115
+ }]);
26116
+
26117
+ return KeyboardShortcuts;
26118
+ }(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["b" /* Component */]);
26119
+
26120
+ /* harmony default export */ __webpack_exports__["a"] = (KeyboardShortcuts);
26121
+ //# sourceMappingURL=index.js.map
26122
+
26123
+ /***/ }),
26124
+ /* 57 */
26125
+ /***/ (function(module, exports, __webpack_require__) {
26126
+
26127
+ "use strict";
26128
+
26129
+
26130
+ Object.defineProperty(exports, "__esModule", {
26131
+ value: true
26132
+ });
26133
+
26134
+ var _propTypes = __webpack_require__(10);
26135
+
26136
+ var _propTypes2 = _interopRequireDefault(_propTypes);
26137
+
26138
+ var _constants = __webpack_require__(15);
26139
+
26140
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26141
+
26142
+ exports['default'] = _propTypes2['default'].oneOf([_constants.ICON_BEFORE_POSITION, _constants.ICON_AFTER_POSITION]);
26143
+
26144
+ /***/ }),
26145
+ /* 58 */
26146
+ /***/ (function(module, exports, __webpack_require__) {
26147
+
26148
+ "use strict";
26149
+
26150
+
26151
+ Object.defineProperty(exports, "__esModule", {
26152
+ value: true
26153
+ });
26154
+
26155
+ var _propTypes = __webpack_require__(10);
26156
+
26157
+ var _propTypes2 = _interopRequireDefault(_propTypes);
26158
+
26159
+ var _constants = __webpack_require__(15);
26160
+
26161
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26162
+
26163
+ exports['default'] = _propTypes2['default'].oneOf([_constants.INFO_POSITION_TOP, _constants.INFO_POSITION_BOTTOM, _constants.INFO_POSITION_BEFORE, _constants.INFO_POSITION_AFTER]);
26164
+
26165
+ /***/ }),
26166
+ /* 59 */
26167
+ /***/ (function(module, exports, __webpack_require__) {
26168
+
26169
+ "use strict";
26170
+
26171
+
26172
+ Object.defineProperty(exports, "__esModule", {
26173
+ value: true
26174
+ });
26175
+ exports['default'] = isInclusivelyAfterDay;
26176
+
26177
+ var _moment = __webpack_require__(1);
26178
+
26179
+ var _moment2 = _interopRequireDefault(_moment);
26180
+
26181
+ var _isBeforeDay = __webpack_require__(60);
26182
+
26183
+ var _isBeforeDay2 = _interopRequireDefault(_isBeforeDay);
26184
+
26185
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26186
+
26187
+ function isInclusivelyAfterDay(a, b) {
26188
+ if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;
26189
+ return !(0, _isBeforeDay2['default'])(a, b);
26190
+ }
26191
+
26192
+ /***/ }),
26193
+ /* 60 */
26194
+ /***/ (function(module, exports, __webpack_require__) {
26195
+
26196
+ "use strict";
26197
+
26198
+
26199
+ Object.defineProperty(exports, "__esModule", {
26200
+ value: true
26201
+ });
26202
+ exports['default'] = isBeforeDay;
26203
+
26204
+ var _moment = __webpack_require__(1);
26205
+
26206
+ var _moment2 = _interopRequireDefault(_moment);
26207
+
26208
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26209
+
26210
+ function isBeforeDay(a, b) {
26211
+ if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;
26212
+
26213
+ var aYear = a.year();
26214
+ var aMonth = a.month();
26215
+
26216
+ var bYear = b.year();
26217
+ var bMonth = b.month();
26218
+
26219
+ var isSameYear = aYear === bYear;
26220
+ var isSameMonth = aMonth === bMonth;
26221
+
26222
+ if (isSameYear && isSameMonth) return a.date() < b.date();
26223
+ if (isSameYear) return aMonth < bMonth;
26224
+ return aYear < bYear;
26225
+ }
26226
+
26227
+ /***/ }),
26228
+ /* 61 */
26229
+ /***/ (function(module, exports, __webpack_require__) {
26230
+
26231
+ "use strict";
26232
+
26233
+
26234
+ Object.defineProperty(exports, "__esModule", {
26235
+ value: true
26236
+ });
26237
+
26238
+ var _react = __webpack_require__(11);
26239
+
26240
+ var _react2 = _interopRequireDefault(_react);
26241
+
26242
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26243
+
26244
+ var CloseButton = function () {
26245
+ function CloseButton(props) {
26246
+ return _react2['default'].createElement(
26247
+ 'svg',
26248
+ props,
26249
+ _react2['default'].createElement('path', {
26250
+ fillRule: 'evenodd',
26251
+ d: 'M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z'
26252
+ })
26253
+ );
26254
+ }
26255
+
26256
+ return CloseButton;
26257
+ }();
26258
+
26259
+ CloseButton.defaultProps = {
26260
+ viewBox: '0 0 12 12'
26261
+ };
26262
+ exports['default'] = CloseButton;
26263
+
26264
+ /***/ }),
26265
+ /* 62 */
26266
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26267
+
26268
+ "use strict";
26269
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__menu__ = __webpack_require__(580);
26270
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__menu__["a"]; });
26271
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__tabbable__ = __webpack_require__(581);
26272
+ /* unused harmony reexport TabbableContainer */
26273
+ /**
26274
+ * Internal Dependencies
26275
+ */
26276
+
26277
+
26278
+ //# sourceMappingURL=index.js.map
26279
+
26280
+ /***/ }),
26281
+ /* 63 */
26282
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26283
+
26284
+ "use strict";
26285
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__svg__ = __webpack_require__(353);
26286
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__svg__["a"]; });
26287
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__svg__["b"]; });
26288
+ /* harmony namespace reexport (by used) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__svg__["c"]; });
26289
+
26290
+ //# sourceMappingURL=index.js.map
26291
+
26292
+ /***/ }),
26293
+ /* 64 */
26294
+ /***/ (function(module, exports, __webpack_require__) {
26295
+
26296
+ "use strict";
26297
+
26298
+
26299
+ /**
26300
+ * Internal dependencies;
26301
+ */
26302
+ var isShallowEqualObjects = __webpack_require__( 381 );
26303
+ var isShallowEqualArrays = __webpack_require__( 382 );
26304
+
26305
+ var isArray = Array.isArray;
26306
+
26307
+ /**
26308
+ * Returns true if the two arrays or objects are shallow equal, or false
26309
+ * otherwise.
26310
+ *
26311
+ * @param {(Array|Object)} a First object or array to compare.
26312
+ * @param {(Array|Object)} b Second object or array to compare.
26313
+ *
26314
+ * @return {boolean} Whether the two values are shallow equal.
26315
+ */
26316
+ function isShallowEqual( a, b ) {
26317
+ if ( a && b ) {
26318
+ if ( a.constructor === Object && b.constructor === Object ) {
26319
+ return isShallowEqualObjects( a, b );
26320
+ } else if ( isArray( a ) && isArray( b ) ) {
26321
+ return isShallowEqualArrays( a, b );
26322
+ }
26323
+ }
26324
+
26325
+ return a === b;
26326
+ }
26327
+
26328
+ module.exports = isShallowEqual;
26329
+
26330
+
26331
+ /***/ }),
26332
+ /* 65 */
26333
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26334
+
26335
+ "use strict";
26336
+ /* harmony export (immutable) */ __webpack_exports__["a"] = _slicedToArray;
26337
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayWithHoles__ = __webpack_require__(391);
26338
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__iterableToArrayLimit__ = __webpack_require__(392);
26339
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nonIterableRest__ = __webpack_require__(393);
26340
+
26341
+
26342
+
26343
+ function _slicedToArray(arr, i) {
26344
+ return Object(__WEBPACK_IMPORTED_MODULE_0__arrayWithHoles__["a" /* default */])(arr) || Object(__WEBPACK_IMPORTED_MODULE_1__iterableToArrayLimit__["a" /* default */])(arr, i) || Object(__WEBPACK_IMPORTED_MODULE_2__nonIterableRest__["a" /* default */])();
26345
+ }
26346
+
26347
+ /***/ }),
26348
+ /* 66 */
26349
+ /***/ (function(module, exports, __webpack_require__) {
26350
+
26351
+ "use strict";
26352
+
26353
+
26354
+ Object.defineProperty(exports, "__esModule", {
26355
+ value: true
26356
+ });
26357
+
26358
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
26359
+
26360
+ var _keys = __webpack_require__(117);
26361
+
26362
+ var _keys2 = _interopRequireDefault(_keys);
26363
+
26364
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26365
+
26366
+ var is = {
26367
+ obj: function obj(value) {
26368
+ return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !!value;
26369
+ },
26370
+ all: function all(value) {
26371
+ return is.obj(value) && value.type === _keys2.default.all;
26372
+ },
26373
+ error: function error(value) {
26374
+ return is.obj(value) && value.type === _keys2.default.error;
26375
+ },
26376
+ array: Array.isArray,
26377
+ func: function func(value) {
26378
+ return typeof value === 'function';
26379
+ },
26380
+ promise: function promise(value) {
26381
+ return value && is.func(value.then);
26382
+ },
26383
+ iterator: function iterator(value) {
26384
+ return value && is.func(value.next) && is.func(value.throw);
26385
+ },
26386
+ fork: function fork(value) {
26387
+ return is.obj(value) && value.type === _keys2.default.fork;
26388
+ },
26389
+ join: function join(value) {
26390
+ return is.obj(value) && value.type === _keys2.default.join;
26391
+ },
26392
+ race: function race(value) {
26393
+ return is.obj(value) && value.type === _keys2.default.race;
26394
+ },
26395
+ call: function call(value) {
26396
+ return is.obj(value) && value.type === _keys2.default.call;
26397
+ },
26398
+ cps: function cps(value) {
26399
+ return is.obj(value) && value.type === _keys2.default.cps;
26400
+ },
26401
+ subscribe: function subscribe(value) {
26402
+ return is.obj(value) && value.type === _keys2.default.subscribe;
26403
+ },
26404
+ channel: function channel(value) {
26405
+ return is.obj(value) && is.func(value.subscribe);
26406
+ }
26407
+ };
26408
+
26409
+ exports.default = is;
26410
+
26411
+ /***/ }),
26412
+ /* 67 */
26413
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
26414
+
26415
+ "use strict";
26416
+ /* harmony export (immutable) */ __webpack_exports__["a"] = create;
26417
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_toConsumableArray__ = __webpack_require__(22);
26418
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_typeof__ = __webpack_require__(41);
26419
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__wordpress_data__ = __webpack_require__(42);
26420
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__is_empty__ = __webpack_require__(120);
26421
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__is_format_equal__ = __webpack_require__(119);
26422
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__create_element__ = __webpack_require__(121);
26423
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__special_characters__ = __webpack_require__(54);
26424
+
26425
+
26426
+
26427
+ /**
26428
+ * WordPress dependencies
26429
+ */
26430
+
26431
+ /**
26432
+ * Internal dependencies
26433
+ */
26434
+
26435
+
26436
+
26437
+
26438
+
26439
+ /**
26440
+ * Browser dependencies
26441
+ */
26442
+
26443
+ var _window$Node = window.Node,
26444
+ TEXT_NODE = _window$Node.TEXT_NODE,
26445
+ ELEMENT_NODE = _window$Node.ELEMENT_NODE;
26446
+
26447
+ function createEmptyValue() {
26448
+ return {
26449
+ formats: [],
26450
+ text: ''
26451
+ };
26452
+ }
26453
+
26454
+ function simpleFindKey(object, value) {
26455
+ for (var key in object) {
26456
+ if (object[key] === value) {
26457
+ return key;
26458
+ }
26459
+ }
26460
+ }
26461
+
26462
+ function toFormat(_ref) {
26463
+ var type = _ref.type,
26464
+ attributes = _ref.attributes;
26465
+ var formatType;
26466
+
26467
+ if (attributes && attributes.class) {
26468
+ formatType = Object(__WEBPACK_IMPORTED_MODULE_2__wordpress_data__["d" /* select */])('core/rich-text').getFormatTypeForClassName(attributes.class);
26469
+
26470
+ if (formatType) {
26471
+ // Preserve any additional classes.
26472
+ attributes.class = " ".concat(attributes.class, " ").replace(" ".concat(formatType.className, " "), ' ').trim();
26473
+
26474
+ if (!attributes.class) {
26475
+ delete attributes.class;
26476
+ }
26477
+ }
26478
+ }
26479
+
26480
+ if (!formatType) {
26481
+ formatType = Object(__WEBPACK_IMPORTED_MODULE_2__wordpress_data__["d" /* select */])('core/rich-text').getFormatTypeForBareElement(type);
26482
+ }
26483
+
26484
+ if (!formatType) {
26485
+ return attributes ? {
26486
+ type: type,
26487
+ attributes: attributes
26488
+ } : {
26489
+ type: type
26490
+ };
26491
+ }
26492
+
26493
+ if (!attributes) {
26494
+ return {
26495
+ type: formatType.name
26496
+ };
26497
+ }
26498
+
26499
+ var registeredAttributes = {};
26500
+ var unregisteredAttributes = {};
26501
+
26502
+ for (var name in attributes) {
26503
+ var key = simpleFindKey(formatType.attributes, name);
26504
+
26505
+ if (key) {
26506
+ registeredAttributes[key] = attributes[name];
26507
+ } else {
26508
+ unregisteredAttributes[name] = attributes[name];
26509
+ }
26510
+ }
26511
+
26512
+ return {
26513
+ type: formatType.name,
26514
+ attributes: registeredAttributes,
26515
+ unregisteredAttributes: unregisteredAttributes
26516
+ };
26517
+ }
26518
+ /**
26519
+ * Create a RichText value from an `Element` tree (DOM), an HTML string or a
26520
+ * plain text string, with optionally a `Range` object to set the selection. If
26521
+ * called without any input, an empty value will be created. If
26522
+ * `multilineTag` is provided, any content of direct children whose type matches
26523
+ * `multilineTag` will be separated by two newlines. The optional functions can
26524
+ * be used to filter out content.
26525
+ *
26526
+ * @param {?Object} $1 Optional named argements.
26527
+ * @param {?Element} $1.element Element to create value from.
26528
+ * @param {?string} $1.text Text to create value from.
26529
+ * @param {?string} $1.html HTML to create value from.
26530
+ * @param {?Range} $1.range Range to create value from.
26531
+ * @param {?string} $1.multilineTag Multiline tag if the structure is
26532
+ * multiline.
26533
+ * @param {?Array} $1.multilineWrapperTags Tags where lines can be found if
26534
+ * nesting is possible.
26535
+ * @param {?Function} $1.removeNode Function to declare whether the
26536
+ * given node should be removed.
26537
+ * @param {?Function} $1.unwrapNode Function to declare whether the
26538
+ * given node should be unwrapped.
26539
+ * @param {?Function} $1.filterString Function to filter the given
26540
+ * string.
26541
+ * @param {?Function} $1.removeAttribute Wether to remove an attribute
26542
+ * based on the name.
26543
+ *
26544
+ * @return {Object} A rich text value.
26545
+ */
26546
+
26547
+
26548
+ function create() {
26549
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
26550
+ element = _ref2.element,
26551
+ text = _ref2.text,
26552
+ html = _ref2.html,
26553
+ range = _ref2.range,
26554
+ multilineTag = _ref2.multilineTag,
26555
+ multilineWrapperTags = _ref2.multilineWrapperTags,
26556
+ removeNode = _ref2.removeNode,
26557
+ unwrapNode = _ref2.unwrapNode,
26558
+ filterString = _ref2.filterString,
26559
+ removeAttribute = _ref2.removeAttribute;
26560
+
26561
+ if (typeof text === 'string' && text.length > 0) {
26562
+ return {
26563
+ formats: Array(text.length),
26564
+ text: text
26565
+ };
26566
+ }
26567
+
26568
+ if (typeof html === 'string' && html.length > 0) {
26569
+ element = Object(__WEBPACK_IMPORTED_MODULE_5__create_element__["a" /* createElement */])(document, html);
26570
+ }
26571
+
26572
+ if (Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_typeof__["a" /* default */])(element) !== 'object') {
26573
+ return createEmptyValue();
26574
+ }
26575
+
26576
+ if (!multilineTag) {
26577
+ return createFromElement({
26578
+ element: element,
26579
+ range: range,
26580
+ removeNode: removeNode,
26581
+ unwrapNode: unwrapNode,
26582
+ filterString: filterString,
26583
+ removeAttribute: removeAttribute
26584
+ });
26585
+ }
26586
+
26587
+ return createFromMultilineElement({
26588
+ element: element,
26589
+ range: range,
26590
+ multilineTag: multilineTag,
26591
+ multilineWrapperTags: multilineWrapperTags,
26592
+ removeNode: removeNode,
26593
+ unwrapNode: unwrapNode,
26594
+ filterString: filterString,
26595
+ removeAttribute: removeAttribute
26596
+ });
26597
+ }
26598
+ /**
26599
+ * Helper to accumulate the value's selection start and end from the current
26600
+ * node and range.
26601
+ *
26602
+ * @param {Object} accumulator Object to accumulate into.
26603
+ * @param {Node} node Node to create value with.
26604
+ * @param {Range} range Range to create value with.
26605
+ * @param {Object} value Value that is being accumulated.
26606
+ */
26607
+
26608
+ function accumulateSelection(accumulator, node, range, value) {
26609
+ if (!range) {
26610
+ return;
26611
+ }
26612
+
26613
+ var parentNode = node.parentNode;
26614
+ var startContainer = range.startContainer,
26615
+ startOffset = range.startOffset,
26616
+ endContainer = range.endContainer,
26617
+ endOffset = range.endOffset;
26618
+ var currentLength = accumulator.text.length; // Selection can be extracted from value.
26619
+
26620
+ if (value.start !== undefined) {
26621
+ accumulator.start = currentLength + value.start; // Range indicates that the current node has selection.
26622
+ } else if (node === startContainer && node.nodeType === TEXT_NODE) {
26623
+ accumulator.start = currentLength + startOffset; // Range indicates that the current node is selected.
26624
+ } else if (parentNode === startContainer && node === startContainer.childNodes[startOffset]) {
26625
+ accumulator.start = currentLength; // Range indicates that the selection is after the current node.
26626
+ } else if (parentNode === startContainer && node === startContainer.childNodes[startOffset - 1]) {
26627
+ accumulator.start = currentLength + value.text.length; // Fallback if no child inside handled the selection.
26628
+ } else if (node === startContainer) {
26629
+ accumulator.start = currentLength;
26630
+ } // Selection can be extracted from value.
26631
+
26632
+
26633
+ if (value.end !== undefined) {
26634
+ accumulator.end = currentLength + value.end; // Range indicates that the current node has selection.
26635
+ } else if (node === endContainer && node.nodeType === TEXT_NODE) {
26636
+ accumulator.end = currentLength + endOffset; // Range indicates that the current node is selected.
26637
+ } else if (parentNode === endContainer && node === endContainer.childNodes[endOffset - 1]) {
26638
+ accumulator.end = currentLength + value.text.length; // Range indicates that the selection is before the current node.
26639
+ } else if (parentNode === endContainer && node === endContainer.childNodes[endOffset]) {
26640
+ accumulator.end = currentLength; // Fallback if no child inside handled the selection.
26641
+ } else if (node === endContainer) {
26642
+ accumulator.end = currentLength + endOffset;
26643
+ }
26644
+ }
26645
+ /**
26646
+ * Adjusts the start and end offsets from a range based on a text filter.
26647
+ *
26648
+ * @param {Node} node Node of which the text should be filtered.
26649
+ * @param {Range} range The range to filter.
26650
+ * @param {Function} filter Function to use to filter the text.
26651
+ *
26652
+ * @return {?Object} Object containing range properties.
26653
+ */
26654
+
26655
+
26656
+ function filterRange(node, range, filter) {
26657
+ if (!range) {
26658
+ return;
26659
+ }
26660
+
26661
+ var startContainer = range.startContainer,
26662
+ endContainer = range.endContainer;
26663
+ var startOffset = range.startOffset,
26664
+ endOffset = range.endOffset;
26665
+
26666
+ if (node === startContainer) {
26667
+ startOffset = filter(node.nodeValue.slice(0, startOffset)).length;
26668
+ }
26669
+
26670
+ if (node === endContainer) {
26671
+ endOffset = filter(node.nodeValue.slice(0, endOffset)).length;
26672
+ }
26673
+
26674
+ return {
26675
+ startContainer: startContainer,
26676
+ startOffset: startOffset,
26677
+ endContainer: endContainer,
26678
+ endOffset: endOffset
26679
+ };
26680
+ }
26681
+ /**
26682
+ * Creates a Rich Text value from a DOM element and range.
26683
+ *
26684
+ * @param {Object} $1 Named argements.
26685
+ * @param {?Element} $1.element Element to create value from.
26686
+ * @param {?Range} $1.range Range to create value from.
26687
+ * @param {?string} $1.multilineTag Multiline tag if the structure is
26688
+ * multiline.
26689
+ * @param {?Array} $1.multilineWrapperTags Tags where lines can be found if
26690
+ * nesting is possible.
26691
+ * @param {?Function} $1.removeNode Function to declare whether the
26692
+ * given node should be removed.
26693
+ * @param {?Function} $1.unwrapNode Function to declare whether the
26694
+ * given node should be unwrapped.
26695
+ * @param {?Function} $1.filterString Function to filter the given
26696
+ * string.
26697
+ * @param {?Function} $1.removeAttribute Wether to remove an attribute
26698
+ * based on the name.
26699
+ *
26700
+ * @return {Object} A rich text value.
26701
+ */
26702
+
26703
+
26704
+ function createFromElement(_ref3) {
26705
+ var element = _ref3.element,
26706
+ range = _ref3.range,
26707
+ multilineTag = _ref3.multilineTag,
26708
+ multilineWrapperTags = _ref3.multilineWrapperTags,
26709
+ _ref3$currentWrapperT = _ref3.currentWrapperTags,
26710
+ currentWrapperTags = _ref3$currentWrapperT === void 0 ? [] : _ref3$currentWrapperT,
26711
+ removeNode = _ref3.removeNode,
26712
+ unwrapNode = _ref3.unwrapNode,
26713
+ filterString = _ref3.filterString,
26714
+ removeAttribute = _ref3.removeAttribute;
26715
+ var accumulator = createEmptyValue();
26716
+
26717
+ if (!element) {
26718
+ return accumulator;
26719
+ }
26720
+
26721
+ if (!element.hasChildNodes()) {
26722
+ accumulateSelection(accumulator, element, range, createEmptyValue());
26723
+ return accumulator;
26724
+ }
26725
+
26726
+ var length = element.childNodes.length;
26727
+
26728
+ var filterStringComplete = function filterStringComplete(string) {
26729
+ // Reduce any whitespace used for HTML formatting to one space
26730
+ // character, because it will also be displayed as such by the browser.
26731
+ string = string.replace(/[\n\r\t]+/g, ' ');
26732
+
26733
+ if (filterString) {
26734
+ string = filterString(string);
26735
+ }
26736
+
26737
+ return string;
26738
+ }; // Optimise for speed.
26739
+
26740
+
26741
+ for (var index = 0; index < length; index++) {
26742
+ var node = element.childNodes[index];
26743
+ var type = node.nodeName.toLowerCase();
26744
+
26745
+ if (node.nodeType === TEXT_NODE) {
26746
+ var _text = filterStringComplete(node.nodeValue);
26747
+
26748
+ range = filterRange(node, range, filterStringComplete);
26749
+ accumulateSelection(accumulator, node, range, {
26750
+ text: _text
26751
+ });
26752
+ accumulator.text += _text; // Create a sparse array of the same length as `text`, in which
26753
+ // formats can be added.
26754
+
26755
+ accumulator.formats.length += _text.length;
26756
+ continue;
26757
+ }
26758
+
26759
+ if (node.nodeType !== ELEMENT_NODE) {
26760
+ continue;
26761
+ }
26762
+
26763
+ if (removeNode && removeNode(node) || unwrapNode && unwrapNode(node) && !node.hasChildNodes()) {
26764
+ accumulateSelection(accumulator, node, range, createEmptyValue());
26765
+ continue;
26766
+ }
26767
+
26768
+ if (type === 'br') {
26769
+ accumulateSelection(accumulator, node, range, createEmptyValue());
26770
+ accumulator.text += '\n';
26771
+ accumulator.formats.length += 1;
26772
+ continue;
26773
+ }
26774
+
26775
+ var lastFormats = accumulator.formats[accumulator.formats.length - 1];
26776
+ var lastFormat = lastFormats && lastFormats[lastFormats.length - 1];
26777
+ var format = void 0;
26778
+ var value = void 0;
26779
+
26780
+ if (!unwrapNode || !unwrapNode(node)) {
26781
+ var newFormat = toFormat({
26782
+ type: type,
26783
+ attributes: getAttributes({
26784
+ element: node,
26785
+ removeAttribute: removeAttribute
26786
+ })
26787
+ });
26788
+
26789
+ if (newFormat) {
26790
+ // Reuse the last format if it's equal.
26791
+ if (Object(__WEBPACK_IMPORTED_MODULE_4__is_format_equal__["a" /* isFormatEqual */])(newFormat, lastFormat)) {
26792
+ format = lastFormat;
26793
+ } else {
26794
+ format = newFormat;
26795
+ }
26796
+ }
26797
+ }
26798
+
26799
+ if (multilineWrapperTags && multilineWrapperTags.indexOf(type) !== -1) {
26800
+ value = createFromMultilineElement({
26801
+ element: node,
26802
+ range: range,
26803
+ multilineTag: multilineTag,
26804
+ multilineWrapperTags: multilineWrapperTags,
26805
+ removeNode: removeNode,
26806
+ unwrapNode: unwrapNode,
26807
+ filterString: filterString,
26808
+ removeAttribute: removeAttribute,
26809
+ currentWrapperTags: Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(currentWrapperTags).concat([format])
26810
+ });
26811
+ format = undefined;
26812
+ } else {
26813
+ value = createFromElement({
26814
+ element: node,
26815
+ range: range,
26816
+ multilineTag: multilineTag,
26817
+ multilineWrapperTags: multilineWrapperTags,
26818
+ removeNode: removeNode,
26819
+ unwrapNode: unwrapNode,
26820
+ filterString: filterString,
26821
+ removeAttribute: removeAttribute
26822
+ });
26823
+ }
26824
+
26825
+ var text = value.text;
26826
+ var start = accumulator.text.length;
26827
+ accumulateSelection(accumulator, node, range, value); // Don't apply the element as formatting if it has no content.
26828
+
26829
+ if (Object(__WEBPACK_IMPORTED_MODULE_3__is_empty__["a" /* isEmpty */])(value) && format && !format.attributes) {
26830
+ continue;
26831
+ }
26832
+
26833
+ var formats = accumulator.formats;
26834
+
26835
+ if (format && format.attributes && text.length === 0) {
26836
+ format.object = true;
26837
+ accumulator.text += __WEBPACK_IMPORTED_MODULE_6__special_characters__["b" /* OBJECT_REPLACEMENT_CHARACTER */];
26838
+
26839
+ if (formats[start]) {
26840
+ formats[start].unshift(format);
26841
+ } else {
26842
+ formats[start] = [format];
26843
+ }
26844
+ } else {
26845
+ accumulator.text += text;
26846
+ accumulator.formats.length += text.length;
26847
+ var i = value.formats.length; // Optimise for speed.
26848
+
26849
+ while (i--) {
26850
+ var formatIndex = start + i;
26851
+
26852
+ if (format) {
26853
+ if (formats[formatIndex]) {
26854
+ formats[formatIndex].push(format);
26855
+ } else {
26856
+ formats[formatIndex] = [format];
26857
+ }
26858
+ }
26859
+
26860
+ if (value.formats[i]) {
26861
+ if (formats[formatIndex]) {
26862
+ var _formats$formatIndex;
26863
+
26864
+ (_formats$formatIndex = formats[formatIndex]).push.apply(_formats$formatIndex, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_toConsumableArray__["a" /* default */])(value.formats[i]));
26865
+ } else {
26866
+ formats[formatIndex] = value.formats[i];
26867
+ }
26868
+ }
26869
+ }
26870
+ }
26871
+ }
26872
+
26873
+ return accumulator;
26874
+ }
26875
+ /**
26876
+ * Creates a rich text value from a DOM element and range that should be
26877
+ * multiline.
26878
+ *
26879
+ * @param {Object} $1 Named argements.
26880
+ * @param {?Element} $1.element Element to create value from.
26881
+ * @param {?Range} $1.range Range to create value from.
26882
+ * @param {?string} $1.multilineTag Multiline tag if the structure is
26883
+ * multiline.
26884
+ * @param {?Array} $1.multilineWrapperTags Tags where lines can be found if
26885
+ * nesting is possible.
26886
+ * @param {?Function} $1.removeNode Function to declare whether the
26887
+ * given node should be removed.
26888
+ * @param {?Function} $1.unwrapNode Function to declare whether the
26889
+ * given node should be unwrapped.
26890
+ * @param {?Function} $1.filterString Function to filter the given
26891
+ * string.
26892
+ * @param {?Function} $1.removeAttribute Wether to remove an attribute
26893
+ * based on the name.
26894
+ * @param {boolean} $1.currentWrapperTags Whether to prepend a line
26895
+ * separator.
26896
+ *
26897
+ * @return {Object} A rich text value.
26898
+ */
26899
+
26900
+
26901
+ function createFromMultilineElement(_ref4) {
26902
+ var element = _ref4.element,
26903
+ range = _ref4.range,
26904
+ multilineTag = _ref4.multilineTag,
26905
+ multilineWrapperTags = _ref4.multilineWrapperTags,
26906
+ removeNode = _ref4.removeNode,
26907
+ unwrapNode = _ref4.unwrapNode,
26908
+ filterString = _ref4.filterString,
26909
+ removeAttribute = _ref4.removeAttribute,
26910
+ _ref4$currentWrapperT = _ref4.currentWrapperTags,
26911
+ currentWrapperTags = _ref4$currentWrapperT === void 0 ? [] : _ref4$currentWrapperT;
26912
+ var accumulator = createEmptyValue();
26913
+
26914
+ if (!element || !element.hasChildNodes()) {
26915
+ return accumulator;
26916
+ }
26917
+
26918
+ var length = element.children.length; // Optimise for speed.
26919
+
26920
+ for (var index = 0; index < length; index++) {
26921
+ var node = element.children[index];
26922
+
26923
+ if (node.nodeName.toLowerCase() !== multilineTag) {
26924
+ continue;
26925
+ }
26926
+
26927
+ var value = createFromElement({
26928
+ element: node,
26929
+ range: range,
26930
+ multilineTag: multilineTag,
26931
+ multilineWrapperTags: multilineWrapperTags,
26932
+ currentWrapperTags: currentWrapperTags,
26933
+ removeNode: removeNode,
26934
+ unwrapNode: unwrapNode,
26935
+ filterString: filterString,
26936
+ removeAttribute: removeAttribute
26937
+ }); // If a line consists of one single line break (invisible), consider the
26938
+ // line empty, wether this is the browser's doing or not.
26939
+
26940
+ if (value.text === '\n') {
26941
+ var start = value.start;
26942
+ var end = value.end;
26943
+ value = createEmptyValue();
26944
+
26945
+ if (start !== undefined) {
26946
+ value.start = 0;
26947
+ }
26948
+
26949
+ if (end !== undefined) {
26950
+ value.end = 0;
26951
+ }
26952
+ } // Multiline value text should be separated by a double line break.
26953
+
26954
+
26955
+ if (index !== 0 || currentWrapperTags.length > 0) {
26956
+ var formats = currentWrapperTags.length > 0 ? [currentWrapperTags] : [,];
26957
+ accumulator.formats = accumulator.formats.concat(formats);
26958
+ accumulator.text += __WEBPACK_IMPORTED_MODULE_6__special_characters__["a" /* LINE_SEPARATOR */];
26959
+ }
26960
+
26961
+ accumulateSelection(accumulator, node, range, value);
26962
+ accumulator.formats = accumulator.formats.concat(value.formats);
26963
+ accumulator.text += value.text;
26964
+ }
26965
+
26966
+ return accumulator;
26967
+ }
26968
+ /**
26969
+ * Gets the attributes of an element in object shape.
26970
+ *
26971
+ * @param {Object} $1 Named argements.
26972
+ * @param {Element} $1.element Element to get attributes from.
26973
+ * @param {?Function} $1.removeAttribute Wether to remove an attribute based on
26974
+ * the name.
26975
+ *
26976
+ * @return {?Object} Attribute object or `undefined` if the element has no
26977
+ * attributes.
26978
+ */
26979
+
26980
+
26981
+ function getAttributes(_ref5) {
26982
+ var element = _ref5.element,
26983
+ removeAttribute = _ref5.removeAttribute;
26984
+
26985
+ if (!element.hasAttributes()) {
26986
+ return;
26987
+ }
26988
+
26989
+ var length = element.attributes.length;
26990
+ var accumulator; // Optimise for speed.
26991
+
26992
+ for (var i = 0; i < length; i++) {
26993
+ var _element$attributes$i = element.attributes[i],
26994
+ name = _element$attributes$i.name,
26995
+ value = _element$attributes$i.value;
26996
+
26997
+ if (removeAttribute && removeAttribute(name)) {
26998
+ continue;
26999
+ }
27000
+
27001
+ accumulator = accumulator || {};
27002
+ accumulator[name] = value;
27003
+ }
27004
+
27005
+ return accumulator;
27006
+ }
27007
+ //# sourceMappingURL=create.js.map
27008
+
27009
+ /***/ }),
27010
+ /* 68 */
27011
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
27012
+
27013
+ "use strict";
27014
+ /* harmony export (immutable) */ __webpack_exports__["a"] = insert;
27015
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__create__ = __webpack_require__(67);
27016
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__normalise_formats__ = __webpack_require__(43);
27017
+ /**
27018
+ * Internal dependencies
27019
+ */
27020
+
27021
+
27022
+ /**
27023
+ * Insert a Rich Text value, an HTML string, or a plain text string, into a
27024
+ * Rich Text value at the given `startIndex`. Any content between `startIndex`
27025
+ * and `endIndex` will be removed. Indices are retrieved from the selection if
27026
+ * none are provided.
27027
+ *
27028
+ * @param {Object} value Value to modify.
27029
+ * @param {string} valueToInsert Value to insert.
27030
+ * @param {number} startIndex Start index.
27031
+ * @param {number} endIndex End index.
27032
+ *
27033
+ * @return {Object} A new value with the value inserted.
27034
+ */
27035
+
27036
+ function insert(_ref, valueToInsert) {
27037
+ var formats = _ref.formats,
27038
+ text = _ref.text,
27039
+ start = _ref.start,
27040
+ end = _ref.end;
27041
+ var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : start;
27042
+ var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : end;
27043
+
27044
+ if (typeof valueToInsert === 'string') {
27045
+ valueToInsert = Object(__WEBPACK_IMPORTED_MODULE_0__create__["a" /* create */])({
27046
+ text: valueToInsert
27047
+ });
27048
+ }
27049
+
27050
+ var index = startIndex + valueToInsert.text.length;
27051
+ return Object(__WEBPACK_IMPORTED_MODULE_1__normalise_formats__["a" /* normaliseFormats */])({
27052
+ formats: formats.slice(0, startIndex).concat(valueToInsert.formats, formats.slice(endIndex)),
27053
+ text: text.slice(0, startIndex) + valueToInsert.text + text.slice(endIndex),
27054
+ start: index,
27055
+ end: index
27056
+ });
27057
+ }
27058
+ //# sourceMappingURL=insert.js.map
27059
+
27060
+ /***/ }),
27061
+ /* 69 */
27062
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
27063
+
27064
+ "use strict";
27065
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(8);
27066
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__ = __webpack_require__(13);
27067
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
27068
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
27069
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
27070
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
27071
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
27072
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
27073
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__wordpress_element__ = __webpack_require__(0);
27074
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(12);
27075
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
27076
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__wordpress_is_shallow_equal__ = __webpack_require__(64);
27077
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__wordpress_is_shallow_equal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__wordpress_is_shallow_equal__);
27078
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__wordpress_dom__ = __webpack_require__(44);
27079
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__wordpress_keycodes__ = __webpack_require__(27);
27080
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils__ = __webpack_require__(455);
27081
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__higher_order_with_focus_return__ = __webpack_require__(84);
27082
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__higher_order_with_constrained_tabbing__ = __webpack_require__(85);
27083
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__detect_outside__ = __webpack_require__(456);
27084
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__icon_button__ = __webpack_require__(29);
27085
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__scroll_lock__ = __webpack_require__(133);
27086
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__isolated_event_container__ = __webpack_require__(87);
27087
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__slot_fill__ = __webpack_require__(134);
27088
+
27089
+
27090
+
27091
+
27092
+
27093
+
27094
+
27095
+
27096
+
27097
+
27098
+ /**
27099
+ * External dependencies
27100
+ */
27101
+
27102
+
27103
+ /**
27104
+ * WordPress dependencies
27105
+ */
27106
+
27107
+
27108
+
27109
+
27110
+ /**
27111
+ * Internal dependencies
27112
+ */
27113
+
27114
+
27115
+
27116
+
27117
+
27118
+
27119
+
27120
+
27121
+
27122
+ var FocusManaged = Object(__WEBPACK_IMPORTED_MODULE_15__higher_order_with_constrained_tabbing__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_14__higher_order_with_focus_return__["a" /* default */])(function (_ref) {
27123
+ var children = _ref.children;
27124
+ return children;
27125
+ }));
27126
+ /**
27127
+ * Name of slot in which popover should fill.
27128
+ *
27129
+ * @type {String}
27130
+ */
27131
+
27132
+ var SLOT_NAME = 'Popover';
27133
+
27134
+ var Popover =
27135
+ /*#__PURE__*/
27136
+ function (_Component) {
27137
+ Object(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__["a" /* default */])(Popover, _Component);
27138
+
27139
+ function Popover() {
27140
+ var _this;
27141
+
27142
+ Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, Popover);
27143
+
27144
+ _this = Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(Popover).apply(this, arguments));
27145
+ _this.getAnchorRect = _this.getAnchorRect.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27146
+ _this.computePopoverPosition = _this.computePopoverPosition.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27147
+ _this.maybeClose = _this.maybeClose.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27148
+ _this.throttledRefresh = _this.throttledRefresh.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27149
+ _this.refresh = _this.refresh.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27150
+ _this.refreshOnAnchorMove = _this.refreshOnAnchorMove.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27151
+ _this.contentNode = Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["j" /* createRef */])();
27152
+ _this.anchorNode = Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["j" /* createRef */])();
27153
+ _this.state = {
27154
+ popoverLeft: null,
27155
+ popoverTop: null,
27156
+ yAxis: 'top',
27157
+ xAxis: 'center',
27158
+ contentHeight: null,
27159
+ contentWidth: null,
27160
+ isMobile: false,
27161
+ popoverSize: null
27162
+ }; // Property used keep track of the previous anchor rect
27163
+ // used to compute the popover position and size.
27164
+
27165
+ _this.anchorRect = {};
27166
+ return _this;
27167
+ }
27168
+
27169
+ Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__["a" /* default */])(Popover, [{
27170
+ key: "componentDidMount",
27171
+ value: function componentDidMount() {
27172
+ var _this2 = this;
27173
+
27174
+ this.toggleAutoRefresh(true);
27175
+ this.refresh();
27176
+ /*
27177
+ * Without the setTimeout, the dom node is not being focused. Related:
27178
+ * https://stackoverflow.com/questions/35522220/react-ref-with-focus-doesnt-work-without-settimeout-my-example
27179
+ *
27180
+ * TODO: Treat the cause, not the symptom.
27181
+ */
27182
+
27183
+ this.focusTimeout = setTimeout(function () {
27184
+ _this2.focus();
27185
+ }, 0);
27186
+ }
27187
+ }, {
27188
+ key: "componentDidUpdate",
27189
+ value: function componentDidUpdate(prevProps) {
27190
+ if (prevProps.position !== this.props.position) {
27191
+ this.computePopoverPosition(this.state.popoverSize, this.anchorRect);
27192
+ }
27193
+ }
27194
+ }, {
27195
+ key: "componentWillUnmount",
27196
+ value: function componentWillUnmount() {
27197
+ clearTimeout(this.focusTimeout);
27198
+ this.toggleAutoRefresh(false);
27199
+ }
27200
+ }, {
27201
+ key: "toggleAutoRefresh",
27202
+ value: function toggleAutoRefresh(isActive) {
27203
+ window.cancelAnimationFrame(this.rafHandle); // Refresh the popover every time the window is resized or scrolled
27204
+
27205
+ var handler = isActive ? 'addEventListener' : 'removeEventListener';
27206
+ window[handler]('resize', this.throttledRefresh);
27207
+ window[handler]('scroll', this.throttledRefresh, true);
27208
+ /*
27209
+ * There are sometimes we need to reposition or resize the popover that are not
27210
+ * handled by the resize/scroll window events (i.e. CSS changes in the layout
27211
+ * that changes the position of the anchor).
27212
+ *
27213
+ * For these situations, we refresh the popover every 0.5s
27214
+ */
27215
+
27216
+ if (isActive) {
27217
+ this.autoRefresh = setInterval(this.refreshOnAnchorMove, 500);
27218
+ } else {
27219
+ clearInterval(this.autoRefresh);
27220
+ }
27221
+ }
27222
+ }, {
27223
+ key: "throttledRefresh",
27224
+ value: function throttledRefresh(event) {
27225
+ window.cancelAnimationFrame(this.rafHandle);
27226
+
27227
+ if (event && event.type === 'scroll' && this.contentNode.current.contains(event.target)) {
27228
+ return;
27229
+ }
27230
+
27231
+ this.rafHandle = window.requestAnimationFrame(this.refresh);
27232
+ }
27233
+ /**
27234
+ * Calling refreshOnAnchorMove
27235
+ * will only refresh the popover position if the anchor moves.
27236
+ */
27237
+
27238
+ }, {
27239
+ key: "refreshOnAnchorMove",
27240
+ value: function refreshOnAnchorMove() {
27241
+ var _this$props$getAnchor = this.props.getAnchorRect,
27242
+ getAnchorRect = _this$props$getAnchor === void 0 ? this.getAnchorRect : _this$props$getAnchor;
27243
+ var anchorRect = getAnchorRect(this.anchorNode.current);
27244
+ var didAnchorRectChange = !__WEBPACK_IMPORTED_MODULE_10__wordpress_is_shallow_equal___default()(anchorRect, this.anchorRect);
27245
+
27246
+ if (didAnchorRectChange) {
27247
+ this.anchorRect = anchorRect;
27248
+ this.computePopoverPosition(this.state.popoverSize, anchorRect);
27249
+ }
27250
+ }
27251
+ /**
27252
+ * Calling `refresh()` will force the Popover to recalculate its size and
27253
+ * position. This is useful when a DOM change causes the anchor node to change
27254
+ * position.
27255
+ */
27256
+
27257
+ }, {
27258
+ key: "refresh",
27259
+ value: function refresh() {
27260
+ var _this$props$getAnchor2 = this.props.getAnchorRect,
27261
+ getAnchorRect = _this$props$getAnchor2 === void 0 ? this.getAnchorRect : _this$props$getAnchor2;
27262
+ var anchorRect = getAnchorRect(this.anchorNode.current);
27263
+ var contentRect = this.contentNode.current.getBoundingClientRect();
27264
+ var popoverSize = {
27265
+ width: contentRect.width,
27266
+ height: contentRect.height
27267
+ };
27268
+ var didPopoverSizeChange = !this.state.popoverSize || popoverSize.width !== this.state.popoverSize.width || popoverSize.height !== this.state.popoverSize.height;
27269
+
27270
+ if (didPopoverSizeChange) {
27271
+ this.setState({
27272
+ popoverSize: popoverSize
27273
+ });
27274
+ }
27275
+
27276
+ this.anchorRect = anchorRect;
27277
+ this.computePopoverPosition(popoverSize, anchorRect);
27278
+ }
27279
+ }, {
27280
+ key: "focus",
27281
+ value: function focus() {
27282
+ var focusOnMount = this.props.focusOnMount;
27283
+
27284
+ if (!focusOnMount || !this.contentNode.current) {
27285
+ return;
27286
+ }
27287
+
27288
+ if (focusOnMount === 'firstElement') {
27289
+ // Find first tabbable node within content and shift focus, falling
27290
+ // back to the popover panel itself.
27291
+ var firstTabbable = __WEBPACK_IMPORTED_MODULE_11__wordpress_dom__["a" /* focus */].tabbable.find(this.contentNode.current)[0];
27292
+
27293
+ if (firstTabbable) {
27294
+ firstTabbable.focus();
27295
+ } else {
27296
+ this.contentNode.current.focus();
27297
+ }
27298
+
27299
+ return;
27300
+ }
27301
+
27302
+ if (focusOnMount === 'container') {
27303
+ // Focus the popover panel itself so items in the popover are easily
27304
+ // accessed via keyboard navigation.
27305
+ this.contentNode.current.focus();
27306
+ }
27307
+ }
27308
+ }, {
27309
+ key: "getAnchorRect",
27310
+ value: function getAnchorRect(anchor) {
27311
+ if (!anchor || !anchor.parentNode) {
27312
+ return;
27313
+ }
27314
+
27315
+ var rect = anchor.parentNode.getBoundingClientRect(); // subtract padding
27316
+
27317
+ var _window$getComputedSt = window.getComputedStyle(anchor.parentNode),
27318
+ paddingTop = _window$getComputedSt.paddingTop,
27319
+ paddingBottom = _window$getComputedSt.paddingBottom;
27320
+
27321
+ var topPad = parseInt(paddingTop, 10);
27322
+ var bottomPad = parseInt(paddingBottom, 10);
27323
+ return {
27324
+ x: rect.left,
27325
+ y: rect.top + topPad,
27326
+ width: rect.width,
27327
+ height: rect.height - topPad - bottomPad,
27328
+ left: rect.left,
27329
+ right: rect.right,
27330
+ top: rect.top + topPad,
27331
+ bottom: rect.bottom - bottomPad
27332
+ };
27333
+ }
27334
+ }, {
27335
+ key: "computePopoverPosition",
27336
+ value: function computePopoverPosition(popoverSize, anchorRect) {
27337
+ var _this$props = this.props,
27338
+ _this$props$position = _this$props.position,
27339
+ position = _this$props$position === void 0 ? 'top' : _this$props$position,
27340
+ expandOnMobile = _this$props.expandOnMobile;
27341
+
27342
+ var newPopoverPosition = Object(__WEBPACK_IMPORTED_MODULE_13__utils__["a" /* computePopoverPosition */])(anchorRect, popoverSize, position, expandOnMobile);
27343
+
27344
+ if (this.state.yAxis !== newPopoverPosition.yAxis || this.state.xAxis !== newPopoverPosition.xAxis || this.state.popoverLeft !== newPopoverPosition.popoverLeft || this.state.popoverTop !== newPopoverPosition.popoverTop || this.state.contentHeight !== newPopoverPosition.contentHeight || this.state.contentWidth !== newPopoverPosition.contentWidth || this.state.isMobile !== newPopoverPosition.isMobile) {
27345
+ this.setState(newPopoverPosition);
27346
+ }
27347
+ }
27348
+ }, {
27349
+ key: "maybeClose",
27350
+ value: function maybeClose(event) {
27351
+ var _this$props2 = this.props,
27352
+ onKeyDown = _this$props2.onKeyDown,
27353
+ onClose = _this$props2.onClose; // Close on escape
27354
+
27355
+ if (event.keyCode === __WEBPACK_IMPORTED_MODULE_12__wordpress_keycodes__["e" /* ESCAPE */] && onClose) {
27356
+ event.stopPropagation();
27357
+ onClose();
27358
+ } // Preserve original content prop behavior
27359
+
27360
+
27361
+ if (onKeyDown) {
27362
+ onKeyDown(event);
27363
+ }
27364
+ }
27365
+ }, {
27366
+ key: "render",
27367
+ value: function render() {
27368
+ var _this3 = this;
27369
+
27370
+ var _this$props3 = this.props,
27371
+ headerTitle = _this$props3.headerTitle,
27372
+ onClose = _this$props3.onClose,
27373
+ children = _this$props3.children,
27374
+ className = _this$props3.className,
27375
+ _this$props3$onClickO = _this$props3.onClickOutside,
27376
+ onClickOutside = _this$props3$onClickO === void 0 ? onClose : _this$props3$onClickO,
27377
+ noArrow = _this$props3.noArrow,
27378
+ position = _this$props3.position,
27379
+ range = _this$props3.range,
27380
+ focusOnMount = _this$props3.focusOnMount,
27381
+ getAnchorRect = _this$props3.getAnchorRect,
27382
+ expandOnMobile = _this$props3.expandOnMobile,
27383
+ contentProps = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__["a" /* default */])(_this$props3, ["headerTitle", "onClose", "children", "className", "onClickOutside", "noArrow", "position", "range", "focusOnMount", "getAnchorRect", "expandOnMobile"]);
27384
+
27385
+ var _this$state = this.state,
27386
+ popoverLeft = _this$state.popoverLeft,
27387
+ popoverTop = _this$state.popoverTop,
27388
+ yAxis = _this$state.yAxis,
27389
+ xAxis = _this$state.xAxis,
27390
+ contentHeight = _this$state.contentHeight,
27391
+ contentWidth = _this$state.contentWidth,
27392
+ popoverSize = _this$state.popoverSize,
27393
+ isMobile = _this$state.isMobile;
27394
+ var classes = __WEBPACK_IMPORTED_MODULE_9_classnames___default()('components-popover', className, 'is-' + yAxis, 'is-' + xAxis, {
27395
+ 'is-mobile': isMobile,
27396
+ 'is-without-arrow': noArrow || xAxis === 'center' && yAxis === 'middle'
27397
+ }); // Disable reason: We care to capture the _bubbled_ events from inputs
27398
+ // within popover as inferring close intent.
27399
+
27400
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
27401
+
27402
+ var content = Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_16__detect_outside__["a" /* default */], {
27403
+ onClickOutside: onClickOutside
27404
+ }, Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_19__isolated_event_container__["a" /* default */], Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({
27405
+ className: classes,
27406
+ style: {
27407
+ top: !isMobile && popoverTop ? popoverTop + 'px' : undefined,
27408
+ left: !isMobile && popoverLeft ? popoverLeft + 'px' : undefined,
27409
+ visibility: popoverSize ? undefined : 'hidden'
27410
+ }
27411
+ }, contentProps, {
27412
+ onKeyDown: this.maybeClose
27413
+ }), isMobile && Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])("div", {
27414
+ className: "components-popover__header"
27415
+ }, Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])("span", {
27416
+ className: "components-popover__header-title"
27417
+ }, headerTitle), Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_17__icon_button__["a" /* default */], {
27418
+ className: "components-popover__close",
27419
+ icon: "no-alt",
27420
+ onClick: onClose
27421
+ })), Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])("div", {
27422
+ ref: this.contentNode,
27423
+ className: "components-popover__content",
27424
+ style: {
27425
+ maxHeight: !isMobile && contentHeight ? contentHeight + 'px' : undefined,
27426
+ maxWidth: !isMobile && contentWidth ? contentWidth + 'px' : undefined
27427
+ },
27428
+ tabIndex: "-1"
27429
+ }, children)));
27430
+ /* eslint-enable jsx-a11y/no-static-element-interactions */
27431
+ // Apply focus to element as long as focusOnMount is truthy; false is
27432
+ // the only "disabled" value.
27433
+
27434
+ if (focusOnMount) {
27435
+ content = Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(FocusManaged, null, content);
27436
+ }
27437
+
27438
+ return Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_20__slot_fill__["a" /* Consumer */], null, function (_ref2) {
27439
+ var getSlot = _ref2.getSlot;
27440
+
27441
+ // In case there is no slot context in which to render,
27442
+ // default to an in-place rendering.
27443
+ if (getSlot && getSlot(SLOT_NAME)) {
27444
+ content = Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_20__slot_fill__["b" /* Fill */], {
27445
+ name: SLOT_NAME
27446
+ }, content);
27447
+ }
27448
+
27449
+ return Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])("span", {
27450
+ ref: _this3.anchorNode
27451
+ }, content, isMobile && expandOnMobile && Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_18__scroll_lock__["a" /* default */], null));
27452
+ });
27453
+ }
27454
+ }]);
27455
+
27456
+ return Popover;
27457
+ }(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["b" /* Component */]);
27458
+
27459
+ Popover.defaultProps = {
27460
+ focusOnMount: 'firstElement',
27461
+ noArrow: false
27462
+ };
27463
+ var PopoverContainer = Popover;
27464
+
27465
+ PopoverContainer.Slot = function () {
27466
+ return Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_20__slot_fill__["c" /* Slot */], {
27467
+ bubblesVirtually: true,
27468
+ name: SLOT_NAME
27469
+ });
27470
+ };
27471
+
27472
+ /* harmony default export */ __webpack_exports__["a"] = (PopoverContainer);
27473
+ //# sourceMappingURL=index.js.map
27474
+
27475
+ /***/ }),
27476
+ /* 70 */
27477
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
27478
+
27479
+ "use strict";
27480
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
27481
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
27482
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
27483
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
27484
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
27485
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
27486
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__wordpress_element__ = __webpack_require__(0);
27487
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__wordpress_deprecated__ = __webpack_require__(469);
27488
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__popover__ = __webpack_require__(69);
27489
+
27490
+
27491
+
27492
+
27493
+
27494
+
27495
+
27496
+
27497
+ /**
27498
+ * WordPress dependencies
27499
+ */
27500
+
27501
+
27502
+ /**
27503
+ * Internal dependencies
27504
+ */
27505
+
27506
+
27507
+
27508
+ var Dropdown =
27509
+ /*#__PURE__*/
27510
+ function (_Component) {
27511
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(Dropdown, _Component);
27512
+
27513
+ function Dropdown() {
27514
+ var _this;
27515
+
27516
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, Dropdown);
27517
+
27518
+ _this = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(Dropdown).apply(this, arguments));
27519
+ _this.toggle = _this.toggle.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27520
+ _this.close = _this.close.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27521
+ _this.closeIfClickOutside = _this.closeIfClickOutside.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27522
+ _this.refresh = _this.refresh.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
27523
+ _this.containerRef = Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["j" /* createRef */])();
27524
+ _this.state = {
27525
+ isOpen: false
27526
+ };
27527
+ return _this;
27528
+ }
27529
+
27530
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(Dropdown, [{
27531
+ key: "componentWillUnmount",
27532
+ value: function componentWillUnmount() {
27533
+ var isOpen = this.state.isOpen;
27534
+ var onToggle = this.props.onToggle;
27535
+
27536
+ if (isOpen && onToggle) {
27537
+ onToggle(false);
27538
+ }
27539
+ }
27540
+ }, {
27541
+ key: "componentDidUpdate",
27542
+ value: function componentDidUpdate(prevProps, prevState) {
27543
+ var isOpen = this.state.isOpen;
27544
+ var onToggle = this.props.onToggle;
27545
+
27546
+ if (prevState.isOpen !== isOpen && onToggle) {
27547
+ onToggle(isOpen);
27548
+ }
27549
+ }
27550
+ /**
27551
+ * When contents change height due to user interaction,
27552
+ * `refresh` can be called to re-render Popover with correct
27553
+ * attributes which allow scroll, if need be.
27554
+ * @deprecated
27555
+ */
27556
+
27557
+ }, {
27558
+ key: "refresh",
27559
+ value: function refresh() {
27560
+ Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_deprecated__["a" /* default */])('Dropdown.refresh()', {
27561
+ plugin: 'Gutenberg',
27562
+ version: '4.5',
27563
+ hint: 'Popover is now automatically re-rendered without needing to execute "refresh"'
27564
+ });
27565
+ }
27566
+ }, {
27567
+ key: "toggle",
27568
+ value: function toggle() {
27569
+ this.setState(function (state) {
27570
+ return {
27571
+ isOpen: !state.isOpen
27572
+ };
27573
+ });
27574
+ }
27575
+ /**
27576
+ * Closes the dropdown if a click occurs outside the dropdown wrapper. This
27577
+ * is intentionally distinct from `onClose` in that a click outside the
27578
+ * popover may occur in the toggling of the dropdown via its toggle button.
27579
+ * The correct behavior is to keep the dropdown closed.
27580
+ *
27581
+ * @param {MouseEvent} event Click event triggering `onClickOutside`.
27582
+ */
27583
+
27584
+ }, {
27585
+ key: "closeIfClickOutside",
27586
+ value: function closeIfClickOutside(event) {
27587
+ if (!this.containerRef.current.contains(event.target)) {
27588
+ this.close();
27589
+ }
27590
+ }
27591
+ }, {
27592
+ key: "close",
27593
+ value: function close() {
27594
+ this.setState({
27595
+ isOpen: false
27596
+ });
27597
+ }
27598
+ }, {
27599
+ key: "render",
27600
+ value: function render() {
27601
+ var isOpen = this.state.isOpen;
27602
+ var _this$props = this.props,
27603
+ renderContent = _this$props.renderContent,
27604
+ renderToggle = _this$props.renderToggle,
27605
+ _this$props$position = _this$props.position,
27606
+ position = _this$props$position === void 0 ? 'bottom' : _this$props$position,
27607
+ className = _this$props.className,
27608
+ contentClassName = _this$props.contentClassName,
27609
+ expandOnMobile = _this$props.expandOnMobile,
27610
+ headerTitle = _this$props.headerTitle;
27611
+ var args = {
27612
+ isOpen: isOpen,
27613
+ onToggle: this.toggle,
27614
+ onClose: this.close
27615
+ };
27616
+ return Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["h" /* createElement */])("div", {
27617
+ className: className,
27618
+ ref: this.containerRef
27619
+ }, renderToggle(args), isOpen && Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_8__popover__["a" /* default */], {
27620
+ className: contentClassName,
27621
+ position: position,
27622
+ onClose: this.close,
27623
+ onClickOutside: this.closeIfClickOutside,
27624
+ expandOnMobile: expandOnMobile,
27625
+ headerTitle: headerTitle
27626
+ }, renderContent(args)));
27627
+ }
27628
+ }]);
27629
+
27630
+ return Dropdown;
27631
+ }(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["b" /* Component */]);
27632
+
27633
+ /* harmony default export */ __webpack_exports__["a"] = (Dropdown);
27634
+ //# sourceMappingURL=index.js.map
27635
+
27636
+ /***/ }),
27637
+ /* 71 */
27638
+ /***/ (function(module, exports, __webpack_require__) {
27639
+
27640
+ "use strict";
27641
+
27642
+
27643
+ var fnToStr = Function.prototype.toString;
27644
+
27645
+ var constructorRegex = /^\s*class\b/;
27646
+ var isES6ClassFn = function isES6ClassFunction(value) {
27647
+ try {
27648
+ var fnStr = fnToStr.call(value);
27649
+ return constructorRegex.test(fnStr);
27650
+ } catch (e) {
27651
+ return false; // not a function
27652
+ }
27653
+ };
27654
+
27655
+ var tryFunctionObject = function tryFunctionToStr(value) {
27656
+ try {
27657
+ if (isES6ClassFn(value)) { return false; }
27658
+ fnToStr.call(value);
27659
+ return true;
27660
+ } catch (e) {
27661
+ return false;
27662
+ }
27663
+ };
27664
+ var toStr = Object.prototype.toString;
27665
+ var fnClass = '[object Function]';
27666
+ var genClass = '[object GeneratorFunction]';
27667
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
27668
+
27669
+ module.exports = function isCallable(value) {
27670
+ if (!value) { return false; }
27671
+ if (typeof value !== 'function' && typeof value !== 'object') { return false; }
27672
+ if (typeof value === 'function' && !value.prototype) { return true; }
27673
+ if (hasToStringTag) { return tryFunctionObject(value); }
27674
+ if (isES6ClassFn(value)) { return false; }
27675
+ var strClass = toStr.call(value);
27676
+ return strClass === fnClass || strClass === genClass;
27677
+ };
27678
+
27679
+
27680
+ /***/ }),
27681
+ /* 72 */
27682
+ /***/ (function(module, exports, __webpack_require__) {
27683
+
27684
+ "use strict";
27685
+
27686
+
27687
+ /* globals
27688
+ Set,
27689
+ Map,
27690
+ WeakSet,
27691
+ WeakMap,
27692
+
27693
+ Promise,
27694
+
27695
+ Symbol,
27696
+ Proxy,
27697
+
27698
+ Atomics,
27699
+ SharedArrayBuffer,
27700
+
27701
+ ArrayBuffer,
27702
+ DataView,
27703
+ Uint8Array,
27704
+ Float32Array,
27705
+ Float64Array,
27706
+ Int8Array,
27707
+ Int16Array,
27708
+ Int32Array,
27709
+ Uint8ClampedArray,
27710
+ Uint16Array,
27711
+ Uint32Array,
27712
+ */
27713
+
27714
+ var undefined; // eslint-disable-line no-shadow-restricted-names
27715
+
27716
+ var ThrowTypeError = Object.getOwnPropertyDescriptor
27717
+ ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())
27718
+ : function () { throw new TypeError(); };
27719
+
27720
+ var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
27721
+
27722
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
27723
+
27724
+ var generator; // = function * () {};
27725
+ var generatorFunction = generator ? getProto(generator) : undefined;
27726
+ var asyncFn; // async function() {};
27727
+ var asyncFunction = asyncFn ? asyncFn.constructor : undefined;
27728
+ var asyncGen; // async function * () {};
27729
+ var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;
27730
+ var asyncGenIterator = asyncGen ? asyncGen() : undefined;
27731
+
27732
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
27733
+
27734
+ var INTRINSICS = {
27735
+ '$ %Array%': Array,
27736
+ '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
27737
+ '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,
27738
+ '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
27739
+ '$ %ArrayPrototype%': Array.prototype,
27740
+ '$ %ArrayProto_entries%': Array.prototype.entries,
27741
+ '$ %ArrayProto_forEach%': Array.prototype.forEach,
27742
+ '$ %ArrayProto_keys%': Array.prototype.keys,
27743
+ '$ %ArrayProto_values%': Array.prototype.values,
27744
+ '$ %AsyncFromSyncIteratorPrototype%': undefined,
27745
+ '$ %AsyncFunction%': asyncFunction,
27746
+ '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,
27747
+ '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,
27748
+ '$ %AsyncGeneratorFunction%': asyncGenFunction,
27749
+ '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,
27750
+ '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,
27751
+ '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
27752
+ '$ %Boolean%': Boolean,
27753
+ '$ %BooleanPrototype%': Boolean.prototype,
27754
+ '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView,
27755
+ '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,
27756
+ '$ %Date%': Date,
27757
+ '$ %DatePrototype%': Date.prototype,
27758
+ '$ %decodeURI%': decodeURI,
27759
+ '$ %decodeURIComponent%': decodeURIComponent,
27760
+ '$ %encodeURI%': encodeURI,
27761
+ '$ %encodeURIComponent%': encodeURIComponent,
27762
+ '$ %Error%': Error,
27763
+ '$ %ErrorPrototype%': Error.prototype,
27764
+ '$ %eval%': eval, // eslint-disable-line no-eval
27765
+ '$ %EvalError%': EvalError,
27766
+ '$ %EvalErrorPrototype%': EvalError.prototype,
27767
+ '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
27768
+ '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,
27769
+ '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
27770
+ '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,
27771
+ '$ %Function%': Function,
27772
+ '$ %FunctionPrototype%': Function.prototype,
27773
+ '$ %Generator%': generator ? getProto(generator()) : undefined,
27774
+ '$ %GeneratorFunction%': generatorFunction,
27775
+ '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,
27776
+ '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
27777
+ '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,
27778
+ '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
27779
+ '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,
27780
+ '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
27781
+ '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,
27782
+ '$ %isFinite%': isFinite,
27783
+ '$ %isNaN%': isNaN,
27784
+ '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
27785
+ '$ %JSON%': JSON,
27786
+ '$ %JSONParse%': JSON.parse,
27787
+ '$ %Map%': typeof Map === 'undefined' ? undefined : Map,
27788
+ '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
27789
+ '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,
27790
+ '$ %Math%': Math,
27791
+ '$ %Number%': Number,
27792
+ '$ %NumberPrototype%': Number.prototype,
27793
+ '$ %Object%': Object,
27794
+ '$ %ObjectPrototype%': Object.prototype,
27795
+ '$ %ObjProto_toString%': Object.prototype.toString,
27796
+ '$ %ObjProto_valueOf%': Object.prototype.valueOf,
27797
+ '$ %parseFloat%': parseFloat,
27798
+ '$ %parseInt%': parseInt,
27799
+ '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise,
27800
+ '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,
27801
+ '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,
27802
+ '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,
27803
+ '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,
27804
+ '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,
27805
+ '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
27806
+ '$ %RangeError%': RangeError,
27807
+ '$ %RangeErrorPrototype%': RangeError.prototype,
27808
+ '$ %ReferenceError%': ReferenceError,
27809
+ '$ %ReferenceErrorPrototype%': ReferenceError.prototype,
27810
+ '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
27811
+ '$ %RegExp%': RegExp,
27812
+ '$ %RegExpPrototype%': RegExp.prototype,
27813
+ '$ %Set%': typeof Set === 'undefined' ? undefined : Set,
27814
+ '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
27815
+ '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,
27816
+ '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
27817
+ '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,
27818
+ '$ %String%': String,
27819
+ '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
27820
+ '$ %StringPrototype%': String.prototype,
27821
+ '$ %Symbol%': hasSymbols ? Symbol : undefined,
27822
+ '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,
27823
+ '$ %SyntaxError%': SyntaxError,
27824
+ '$ %SyntaxErrorPrototype%': SyntaxError.prototype,
27825
+ '$ %ThrowTypeError%': ThrowTypeError,
27826
+ '$ %TypedArray%': TypedArray,
27827
+ '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,
27828
+ '$ %TypeError%': TypeError,
27829
+ '$ %TypeErrorPrototype%': TypeError.prototype,
27830
+ '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
27831
+ '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,
27832
+ '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
27833
+ '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,
27834
+ '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
27835
+ '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,
27836
+ '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
27837
+ '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,
27838
+ '$ %URIError%': URIError,
27839
+ '$ %URIErrorPrototype%': URIError.prototype,
27840
+ '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
27841
+ '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,
27842
+ '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
27843
+ '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype
27844
+ };
27845
+
27846
+ module.exports = function GetIntrinsic(name, allowMissing) {
27847
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
27848
+ throw new TypeError('"allowMissing" argument must be a boolean');
27849
+ }
27850
+
27851
+ var key = '$ ' + name;
27852
+ if (!(key in INTRINSICS)) {
27853
+ throw new SyntaxError('intrinsic ' + name + ' does not exist!');
27854
+ }
27855
+
27856
+ // istanbul ignore if // hopefully this is impossible to test :-)
27857
+ if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {
27858
+ throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
27859
+ }
27860
+ return INTRINSICS[key];
27861
+ };
27862
+
27863
+
27864
+ /***/ }),
27865
+ /* 73 */
27866
+ /***/ (function(module, exports, __webpack_require__) {
27867
+
27868
+ "use strict";
27869
+
27870
+
27871
+ Object.defineProperty(exports, "__esModule", {
27872
+ value: true
27873
+ });
27874
+
27875
+ var _propTypes = __webpack_require__(10);
27876
+
27877
+ var _propTypes2 = _interopRequireDefault(_propTypes);
27878
+
27879
+ var _airbnbPropTypes = __webpack_require__(19);
27880
+
27881
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
27882
+
27883
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27884
+
27885
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
27886
+
27887
+ exports['default'] = (0, _airbnbPropTypes.and)([_propTypes2['default'].instanceOf(Set), function () {
27888
+ function modifiers(props, propName) {
27889
+ for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
27890
+ rest[_key - 2] = arguments[_key];
27891
+ }
27892
+
27893
+ var propValue = props[propName];
27894
+
27895
+ var firstError = void 0;
27896
+ [].concat(_toConsumableArray(propValue)).some(function (v, i) {
27897
+ var _PropTypes$string;
27898
+
27899
+ var fakePropName = String(propName) + ': index ' + String(i);
27900
+ firstError = (_PropTypes$string = _propTypes2['default'].string).isRequired.apply(_PropTypes$string, [_defineProperty({}, fakePropName, v), fakePropName].concat(rest));
27901
+ return firstError != null;
27902
+ });
27903
+ return firstError == null ? null : firstError;
27904
+ }
27905
+
27906
+ return modifiers;
27907
+ }()], 'Modifiers (Set of Strings)');
27908
+
27909
+ /***/ }),
27910
+ /* 74 */
27911
+ /***/ (function(module, exports, __webpack_require__) {
27912
+
27913
+ "use strict";
27914
+
27915
+
27916
+ Object.defineProperty(exports, "__esModule", {
27917
+ value: true
27918
+ });
27919
+ exports['default'] = toISODateString;
27920
+
27921
+ var _moment = __webpack_require__(1);
27922
+
27923
+ var _moment2 = _interopRequireDefault(_moment);
27924
+
27925
+ var _toMomentObject = __webpack_require__(48);
27926
+
27927
+ var _toMomentObject2 = _interopRequireDefault(_toMomentObject);
27928
+
27929
+ var _constants = __webpack_require__(15);
27930
+
27931
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
27932
+
27933
+ function toISODateString(date, currentFormat) {
27934
+ var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat);
27935
+ if (!dateObj) return null;
27936
+
27937
+ return dateObj.format(_constants.ISO_FORMAT);
27938
+ }
27939
+
27940
+ /***/ }),
27941
+ /* 75 */
27942
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
27943
+
27944
+ "use strict";
27945
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
27946
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEventListener", function() { return addEventListener; });
27947
+ var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
27948
+
27949
+ // Adapted from Modernizr
27950
+ // https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37
27951
+ function testPassiveEventListeners() {
27952
+ if (!CAN_USE_DOM) {
27953
+ return false;
27954
+ }
27955
+
27956
+ if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) {
27957
+ return false;
27958
+ }
27959
+
27960
+ var supportsPassiveOption = false;
27961
+ try {
27962
+ var opts = Object.defineProperty({}, 'passive', {
27963
+ // eslint-disable-next-line getter-return
27964
+ get: function () {
27965
+ function get() {
27966
+ supportsPassiveOption = true;
27967
+ }
27968
+
27969
+ return get;
27970
+ }()
27971
+ });
27972
+ var noop = function noop() {};
27973
+ window.addEventListener('testPassiveEventSupport', noop, opts);
27974
+ window.removeEventListener('testPassiveEventSupport', noop, opts);
27975
+ } catch (e) {
27976
+ // do nothing
27977
+ }
27978
+
27979
+ return supportsPassiveOption;
27980
+ }
27981
+
27982
+ var memoized = void 0;
27983
+
27984
+ function canUsePassiveEventListeners() {
27985
+ if (memoized === undefined) {
27986
+ memoized = testPassiveEventListeners();
27987
+ }
27988
+ return memoized;
27989
+ }
27990
+
27991
+ function normalizeEventOptions(eventOptions) {
27992
+ if (!eventOptions) {
27993
+ return undefined;
27994
+ }
27995
+
27996
+ if (!canUsePassiveEventListeners()) {
27997
+ // If the browser does not support the passive option, then it is expecting
27998
+ // a boolean for the options argument to specify whether it should use
27999
+ // capture or not. In more modern browsers, this is passed via the `capture`
28000
+ // option, so let's just hoist that value up.
28001
+ return !!eventOptions.capture;
28002
+ }
28003
+
28004
+ return eventOptions;
28005
+ }
28006
+
28007
+ /* eslint-disable no-bitwise */
28008
+
28009
+ /**
28010
+ * Generate a unique key for any set of event options
28011
+ */
28012
+ function eventOptionsKey(normalizedEventOptions) {
28013
+ if (!normalizedEventOptions) {
28014
+ return 0;
28015
+ }
28016
+
28017
+ // If the browser does not support passive event listeners, the normalized
28018
+ // event options will be a boolean.
28019
+ if (normalizedEventOptions === true) {
28020
+ return 100;
28021
+ }
28022
+
28023
+ // At this point, the browser supports passive event listeners, so we expect
28024
+ // the event options to be an object with possible properties of capture,
28025
+ // passive, and once.
28026
+ //
28027
+ // We want to consistently return the same value, regardless of the order of
28028
+ // these properties, so let's use binary maths to assign each property to a
28029
+ // bit, and then add those together (with an offset to account for the
28030
+ // booleans at the beginning of this function).
28031
+ var capture = normalizedEventOptions.capture << 0;
28032
+ var passive = normalizedEventOptions.passive << 1;
28033
+ var once = normalizedEventOptions.once << 2;
28034
+ return capture + passive + once;
28035
+ }
28036
+
28037
+ function ensureCanMutateNextEventHandlers(eventHandlers) {
28038
+ if (eventHandlers.handlers === eventHandlers.nextHandlers) {
28039
+ // eslint-disable-next-line no-param-reassign
28040
+ eventHandlers.nextHandlers = eventHandlers.handlers.slice();
28041
+ }
28042
+ }
28043
+
28044
+ function TargetEventHandlers(target) {
28045
+ this.target = target;
28046
+ this.events = {};
28047
+ }
28048
+
28049
+ TargetEventHandlers.prototype.getEventHandlers = function () {
28050
+ function getEventHandlers(eventName, options) {
28051
+ var key = String(eventName) + ' ' + String(eventOptionsKey(options));
28052
+
28053
+ if (!this.events[key]) {
28054
+ this.events[key] = {
28055
+ handlers: [],
28056
+ handleEvent: undefined
28057
+ };
28058
+ this.events[key].nextHandlers = this.events[key].handlers;
28059
+ }
28060
+
28061
+ return this.events[key];
28062
+ }
28063
+
28064
+ return getEventHandlers;
28065
+ }();
28066
+
28067
+ TargetEventHandlers.prototype.handleEvent = function () {
28068
+ function handleEvent(eventName, options, event) {
28069
+ var eventHandlers = this.getEventHandlers(eventName, options);
28070
+ eventHandlers.handlers = eventHandlers.nextHandlers;
28071
+ eventHandlers.handlers.forEach(function (handler) {
28072
+ if (handler) {
28073
+ // We need to check for presence here because a handler function may
28074
+ // cause later handlers to get removed. This can happen if you for
28075
+ // instance have a waypoint that unmounts another waypoint as part of an
28076
+ // onEnter/onLeave handler.
28077
+ handler(event);
28078
+ }
28079
+ });
28080
+ }
28081
+
28082
+ return handleEvent;
28083
+ }();
28084
+
28085
+ TargetEventHandlers.prototype.add = function () {
28086
+ function add(eventName, listener, options) {
28087
+ var _this = this;
28088
+
28089
+ // options has already been normalized at this point.
28090
+ var eventHandlers = this.getEventHandlers(eventName, options);
28091
+
28092
+ ensureCanMutateNextEventHandlers(eventHandlers);
28093
+
28094
+ if (eventHandlers.nextHandlers.length === 0) {
28095
+ eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options);
28096
+
28097
+ this.target.addEventListener(eventName, eventHandlers.handleEvent, options);
28098
+ }
28099
+
28100
+ eventHandlers.nextHandlers.push(listener);
28101
+
28102
+ var isSubscribed = true;
28103
+ var unsubscribe = function () {
28104
+ function unsubscribe() {
28105
+ if (!isSubscribed) {
28106
+ return;
28107
+ }
28108
+
28109
+ isSubscribed = false;
28110
+
28111
+ ensureCanMutateNextEventHandlers(eventHandlers);
28112
+ var index = eventHandlers.nextHandlers.indexOf(listener);
28113
+ eventHandlers.nextHandlers.splice(index, 1);
28114
+
28115
+ if (eventHandlers.nextHandlers.length === 0) {
28116
+ // All event handlers have been removed, so we want to remove the event
28117
+ // listener from the target node.
28118
+
28119
+ if (_this.target) {
28120
+ // There can be a race condition where the target may no longer exist
28121
+ // when this function is called, e.g. when a React component is
28122
+ // unmounting. Guarding against this prevents the following error:
28123
+ //
28124
+ // Cannot read property 'removeEventListener' of undefined
28125
+ _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options);
28126
+ }
28127
+
28128
+ eventHandlers.handleEvent = undefined;
28129
+ }
28130
+ }
28131
+
28132
+ return unsubscribe;
28133
+ }();
28134
+ return unsubscribe;
28135
+ }
28136
+
28137
+ return add;
28138
+ }();
28139
+
28140
+ var EVENT_HANDLERS_KEY = '__consolidated_events_handlers__';
28141
+
28142
+ // eslint-disable-next-line import/prefer-default-export
28143
+ function addEventListener(target, eventName, listener, options) {
28144
+ if (!target[EVENT_HANDLERS_KEY]) {
28145
+ // eslint-disable-next-line no-param-reassign
28146
+ target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target);
28147
+ }
28148
+ var normalizedEventOptions = normalizeEventOptions(options);
28149
+ return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions);
28150
+ }
28151
+
28152
+
28153
+
28154
+
28155
+ /***/ }),
28156
+ /* 76 */
28157
+ /***/ (function(module, exports, __webpack_require__) {
28158
+
28159
+ "use strict";
28160
+
28161
+
28162
+ Object.defineProperty(exports, "__esModule", {
28163
+ value: true
28164
+ });
28165
+ exports['default'] = toISOMonthString;
28166
+
28167
+ var _moment = __webpack_require__(1);
28168
+
28169
+ var _moment2 = _interopRequireDefault(_moment);
28170
+
28171
+ var _toMomentObject = __webpack_require__(48);
28172
+
28173
+ var _toMomentObject2 = _interopRequireDefault(_toMomentObject);
28174
+
28175
+ var _constants = __webpack_require__(15);
28176
+
28177
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
28178
+
28179
+ function toISOMonthString(date, currentFormat) {
28180
+ var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat);
28181
+ if (!dateObj) return null;
28182
+
28183
+ return dateObj.format(_constants.ISO_MONTH_FORMAT);
28184
+ }
28185
+
28186
+ /***/ }),
28187
+ /* 77 */
28188
+ /***/ (function(module, exports, __webpack_require__) {
28189
+
28190
+ "use strict";
28191
+
28192
+
28193
+ Object.defineProperty(exports, "__esModule", {
28194
+ value: true
28195
+ });
28196
+
28197
+ var _propTypes = __webpack_require__(10);
28198
+
28199
+ var _propTypes2 = _interopRequireDefault(_propTypes);
28200
+
28201
+ var _constants = __webpack_require__(15);
28202
+
28203
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
28204
+
28205
+ exports['default'] = _propTypes2['default'].oneOfType([_propTypes2['default'].bool, _propTypes2['default'].oneOf([_constants.START_DATE, _constants.END_DATE])]);
28206
+
28207
+ /***/ }),
28208
+ /* 78 */
28209
+ /***/ (function(module, exports, __webpack_require__) {
28210
+
28211
+ "use strict";
28212
+
28213
+
28214
+ Object.defineProperty(exports, "__esModule", {
28215
+ value: true
28216
+ });
28217
+ exports['default'] = isAfterDay;
28218
+
28219
+ var _moment = __webpack_require__(1);
28220
+
28221
+ var _moment2 = _interopRequireDefault(_moment);
28222
+
28223
+ var _isBeforeDay = __webpack_require__(60);
28224
+
28225
+ var _isBeforeDay2 = _interopRequireDefault(_isBeforeDay);
28226
+
28227
+ var _isSameDay = __webpack_require__(47);
28228
+
28229
+ var _isSameDay2 = _interopRequireDefault(_isSameDay);
28230
+
28231
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
28232
+
28233
+ function isAfterDay(a, b) {
28234
+ if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false;
28235
+ return !(0, _isBeforeDay2['default'])(a, b) && !(0, _isSameDay2['default'])(a, b);
28236
+ }
28237
+
28238
+ /***/ }),
28239
+ /* 79 */
28240
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28241
+
28242
+ "use strict";
28243
+ /* harmony export (immutable) */ __webpack_exports__["f"] = concatChildren;
28244
+ /* unused harmony export switchChildrenNodeName */
28245
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__ = __webpack_require__(16);
28246
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__ = __webpack_require__(13);
28247
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(11);
28248
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
28249
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash__ = __webpack_require__(2);
28250
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_lodash__);
28251
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "Children")) __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["Children"]; });
28252
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "cloneElement")) __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["cloneElement"]; });
28253
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "Component")) __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["Component"]; });
28254
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "createContext")) __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["createContext"]; });
28255
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "createElement")) __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"]; });
28256
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "createRef")) __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["createRef"]; });
28257
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "forwardRef")) __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["forwardRef"]; });
28258
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "Fragment")) __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["Fragment"]; });
28259
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "isValidElement")) __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["isValidElement"]; });
28260
+ /* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_2_react__, "StrictMode")) __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2_react__["StrictMode"]; });
28261
+
28262
+
28263
+
28264
+ /**
28265
+ * External dependencies
28266
+ */
28267
+
28268
+
28269
+
28270
+ /**
28271
+ * Creates a copy of an element with extended props.
28272
+ *
28273
+ * @param {WPElement} element Element
28274
+ * @param {?Object} props Props to apply to cloned element
28275
+ *
28276
+ * @return {WPElement} Cloned element.
28277
+ */
28278
+
28279
+
28280
+ /**
28281
+ * A base class to create WordPress Components (Refs, state and lifecycle hooks)
28282
+ */
28283
+
28284
+
28285
+ /**
28286
+ * Creates a context object containing two components: a provider and consumer.
28287
+ *
28288
+ * @param {Object} defaultValue A default data stored in the context.
28289
+ *
28290
+ * @return {Object} Context object.
28291
+ */
28292
+
28293
+
28294
+ /**
28295
+ * Returns a new element of given type. Type can be either a string tag name or
28296
+ * another function which itself returns an element.
28297
+ *
28298
+ * @param {?(string|Function)} type Tag name or element creator
28299
+ * @param {Object} props Element properties, either attribute
28300
+ * set to apply to DOM node or values to
28301
+ * pass through to element creator
28302
+ * @param {...WPElement} children Descendant elements
28303
+ *
28304
+ * @return {WPElement} Element.
28305
+ */
28306
+
28307
+
28308
+ /**
28309
+ * Returns an object tracking a reference to a rendered element via its
28310
+ * `current` property as either a DOMElement or Element, dependent upon the
28311
+ * type of element rendered with the ref attribute.
28312
+ *
28313
+ * @return {Object} Ref object.
28314
+ */
28315
+
28316
+
28317
+ /**
28318
+ * Component enhancer used to enable passing a ref to its wrapped component.
28319
+ * Pass a function argument which receives `props` and `ref` as its arguments,
28320
+ * returning an element using the forwarded ref. The return value is a new
28321
+ * component which forwards its ref.
28322
+ *
28323
+ * @param {Function} forwarder Function passed `props` and `ref`, expected to
28324
+ * return an element.
28325
+ *
28326
+ * @return {WPComponent} Enhanced component.
28327
+ */
28328
+
28329
+
28330
+ /**
28331
+ * A component which renders its children without any wrapping element.
28332
+ */
28333
+
28334
+
28335
+ /**
28336
+ * Checks if an object is a valid WPElement
28337
+ *
28338
+ * @param {Object} objectToCheck The object to be checked.
28339
+ *
28340
+ * @return {boolean} true if objectToTest is a valid WPElement and false otherwise.
28341
+ */
28342
+
28343
+
28344
+
28345
+ /**
28346
+ * Concatenate two or more React children objects.
28347
+ *
28348
+ * @param {...?Object} childrenArguments Array of children arguments (array of arrays/strings/objects) to concatenate.
28349
+ *
28350
+ * @return {Array} The concatenated value.
28351
+ */
28352
+
28353
+ function concatChildren() {
28354
+ for (var _len = arguments.length, childrenArguments = new Array(_len), _key = 0; _key < _len; _key++) {
28355
+ childrenArguments[_key] = arguments[_key];
28356
+ }
28357
+
28358
+ return childrenArguments.reduce(function (memo, children, i) {
28359
+ __WEBPACK_IMPORTED_MODULE_2_react__["Children"].forEach(children, function (child, j) {
28360
+ if (child && 'string' !== typeof child) {
28361
+ child = Object(__WEBPACK_IMPORTED_MODULE_2_react__["cloneElement"])(child, {
28362
+ key: [i, j].join()
28363
+ });
28364
+ }
28365
+
28366
+ memo.push(child);
28367
+ });
28368
+ return memo;
28369
+ }, []);
28370
+ }
28371
+ /**
28372
+ * Switches the nodeName of all the elements in the children object.
28373
+ *
28374
+ * @param {?Object} children Children object.
28375
+ * @param {string} nodeName Node name.
28376
+ *
28377
+ * @return {?Object} The updated children object.
28378
+ */
28379
+
28380
+ function switchChildrenNodeName(children, nodeName) {
28381
+ return children && __WEBPACK_IMPORTED_MODULE_2_react__["Children"].map(children, function (elt, index) {
28382
+ if (Object(__WEBPACK_IMPORTED_MODULE_3_lodash__["isString"])(elt)) {
28383
+ return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(nodeName, {
28384
+ key: index
28385
+ }, elt);
28386
+ }
28387
+
28388
+ var _elt$props = elt.props,
28389
+ childrenProp = _elt$props.children,
28390
+ props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__["a" /* default */])(_elt$props, ["children"]);
28391
+
28392
+ return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(nodeName, Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_objectSpread__["a" /* default */])({
28393
+ key: index
28394
+ }, props), childrenProp);
28395
+ });
28396
+ }
28397
+ //# sourceMappingURL=react.js.map
28398
+
28399
+ /***/ }),
28400
+ /* 80 */
28401
+ /***/ (function(module, exports, __webpack_require__) {
28402
+
28403
+ "use strict";
28404
+ /* WEBPACK VAR INJECTION */(function(process) {/**
28405
+ * Copyright (c) 2013-present, Facebook, Inc.
28406
+ *
28407
+ * This source code is licensed under the MIT license found in the
28408
+ * LICENSE file in the root directory of this source tree.
28409
+ */
28410
+
28411
+
28412
+
28413
+ var printWarning = function() {};
28414
+
28415
+ if (process.env.NODE_ENV !== 'production') {
28416
+ var ReactPropTypesSecret = __webpack_require__(81);
28417
+ var loggedTypeFailures = {};
28418
+
28419
+ printWarning = function(text) {
28420
+ var message = 'Warning: ' + text;
28421
+ if (typeof console !== 'undefined') {
28422
+ console.error(message);
28423
+ }
28424
+ try {
28425
+ // --- Welcome to debugging React ---
28426
+ // This error was thrown as a convenience so that you can use this stack
28427
+ // to find the callsite that caused this warning to fire.
28428
+ throw new Error(message);
28429
+ } catch (x) {}
28430
+ };
28431
+ }
28432
+
28433
+ /**
28434
+ * Assert that the values match with the type specs.
28435
+ * Error messages are memorized and will only be shown once.
28436
+ *
28437
+ * @param {object} typeSpecs Map of name to a ReactPropType
28438
+ * @param {object} values Runtime values that need to be type-checked
28439
+ * @param {string} location e.g. "prop", "context", "child context"
28440
+ * @param {string} componentName Name of the component for error messages.
28441
+ * @param {?Function} getStack Returns the component stack.
28442
+ * @private
28443
+ */
28444
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
28445
+ if (process.env.NODE_ENV !== 'production') {
28446
+ for (var typeSpecName in typeSpecs) {
28447
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
28448
+ var error;
28449
+ // Prop type validation may throw. In case they do, we don't want to
28450
+ // fail the render phase where it didn't fail before. So we log it.
28451
+ // After these have been cleaned up, we'll let them throw.
28452
+ try {
28453
+ // This is intentionally an invariant that gets caught. It's the same
28454
+ // behavior as without this statement except with a better message.
28455
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
28456
+ var err = Error(
28457
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
28458
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
28459
+ );
28460
+ err.name = 'Invariant Violation';
28461
+ throw err;
28462
+ }
28463
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
28464
+ } catch (ex) {
28465
+ error = ex;
28466
+ }
28467
+ if (error && !(error instanceof Error)) {
28468
+ printWarning(
28469
+ (componentName || 'React class') + ': type specification of ' +
28470
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
28471
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
28472
+ 'You may have forgotten to pass an argument to the type checker ' +
28473
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
28474
+ 'shape all require an argument).'
28475
+ )
28476
+
28477
+ }
28478
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
28479
+ // Only monitor this failure once because there tends to be a lot of the
28480
+ // same error.
28481
+ loggedTypeFailures[error.message] = true;
28482
+
28483
+ var stack = getStack ? getStack() : '';
28484
+
28485
+ printWarning(
28486
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
28487
+ );
28488
+ }
28489
+ }
28490
+ }
28491
+ }
28492
+ }
28493
+
28494
+ module.exports = checkPropTypes;
28495
+
28496
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(21)))
28497
+
28498
+ /***/ }),
28499
+ /* 81 */
28500
+ /***/ (function(module, exports, __webpack_require__) {
28501
+
28502
+ "use strict";
28503
+ /**
28504
+ * Copyright (c) 2013-present, Facebook, Inc.
28505
+ *
28506
+ * This source code is licensed under the MIT license found in the
28507
+ * LICENSE file in the root directory of this source tree.
28508
+ */
28509
+
28510
+
28511
+
28512
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
28513
+
28514
+ module.exports = ReactPropTypesSecret;
28515
+
28516
+
28517
+ /***/ }),
28518
+ /* 82 */
28519
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28520
+
28521
+ "use strict";
28522
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RegistryConsumer; });
28523
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__wordpress_element__ = __webpack_require__(0);
28524
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__default_registry__ = __webpack_require__(111);
28525
+ /**
28526
+ * WordPress dependencies
28527
+ */
28528
+
28529
+ /**
28530
+ * Internal dependencies
28531
+ */
28532
+
28533
+
28534
+
28535
+ var _createContext = Object(__WEBPACK_IMPORTED_MODULE_0__wordpress_element__["g" /* createContext */])(__WEBPACK_IMPORTED_MODULE_1__default_registry__["a" /* default */]),
28536
+ Consumer = _createContext.Consumer,
28537
+ Provider = _createContext.Provider;
28538
+
28539
+ var RegistryConsumer = Consumer;
28540
+ /* unused harmony default export */ var _unused_webpack_default_export = (Provider);
28541
+ //# sourceMappingURL=index.js.map
28542
+
28543
+ /***/ }),
28544
+ /* 83 */
28545
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28546
+
28547
+ "use strict";
28548
+ /**
28549
+ * Validate a hookName string.
28550
+ *
28551
+ * @param {string} hookName The hook name to validate. Should be a non empty string containing
28552
+ * only numbers, letters, dashes, periods and underscores. Also,
28553
+ * the hook name cannot begin with `__`.
28554
+ *
28555
+ * @return {boolean} Whether the hook name is valid.
28556
+ */
28557
+ function validateHookName(hookName) {
28558
+ if ('string' !== typeof hookName || '' === hookName) {
28559
+ // eslint-disable-next-line no-console
28560
+ console.error('The hook name must be a non-empty string.');
28561
+ return false;
28562
+ }
28563
+
28564
+ if (/^__/.test(hookName)) {
28565
+ // eslint-disable-next-line no-console
28566
+ console.error('The hook name cannot begin with `__`.');
28567
+ return false;
28568
+ }
28569
+
28570
+ if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {
28571
+ // eslint-disable-next-line no-console
28572
+ console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');
28573
+ return false;
28574
+ }
28575
+
28576
+ return true;
28577
+ }
28578
+
28579
+ /* harmony default export */ __webpack_exports__["a"] = (validateHookName);
28580
+ //# sourceMappingURL=validateHookName.js.map
28581
+
28582
+ /***/ }),
28583
+ /* 84 */
28584
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28585
+
28586
+ "use strict";
28587
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
28588
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
28589
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
28590
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
28591
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
28592
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_element__ = __webpack_require__(0);
28593
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__wordpress_compose__ = __webpack_require__(14);
28594
+
28595
+
28596
+
28597
+
28598
+
28599
+
28600
+
28601
+ /**
28602
+ * WordPress dependencies
28603
+ */
28604
+
28605
+
28606
+ /**
28607
+ * Higher Order Component used to be used to wrap disposable elements like
28608
+ * sidebars, modals, dropdowns. When mounting the wrapped component, we track a
28609
+ * reference to the current active element so we know where to restore focus
28610
+ * when the component is unmounted.
28611
+ *
28612
+ * @param {WPElement} WrappedComponent The disposable component.
28613
+ *
28614
+ * @return {Component} Component with the focus restauration behaviour.
28615
+ */
28616
+
28617
+ /* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_compose__["b" /* createHigherOrderComponent */])(function (WrappedComponent) {
28618
+ return (
28619
+ /*#__PURE__*/
28620
+ function (_Component) {
28621
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(_class, _Component);
28622
+
28623
+ function _class() {
28624
+ var _this;
28625
+
28626
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, _class);
28627
+
28628
+ _this = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(_class).apply(this, arguments));
28629
+
28630
+ _this.setIsFocusedTrue = function () {
28631
+ return _this.isFocused = true;
28632
+ };
28633
+
28634
+ _this.setIsFocusedFalse = function () {
28635
+ return _this.isFocused = false;
28636
+ };
28637
+
28638
+ _this.activeElementOnMount = document.activeElement;
28639
+ return _this;
28640
+ }
28641
+
28642
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(_class, [{
28643
+ key: "componentWillUnmount",
28644
+ value: function componentWillUnmount() {
28645
+ var activeElementOnMount = this.activeElementOnMount,
28646
+ isFocused = this.isFocused;
28647
+
28648
+ if (!activeElementOnMount) {
28649
+ return;
28650
+ }
28651
+
28652
+ var _document = document,
28653
+ body = _document.body,
28654
+ activeElement = _document.activeElement;
28655
+
28656
+ if (isFocused || null === activeElement || body === activeElement) {
28657
+ activeElementOnMount.focus();
28658
+ }
28659
+ }
28660
+ }, {
28661
+ key: "render",
28662
+ value: function render() {
28663
+ return Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])("div", {
28664
+ onFocus: this.setIsFocusedTrue,
28665
+ onBlur: this.setIsFocusedFalse
28666
+ }, Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])(WrappedComponent, this.props));
28667
+ }
28668
+ }]);
28669
+
28670
+ return _class;
28671
+ }(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["b" /* Component */])
28672
+ );
28673
+ }, 'withFocusReturn'));
28674
+ //# sourceMappingURL=index.js.map
28675
+
28676
+ /***/ }),
28677
+ /* 85 */
28678
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28679
+
28680
+ "use strict";
28681
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
28682
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
28683
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
28684
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
28685
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
28686
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
28687
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__wordpress_element__ = __webpack_require__(0);
28688
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__wordpress_compose__ = __webpack_require__(14);
28689
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__wordpress_keycodes__ = __webpack_require__(27);
28690
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__wordpress_dom__ = __webpack_require__(44);
28691
+
28692
+
28693
+
28694
+
28695
+
28696
+
28697
+
28698
+
28699
+ /**
28700
+ * WordPress dependencies
28701
+ */
28702
+
28703
+
28704
+
28705
+
28706
+ var withConstrainedTabbing = Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_compose__["b" /* createHigherOrderComponent */])(function (WrappedComponent) {
28707
+ return (
28708
+ /*#__PURE__*/
28709
+ function (_Component) {
28710
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(_class, _Component);
28711
+
28712
+ function _class() {
28713
+ var _this;
28714
+
28715
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, _class);
28716
+
28717
+ _this = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(_class).apply(this, arguments));
28718
+ _this.focusContainRef = Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["j" /* createRef */])();
28719
+ _this.handleTabBehaviour = _this.handleTabBehaviour.bind(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
28720
+ return _this;
28721
+ }
28722
+
28723
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(_class, [{
28724
+ key: "handleTabBehaviour",
28725
+ value: function handleTabBehaviour(event) {
28726
+ if (event.keyCode !== __WEBPACK_IMPORTED_MODULE_8__wordpress_keycodes__["i" /* TAB */]) {
28727
+ return;
28728
+ }
28729
+
28730
+ var tabbables = __WEBPACK_IMPORTED_MODULE_9__wordpress_dom__["a" /* focus */].tabbable.find(this.focusContainRef.current);
28731
+
28732
+ if (!tabbables.length) {
28733
+ return;
28734
+ }
28735
+
28736
+ var firstTabbable = tabbables[0];
28737
+ var lastTabbable = tabbables[tabbables.length - 1];
28738
+
28739
+ if (event.shiftKey && event.target === firstTabbable) {
28740
+ event.preventDefault();
28741
+ lastTabbable.focus();
28742
+ } else if (!event.shiftKey && event.target === lastTabbable) {
28743
+ event.preventDefault();
28744
+ firstTabbable.focus();
28745
+ /*
28746
+ * When pressing Tab and none of the tabbables has focus, the keydown
28747
+ * event happens on the wrapper div: move focus on the first tabbable.
28748
+ */
28749
+ } else if (!tabbables.includes(event.target)) {
28750
+ event.preventDefault();
28751
+ firstTabbable.focus();
28752
+ }
28753
+ }
28754
+ }, {
28755
+ key: "render",
28756
+ value: function render() {
28757
+ // Disable reason: this component is non-interactive, but must capture
28758
+ // events from the wrapped component to determine when the Tab key is used.
28759
+
28760
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
28761
+ return Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["h" /* createElement */])("div", {
28762
+ onKeyDown: this.handleTabBehaviour,
28763
+ ref: this.focusContainRef,
28764
+ tabIndex: "-1"
28765
+ }, Object(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["h" /* createElement */])(WrappedComponent, this.props));
28766
+ /* eslint-enable jsx-a11y/no-static-element-interactions */
28767
+ }
28768
+ }]);
28769
+
28770
+ return _class;
28771
+ }(__WEBPACK_IMPORTED_MODULE_6__wordpress_element__["b" /* Component */])
28772
+ );
28773
+ }, 'withConstrainedTabbing');
28774
+ /* harmony default export */ __webpack_exports__["a"] = (withConstrainedTabbing);
28775
+ //# sourceMappingURL=index.js.map
28776
+
28777
+ /***/ }),
28778
+ /* 86 */
28779
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28780
+
28781
+ "use strict";
28782
+ /* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
28783
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
28784
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
28785
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
28786
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
28787
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__wordpress_element__ = __webpack_require__(0);
28788
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash__ = __webpack_require__(2);
28789
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_lodash__);
28790
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__popover__ = __webpack_require__(69);
28791
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__shortcut__ = __webpack_require__(132);
28792
+
28793
+
28794
+
28795
+
28796
+
28797
+
28798
+
28799
+ /**
28800
+ * External dependencies
28801
+ */
28802
+
28803
+ /**
28804
+ * WordPress dependencies
28805
+ */
28806
+
28807
+
28808
+ /**
28809
+ * Internal dependencies
28810
+ */
28811
+
28812
+
28813
+
28814
+ /**
28815
+ * Time over children to wait before showing tooltip
28816
+ *
28817
+ * @type {Number}
28818
+ */
28819
+
28820
+ var TOOLTIP_DELAY = 700;
28821
+
28822
+ var Tooltip =
28823
+ /*#__PURE__*/
28824
+ function (_Component) {
28825
+ Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_inherits__["a" /* default */])(Tooltip, _Component);
28826
+
28827
+ function Tooltip() {
28828
+ var _this;
28829
+
28830
+ Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, Tooltip);
28831
+
28832
+ _this = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(Tooltip).apply(this, arguments));
28833
+ _this.delayedSetIsOver = Object(__WEBPACK_IMPORTED_MODULE_6_lodash__["debounce"])(function (isOver) {
28834
+ return _this.setState({
28835
+ isOver: isOver
28836
+ });
28837
+ }, TOOLTIP_DELAY);
28838
+ _this.state = {
28839
+ isOver: false
28840
+ };
28841
+ return _this;
28842
+ }
28843
+
28844
+ Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_createClass__["a" /* default */])(Tooltip, [{
28845
+ key: "componentWillUnmount",
28846
+ value: function componentWillUnmount() {
28847
+ this.delayedSetIsOver.cancel();
28848
+ }
28849
+ }, {
28850
+ key: "emitToChild",
28851
+ value: function emitToChild(eventName, event) {
28852
+ var children = this.props.children;
28853
+
28854
+ if (__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["a" /* Children */].count(children) !== 1) {
28855
+ return;
28856
+ }
28857
+
28858
+ var child = __WEBPACK_IMPORTED_MODULE_5__wordpress_element__["a" /* Children */].only(children);
28859
+
28860
+ if (typeof child.props[eventName] === 'function') {
28861
+ child.props[eventName](event);
28862
+ }
28863
+ }
28864
+ }, {
28865
+ key: "createToggleIsOver",
28866
+ value: function createToggleIsOver(eventName, isDelayed) {
28867
+ var _this2 = this;
28868
+
28869
+ return function (event) {
28870
+ // Preserve original child callback behavior
28871
+ _this2.emitToChild(eventName, event); // Mouse events behave unreliably in React for disabled elements,
28872
+ // firing on mouseenter but not mouseleave. Further, the default
28873
+ // behavior for disabled elements in some browsers is to ignore
28874
+ // mouse events. Don't bother trying to to handle them.
28875
+ //
28876
+ // See: https://github.com/facebook/react/issues/4251
28877
+
28878
+
28879
+ if (event.currentTarget.disabled) {
28880
+ return;
28881
+ } // Needed in case unsetting is over while delayed set pending, i.e.
28882
+ // quickly blur/mouseleave before delayedSetIsOver is called
28883
+
28884
+
28885
+ _this2.delayedSetIsOver.cancel();
28886
+
28887
+ var isOver = Object(__WEBPACK_IMPORTED_MODULE_6_lodash__["includes"])(['focus', 'mouseenter'], event.type);
28888
+
28889
+ if (isOver === _this2.state.isOver) {
28890
+ return;
28891
+ }
28892
+
28893
+ if (isDelayed) {
28894
+ _this2.delayedSetIsOver(isOver);
28895
+ } else {
28896
+ _this2.setState({
28897
+ isOver: isOver
28898
+ });
28899
+ }
28900
+ };
28901
+ }
28902
+ }, {
28903
+ key: "render",
28904
+ value: function render() {
28905
+ var _this$props = this.props,
28906
+ children = _this$props.children,
28907
+ position = _this$props.position,
28908
+ text = _this$props.text,
28909
+ shortcut = _this$props.shortcut;
28910
+
28911
+ if (__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["a" /* Children */].count(children) !== 1) {
28912
+ if ('development' === process.env.NODE_ENV) {
28913
+ // eslint-disable-next-line no-console
28914
+ console.error('Tooltip should be called with only a single child element.');
28915
+ }
28916
+
28917
+ return children;
28918
+ }
28919
+
28920
+ var child = __WEBPACK_IMPORTED_MODULE_5__wordpress_element__["a" /* Children */].only(children);
28921
+ var isOver = this.state.isOver;
28922
+ return Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["e" /* cloneElement */])(child, {
28923
+ onMouseEnter: this.createToggleIsOver('onMouseEnter', true),
28924
+ onMouseLeave: this.createToggleIsOver('onMouseLeave'),
28925
+ onClick: this.createToggleIsOver('onClick'),
28926
+ onFocus: this.createToggleIsOver('onFocus'),
28927
+ onBlur: this.createToggleIsOver('onBlur'),
28928
+ children: Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["f" /* concatChildren */])(child.props.children, isOver && Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_7__popover__["a" /* default */], {
28929
+ focusOnMount: false,
28930
+ position: position,
28931
+ className: "components-tooltip",
28932
+ "aria-hidden": "true"
28933
+ }, text, Object(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["h" /* createElement */])(__WEBPACK_IMPORTED_MODULE_8__shortcut__["a" /* default */], {
28934
+ className: "components-tooltip__shortcut",
28935
+ shortcut: shortcut
28936
+ })))
28937
+ });
28938
+ }
28939
+ }]);
28940
+
28941
+ return Tooltip;
28942
+ }(__WEBPACK_IMPORTED_MODULE_5__wordpress_element__["b" /* Component */]);
28943
+
28944
+ /* harmony default export */ __webpack_exports__["a"] = (Tooltip);
28945
+ //# sourceMappingURL=index.js.map
28946
+ /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(21)))
28947
+
28948
+ /***/ }),
28949
+ /* 87 */
28950
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
28951
+
28952
+ "use strict";
28953
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(8);
28954
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__ = __webpack_require__(13);
28955
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
28956
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
28957
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
28958
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
28959
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
28960
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
28961
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__wordpress_element__ = __webpack_require__(0);
28962
+
28963
+
28964
+
28965
+
28966
+
28967
+
28968
+
28969
+
28970
+
28971
+
28972
+ /**
28973
+ * External dependencies
28974
+ */
28975
+
28976
+
28977
+ var IsolatedEventContainer =
28978
+ /*#__PURE__*/
28979
+ function (_Component) {
28980
+ Object(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_inherits__["a" /* default */])(IsolatedEventContainer, _Component);
28981
+
28982
+ function IsolatedEventContainer(props) {
28983
+ var _this;
28984
+
28985
+ Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_classCallCheck__["a" /* default */])(this, IsolatedEventContainer);
28986
+
28987
+ _this = Object(__WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_possibleConstructorReturn__["a" /* default */])(this, Object(__WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_getPrototypeOf__["a" /* default */])(IsolatedEventContainer).call(this, props));
28988
+ _this.stopEventPropagationOutsideContainer = _this.stopEventPropagationOutsideContainer.bind(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_7__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
28989
+ return _this;
28990
+ }
28991
+
28992
+ Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_createClass__["a" /* default */])(IsolatedEventContainer, [{
28993
+ key: "stopEventPropagationOutsideContainer",
28994
+ value: function stopEventPropagationOutsideContainer(event) {
28995
+ event.stopPropagation();
28996
+ }
28997
+ }, {
28998
+ key: "render",
28999
+ value: function render() {
29000
+ var _this$props = this.props,
29001
+ children = _this$props.children,
29002
+ props = Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_objectWithoutProperties__["a" /* default */])(_this$props, ["children"]); // Disable reason: this stops certain events from propagating outside of the component.
29003
+ // - onMouseDown is disabled as this can cause interactions with other DOM elements
29004
+
29005
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
29006
+
29007
+
29008
+ return Object(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["h" /* createElement */])("div", Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, props, {
29009
+ onMouseDown: this.stopEventPropagationOutsideContainer
29010
+ }), children);
29011
+ }
29012
+ }]);
29013
+
29014
+ return IsolatedEventContainer;
29015
+ }(__WEBPACK_IMPORTED_MODULE_8__wordpress_element__["b" /* Component */]);
29016
+
29017
+ /* harmony default export */ __webpack_exports__["a"] = (IsolatedEventContainer);
29018
+ //# sourceMappingURL=index.js.map
29019
+
29020
+ /***/ }),
29021
+ /* 88 */
29022
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
29023
+
29024
+ "use strict";
29025
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Consumer; });
29026
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_toConsumableArray__ = __webpack_require__(22);
29027
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_classCallCheck__ = __webpack_require__(3);
29028
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_createClass__ = __webpack_require__(4);
29029
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_possibleConstructorReturn__ = __webpack_require__(5);
29030
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__babel_runtime_helpers_esm_getPrototypeOf__ = __webpack_require__(6);
29031
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__babel_runtime_helpers_esm_inherits__ = __webpack_require__(7);
29032
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(9);
29033
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__wordpress_element__ = __webpack_require__(0);
29034
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash__ = __webpack_require__(2);
29035
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_lodash___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_lodash__);
29036
+
29037
+
29038
+
29039
+
29040
+
29041
+
29042
+
29043
+
29044
+
29045
+ /**
29046
+ * External dependencies
29047
+ */
29048
+
29049
+ /**
29050
+ * WordPress dependencies
29051
+ */
29052
+
29053
+
29054
+
29055
+ var _createContext = Object(__WEBPACK_IMPORTED_MODULE_7__wordpress_el