Envato Elements – Template Kits (Beta) - Version 0.0.6

Version Description

Download this release

Release Info

Developer dtbaker
Plugin Icon 128x128 Envato Elements – Template Kits (Beta)
Version 0.0.6
Comparing to
See all releases

Version 0.0.6

Files changed (78) hide show
  1. LICENSE +674 -0
  2. assets/css/main.min.css +248 -0
  3. assets/fonts/envato.eot +0 -0
  4. assets/fonts/envato.svg +11 -0
  5. assets/fonts/envato.ttf +0 -0
  6. assets/fonts/envato.woff +0 -0
  7. assets/images/envato-elements-template-kits.svg +1 -0
  8. assets/images/envato-elements.svg +1 -0
  9. assets/images/envato-logo-green.svg +1 -0
  10. assets/images/envato-logo-white.svg +1 -0
  11. assets/images/envato.svg +1 -0
  12. assets/images/loader.svg +1 -0
  13. assets/images/placeholder.jpg +0 -0
  14. assets/images/thumbs-down.svg +1 -0
  15. assets/images/thumbs-up.svg +1 -0
  16. assets/images/welcome-2.svg +1 -0
  17. assets/images/welcome.svg +1 -0
  18. assets/js/app.min.js +12 -0
  19. envato-elements.php +93 -0
  20. inc/bootstrap.php +48 -0
  21. inc/class-api.php +118 -0
  22. inc/class-base.php +137 -0
  23. inc/class-category.php +105 -0
  24. inc/class-collection-beaver-builder.php +133 -0
  25. inc/class-collection-elementor.php +247 -0
  26. inc/class-collection-photos.php +140 -0
  27. inc/class-collection.php +454 -0
  28. inc/class-cpt-kits.php +366 -0
  29. inc/class-cpt.php +175 -0
  30. inc/class-elementor.php +33 -0
  31. inc/class-feedback.php +119 -0
  32. inc/class-import.php +902 -0
  33. inc/class-insert.php +26 -0
  34. inc/class-license.php +150 -0
  35. inc/class-notices.php +72 -0
  36. inc/class-plugin.php +185 -0
  37. inc/class-required-plugin.php +151 -0
  38. inc/class-rest.php +55 -0
  39. inc/class-statistics.php +164 -0
  40. inc/class-template.php +36 -0
  41. languages/envato-elements.pot +82 -0
  42. readme.txt +75 -0
  43. src/js/app/index.js +142 -0
  44. src/js/app/objects/collection.js +182 -0
  45. src/js/app/objects/collections.js +119 -0
  46. src/js/app/objects/template.js +82 -0
  47. src/js/app/pages/collections.js +118 -0
  48. src/js/app/pages/header.js +33 -0
  49. src/js/app/utils/api.js +45 -0
  50. src/js/app/utils/config.js +23 -0
  51. src/js/app/utils/error.js +28 -0
  52. src/js/app/utils/fetchWP.js +55 -0
  53. src/js/app/utils/helper.js +28 -0
  54. src/js/app/utils/importer.js +192 -0
  55. src/js/app/utils/lazyLoader.js +65 -0
  56. src/js/app/utils/modal.js +41 -0
  57. src/js/app/utils/objectCache.js +11 -0
  58. src/js/app/utils/template.js +63 -0
  59. src/scss/admin/_collection.scss +178 -0
  60. src/scss/admin/_collections.scss +190 -0
  61. src/scss/admin/_global.scss +487 -0
  62. src/scss/admin/_helper.scss +10 -0
  63. src/scss/admin/_importer.scss +81 -0
  64. src/scss/admin/_photos.scss +9 -0
  65. src/scss/admin/_welcome.scss +53 -0
  66. uninstall.php +12 -0
  67. views/collections/header.php +15 -0
  68. views/collections/js-holder.php +5 -0
  69. views/header.php +12 -0
  70. views/license/settings.php +19 -0
  71. views/license/welcome.php +73 -0
  72. views/notices/global.php +22 -0
  73. views/templates/collection.php +163 -0
  74. views/templates/collections.php +67 -0
  75. views/templates/general.php +28 -0
  76. views/templates/imports.php +47 -0
  77. views/templates/terms.php +55 -0
  78. views/wrapper.php +27 -0
LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ {one line to give the program's name and a brief idea of what it does.}
635
+ Copyright (C) {year} {name of author}
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ {project} Copyright (C) {year} {fullname}
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
assets/css/main.min.css ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements-screen-only,.screen-reader-text,.screen-reader-text span,.ui-helper-hidden-accessible{position:absolute;top:-10000em;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}
2
+ .envato-elements-clearfix:after{content:'';display:block;clear:both;width:0;height:0}
3
+ .envato-elements__wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;min-height:85vh;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;color:#555d66}
4
+ .envato-elements__header{background-color:#fff;box-shadow:inset 0 -1px 0 0 #e0e5e9;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
5
+ .envato-elements__header-logo{padding:15px 30px 15px 20px}
6
+ .envato-elements__header-logo img{height:22px}
7
+ .envato-elements__header-logo a:active,.envato-elements__header-logo a:focus{outline:0;border:0;-moz-outline-style:none;box-shadow:none}
8
+ .envato-elements__header-menu{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}
9
+ .envato-elements__header-menuitem{height:55px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-size:13px;text-decoration:none;color:#555d66;padding:0 30px;font-weight:500}
10
+ .envato-elements__header-menuitem--current{background-color:#f0f2f4;box-shadow:inset -1px 0 0 0 #e0e5e9,inset 1px 0 0 0 #e0e5e9,inset 0 -3px 0 0 #82b541}
11
+ .envato-elements__header-menuitem:hover{color:#555d66;background-color:#f5f7f9}
12
+ .envato-elements__header-menuitem:active,.envato-elements__header-menuitem:focus{outline:0;border:0;-moz-outline-style:none;box-shadow:inset -1px 0 0 0 #e0e5e9,inset 1px 0 0 0 #e0e5e9,inset 0 -3px 0 0 #82b541}
13
+ .envato-elements__content{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:20px;background:#f8f9f9}
14
+ .envato-elements__content-dynamic{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}
15
+ .envato-elements__content-dynamic--loading{background-image:url("../images/loader.svg");background-position:center;background-repeat:no-repeat}
16
+ .envato-elements__content-dynamic--loading>*{display:none !important}
17
+ .envato-elements__content-dynamic>.envato-elements__collections-single{margin-top:20px}
18
+ .envato-elements-notice{border:1px solid #e0e5e9;padding:15px;background:#FFF;margin:0 0 15px}
19
+ .envato-elements-notice--error{border-color:#9e4848;color:#9e4848}
20
+ .envato-elements-notice--warning{border-color:#eaeaea;color:#6d6d6d}
21
+ .envato-elements-notice--success{border-color:#1f6824;color:#6d6d6d}
22
+ .envato-elements-notice--global{border-color:#eaeaea;color:#6d6d6d;margin-top:20px}
23
+ .envato-elements--action{cursor:pointer}
24
+ .envato-elements__link--back:before{content:"\f341";padding-right:2px;font-family:dashicons;font-size:.7em}
25
+ .envato-elements__link--next:after{content:"\f345";padding-left:2px;font-family:dashicons;font-size:.7em}
26
+ .elements_page_envato-elements-activation .update-nag,.elements_page_envato-elements-activation .updated,.elements_page_envato-elements-activation .error,.elements_page_envato-elements-activation .is-dismissible,.elements_page_envato-elements-activation #dolly,.toplevel_page_envato-elements .update-nag,.toplevel_page_envato-elements .updated,.toplevel_page_envato-elements .error,.toplevel_page_envato-elements .is-dismissible,.toplevel_page_envato-elements #dolly{display:none}
27
+ .elements_page_envato-elements-activation #wpcontent,.toplevel_page_envato-elements #wpcontent{padding-left:0}
28
+ .elements_page_envato-elements-activation #wpbody-content,.toplevel_page_envato-elements #wpbody-content{padding-bottom:0}
29
+ .elements_page_envato-elements-activation #wpfooter,.toplevel_page_envato-elements #wpfooter{display:none}
30
+ .envato-elements__error{width:100%}
31
+ .envato-elements-import-button{position:relative}
32
+ .envato-elements-import-button span{display:block;position:absolute;top:3px;right:5px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
33
+ .envato-elements-import-button--importing{padding-right:30px !important}
34
+ .envato-elements-import-button--importing span{-webkit-animation:import-rotation 2s infinite linear;animation:import-rotation 2s infinite linear;width:20px;height:20px}
35
+ .envato-elements-import-button--importing span:before{displaY:block;position:absolute;color:#f56e28;content:"\f463"}
36
+ .envato-elements-import-button--importing.button-primary span:before{color:#fff}
37
+ .envato-elements-import-button--imported span{width:20px;height:20px}
38
+ .envato-elements-import-button--imported span:before{color:#79ba49;content:'\f147';margin:3px 5px 0 -2px}
39
+ .envato-elements-insert-button{position:relative}
40
+ .envato-elements-insert-button span{display:block;position:absolute;top:3px;right:5px;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
41
+ .envato-elements-insert-button--inserting{padding-right:30px !important}
42
+ .envato-elements-insert-button--inserting span{-webkit-animation:import-rotation 2s infinite linear;animation:import-rotation 2s infinite linear;width:20px;height:20px}
43
+ .envato-elements-insert-button--inserting span:before{displaY:block;position:absolute;color:#f56e28;content:"\f463"}
44
+ .envato-elements-insert-button--inserting.button-primary span:before{color:#fff}
45
+ .envato-elements-insert-button--inserted{padding-right:30px !important}
46
+ .envato-elements-insert-button--inserted span{width:20px;height:20px}
47
+ .envato-elements-insert-button--inserted span:before{color:#79ba49;content:'\f147';margin:3px 5px 0 -2px}
48
+ .envato-elements__collection-template,.envato-elements__collections-template{position:relative}
49
+ .envato-elements__collection-template .envato-elements-template-status,.envato-elements__collections-template .envato-elements-template-status{position:absolute;right:0;top:0;z-index:8;width:30px;height:30px;overflow:hidden;display:block;display:none;pointer-events:none;font-size:0;padding:0;border:0;box-shadow:none;cursor:pointer;background:transparent;border-bottom-left-radius:3px;opacity:.5;-webkit-transition:all .2s linear;transition:all .2s linear}
50
+ .envato-elements__collection-template .envato-elements-template-status:before,.envato-elements__collections-template .envato-elements-template-status:before{left:5px;top:5px;display:block;width:20px;height:20px;position:absolute;z-index:4;content:"\f316";color:#f56e28;background:transparent;font:400 20px/1 dashicons;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
51
+ .envato-elements__collection-template .envato-elements-template-status span,.envato-elements__collections-template .envato-elements-template-status span{display:none}
52
+ .envato-elements__collection-template .envato-elements-template-status--importing,.envato-elements__collections-template .envato-elements-template-status--importing{display:block;-webkit-animation:import-rotation 2s infinite linear;animation:import-rotation 2s infinite linear}
53
+ .envato-elements__collection-template .envato-elements-template-status--importing:before,.envato-elements__collections-template .envato-elements-template-status--importing:before{content:"\f463"}
54
+ .envato-elements__collection-template .envato-elements-template-status--imported,.envato-elements__collections-template .envato-elements-template-status--imported{display:block}
55
+ .envato-elements__collection-template .envato-elements-template-status--imported:before,.envato-elements__collections-template .envato-elements-template-status--imported:before{content:"\f147";color:#46ad24}
56
+ .envato-elements__collection-template:hover .envato-elements-import-button,.envato-elements__collections-template:hover .envato-elements-import-button{opacity:1}
57
+ .envato-elements__collection--loading .envato-elements-import-button:before,.envato-elements__collections--loading .envato-elements-import-button:before{display:none !important}
58
+ .envato-elements--modal-open .envato-elements__collection-header,.envato-elements--modal-open .envato-elements__collection-content,.envato-elements--modal-open .envato-elements__collections-header,.envato-elements--modal-open .envato-elements__collections-content{-webkit-filter:blur(2px);filter:blur(2px)}
59
+ .envato-elements__modal{background:rgba(255,255,255,0.79);position:absolute;top:0;left:0;right:0;bottom:0;z-index:6}
60
+ .envato-elements__modal-inner{position:fixed;left:400px;right:200px;margin-top:20vh;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}
61
+ .envato-elements__modal-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-top:-30px;width:100%;-webkit-align-content:space-between;-ms-flex-line-pack:justify;align-content:space-between}
62
+ .envato-elements__modal-close{margin-left:auto;margin-right:0;width:40px;border:0;box-shadow:none;background:transparent;position:relative;cursor:pointer}
63
+ .envato-elements__modal-close:before{font-family:dashicons;font-size:20px;content:"\f335"}
64
+ .envato-elements__modal-inner-bg{border:1px solid #ccc;width:600px;background:#FFF;padding:40px 20px}
65
+ .envato-elements__feedback-question{text-align:center;width:100%}
66
+ .envato-elements__feedback-answers-wrap{width:344px;margin:0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
67
+ .envato-elements__feedback-answer{margin:5px;display:inline-block;width:150px;height:150px;border:1px solid #ccc;text-align:center;text-decoration:none;font-size:20px;color:#777;border-radius:5px}
68
+ .envato-elements__feedback-answer span{font-size:80px;display:block;margin-top:38px;margin-bottom:4px}
69
+ .envato-elements__feedback-answer span img{width:45px;height:45px}
70
+ .envato-elements__feedback-answer--yes:hover{background:#6ca12b;color:#FFF}
71
+ .envato-elements__feedback-answer--no:hover{background:#b42f2c;color:#FFF}
72
+ .envato-elements__modal--terms-conditions .envato-elements__modal-content{text-align:left;max-height:400px;overflow-y:scroll;padding:10px 20px 10px 0}
73
+ .envato-elements__content h1,.envato-elements__content h2,.envato-elements__content h3{font-family:'Rubik',sans-serif}
74
+ .envato-elements__welcome{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch;margin:auto}
75
+ .envato-elements__welcome-inner{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:410px;border:1px solid #e0e5e9;background-color:#fff;text-align:center;padding:30px}
76
+ .envato-elements__welcome-inner h2{font-weight:300;font-size:20px;color:#777;margin:0;padding:0;line-height:1.1}
77
+ .envato-elements__welcome-inner p:first-of-type{margin-bottom:.5em}
78
+ .envato-elements__welcome-inner input[type="email"]{padding:9px;width:100%;border-radius:5px}
79
+ .envato-elements__welcome-inner div{padding:2px}
80
+ .envato-elements__welcome-inner .button-primary{padding:2px 40px;font-size:1.1em;height:auto;margin-top:15px}
81
+ .envato-elements__welcome-checkboxes{text-align:left;margin-top:10px}
82
+ .envato-elements__welcome-checkboxes label{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding:5px}
83
+ .envato-elements__welcome-checkboxes label input{margin:auto 10px auto 0}
84
+ .envato-elements__collections-single-detail{height:0;-webkit-transition:height .5s;transition:height .5s;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin-bottom:20px;overflow:hidden}
85
+ .envato-elements__collections-single{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%}
86
+ .envato-elements__collections-single--open .envato-elements__collections-single-detail{height:calc(100vh - 400px)}
87
+ .envato-elements__collections-single--opened .envato-elements__collections-single-detail{min-height:300px}
88
+ .envato-elements__collection-detail-thumbnail{width:70%;max-width:1360px;padding-right:30px;height:100%;overflow:hidden;overflow-y:auto}
89
+ .envato-elements__collection-detail-actions{width:30%;padding:0 0 0 20px}
90
+ .envato-elements__collection-preview-placeholder{min-height:90%;position:relative;overflow:hidden}
91
+ .envato-elements__collection-preview-placeholder>div{z-index:3;position:relative}
92
+ .envato-elements__collection-preview-placeholder .envato-elements__collection-preview-placeholder-img-wrap{position:relative;overflow:hidden;z-index:1}
93
+ .envato-elements__collection-preview-placeholder .envato-elements__collection-preview-placeholder-img-wrap:before{position:absolute;top:0;left:0;right:0;bottom:0;display:block;content:'';z-index:2}
94
+ .envato-elements__collection-preview-placeholder .envato-elements__collection-preview-placeholder-img{position:relative;-webkit-filter:blur(4px);filter:blur(4px);max-width:100%;height:auto;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}
95
+ .envato-elements__collection-preview-placeholder .envato-elements__collection-preview-large-img{position:absolute;left:0;right:0;max-width:100%;height:auto;box-sizing:border-box;z-index:3;opacity:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}
96
+ .envato-elements__collection-preview-placeholder.--loaded .envato-elements__collection-preview-large-img{opacity:1}
97
+ .envato-elements__collection-preview-placeholder.--loaded .envato-elements__collection-preview-placeholder-img{opacity:0}
98
+ .envato-elements__collection-template-options{padding-top:10px}
99
+ .envato-elements__collection-template-option{text-align:center;padding:5px 0}
100
+ .envato-elements__collection-template-option--create-page input{padding:7px;margin:0 0 10px;min-width:240px}
101
+ .envato-elements__collection-template-option--help-text{padding:10px 20px;color:#979797}
102
+ .envato-elements__collection-template-option--help-text a{color:#979797}
103
+ .envato-elements__collection-template-option--divider{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:rgba(0,0,0,0.35);margin:8px 0}
104
+ .envato-elements__collection-template-option--divider:before,.envato-elements__collection-template-option--divider:after{content:"";-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;background:rgba(0,0,0,0.1);height:1px;font-size:0;line-height:0}
105
+ .envato-elements__collection-template-option--divider:before{margin:0 8px 0 0}
106
+ .envato-elements__collection-template-option--divider:after{margin:0 0 0 8px}
107
+ .envato-elements__collection-template-label{display:block;width:100%;text-align:center;padding:6px 0 0 0;opacity:0;-webkit-transition:opacity .4s;transition:opacity .4s;color:#888}
108
+ .envato-elements__collections-single--opened .envato-elements__collection-template-label{opacity:1}
109
+ .envato-elements__collection-preview-close{float:right;background:transparent;border:0;box-shadow:none;padding:5px;right:9999px;position:relative;width:20px}
110
+ .envato-elements__collection-preview-close:before{right:-9999px;content:"\f335";padding-right:2px;font-family:dashicons;position:absolute;top:2px;width:100%;text-align:center;height:100%;font-size:20px;line-height:30.8px}
111
+ .envato-elements__collection-preview-label{margin:0}
112
+ .envato-elements__collection-preview-title{margin:.5em 0}
113
+ .envato-elements__collections{width:100%;position:relative}
114
+ .envato-elements__collections--loading .envato-elements__collections-single-title,.envato-elements__collections--loading .envato-elements__collections-single-count,.envato-elements__collections--loading .envato-elements__link--next,.envato-elements__collections--loading .envato-elements__collections-template{background:#d8d8d9;position:relative;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:.4;border:1px solid #e0e5e9;box-shadow:none;border-radius:3px}
115
+ .envato-elements__collections--loading .envato-elements__collections-single-title:before,.envato-elements__collections--loading .envato-elements__collections-single-title:after,.envato-elements__collections--loading .envato-elements__collections-single-count:before,.envato-elements__collections--loading .envato-elements__collections-single-count:after,.envato-elements__collections--loading .envato-elements__link--next:before,.envato-elements__collections--loading .envato-elements__link--next:after,.envato-elements__collections--loading .envato-elements__collections-template:before,.envato-elements__collections--loading .envato-elements__collections-template:after{content:"";background:-webkit-linear-gradient(right,#d8d8d9,#f2f2f3);background:linear-gradient(270deg,#d8d8d9,#f2f2f3);position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;-webkit-animation:placeHolderShimmer 4s linear infinite;animation:placeHolderShimmer 4s linear infinite}
116
+ .envato-elements__collections--loading .envato-elements__collections-single-title:before,.envato-elements__collections--loading .envato-elements__collections-single-count:before,.envato-elements__collections--loading .envato-elements__link--next:before,.envato-elements__collections--loading .envato-elements__collections-template:before{-webkit-animation-delay:.35s;animation-delay:.35s;background:-webkit-linear-gradient(left,#d8d8d9,#f2f2f3);background:linear-gradient(90deg,#d8d8d9,#f2f2f3)}
117
+ .envato-elements__collections--loading .envato-elements__link--next,.envato-elements__collections--loading .envato-elements__collections-single-title,.envato-elements__collections--loading .envato-elements__collections-single-count{border-radius:3px;text-indent:-9999px;overflow:hidden;min-width:180px}
118
+ .envato-elements__collections--loading .envato-elements__collections-scroller{border-bottom:2px solid #e0e5e9;overflow:hidden}
119
+ .envato-elements__collections-header{border-bottom:1px solid #e0e5e9;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}
120
+ .envato-elements__collections-header h2{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:normal;font-size:18px}
121
+ .envato-elements__collections-header span{text-align:right}
122
+ .envato-elements__collections-content{padding-top:20px}
123
+ .envato-elements__collections-single{margin-bottom:20px;padding-bottom:20px;cursor:default}
124
+ .envato-elements__collections-single:last-child{border-bottom:0}
125
+ .envato-elements__collections-single-summary header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin-bottom:25px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}
126
+ .envato-elements__collections-single-summary header h3{border-right:1px solid #e0e5e9;padding-right:20px;font-weight:normal;font-size:16px}
127
+ .envato-elements__collections-single-summary header span{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;max-width:235px;margin-left:20px;margin-right:auto}
128
+ .envato-elements__collections-single-summary header a{text-decoration:none;color:#555d66}
129
+ .envato-elements__collections-single-summary header a:hover{text-decoration:underline}
130
+ .envato-elements__collections-single-summary header *{margin:0;padding:0;height:30px;line-height:30px}
131
+ .envato-elements__collections-scroller{padding:6px 6px 36px;margin:0 -6px}
132
+ .envato-elements__collections-single--opened .envato-elements__collections-scroller{padding-bottom:48px}
133
+ .envato-elements__collections-templates{height:106px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}
134
+ .envato-elements__collection-template-cell{margin:0;padding:1px;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;margin-right:24px;border:2px solid #FFF;background:#FFF}
135
+ .envato-elements__collection-template-cell--active{border:2px solid #0079b4}
136
+ .envato-elements__collection-template{overflow:hidden}
137
+ .envato-elements__collection-template-thumb{padding-bottom:0 !important;text-decoration:none;display:block;position:relative;width:200px;height:100px;border:0 !important;overflow:hidden;background-position:center top;background-size:cover;background-repeat:no-repeat;-webkit-transition:background-position 2.8s ease-in-out;transition:background-position 2.8s ease-in-out}
138
+ .envato-elements__collection-template-thumb:hover{background-position:center bottom}
139
+ .envato-elements__pagination{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}
140
+ .envato-elements__pagination a{display:inline-block;border:1px solid #e0e5e9;padding:10px 20px;color:#444;text-decoration:none;font-size:16px;margin:0 2px}
141
+ .envato-elements__pagination a:hover{background:#e0e5e9}
142
+ .envato-elements__pagination-item--current{display:inline-block;border:1px solid #e0e5e9;padding:10px 20px;color:#444;text-decoration:none;font-size:16px;margin:0 2px;background:#f1f1f1}
143
+ .envato-elements__coming-soon{background:#FFF;border:1px dotted #e0e5e9;border-left:5px solid #e0e5e9;text-align:left;margin-bottom:20px;padding:20px 10px}
144
+ .envato-elements__collections--photos .envato-elements__collections-header,.envato-elements__collections--photos .envato-elements__collections-content{-webkit-filter:blur(2px);filter:blur(2px)}
145
+ .envato-elements__collections--photos .envato-elements__collections-thumb{background-size:cover}
146
+ .envato-elements__importer-wrapper{margin-left:auto;margin-right:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}
147
+ .envato-elements__importer{margin-left:auto;margin-right:0;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}
148
+ .envato-elements__importer [type="checkbox"]{display:none}
149
+ .envato-elements__importer [type="checkbox"]:checked ~ .envato-elements__importer-list{display:block}
150
+ .envato-elements__importer [type="checkbox"]:checked ~ .envato-elements__importer-trigger:before{content:"\f142"}
151
+ .envato-elements__importer-status{border-left:1px solid #f1f1f1;border-right:1px solid #f1f1f1;height:55px;line-height:55px;padding:0 20px;opacity:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}
152
+ .envato-elements__importer-status.--active{opacity:.8}
153
+ .envato-elements__importer-trigger{border:0;background:0;width:55px;text-align:center;position:relative}
154
+ .envato-elements__importer-trigger:before{content:"\f140";padding-right:2px;font-size:20px;width:20px;height:20px;top:50%;margin-top:-10px;font-family:dashicons;position:absolute;left:50%;margin-left:-10px}
155
+ .envato-elements__importer-list{position:absolute;display:none;background:#FFF;padding:10px;z-index:2;width:320px;top:54px;right:-14px;border-left:1px solid #e0e5e9;border-bottom:1px solid #e0e5e9;border-right:0;border-top:0;max-height:400px;overflow-y:auto}
156
+ .envato-elements__importer-list ul{margin:0;padding:0}
157
+ .envato-elements__support{height:40px;border-top:1px solid #e0e5e9;width:100%;clear:both;line-height:40px}
158
+ .envato-elements__support p{text-align:center}
159
+ /*! OverlayScrollbars https://github.com/KingSora/OverlayScrollbars Version: 1.4.5 Copyright KingSora. https://github.com/KingSora Released under the MIT license. Date: 18.05.2018 */html.os-html,html.os-html>.os-host{display:block;overflow:hidden;box-sizing:border-box;height:100% !important;width:100% !important;min-width:100% !important;min-height:100% !important;margin:0 !important;position:absolute !important}
160
+ html.os-html>.os-host>.os-padding{position:absolute}
161
+ body.os-dragging,body.os-dragging *{cursor:default}
162
+ .os-host,.os-host-textarea{position:relative;overflow:visible !important}
163
+ #hs-dummy-scrollbar-size{position:fixed;opacity:0;-ms-filter:'alpha(opacity=0)';visibility:hidden;overflow:scroll;height:500px;width:500px}
164
+ #hs-dummy-scrollbar-size,.os-viewport{-ms-overflow-style:scrollbar !important}
165
+ .os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar-corner,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner{display:none !important;width:0 !important;height:0 !important;visibility:hidden !important;background:transparent !important}
166
+ .os-content-glue{max-height:100%;max-width:100%;width:100%;pointer-events:none}
167
+ .os-padding{direction:inherit;position:absolute;overflow:visible;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto !important;height:auto !important;z-index:1}
168
+ .os-host-overflow>.os-padding{overflow:hidden}
169
+ .os-viewport{direction:inherit !important;box-sizing:inherit !important;resize:none !important;position:absolute;overflow:hidden;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}
170
+ .os-content-arrange{position:absolute;z-index:-1;min-height:1px;min-width:1px;pointer-events:none}
171
+ .os-content{direction:inherit;box-sizing:border-box !important;position:relative;display:block;height:100%;width:100%;height:100%;width:100%;visibility:visible}
172
+ .os-host-textarea>.os-padding>.os-content{overflow:hidden !important}
173
+ .os-content>.os-textarea{direction:inherit !important;float:none !important;margin:0 !important;max-height:none !important;max-width:none !important;border:none !important;border-radius:0 !important;background:transparent !important;outline:0 none transparent !important;overflow:hidden !important;resize:none !important;position:absolute !important;top:0 !important;left:0 !important;z-index:1;padding:0}
174
+ .os-host-rtl>.os-padding>.os-viewport>.os-content>.os-textarea{right:0 !important}
175
+ .os-content>.os-textarea-cover{z-index:-1;pointer-events:none}
176
+ .os-content>.os-textarea[wrap='off']{white-space:pre !important;margin:0 !important}
177
+ .os-text-inherit{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-align:inherit;text-shadow:inherit;text-overflow:inherit;letter-spacing:inherit;word-spacing:inherit;line-height:inherit;unicode-bidi:inherit;direction:inherit;color:inherit;cursor:text}
178
+ .os-resize-observer,.os-resize-observer-host{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}
179
+ .os-resize-observer-host{padding:inherit;border:inherit;border-color:transparent;border-style:solid;box-sizing:border-box}
180
+ .os-resize-observer-host:after{content:''}
181
+ .os-resize-observer-host>.os-resize-observer,.os-resize-observer-host:after{height:200%;width:200%;padding:inherit;border:inherit;margin:0;display:block;box-sizing:content-box}
182
+ .os-resize-observer.observed,object.os-resize-observer{box-sizing:border-box !important}
183
+ .os-size-auto-observer{box-sizing:inherit !important;height:100%;width:inherit;max-width:1px;position:relative;float:left;max-height:1px;margin-top:-1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none}
184
+ .os-size-auto-observer>.os-resize-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}
185
+ .os-resize-observer-item{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;z-index:-1;opacity:0;direction:ltr !important;-webkit-box-flex:0 !important;-ms-flex:none !important;-webkit-flex:none !important;flex:none !important}
186
+ .os-resize-observer-item-final{position:absolute;left:0;top:0;-webkit-transition:none !important;transition:none !important;-webkit-box-flex:0 !important;-ms-flex:none !important;-webkit-flex:none !important;flex:none !important}
187
+ .os-resize-observer{-webkit-animation-duration:.001s;animation-duration:.001s;-webkit-animation-name:hs-resize-observer-dummy-animation;animation-name:hs-resize-observer-dummy-animation}
188
+ .os-host-transition>.os-scrollbar,.os-host-transition>.os-scrollbar-corner{-webkit-transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s;transition:opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s}
189
+ html.os-html>.os-host>.os-scrollbar{position:absolute;z-index:999999}
190
+ .os-scrollbar,.os-scrollbar-corner{position:absolute;opacity:1;-ms-filter:'alpha(opacity=100)';z-index:1}
191
+ .os-scrollbar-corner{bottom:0;right:0}
192
+ .os-scrollbar-track{pointer-events:auto;position:relative;height:100%;width:100%;padding:0 !important;border:none !important}
193
+ .os-scrollbar-handle{pointer-events:auto;position:absolute;width:100%;height:100%;cursor:pointer}
194
+ .os-scrollbar-handle-off,.os-scrollbar-track-off{pointer-events:none}
195
+ .os-scrollbar.os-scrollbar-unusable,.os-scrollbar.os-scrollbar-unusable *{pointer-events:none !important}
196
+ .os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle{opacity:0 !important}
197
+ .os-scrollbar-horizontal{bottom:0;left:0}
198
+ .os-scrollbar-vertical{top:0;right:0}
199
+ .os-host-rtl>.os-scrollbar-horizontal{right:0}
200
+ .os-host-rtl>.os-scrollbar-vertical{right:auto;left:0}
201
+ .os-host-rtl>.os-scrollbar-corner{right:auto;left:0}
202
+ .os-scrollbar-auto-hidden,.os-padding+.os-scrollbar-corner,.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-corner,.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal,.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-corner,.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical+.os-scrollbar-corner,.os-scrollbar-horizontal+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner{opacity:0;visibility:hidden;pointer-events:none}
203
+ .os-scrollbar-corner-resize-both{cursor:nwse-resize}
204
+ .os-host-rtl>.os-scrollbar-corner-resize-both{cursor:nesw-resize}
205
+ .os-scrollbar-corner-resize-horizontal{cursor:ew-resize}
206
+ .os-scrollbar-corner-resize-vertical{cursor:ns-resize}
207
+ .os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize{cursor:default}
208
+ .os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-vertical{top:0;bottom:0}
209
+ .os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal{right:0;left:0}
210
+ .os-scrollbar:hover,.os-scrollbar-corner.os-scrollbar-corner-resize{opacity:1 !important;visibility:visible !important}
211
+ .os-scrollbar-corner.os-scrollbar-corner-resize{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB3aWR0aD0iMTAiICAgaGVpZ2h0PSIxMCIgICB2ZXJzaW9uPSIxLjEiPiAgPGcgICAgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAsLTEwNDIuMzYyMikiICAgICBzdHlsZT0iZGlzcGxheTppbmxpbmUiPiAgICA8cGF0aCAgICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eTowLjQ5NDExNzY1O2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lIiAgICAgICBkPSJtIDcuNDI0MjE4NywxMDQyLjM2MjIgYyAtMC43MjM1NzkyLDAgLTEuMzEwMTU2MiwwLjU4NjYgLTEuMzEwMTU2MiwxLjMxMDIgMCwwLjI5OSAwLjEwNDM0MTksMC41NzEgMC4yNzI5NDkyLDAuNzkxNSAwLjIwOTEwMjQsMC4xNDEzIDAuNDY1NjIwNiwwLjIxODQgMC43MzY5NjI5LDAuMjE4NCAwLjcyMzU3OTMsMCAxLjMxMDE1NjMsLTAuNTg2NiAxLjMxMDE1NjMsLTEuMzEwMiAwLC0wLjI3MTMgLTAuMDc3MDkzLC0wLjUyNzggLTAuMjE4MzU5NCwtMC43MzcgLTAuMjIwNDk0MSwtMC4xNjg2IC0wLjQ5MjU0NDMsLTAuMjcyOSAtMC43OTE1NTI4LC0wLjI3MjkgeiBtIDAsMy4wODQzIGMgLTAuNzIzNTc5MiwwIC0xLjMxMDE1NjIsMC41ODY2IC0xLjMxMDE1NjIsMS4zMTAyIDAsMC4yOTkgMC4xMDQzNDE5LDAuNTcxIDAuMjcyOTQ5MiwwLjc5MTUgMC4yMDkxMDI0LDAuMTQxMyAwLjQ2NTYyMDYsMC4yMTg0IDAuNzM2OTYyOSwwLjIxODQgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjYgMS4zMTAxNTYzLC0xLjMxMDIgMCwtMC4yNzEzIC0wLjA3NzA5MywtMC41Mjc4IC0wLjIxODM1OTQsLTAuNzM2OSAtMC4yMjA0OTQxLC0wLjE2ODYgLTAuNDkyNTQ0MywtMC4yNzMgLTAuNzkxNTUyOCwtMC4yNzMgeiBtIC0zLjA4NDMyNjEsMCBjIC0wLjcyMzU3OTMsMCAtMS4zMTAxNTYzLDAuNTg2NiAtMS4zMTAxNTYzLDEuMzEwMiAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MSAwLjI3Mjk0OTIsMC43OTE1IDAuMjA5MTAyNCwwLjE0MTMgMC40NjU2MjA3LDAuMjE4NCAwLjczNjk2MjksMC4yMTg0IDAuNzIzNTc5MywwIDEuMzEwMTU2MywtMC41ODY2IDEuMzEwMTU2MywtMS4zMTAyIDAsLTAuMjcxMyAtMC4wNzcwOTMsLTAuNTI3OCAtMC4yMTgzNTk0LC0wLjczNjkgLTAuMjIwNDk0LC0wLjE2ODYgLTAuNDkyNTQ0MiwtMC4yNzMgLTAuNzkxNTUyNywtMC4yNzMgeiBtIC0zLjAyOTczNjQsMy4wMjk4IEMgMC41ODY1NzY5MywxMDQ4LjQ3NjMgMCwxMDQ5LjA2MjggMCwxMDQ5Ljc4NjQgYyAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MTEgMC4yNzI5NDkyMiwwLjc5MTYgMC4yMDkxMDIyOSwwLjE0MTIgMC40NjU2MjA2NSwwLjIxODMgMC43MzY5NjI4OCwwLjIxODMgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjUgMS4zMTAxNTYzLC0xLjMxMDEgMCwtMC4yNzE0IC0wLjA3NzA5MywtMC41Mjc5IC0wLjIxODM1OTQsLTAuNzM3IC0wLjIyMDQ5NDEsLTAuMTY4NiAtMC40OTI1NDQzLC0wLjI3MjkgLTAuNzkxNTUyOCwtMC4yNzI5IHogbSAzLjAyOTczNjQsMCBjIC0wLjcyMzU3OTMsMCAtMS4zMTAxNTYzLDAuNTg2NSAtMS4zMTAxNTYzLDEuMzEwMSAwLDAuMjk5IDAuMTA0MzQxOSwwLjU3MTEgMC4yNzI5NDkyLDAuNzkxNiAwLjIwOTEwMjQsMC4xNDEyIDAuNDY1NjIwNywwLjIxODMgMC43MzY5NjI5LDAuMjE4MyAwLjcyMzU3OTMsMCAxLjMxMDE1NjMsLTAuNTg2NSAxLjMxMDE1NjMsLTEuMzEwMSAwLC0wLjI3MTQgLTAuMDc3MDkzLC0wLjUyNzkgLTAuMjE4MzU5NCwtMC43MzcgLTAuMjIwNDk0LC0wLjE2ODYgLTAuNDkyNTQ0MiwtMC4yNzI5IC0wLjc5MTU1MjcsLTAuMjcyOSB6IG0gMy4wODQzMjYxLDAgYyAtMC43MjM1NzkyLDAgLTEuMzEwMTU2MiwwLjU4NjUgLTEuMzEwMTU2MiwxLjMxMDEgMCwwLjI5OSAwLjEwNDM0MTksMC41NzExIDAuMjcyOTQ5MiwwLjc5MTYgMC4yMDkxMDI0LDAuMTQxMiAwLjQ2NTYyMDYsMC4yMTgzIDAuNzM2OTYyOSwwLjIxODMgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjUgMS4zMTAxNTYzLC0xLjMxMDEgMCwtMC4yNzE0IC0wLjA3NzA5MywtMC41Mjc5IC0wLjIxODM1OTQsLTAuNzM3IC0wLjIyMDQ5NDEsLTAuMTY4NiAtMC40OTI1NDQzLC0wLjI3MjkgLTAuNzkxNTUyOCwtMC4yNzI5IHoiLz4gIDwvZz4gIDxnICAgICBzdHlsZT0iZGlzcGxheTppbmxpbmUiPiAgICA8cGF0aCAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO2ZpbGwtcnVsZTpldmVub2RkO3N0cm9rZTpub25lIiAgICAgICBkPSJtIDguMjE1NzcxNSwwLjI3Mjk0OTIyIGMgMC4xNDEyNjY3LDAuMjA5MTAyMjkgMC4yMTgzNTk0LDAuNDY1NjIwNjUgMC4yMTgzNTk0LDAuNzM2OTYyODggMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDc2IC0wLjIwNTUxNzYsLTAuNzk3Nzk2NTkgLTAuNTE4NjAzNSwtMS4wMzcyMDY5OCB6IG0gMCwzLjA4NDMyNjE4IGMgMC4xNDEyNjY3LDAuMjA5MTAyMyAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MiAtMS4zMTAxNTYzLDEuMzEwMTU2MiAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTkzIDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY3IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogbSAtMy4wODQzMjYyLDAgYyAwLjE0MTI2NjcsMC4yMDkxMDIzIDAuMjE4MzU5NCwwLjQ2NTYyMDYgMC4yMTgzNTk0LDAuNzM2OTYyOSAwLDAuNzIzNTc5MyAtMC41ODY1NzcsMS4zMTAxNTYyIC0xLjMxMDE1NjMsMS4zMTAxNTYyIC0wLjI3MTM0MjIsMCAtMC41Mjc4NjA1LC0wLjA3NzA5MyAtMC43MzY5NjI5LC0wLjIxODM1OTMgMC4yMzk0MTA0LDAuMzEzMDg1OSAwLjYxMjYzNjMsMC41MTg2MDM1IDEuMDM3MjA3MSwwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYyLC0wLjU4NjU3NyAxLjMxMDE1NjIsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NSwtMC43OTc3OTY3IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogTSAyLjEwMTcwOSw2LjM4NzAxMTcgYyAwLjE0MTI2NjcsMC4yMDkxMDI0IDAuMjE4MzU5NCwwLjQ2NTYyMDYgMC4yMTgzNTk0LDAuNzM2OTYyOSAwLDAuNzIzNTc5MyAtMC41ODY1NzcsMS4zMTAxNTYzIC0xLjMxMDE1NjMsMS4zMTAxNTYzIC0wLjI3MTM0MjIzLDAgLTAuNTI3ODYwNTksLTAuMDc3MDkzIC0wLjczNjk2Mjg4LC0wLjIxODM1OTQgMC4yMzk0MTAzOSwwLjMxMzA4NTkgMC42MTI2MzYyMiwwLjUxODYwMzUgMS4wMzcyMDY5OCwwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHogbSAzLjAyOTczNjMsMCBjIDAuMTQxMjY2NywwLjIwOTEwMjQgMC4yMTgzNTk0LDAuNDY1NjIwNiAwLjIxODM1OTQsMC43MzY5NjI5IDAsMC43MjM1NzkzIC0wLjU4NjU3NywxLjMxMDE1NjMgLTEuMzEwMTU2MywxLjMxMDE1NjMgLTAuMjcxMzQyMiwwIC0wLjUyNzg2MDUsLTAuMDc3MDkzIC0wLjczNjk2MjksLTAuMjE4MzU5NCAwLjIzOTQxMDQsMC4zMTMwODU5IDAuNjEyNjM2MywwLjUxODYwMzUgMS4wMzcyMDcxLDAuNTE4NjAzNSAwLjcyMzU3OTMsMCAxLjMxMDE1NjIsLTAuNTg2NTc3IDEuMzEwMTU2MiwtMS4zMTAxNTYzIDAsLTAuNDI0NTcwOCAtMC4yMDU1MTc1LC0wLjc5Nzc5NjYgLTAuNTE4NjAzNSwtMS4wMzcyMDcgeiBtIDMuMDg0MzI2MiwwIGMgMC4xNDEyNjY3LDAuMjA5MTAyNCAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHoiIC8+ICA8L2c+PC9zdmc+);background-repeat:no-repeat;background-position:100% 100%;pointer-events:auto !important}
212
+ .os-host-rtl>.os-scrollbar-corner.os-scrollbar-corner-resize{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}
213
+ .os-host-overflow{overflow:hidden !important}
214
+ .os-theme-round-dark>.os-scrollbar{padding:0}
215
+ .os-theme-round-dark>.os-scrollbar-horizontal{right:20px;height:20px}
216
+ .os-theme-round-dark>.os-scrollbar-vertical{bottom:20px;width:20px}
217
+ .os-theme-round-dark.os-host-rtl>.os-scrollbar-horizontal{left:20px;right:0}
218
+ .os-theme-round-dark>.os-scrollbar-corner{height:20px;width:20px;background-color:transparent}
219
+ .os-theme-round-dark>.os-scrollbar>.os-scrollbar-track{background:transparent}
220
+ .os-theme-round-dark>.os-scrollbar-horizontal>.os-scrollbar-track:before,.os-theme-round-dark>.os-scrollbar-vertical>.os-scrollbar-track:before{content:'';display:block;position:absolute;background:#e0e5e9}
221
+ .os-theme-round-dark>.os-scrollbar-horizontal>.os-scrollbar-track:before{left:3px;right:3px;height:2px;top:50%;margin-top:-1px}
222
+ .os-theme-round-dark>.os-scrollbar-vertical>.os-scrollbar-track:before{top:3px;bottom:3px;width:2px;left:50%;margin-left:-1px}
223
+ .os-theme-round-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle{background:transparent}
224
+ .os-theme-round-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle:before{content:'';display:block;position:absolute;background:#e0e5e9;border-radius:20px;top:3px;bottom:3px;left:4px;right:3px;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}
225
+ .os-theme-round-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle:hover:before,.os-theme-round-dark>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle.active:before{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}
226
+ .os-theme-round-dark>.os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle{height:100%;min-width:40px;max-width:40px}
227
+ .os-theme-round-dark>.os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle{width:100%;min-height:40px;max-height:40px}
228
+ .os-theme-round-dark.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle:before{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}
229
+ @media screen and (min-width:783px){.envato-elements__wrapper--fixed .envato-elements__header{opacity:0;position:fixed;top:32px;z-index:10;-webkit-transition:opacity .2s;transition:opacity .2s}
230
+ .envato-elements__wrapper--fixed .envato-elements__header:before{content:"";position:absolute;background-color:#f1f1f1;left:-1px;right:-1px;top:-21px;height:20px}
231
+ .envato-elements__wrapper--fixed .envato-elements__header--set{opacity:1}
232
+ .envato-elements__wrapper--fixed .envato-elements__content{padding:60px 20px 20px}
233
+ }@media screen and (max-width:782px){.envato-elements__header-logo{max-width:61px;overflow:hidden;margin-right:20px}
234
+ .envato-elements__modal-inner{left:10px;right:10px}
235
+ .envato-elements__importer-wrapper{display:none}
236
+ }@-webkit-keyframes import-rotation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}
237
+ }@keyframes import-rotation{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}
238
+ }@-webkit-keyframes placeHolderShimmer{0%{opacity:1}
239
+ 50%{opacity:0}
240
+ to{opacity:1}
241
+ }@keyframes placeHolderShimmer{0%{opacity:1}
242
+ 50%{opacity:0}
243
+ to{opacity:1}
244
+ }@-webkit-keyframes hs-resize-observer-dummy-animation{from{z-index:0}
245
+ to{z-index:-1}
246
+ }@keyframes hs-resize-observer-dummy-animation{from{z-index:0}
247
+ to{z-index:-1}
248
+ }
assets/fonts/envato.eot ADDED
Binary file
assets/fonts/envato.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="envato" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M764.774 851.302c-24.013 13.312-92.774 5.12-175.462-20.48-144.64-98.816-266.65-244.48-275.149-478.31-1.587-5.581-15.821 0.768-18.637 2.56-39.066 74.803-54.528 153.6-21.914 267.315 6.093 10.138-13.824 22.579-17.357 18.995-7.168-7.168-36.966-38.963-56.781-73.318-98.202-170.394-33.997-388.71 137.83-484.25 171.776-95.693 388.813-33.894 484.454 137.933 110.746 198.298 7.936 593.357-56.986 629.555z" />
11
+ </font></defs></svg>
assets/fonts/envato.ttf ADDED
Binary file
assets/fonts/envato.woff ADDED
Binary file
assets/images/envato-elements-template-kits.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="318" height="24" viewBox="0 0 318 24" xmlns="http://www.w3.org/2000/svg"><title>envato-elements</title><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path d="M15.29 3.967c-.482-.267-1.865-.102-3.525.412-2.907 1.987-5.36 4.914-5.531 9.614-.031.113-.318-.015-.375-.05-.785-1.505-1.096-3.089-.44-5.374.122-.203-.277-.454-.35-.382-.143.144-.743.783-1.14 1.474-1.975 3.425-.684 7.813 2.77 9.733a7.158 7.158 0 0 0 9.737-2.771c2.224-3.987.158-11.927-1.146-12.656" fill="#7AAC41"/><path d="M27.651 5.88c-4.094 0-7.066 3.045-7.066 7.239 0 4.228 2.964 7.181 7.209 7.181 2.144 0 3.842-.67 5.191-2.051.404-.435.447-.854.447-1.015 0-.684-.509-1.18-1.21-1.18-.352 0-.648.133-.986.446-.765.712-1.771 1.44-3.442 1.44-2.324 0-4.213-1.744-4.332-3.984h9.247c1.006 0 1.494-.47 1.494-1.437 0-.285 0-.49-.057-.896-.498-3.596-2.926-5.742-6.495-5.742zm0 2.246c2.22 0 3.645 1.415 3.733 3.699h-7.92c.208-2.114 1.995-3.699 4.187-3.699zM43.034 5.88c-1.86 0-3.702 1.07-4.421 2.555v-.917c0-1.422-1.103-1.494-1.323-1.494-.653 0-1.351.392-1.351 1.494v11.088c0 1.476 1.173 1.55 1.408 1.55.235 0 1.409-.074 1.409-1.55v-5.944c0-2.586 1.465-4.393 3.564-4.393 2.031 0 3.02 1.334 3.02 4.078v6.259c0 1.476 1.174 1.55 1.409 1.55.235 0 1.408-.074 1.408-1.55V11.46c0-2.698-1.346-5.58-5.123-5.58M60.903 6.024c-.651 0-1.123.38-1.405 1.127l-3.854 9.691-3.824-9.691c-.3-.759-.768-1.127-1.433-1.127-.777 0-1.409.606-1.409 1.351 0 .184.021.423.177.797l4.43 10.458c.527 1.262 1.395 1.527 2.03 1.527.636 0 1.505-.265 2.034-1.526l4.458-10.517c.152-.368.175-.64.175-.768 0-.753-.593-1.322-1.38-1.322M69.094 5.88c-1.802 0-3.48.503-4.725 1.413-.422.291-.627.654-.627 1.111 0 .629.48 1.122 1.095 1.122.265 0 .563-.106.835-.297 1.07-.713 2.076-1.046 3.164-1.046 2.083 0 3.279 1.06 3.279 2.907v.306c-4.676.005-9.43.57-9.43 4.637 0 2.928 2.501 4.238 4.98 4.238 1.975 0 3.551-.782 4.563-2.263v.712c0 1.06.713 1.437 1.324 1.437.128 0 1.265-.04 1.265-1.437v-7.458c0-3.37-2.14-5.381-5.723-5.381zm2.428 7.59h.593v.649c0 2.373-1.512 3.907-3.85 3.907-.635 0-2.706-.148-2.706-2.05 0-2.246 3.403-2.506 5.963-2.506zM82.153 8.583c1.232 0 1.295-.959 1.295-1.15 0-.571-.34-1.18-1.295-1.18h-2.535V3.688c0-1.145-.743-1.552-1.38-1.552-.235 0-1.408.075-1.408 1.552v12.173c0 2.81 1.386 4.295 4.008 4.295.679 0 1.34-.12 1.772-.322.496-.247.78-.654.78-1.115 0-.651-.472-1.123-1.123-1.123-.126 0-.305.03-.502.088-.24.06-.404.084-.583.084-1.067 0-1.564-.697-1.564-2.193V8.583h2.535M91.468 5.88c-4.26 0-7.352 3.02-7.352 7.181 0 2.026.749 3.872 2.108 5.198 1.35 1.316 3.211 2.041 5.244 2.041 4.208 0 7.38-3.112 7.38-7.239 0-4.16-3.104-7.18-7.38-7.18zm0 12.032c-2.922 0-4.45-2.44-4.45-4.851 0-3.312 2.307-4.82 4.45-4.82 2.143 0 4.45 1.508 4.45 4.82 0 3.333-2.307 4.85-4.45 4.85z" fill="#131412"/><path d="M107.395 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.809 3.55.54 1.073 1.3 1.93 2.26 2.547.962.62 2.035.935 3.188.935 2.09 0 3.694-.786 4.766-2.336a.421.421 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.574.084c-.441.565-.952.987-1.517 1.254-.568.27-1.276.406-2.104.406a4.267 4.267 0 0 1-2.374-.717c-.734-.481-1.318-1.155-1.737-2.004a6.298 6.298 0 0 1-.64-2.82v-.304h9.565a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.2-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.744 0 1.423.195 2.02.579.601.387 1.08.94 1.427 1.642.314.64.49 1.335.523 2.073h-8.377zM115.716.386h-.665a.42.42 0 0 0-.42.42V19.72c0 .233.188.42.42.42h.665a.42.42 0 0 0 .42-.42V.807a.42.42 0 0 0-.42-.42M123.885 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.809 3.55.54 1.073 1.3 1.93 2.258 2.547.964.62 2.037.935 3.19.935 2.09 0 3.694-.786 4.766-2.336a.42.42 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.574.084c-.441.564-.952.986-1.518 1.254-.568.27-1.275.406-2.103.406a4.269 4.269 0 0 1-2.374-.717c-.734-.481-1.319-1.155-1.738-2.004a6.302 6.302 0 0 1-.64-2.82v-.304h9.566a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.2-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.754 0 1.414.19 2.02.579.6.387 1.08.94 1.426 1.642.314.64.49 1.336.524 2.073h-8.377zM146.07 5.69c-1.177 0-2.255.31-3.207.923a5.376 5.376 0 0 0-1.582 1.544c-.288-.713-.713-1.266-1.27-1.653-.779-.54-1.781-.814-2.979-.814-1.101 0-2.119.325-3.024.964-.483.34-.908.758-1.271 1.25V6.358a.42.42 0 0 0-.42-.42h-.677a.42.42 0 0 0-.42.42v13.322c0 .233.187.421.42.421h.676a.42.42 0 0 0 .42-.42v-8.373a6.08 6.08 0 0 1 1.018-2.355c.851-1.182 1.911-1.756 3.241-1.756 1.133 0 1.957.281 2.45.837.507.57.767 1.48.774 2.703v8.943c0 .233.188.421.42.421h.666a.42.42 0 0 0 .42-.42l-.001-8.827c.043-.597.313-1.234.804-1.895.869-1.163 2.017-1.74 3.51-1.762 1.144-.02 1.93.272 2.436.877.52.62.783 1.62.783 2.971v8.635c0 .233.188.421.42.421h.665a.42.42 0 0 0 .42-.42v-8.695c-.008-1.721-.401-3.042-1.167-3.93-.782-.906-1.968-1.365-3.525-1.365M158.598 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.808 3.55.54 1.073 1.3 1.93 2.26 2.547.964.62 2.036.935 3.188.935 2.09 0 3.695-.786 4.767-2.336a.421.421 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.575.084c-.44.565-.951.987-1.517 1.255-.567.27-1.275.405-2.104.405a4.265 4.265 0 0 1-2.373-.717c-.733-.48-1.317-1.155-1.738-2.004a6.307 6.307 0 0 1-.64-2.82v-.304h9.566a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.199-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.754 0 1.414.19 2.02.579.6.387 1.08.94 1.426 1.642.315.64.49 1.336.523 2.073h-8.376zM171.773 5.667a5.18 5.18 0 0 0-3.05.976c-.48.34-.9.747-1.258 1.22v-1.53a.42.42 0 0 0-.42-.42h-.666a.42.42 0 0 0-.42.42v13.323c0 .232.189.42.42.42h.666a.42.42 0 0 0 .42-.42V11.18c.279-1.181.809-2.157 1.577-2.902.767-.744 1.648-1.105 2.694-1.105 1.112 0 1.923.295 2.411.876.507.605.768 1.58.776 2.898v8.709c0 .232.188.42.42.42h.665c.232 0 .42-.188.42-.42V10.96c-.008-1.728-.397-3.051-1.154-3.935-.774-.901-1.952-1.359-3.501-1.359M184.734 18.611c-1.342.192-2.098.14-2.457-.387-.258-.38-.389-1.005-.389-1.86V7.32h2.61a.42.42 0 0 0 .42-.42v-.665a.42.42 0 0 0-.42-.42h-2.61V2.639a.42.42 0 0 0-.42-.421h-.677a.42.42 0 0 0-.42.42v3.176h-2.042a.42.42 0 0 0-.421.42v.664c0 .233.188.42.42.42h2.043v9.135c.01 1.266.247 2.181.728 2.8.5.644 1.312.97 2.413.97.713 0 1.215-.057 1.535-.173a.42.42 0 0 0 .27-.468l-.11-.628a.422.422 0 0 0-.473-.343M196.209 14.357c-.326-.534-.848-.997-1.552-1.376-.67-.361-1.583-.677-2.714-.939-1.065-.246-1.881-.503-2.426-.764-.51-.243-.876-.511-1.088-.795-.198-.265-.298-.655-.298-1.159 0-.629.279-1.142.853-1.571.604-.452 1.451-.68 2.52-.68 1.111 0 2.017.272 2.693.808.655.519.973 1.145.973 1.911 0 .232.188.42.42.42h.678a.42.42 0 0 0 .42-.42c0-1.295-.493-2.34-1.465-3.107-.942-.741-2.194-1.118-3.72-1.118-1.41 0-2.58.349-3.475 1.035-.93.713-1.402 1.637-1.402 2.747 0 1.092.376 1.968 1.12 2.604.708.605 1.901 1.08 3.645 1.452 2.56.541 3.804 1.485 3.804 2.889 0 .653-.31 1.2-.946 1.676-.665.496-1.556.747-2.647.747-1.205 0-2.163-.238-2.847-.708-.654-.449-1-1.06-1.056-1.868a.42.42 0 0 0-.42-.39h-.664a.42.42 0 0 0-.42.42c0 1.203.519 2.196 1.542 2.953.985.73 2.285 1.1 3.865 1.1 1.48 0 2.704-.352 3.636-1.044.971-.721 1.463-1.688 1.463-2.874 0-.757-.166-1.412-.492-1.949" fill="#7AAC41"/></g><path fill="#81B441" fill-rule="nonzero" d="M203.862 1.785h112.451V21.71h-112.45z"/><path d="M213.01 16.71a.313.313 0 0 1-.323-.321V8.115h-2.702a.313.313 0 0 1-.322-.322v-.546c0-.103.03-.185.091-.245a.313.313 0 0 1 .231-.091h6.72c.103 0 .182.03.238.09.056.061.084.143.084.246v.546a.313.313 0 0 1-.322.322h-2.688v8.274c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-.672zm5.921 0a.29.29 0 0 1-.224-.09.327.327 0 0 1-.084-.231V7.247c0-.103.028-.185.084-.245a.29.29 0 0 1 .224-.091h5.754c.103 0 .185.03.245.09.061.061.091.143.091.246v.504a.29.29 0 0 1-.09.224.347.347 0 0 1-.246.084h-4.774v3.122h4.466c.103 0 .185.03.245.09.061.061.091.143.091.246v.476c0 .093-.03.17-.09.23a.331.331 0 0 1-.246.092h-4.466v3.234h4.886c.103 0 .185.03.245.09.061.061.091.143.091.246v.504c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-5.866zm8.484 0a.313.313 0 0 1-.322-.321V7.247c0-.103.028-.185.084-.245a.308.308 0 0 1 .238-.091h.658c.168 0 .285.07.35.21l2.982 5.726 3.01-5.726a.36.36 0 0 1 .336-.21h.658c.103 0 .182.03.238.09.056.061.084.143.084.246v9.142a.313.313 0 0 1-.322.322h-.644a.29.29 0 0 1-.224-.091.327.327 0 0 1-.084-.231V9.43l-2.394 4.634c-.093.196-.242.294-.448.294h-.42c-.196 0-.345-.098-.448-.294l-2.38-4.634v6.958a.313.313 0 0 1-.322.322h-.63zm11.088 0a.29.29 0 0 1-.224-.09.327.327 0 0 1-.084-.231V7.247c0-.103.028-.185.084-.245a.29.29 0 0 1 .224-.091h3.542c1.055 0 1.883.254 2.485.763.602.508.903 1.248.903 2.219 0 .97-.3 1.708-.903 2.212-.602.504-1.43.756-2.485.756h-2.52v3.528a.313.313 0 0 1-.322.322h-.7zm3.472-4.983c1.41 0 2.114-.612 2.114-1.834 0-.598-.175-1.055-.525-1.372-.35-.318-.88-.476-1.589-.476h-2.45v3.682h2.45zm5.502 4.984a.29.29 0 0 1-.224-.091.327.327 0 0 1-.084-.231V7.233c0-.094.028-.17.084-.231a.29.29 0 0 1 .224-.091h.7a.29.29 0 0 1 .224.09c.056.061.084.138.084.232v8.302h4.676c.103 0 .185.03.245.09.061.061.091.138.091.232v.532c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-5.684zm6.874 0a.269.269 0 0 1-.196-.084.269.269 0 0 1-.084-.196l.028-.154 3.472-9.058c.075-.206.224-.308.448-.308h.896c.224 0 .374.102.448.308l3.472 9.058.028.154a.26.26 0 0 1-.09.196.292.292 0 0 1-.204.084h-.658a.37.37 0 0 1-.35-.238l-.784-2.016h-4.634l-.77 2.016c-.074.158-.191.238-.35.238h-.672zm2.198-3.416h3.836l-1.918-5.026-1.918 5.026zm9.254 3.416a.313.313 0 0 1-.322-.322V8.115h-2.702a.313.313 0 0 1-.322-.322v-.546c0-.103.03-.185.091-.245a.313.313 0 0 1 .231-.091h6.72c.103 0 .182.03.238.09.056.061.084.143.084.246v.546a.313.313 0 0 1-.322.322h-2.688v8.274c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-.672zm5.922 0a.29.29 0 0 1-.224-.091.327.327 0 0 1-.084-.231V7.247c0-.103.028-.185.084-.245a.29.29 0 0 1 .224-.091h5.754c.103 0 .185.03.245.09.061.061.091.143.091.246v.504a.29.29 0 0 1-.09.224.347.347 0 0 1-.246.084h-4.774v3.122h4.466c.103 0 .185.03.245.09.061.061.091.143.091.246v.476c0 .093-.03.17-.09.23a.331.331 0 0 1-.246.092h-4.466v3.234h4.886c.103 0 .185.03.245.09.061.061.091.143.091.246v.504c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-5.866zm11.914 0a.29.29 0 0 1-.224-.091.327.327 0 0 1-.084-.231V7.247c0-.103.028-.185.084-.245a.29.29 0 0 1 .224-.091h.658c.103 0 .185.03.245.09.061.061.091.143.091.246v3.486l3.794-3.598a.743.743 0 0 1 .546-.224h.7c.075 0 .14.028.196.084a.269.269 0 0 1 .084.196.246.246 0 0 1-.07.182l-4.368 4.228 4.662 4.634c.047.056.07.121.07.196 0 .074-.028.14-.084.196a.269.269 0 0 1-.196.084h-.728a.631.631 0 0 1-.308-.063 1.95 1.95 0 0 1-.238-.161l-4.06-3.962v3.864c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-.658zm8.372 0a.29.29 0 0 1-.224-.091.327.327 0 0 1-.084-.231V7.233c0-.094.028-.17.084-.231a.29.29 0 0 1 .224-.091h.7c.103 0 .182.028.238.084.056.056.084.135.084.238v9.156a.313.313 0 0 1-.322.322h-.7zm5.95 0a.313.313 0 0 1-.322-.322V8.115h-2.702a.313.313 0 0 1-.322-.322v-.546c0-.103.03-.185.091-.245a.313.313 0 0 1 .231-.091h6.72c.103 0 .182.03.238.09.056.061.084.143.084.246v.546a.313.313 0 0 1-.322.322h-2.688v8.274c0 .093-.032.17-.098.23a.337.337 0 0 1-.238.092h-.672zm8.68.14c-.765 0-1.43-.122-1.995-.364-.564-.243-.994-.563-1.288-.96a2.272 2.272 0 0 1-.469-1.28c0-.075.028-.14.084-.196a.285.285 0 0 1 .21-.084h.686c.168 0 .285.093.35.28.084.392.325.73.721 1.015.397.284.964.427 1.701.427.794 0 1.386-.14 1.778-.42.392-.28.588-.668.588-1.162 0-.318-.095-.579-.287-.784-.191-.206-.476-.385-.854-.54-.378-.153-.945-.342-1.7-.566-.72-.206-1.291-.425-1.716-.658-.424-.234-.744-.52-.959-.861-.214-.34-.322-.773-.322-1.295 0-.504.136-.955.406-1.351.271-.397.663-.71 1.176-.938.514-.229 1.12-.343 1.82-.343.728 0 1.351.128 1.87.385.517.256.912.578 1.182.966.271.387.416.777.434 1.169a.285.285 0 0 1-.294.294h-.7a.355.355 0 0 1-.21-.07.382.382 0 0 1-.14-.21c-.056-.402-.28-.733-.672-.994-.392-.262-.882-.392-1.47-.392-.634 0-1.138.123-1.512.37-.373.248-.56.614-.56 1.1 0 .326.087.592.26.798.172.205.438.387.797.546.36.158.885.34 1.575.546.794.224 1.417.448 1.87.672.452.224.79.501 1.014.833.224.331.336.758.336 1.28 0 .878-.333 1.562-1 2.052-.668.49-1.571.735-2.71.735z" fill="#FFF"/></g></svg>
assets/images/envato-elements.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250.00001 20" height="20" width="250"><title>Envato elements black</title><g fill="none" fill-rule="evenodd"><path d="M12.29 3.967c-.482-.267-1.865-.102-3.525.412-2.907 1.987-5.36 4.914-5.531 9.614-.031.113-.318-.015-.375-.05-.785-1.505-1.096-3.089-.44-5.374.122-.203-.277-.454-.35-.382-.143.144-.743.783-1.14 1.474-1.975 3.425-.684 7.813 2.77 9.733a7.158 7.158 0 0 0 9.737-2.771c2.224-3.987.158-11.927-1.146-12.656" fill="#7aac41"/><path d="M24.651 5.88c-4.094 0-7.066 3.045-7.066 7.239 0 4.228 2.964 7.181 7.209 7.181 2.144 0 3.842-.67 5.191-2.051.404-.435.447-.854.447-1.015 0-.684-.509-1.18-1.21-1.18-.352 0-.648.133-.986.446-.765.712-1.771 1.44-3.442 1.44-2.324 0-4.213-1.744-4.332-3.984h9.247c1.006 0 1.494-.47 1.494-1.437 0-.285 0-.49-.057-.896-.498-3.596-2.926-5.742-6.495-5.742zm0 2.246c2.22 0 3.645 1.415 3.733 3.699h-7.92c.208-2.114 1.995-3.699 4.187-3.699zM40.034 5.88c-1.86 0-3.702 1.07-4.421 2.555v-.917c0-1.422-1.103-1.494-1.323-1.494-.653 0-1.351.392-1.351 1.494v11.088c0 1.476 1.173 1.55 1.408 1.55.235 0 1.409-.074 1.409-1.55v-5.944c0-2.586 1.465-4.393 3.564-4.393 2.031 0 3.02 1.334 3.02 4.078v6.259c0 1.476 1.174 1.55 1.409 1.55.235 0 1.408-.074 1.408-1.55V11.46c0-2.698-1.346-5.58-5.123-5.58M57.903 6.024c-.651 0-1.123.38-1.405 1.127l-3.854 9.691-3.824-9.691c-.3-.759-.768-1.127-1.433-1.127-.777 0-1.409.606-1.409 1.351 0 .184.021.423.177.797l4.43 10.458c.527 1.262 1.395 1.527 2.03 1.527.636 0 1.505-.265 2.034-1.526l4.458-10.517c.152-.368.175-.64.175-.768 0-.753-.593-1.322-1.38-1.322M66.094 5.88c-1.802 0-3.48.503-4.725 1.413-.422.291-.627.654-.627 1.111 0 .629.48 1.122 1.095 1.122.265 0 .563-.106.835-.297 1.07-.713 2.076-1.046 3.164-1.046 2.083 0 3.279 1.06 3.279 2.907v.306c-4.676.005-9.43.57-9.43 4.637 0 2.928 2.501 4.238 4.98 4.238 1.975 0 3.551-.782 4.563-2.263v.712c0 1.06.713 1.437 1.324 1.437.128 0 1.265-.04 1.265-1.437v-7.458c0-3.37-2.14-5.381-5.723-5.381zm2.428 7.59h.593v.649c0 2.373-1.512 3.907-3.85 3.907-.635 0-2.706-.148-2.706-2.05 0-2.246 3.403-2.506 5.963-2.506zM79.153 8.583c1.232 0 1.295-.959 1.295-1.15 0-.571-.34-1.18-1.295-1.18h-2.535V3.688c0-1.145-.743-1.552-1.38-1.552-.235 0-1.408.075-1.408 1.552v12.173c0 2.81 1.386 4.295 4.008 4.295.679 0 1.34-.12 1.772-.322.496-.247.78-.654.78-1.115 0-.651-.472-1.123-1.123-1.123-.126 0-.305.03-.502.088-.24.06-.404.084-.583.084-1.067 0-1.564-.697-1.564-2.193V8.583h2.535M88.468 5.88c-4.26 0-7.352 3.02-7.352 7.181 0 2.026.749 3.872 2.108 5.198 1.35 1.316 3.211 2.041 5.244 2.041 4.208 0 7.38-3.112 7.38-7.239 0-4.16-3.104-7.18-7.38-7.18zm0 12.032c-2.922 0-4.45-2.44-4.45-4.851 0-3.312 2.307-4.82 4.45-4.82 2.143 0 4.45 1.508 4.45 4.82 0 3.333-2.307 4.85-4.45 4.85z" fill="#131412"/><path d="M104.395 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.809 3.55.54 1.073 1.3 1.93 2.26 2.547.962.62 2.035.935 3.188.935 2.09 0 3.694-.786 4.766-2.336a.421.421 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.574.084c-.441.565-.952.987-1.517 1.254-.568.27-1.276.406-2.104.406a4.267 4.267 0 0 1-2.374-.717c-.734-.481-1.318-1.155-1.737-2.004a6.298 6.298 0 0 1-.64-2.82v-.304h9.565a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.2-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.744 0 1.423.195 2.02.579.601.387 1.08.94 1.427 1.642.314.64.49 1.335.523 2.073h-8.377zM112.716.386h-.665a.42.42 0 0 0-.42.42V19.72c0 .233.188.42.42.42h.665a.42.42 0 0 0 .42-.42V.807a.42.42 0 0 0-.42-.42M120.885 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.809 3.55.54 1.073 1.3 1.93 2.258 2.547.964.62 2.037.935 3.19.935 2.09 0 3.694-.786 4.766-2.336a.42.42 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.574.084c-.441.564-.952.986-1.518 1.254-.568.27-1.275.406-2.103.406a4.269 4.269 0 0 1-2.374-.717c-.734-.481-1.319-1.155-1.738-2.004a6.302 6.302 0 0 1-.64-2.82v-.304h9.566a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.2-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.754 0 1.414.19 2.02.579.6.387 1.08.94 1.426 1.642.314.64.49 1.336.524 2.073h-8.377zM143.07 5.69c-1.177 0-2.255.31-3.207.923a5.376 5.376 0 0 0-1.582 1.544c-.288-.713-.713-1.266-1.27-1.653-.779-.54-1.781-.814-2.979-.814-1.101 0-2.119.325-3.024.964-.483.34-.908.758-1.271 1.25V6.358a.42.42 0 0 0-.42-.42h-.677a.42.42 0 0 0-.42.42v13.322c0 .233.187.421.42.421h.676a.42.42 0 0 0 .42-.42v-8.373a6.08 6.08 0 0 1 1.018-2.355c.851-1.182 1.911-1.756 3.241-1.756 1.133 0 1.957.281 2.45.837.507.57.767 1.48.774 2.703v8.943c0 .233.188.421.42.421h.666a.42.42 0 0 0 .42-.42l-.001-8.827c.043-.597.313-1.234.804-1.895.869-1.163 2.017-1.74 3.51-1.762 1.144-.02 1.93.272 2.436.877.52.62.783 1.62.783 2.971v8.635c0 .233.188.421.42.421h.665a.42.42 0 0 0 .42-.42v-8.695c-.008-1.721-.401-3.042-1.167-3.93-.782-.906-1.968-1.365-3.525-1.365M155.598 5.567a5.416 5.416 0 0 0-3.053.933c-.92.614-1.654 1.479-2.177 2.569-.517 1.078-.78 2.278-.78 3.567v.555c0 1.292.272 2.486.808 3.55.54 1.073 1.3 1.93 2.26 2.547.964.62 2.036.935 3.188.935 2.09 0 3.695-.786 4.767-2.336a.421.421 0 0 0-.103-.582l-.468-.332a.42.42 0 0 0-.575.084c-.44.565-.951.987-1.517 1.255-.567.27-1.275.405-2.104.405a4.265 4.265 0 0 1-2.373-.717c-.733-.48-1.317-1.155-1.738-2.004a6.307 6.307 0 0 1-.64-2.82v-.304h9.566a.42.42 0 0 0 .42-.42v-.702c0-1.822-.512-3.32-1.522-4.454-1.023-1.147-2.355-1.73-3.959-1.73zm-4.407 5.8c.199-1.19.674-2.19 1.414-2.98.828-.885 1.806-1.314 2.993-1.314.754 0 1.414.19 2.02.579.6.387 1.08.94 1.426 1.642.315.64.49 1.336.523 2.073h-8.376zM168.773 5.667a5.18 5.18 0 0 0-3.05.976c-.48.34-.9.747-1.258 1.22v-1.53a.42.42 0 0 0-.42-.42h-.666a.42.42 0 0 0-.42.42v13.323c0 .232.189.42.42.42h.666a.42.42 0 0 0 .42-.42V11.18c.279-1.181.809-2.157 1.577-2.902.767-.744 1.648-1.105 2.694-1.105 1.112 0 1.923.295 2.411.876.507.605.768 1.58.776 2.898v8.709c0 .232.188.42.42.42h.665c.232 0 .42-.188.42-.42V10.96c-.008-1.728-.397-3.051-1.154-3.935-.774-.901-1.952-1.359-3.501-1.359M181.734 18.611c-1.342.192-2.098.14-2.457-.387-.258-.38-.389-1.005-.389-1.86V7.32h2.61a.42.42 0 0 0 .42-.42v-.665a.42.42 0 0 0-.42-.42h-2.61V2.639a.42.42 0 0 0-.42-.421h-.677a.42.42 0 0 0-.42.42v3.176h-2.042a.42.42 0 0 0-.421.42v.664c0 .233.188.42.42.42h2.043v9.135c.01 1.266.247 2.181.728 2.8.5.644 1.312.97 2.413.97.713 0 1.215-.057 1.535-.173a.42.42 0 0 0 .27-.468l-.11-.628a.422.422 0 0 0-.473-.343M193.209 14.357c-.326-.534-.848-.997-1.552-1.376-.67-.361-1.583-.677-2.714-.939-1.065-.246-1.881-.503-2.426-.764-.51-.243-.876-.511-1.088-.795-.198-.265-.298-.655-.298-1.159 0-.629.279-1.142.853-1.571.604-.452 1.451-.68 2.52-.68 1.111 0 2.017.272 2.693.808.655.519.973 1.145.973 1.911 0 .232.188.42.42.42h.678a.42.42 0 0 0 .42-.42c0-1.295-.493-2.34-1.465-3.107-.942-.741-2.194-1.118-3.72-1.118-1.41 0-2.58.349-3.475 1.035-.93.713-1.402 1.637-1.402 2.747 0 1.092.376 1.968 1.12 2.604.708.605 1.901 1.08 3.645 1.452 2.56.541 3.804 1.485 3.804 2.889 0 .653-.31 1.2-.946 1.676-.665.496-1.556.747-2.647.747-1.205 0-2.163-.238-2.847-.708-.654-.449-1-1.06-1.056-1.868a.42.42 0 0 0-.42-.39h-.664a.42.42 0 0 0-.42.42c0 1.203.519 2.196 1.542 2.953.985.73 2.285 1.1 3.865 1.1 1.48 0 2.704-.352 3.636-1.044.971-.721 1.463-1.688 1.463-2.874 0-.757-.166-1.412-.492-1.949" fill="#7aac41"/></g><path class="st0" fill="#81b441" d="M200.862 1.784h41.709V19.18h-41.71z"/><text style="line-height:125%" x="-1327.698" y="1299.634" font-weight="400" font-size="19.127" font-family="sans-serif" letter-spacing="0" word-spacing="0" transform="matrix(.61938 0 0 .61938 1028.777 -790.21)"><tspan x="-1327.698" y="1299.634" fill="#fff">BETA</tspan></text></svg>
assets/images/envato-logo-green.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 113.92469 129.95226" height="138.616" width="121.52"><path d="M97.135.994c-3.8-2.1-14.7-.8-27.8 3.2-23 15.7-42.3 38.8-43.7 75.9-.2.9-2.5-.1-3-.4-6.2-11.9-8.6-24.4-3.5-42.4 1-1.6-2.2-3.6-2.8-3-1.1 1.1-5.9 6.2-9 11.6-15.6 27-5.4 61.7 21.9 76.9 27.3 15.2 61.7 5.4 76.9-21.9 17.6-31.5 1.3-94.2-9-99.9z" class="st0" fill="#88b227"/></svg>
assets/images/envato-logo-white.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 21.000001" height="21" width="20"><path d="M16.097.634c-.525-.29-2.03-.11-3.839.441-3.176 2.168-5.84 5.358-6.034 10.48-.027.125-.345-.013-.414-.054-.856-1.643-1.188-3.37-.483-5.855.138-.22-.304-.497-.387-.414-.152.152-.815.856-1.243 1.602-2.154 3.728-.745 8.52 3.024 10.618a7.803 7.803 0 0 0 10.619-3.024c2.43-4.35.18-13.007-1.243-13.794z" class="st0" fill="#f0f5fa"/></svg>
assets/images/envato.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg"/>
assets/images/loader.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="38" height="38" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#CCC"><g transform="translate(1 1)" stroke-width="2" fill="none" fill-rule="evenodd"><circle cx="18" cy="18" r="18" stroke="#e5e5e5"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></svg>
assets/images/placeholder.jpg ADDED
Binary file
assets/images/thumbs-down.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M384 448q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm1152 576q0-35-21.5-81t-53.5-47q15-17 25-47.5t10-55.5q0-69-53-119 18-31 18-69 0-37-17.5-73.5T1396 479q5-30 5-56 0-85-49-126t-136-41h-128q-131 0-342 73-5 2-29 10.5T681.5 352t-35 11.5-38 11-33 6.5-31.5 3h-32v640h32q16 0 35.5 9t40 27 38.5 35.5 40 44 34.5 42.5 31.5 41 23 30q55 68 77 91 41 43 59.5 109.5T954 1579t38 85q96 0 128-47t32-145q0-59-48-160.5t-48-159.5h352q50 0 89-38.5t39-89.5zm128 1q0 103-76 179t-180 76h-176q48 99 48 192 0 118-35 186-35 69-102 101.5T992 1792q-51 0-90-37-34-33-54-82t-25.5-90.5T805 1498t-31-64q-48-50-107-127-101-131-137-155H256q-53 0-90.5-37.5T128 1024V384q0-53 37.5-90.5T256 256h288q22 0 138-40 128-44 223-66t200-22h112q140 0 226.5 79t85.5 216v5q60 77 60 178 0 22-3 43 38 67 38 144 0 36-9 69 49 73 49 163z"/></svg>
assets/images/thumbs-up.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M384 1344q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm1152-576q0-51-39-89.5t-89-38.5h-352q0-58 48-159.5t48-160.5q0-98-32-145t-128-47q-26 26-38 85t-30.5 125.5T864 448q-22 23-77 91-4 5-23 30t-31.5 41-34.5 42.5-40 44-38.5 35.5-40 27-35.5 9h-32v640h32q13 0 31.5 3t33 6.5 38 11 35 11.5 35.5 12.5 29 10.5q211 73 342 73h121q192 0 192-167 0-26-5-56 30-16 47.5-52.5t17.5-73.5-18-69q53-50 53-119 0-25-10-55.5t-25-47.5q32-1 53.5-47t21.5-81zm128-1q0 89-49 163 9 33 9 69 0 77-38 144 3 21 3 43 0 101-60 178 1 139-85 219.5t-227 80.5h-129q-96 0-189.5-22.5T682 1576q-116-40-138-40H256q-53 0-90.5-37.5T128 1408V768q0-53 37.5-90.5T256 640h274q36-24 137-155 58-75 107-128 24-25 35.5-85.5T840 145t62-108q39-37 90-37 84 0 151 32.5T1245 134t35 186q0 93-48 192h176q104 0 180 76t76 179z"/></svg>
assets/images/welcome-2.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 419 349"><style>.st0{opacity:.22;fill:#80b341}.st1,.st2{fill:none;stroke-width:3;stroke-miterlimit:10}.st1{stroke-linecap:round;stroke-linejoin:round;stroke:#80b341}.st2{stroke:#e1ecd3}.st3{fill:#e1ecd3}.st4{stroke-dasharray:2,6}.st4,.st5{fill:none;stroke:#e1ecd3;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10}.st6{stroke-width:2}.st6,.st7,.st8{fill:none;stroke:#80b341;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.st7{opacity:.22;stroke-width:6}.st8{stroke-width:4}#userCircle{stroke-dasharray:400;animation:userCircle-drawIn 2s forwards;animation-delay:.6s;stroke-dashoffset:1250}@keyframes userCircle-drawIn{to{stroke-dashoffset:1000}}#envatoCircle{animation:envatoCircle-fadeIn 2s forwards;animation-delay:.8s;opacity:0}@keyframes envatoCircle-fadeIn{to{opacity:1}}#envatoLeaf,#leafShadow{animation:envatoLeaf-drawIn .8s forwards;animation-delay:1.4s;opacity:0;transform:translateY(-10px)}@keyframes envatoLeaf-drawIn{to{transform:translateY(0);opacity:1}}#leafShadow{animation:leafShadow-moveIn .8s forwards;animation-delay:1.6s}@keyframes leafShadow-moveIn{to{transform:translateY(2px);opacity:1}}#userIcon{animation:userIcon-drawIn .7s forwards;animation-delay:1.4s;opacity:0;transform:translateY(10px)}@keyframes userIcon-drawIn{to{transform:translateY(0);opacity:1}}#lock__lock{animation:lock__lock-moveIn .8s forwards;animation-delay:1.2s;transform:translateX(20px);opacity:0}@keyframes lock__lock-moveIn{to{opacity:1;transform:translateX(0)}}#keyhole,#lock__lines{stroke-dasharray:120;animation:lock__lines-moveIn 1s forwards;animation-delay:1.4s;opacity:0;stroke-dashoffset:360}@keyframes lock__lines-moveIn{to{opacity:1;stroke-dasharray:120;stroke-dashoffset:260}}#keyhole{stroke-dasharray:10;animation:keyhole-drawIn .4s forwards;animation-delay:1.6s;stroke-dashoffset:10}@keyframes keyhole-drawIn{to{stroke-dasharray:10;opacity:1;stroke-dashoffset:20}}</style><path class="st0" d="M151.5 80.4c-2.5-1.2-9.6-.6-18.4 2.2-14.9 10.3-27.7 25.5-28.6 49.8-.3.6-1.6 0-1.9-.3-4-7.8-5.6-15.9-2.2-28 .6-.9-1.6-2.5-1.9-1.9-.6.6-3.7 4-5.9 7.8-10.3 17.7-3.4 40.5 14.3 50.4 18.1 10 40.5 3.4 50.4-14.3 11.6-20.9.7-61.9-5.8-65.7z" id="leafShadow"/><path class="st1" d="M147 75c-2.5-1.2-9.6-.6-18.4 2.2-14.9 10.3-27.7 25.5-28.6 49.8-.3.6-1.6 0-1.9-.3-4-7.8-5.6-15.9-2.2-28 .6-.9-1.6-2.5-1.9-1.9-.6.6-3.7 4-5.9 7.8-10.3 17.7-3.4 40.5 14.3 50.4 18.1 10 40.5 3.4 50.4-14.3 11.7-20.9.8-62-5.8-65.7z" id="envatoLeaf"/><g id="envatoCircle"><ellipse transform="rotate(-4.35 17.324 117.925) scale(.99998)" class="st2" cx="17.3" cy="117.9" rx="4.9" ry="4.9"/><ellipse transform="rotate(-4.35 21.902 151.484) scale(.99998)" class="st3" cx="21.9" cy="151.5" rx="2.9" ry="2.9"/><path class="st4" d="M237.7 129.5c-.6 9.8-2.5 19.7-5.8 29.5-6.6 19.2-18 35.5-32.5 47.8M163.7 19.3c31 10.6 54.1 33.8 65.8 61.8M103.4 16.1c5.6-1.3 11.3-2.1 17.1-2.5M37.4 60.8c13.2-19.1 31.9-33.3 53.1-40.9"/><ellipse transform="rotate(-4.35 234.848 93.513) scale(.99998)" class="st3" cx="234.9" cy="93.5" rx="4.9" ry="4.9"/><path class="st4" d="M37.6 187.1c-3.4-4.6-6.4-9.5-9.1-14.7"/><path class="st5" d="M104.8 230c-22.8-4.5-43.2-16.1-58.6-32.6"/></g><g id="userCircle"><path class="st1 circlePiece4" d="M161.8 272.4c-4.8-8.6-8.4-18-10.8-28-4.7-19.8-3.7-39.6 2-57.7"/><path class="st1 circlePiece3" d="M283.2 326.1c-31.9 7.5-63.8.3-88.6-17.2"/><path class="st1 circlePiece2" d="M335.9 296.7c-4 4.1-8.4 7.8-13.1 11.3"/><path class="st1 circlePiece1" d="M367.9 223.6c-.9 23.2-9.2 45.1-23.1 63"/><g><path class="st1" d="M193.9 131.9c8-5.7 17-10.4 26.7-13.8 19.2-6.8 39-8 57.6-4.4"/></g><ellipse transform="matrix(.06799 -.9977 .9977 .06799 153.657 402.687)" class="st6" cx="292.4" cy="119.1" rx="4.9" ry="4.9"/></g><path class="st1" d="M301.1 310.3c-6.7-14.8-26.3-25.6-33.3-25.6H264v-9.1h.4c1.5 0 3-.5 4.3-1.4 2.5-1.4 5.4-4.3 7.5-10.1 1.9-4 3.5-8.8 4.8-13.5.2 0 .3.1.5.1l1.1.1c2.7.2 5-1.7 5.2-4.4l3.7-11.8c.2-2.3-1.2-4.4-3.4-5v-22.7s.6-11.3-16.6-17.7l4.2-1.4s-4.2-2-11 0c0 0-1.1-2.5 2.3-4.2 0 0-14.6-.3-24.5 5.6l-.3-2.8s-22.5 3.4-23.6 20.3c-1.1 16.9 0 23.1 0 23.1h.3l-1.4.4c-2.6.7-4.1 3.4-3.4 5.9l5.7 10.9c.7 2.6 3.3 4.1 5.9 3.4 4.6 12.6 12.1 25.3 19.6 25.3h.6v9.1h-1.6c-7.7 0-24 8.1-32.8 19.9" id="userIcon"/><g id="lock__lines"><path class="st7" d="M361.5 157.9h46.2M361.5 176.3h34.8"/></g><g id="lock__lock"><path class="st1" d="M341 187.3h-21.9c-3.8 0-6.9-3.1-6.9-6.9v-17.8c0-3.8 3.1-6.9 6.9-6.9H341c3.8 0 6.9 3.1 6.9 6.9v17.8c0 3.8-3.1 6.9-6.9 6.9z"/><path class="st1" d="M312.2 164.7v-16.1c0-7.9 6.4-14.3 14.3-14.3h7.2c7.9 0 14.3 6.4 14.3 14.3v16.1"/></g><path class="st8" d="M330.1 168v7" id="keyhole"/></svg>
assets/images/welcome.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><style>.st0{fill:#e0edd2}.st1{fill:#e1ecd3}.st2{fill:#fff}.st3,.st4,.st5,.st6,.st7{fill:none;stroke-linecap:round;stroke-miterlimit:10}.st3{stroke-linejoin:round;stroke:#80b341;stroke-width:3}.st4,.st5,.st6,.st7{stroke:#e1ecd3;stroke-width:4}.st5,.st6,.st7{stroke:#e0edd2}.st6,.st7{stroke:#e1ecd3;stroke-width:5;stroke-linejoin:round}.st7{fill:#fff;stroke:#80b341;stroke-width:4}.st8{opacity:.22}.st9{fill:#81b441}.st10,.st11{fill:none;stroke:#80b341;stroke-width:3.0227;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.st11{stroke-width:4}#clouds,#mainCircle{stroke-dasharray:500;animation:mainCircle-drawIn 1.4s forwards;animation-delay:0s;stroke-dashoffset:500}@keyframes mainCircle-drawIn{to{stroke-dasharray:1000;stroke-dashoffset:500}}#clouds{animation:clouds-drawIn 2s forwards;animation-delay:.8s;opacity:0}@keyframes clouds-drawIn{to{stroke-dasharray:930;stroke-dashoffset:500;opacity:1}}#planetOutline,#planetShadow{animation:planetOutline-dropIn .8s forwards;animation-delay:.8s;opacity:0;transform:translateY(-20px)}@keyframes planetOutline-dropIn{to{transform:translateY(0);opacity:1}}#planetShadow{animation:planetShadow-moveIn .8s forwards;animation-delay:1s}@keyframes planetShadow-moveIn{to{transform:translateY(2px);opacity:1}}#rocketTrail{stroke-dasharray:150;animation:rocketTrail-moveIn .8s forwards;animation-delay:1.2s;opacity:0;stroke-dashoffset:690;transform:translateY(0)}@keyframes rocketTrail-moveIn{to{opacity:.6;transform:translateY(0);stroke-dasharray:150;stroke-dashoffset:690}}#rocketMain{animation:rocketMain-flyUp .7s forwards;animation-delay:1s;opacity:0;transform:translateY(70px)}@keyframes rocketMain-flyUp{to{transform:translateY(0);opacity:1}}#lock__lock{animation:lock__lock-moveIn .8s forwards;animation-delay:1.2s;transform:translateX(20px);opacity:0}@keyframes lock__lock-moveIn{to{opacity:1;transform:translateX(0)}}#keyhole,#lock__lines{animation:lock__lines-moveIn 1s forwards;animation-delay:1.4s;opacity:0;stroke-dasharray:120;stroke-dashoffset:360}@keyframes lock__lines-moveIn{to{opacity:1;stroke-dasharray:120;stroke-dashoffset:260}}#keyhole{stroke-dasharray:10;animation:keyhole-drawIn .4s forwards;animation-delay:1.6s;stroke-dashoffset:10}@keyframes keyhole-drawIn{to{stroke-dasharray:10;opacity:1;stroke-dashoffset:20}}</style><path class="st0" d="M339.9 182.9h-2.5v-2.5c0-.9-.8-1.7-1.7-1.7s-1.7.8-1.7 1.7v2.5h-2.5c-.9 0-1.7.8-1.7 1.7 0 .9.8 1.7 1.7 1.7h2.5v2.5c0 .9.8 1.7 1.7 1.7.4 0 .9-.2 1.2-.5.3-.3.5-.8.5-1.2v-2.5h2.5c.4 0 .9-.2 1.2-.5s.5-.8.5-1.2c0-1-.7-1.7-1.7-1.7z" id="star4"/><path class="st0" d="M291.6 16.2h-3.1v-3.1c0-1.2-1-2.2-2.2-2.2-1.2 0-2.2 1-2.2 2.2v3.1H281c-1.2 0-2.2 1-2.2 2.2s1 2.2 2.2 2.2h3.1v3.1c0 1.2 1 2.2 2.2 2.2.6 0 1.1-.2 1.5-.6.4-.4.6-1 .6-1.5v-3.1h3.1c.6 0 1.1-.2 1.5-.6.4-.4.6-1 .6-1.5.2-1.4-.8-2.4-2-2.4z" id="star3"/><path class="st1" d="M57.6 54h-3.1v-3.1c0-1.2-1-2.2-2.2-2.2s-2.2 1-2.2 2.2V54H47c-1.2 0-2.2 1-2.2 2.2s1 2.2 2.2 2.2h3.1v3.1c0 1.2 1 2.2 2.2 2.2.6 0 1.1-.2 1.5-.6.4-.4.6-1 .6-1.5v-3.1h3.1c.6 0 1.1-.2 1.5-.6.4-.4.6-1 .6-1.5.2-1.4-.8-2.4-2-2.4z" id="star2"/><path class="st0" d="M48.3 183.5h-2v-2c0-.8-.6-1.4-1.4-1.4-.8 0-1.4.6-1.4 1.4v2h-2c-.8 0-1.4.6-1.4 1.4s.6 1.4 1.4 1.4h2v2c0 .8.6 1.4 1.4 1.4.4 0 .7-.2 1-.4.3-.3.4-.6.4-1v-2h2c.4 0 .7-.2 1-.4.3-.3.4-.6.4-1 0-.8-.6-1.4-1.4-1.4z" id="star1"/><g id="planetShadow"><circle class="st0" cx="335.1" cy="108.5" r="35.3"/><circle class="st2" cx="323.8" cy="88.3" r="5.4"/><circle class="st2" cx="337.4" cy="82.9" r="2.7"/></g><g id="planetOutline"><path class="st3" d="M312.2 134.2c5.4 3.3 11.8 5.3 18.7 5.3 19.7 0 35.7-16 35.7-35.7s-16-35.7-35.7-35.7c-16 0-29.6 10.6-34.1 25.1"/><path class="st3" d="M323.8 123.8c2.2.8 4.4 1.6 6.6 2.3 24 7.8 44.9 7.5 48.3-1.2 2-5.2-2.7-12.4-11.7-19.5m-63-25.1c-11.6-1.8-20.3-.3-22.7 4.8-.7 1.5-.9 3.2-.5 5.1"/></g><g id="mainCircle"><path class="st4" d="M48.6 309.7c-18.2-28-28.8-61.4-28.8-97.3 0-98.8 80.1-178.9 178.9-178.9 36.8 0 71 11.1 99.5 30.2M103.1 363.6c-7.9-5-15.4-10.6-22.4-16.7"/><path class="st5" d="M368.1 154.5c6.2 18.2 9.6 37.6 9.6 57.9 0 98.8-80.1 178.9-178.9 178.9"/><circle class="st4" cx="115.3" cy="105.8" r="17.5"/><circle class="st4" cx="89.5" cy="154.5" r="13.1"/></g><path class="st6" d="M38.1 239.4c3.6-3 8.2-5 13.3-5 11.2 0 20.4 9.1 20.4 20.4v.8c1.9-.4 3.7-.6 5.6-.7 12.7-8.4 28-13.3 44.4-13.3 25.9 0 49 12.2 63.8 31.1 4.3-3 9.5-4.8 15.1-4.8 8.6 0 16.2 4.1 21 10.5 12.8-8.4 28-13.3 44.5-13.3 11.7 0 22.9 2.5 32.9 7 6.3-13.4 20-22.7 35.8-22.7 7.6 0 14.6 2.2 20.6 5.8" id="clouds"/><path class="st1" d="M185.5 275.7c4.3-3 9.5-4.8 15.1-4.7 7.6 0 14.4 3.3 19.2 8.4l.2-67.7-42.1-.2-.2 55.5c2.8 2.8 5.4 5.7 7.8 8.7z" id="rocketTrail"/><g id="rocketMain"><g id="rocketBody"><path id="path302_8_" class="st7" d="M199.33 8.226c-9.4 0-47.8 49.1-47.8 106.9 0 56.1 16.9 92.1 17.1 92.5.2.5.6.8 1.1 1 .4.2 10.6 3.7 29.6 3.7s29.1-3.5 29.6-3.7c.5-.2.9-.6 1.1-1 .1-.4 17-36.4 17-92.5.1-57.8-38.4-106.9-47.7-106.9"/></g><g id="noseCone" class="st8"><path id="path306_6_" class="st9" d="M227.31 41c-11.1-20.1-23.2-32.8-28-32.8-4.8 0-16.9 12.8-28 32.8 3.1.9 12.3 3.2 28 3.2s24.9-2.2 28-3.2"/></g><circle id="windowBig" class="st0" cx="202.4" cy="101.6" r="14.4"/><circle id="windowBigLine" class="st10" cx="199.3" cy="98.6" r="14.4"/><circle id="windowSmall" class="st0" cx="202.4" cy="152.7" r="10.5"/><circle id="windowSmallLine" class="st10" cx="199.3" cy="150.3" r="10.5"/><path id="wingLeft" class="st11" d="M168.5 208.5c-9.6-26.7-15.6-55.1-17.4-84.7-13.9 18-22.1 40.6-22.1 65.1 0 16.4 3.7 32 10.3 45.9 2.2-14.3 14.3-25.6 29.2-26.3z"/><path id="wingRight" class="st11" d="M230 208.5c9.6-26.7 15.6-55.1 17.4-84.7 13.9 18 22.1 40.6 22.1 65.1 0 16.4-3.7 32-10.3 45.9-2.2-14.3-14.3-25.6-29.2-26.3z"/></g></svg>
assets/js/app.min.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ !function(){function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}return t}()({1:[function(t,e,n){(function(n,r){"use strict";function o(e,o){function i(t){var e,n;for(e=0;t[e];e+=1)if(n=t[e],"."===n)t.splice(e,1),e-=1;else if(".."===n){if(1===e&&(".."===t[2]||".."===t[0]))break;e>0&&(t.splice(e-1,2),e-=2)}}function a(t,e){var n;return t&&"."===t.charAt(0)&&e&&(n=e.split("/"),n=n.slice(0,n.length-1),n=n.concat(t.split("/")),i(n),t=n.join("/")),t}function s(t){return function(e){return a(e,t)}}function c(t){function e(e){d[t]=e}return e.fromText=function(t,e){throw new Error("amdefine does not implement load.fromText")},e}function u(t,n,i){var a,s,c,u;if(t)s=d[t]={},c={id:t,uri:r,exports:s},a=f(o,s,c,t);else{if(m)throw new Error("amdefine with no module ID cannot be called more than once per file.");m=!0,s=e.exports,c=e,a=f(o,s,c,e.id)}n&&(n=n.map(function(t){return a(t)})),u="function"==typeof i?i.apply(c.exports,n):i,void 0!==u&&(c.exports=u,t&&(d[t]=c.exports))}function l(t,e,n){Array.isArray(t)?(n=e,e=t,t=void 0):"string"!=typeof t&&(n=t,t=e=void 0),e&&!Array.isArray(e)&&(n=e,e=void 0),e||(e=["require","exports","module"]),t?h[t]=[t,e,n]:u(t,e,n)}var f,p,h={},d={},m=!1,_=t("path");return f=function(t,e,r,o){function i(i,a){return"string"==typeof i?p(t,e,r,i,o):(i=i.map(function(n){return p(t,e,r,n,o)}),void(a&&n.nextTick(function(){a.apply(null,i)})))}return i.toUrl=function(t){return 0===t.indexOf(".")?a(t,_.dirname(r.filename)):t},i},o=o||function(){return e.require.apply(e,arguments)},p=function(t,e,n,r,o){var i,l,m=r.indexOf("!"),_=r;if(m===-1){if(r=a(r,o),"require"===r)return f(t,e,n,o);if("exports"===r)return e;if("module"===r)return n;if(d.hasOwnProperty(r))return d[r];if(h[r])return u.apply(null,h[r]),d[r];if(t)return t(_);throw new Error("No module with ID: "+r)}return i=r.substring(0,m),r=r.substring(m+1,r.length),l=p(t,e,n,i,o),r=l.normalize?l.normalize(r,s(o)):a(r,o),d[r]?d[r]:(l.load(r,f(t,e,n,o),c(r),{}),d[r])},l.require=function(t){return d[t]?d[t]:h[t]?(u.apply(null,h[t]),d[t]):void 0},l.amd={},l}e.exports=o}).call(this,t("_process"),"/node_modules/amdefine/amdefine.js")},{_process:379,path:378}],2:[function(t,e,n){(function(e){"use strict";function n(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(t("core-js/shim"),t("regenerator-runtime/runtime"),t("core-js/fn/regexp/escape"),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&n(Array,t,Function.call.bind([][t]))})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"core-js/fn/regexp/escape":5,"core-js/shim":328,"regenerator-runtime/runtime":3}],3:[function(t,e,n){(function(t){!function(t){"use strict";function n(t,e,n,r){var i=e&&e.prototype instanceof o?e:o,a=Object.create(i.prototype),s=new h(r||[]);return a._invoke=u(t,n,s),a}function r(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function o(){}function i(){}function a(){}function s(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(e){function n(t,o,i,a){var s=r(e[t],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&v.call(u,"__await")?Promise.resolve(u.__await).then(function(t){n("next",t,i,a)},function(t){n("throw",t,i,a)}):Promise.resolve(u).then(function(t){c.value=t,i(c)},a)}a(s.arg)}function o(t,e){function r(){return new Promise(function(r,o){n(t,e,r,o)})}return i=i?i.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var i;this._invoke=o}function u(t,e,n){var o=k;return function(i,a){if(o===E)throw new Error("Generator is already running");if(o===O){if("throw"===i)throw a;return m()}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=l(s,n);if(c){if(c===C)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===k)throw o=O,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=E;var u=r(t,e,n);if("normal"===u.type){if(o=n.done?O:P,u.arg===C)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=O,n.method="throw",n.arg=u.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===_){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=_,l(t,e),"throw"===e.method))return C;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return C}var o=r(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,C;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=_),e.delegate=null,C):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,C)}function f(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function h(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)}function d(t){if(t){var e=t[b];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function o(){for(;++n<t.length;)if(v.call(t,n))return o.value=t[n],o.done=!1,o;return o.value=_,o.done=!0,o};return r.next=r}}return{next:m}}function m(){return{value:_,done:!0}}var _,g=Object.prototype,v=g.hasOwnProperty,y="function"==typeof Symbol?Symbol:{},b=y.iterator||"@@iterator",w=y.asyncIterator||"@@asyncIterator",x=y.toStringTag||"@@toStringTag",S="object"==typeof e,j=t.regeneratorRuntime;if(j)return void(S&&(e.exports=j));j=t.regeneratorRuntime=S?e.exports:{},j.wrap=n;var k="suspendedStart",P="suspendedYield",E="executing",O="completed",C={},M={};M[b]=function(){return this};var A=Object.getPrototypeOf,L=A&&A(A(d([])));L&&L!==g&&v.call(L,b)&&(M=L);var I=a.prototype=o.prototype=Object.create(M);i.prototype=I.constructor=a,a.constructor=i,a[x]=i.displayName="GeneratorFunction",j.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},j.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,x in t||(t[x]="GeneratorFunction")),t.prototype=Object.create(I),t},j.awrap=function(t){return{__await:t}},s(c.prototype),c.prototype[w]=function(){return this},j.AsyncIterator=c,j.async=function(t,e,r,o){var i=new c(n(t,e,r,o));return j.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},s(I),I[x]="Generator",I[b]=function(){return this},I.toString=function(){return"[object Generator]"},j.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},j.values=d,h.prototype={constructor:h,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(p),!t)for(var e in this)"t"===e.charAt(0)&&v.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=_)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return i.type="throw",i.arg=t,n.next=e,r&&(n.method="next",n.arg=_),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=v.call(o,"catchLoc"),s=v.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&v.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,C):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),C},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),C}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:d(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=_),C}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,n){},{}],5:[function(t,e,n){t("../../modules/core.regexp.escape"),e.exports=t("../../modules/_core").RegExp.escape},{"../../modules/_core":26,"../../modules/core.regexp.escape":131}],6:[function(t,e,n){e.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],7:[function(t,e,n){var r=t("./_cof");e.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},{"./_cof":21}],8:[function(t,e,n){var r=t("./_wks")("unscopables"),o=Array.prototype;void 0==o[r]&&t("./_hide")(o,r,{}),e.exports=function(t){o[r][t]=!0}},{"./_hide":45,"./_wks":129}],9:[function(t,e,n){e.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},{}],10:[function(t,e,n){var r=t("./_is-object");e.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},{"./_is-object":54}],11:[function(t,e,n){"use strict";var r=t("./_to-object"),o=t("./_to-absolute-index"),i=t("./_to-length");e.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),c=o(e,a),u=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===u?a:o(u,a))-c,a-s),f=1;for(c<s&&s<c+l&&(f=-1,c+=l-1,s+=l-1);l-- >0;)c in n?n[s]=n[c]:delete n[s],s+=f,c+=f;return n}},{"./_to-absolute-index":114,"./_to-length":118,"./_to-object":119}],12:[function(t,e,n){"use strict";var r=t("./_to-object"),o=t("./_to-absolute-index"),i=t("./_to-length");e.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:o(c,n);u>s;)e[s++]=t;return e}},{"./_to-absolute-index":114,"./_to-length":118,"./_to-object":119}],13:[function(t,e,n){var r=t("./_for-of");e.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},{"./_for-of":42}],14:[function(t,e,n){var r=t("./_to-iobject"),o=t("./_to-length"),i=t("./_to-absolute-index");e.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if(s=c[l++],s!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},{"./_to-absolute-index":114,"./_to-iobject":117,"./_to-length":118}],15:[function(t,e,n){var r=t("./_ctx"),o=t("./_iobject"),i=t("./_to-object"),a=t("./_to-length"),s=t("./_array-species-create");e.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,h=e||s;return function(e,s,d){for(var m,_,g=i(e),v=o(g),y=r(s,d,3),b=a(v.length),w=0,x=n?h(e,b):c?h(e,0):void 0;b>w;w++)if((p||w in v)&&(m=v[w],_=y(m,w,g),t))if(n)x[w]=_;else if(_)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:x.push(m)}else if(l)return!1;return f?-1:u||l?l:x}}},{"./_array-species-create":18,"./_ctx":28,"./_iobject":50,"./_to-length":118,"./_to-object":119}],16:[function(t,e,n){var r=t("./_a-function"),o=t("./_to-object"),i=t("./_iobject"),a=t("./_to-length");e.exports=function(t,e,n,s,c){r(e);var u=o(t),l=i(u),f=a(u.length),p=c?f-1:0,h=c?-1:1;if(n<2)for(;;){if(p in l){s=l[p],p+=h;break}if(p+=h,c?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:f>p;p+=h)p in l&&(s=e(s,l[p],p,u));return s}},{"./_a-function":6,"./_iobject":50,"./_to-length":118,"./_to-object":119}],17:[function(t,e,n){var r=t("./_is-object"),o=t("./_is-array"),i=t("./_wks")("species");e.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&(e=e[i],null===e&&(e=void 0))),void 0===e?Array:e}},{"./_is-array":52,"./_is-object":54,"./_wks":129}],18:[function(t,e,n){var r=t("./_array-species-constructor");e.exports=function(t,e){return new(r(t))(e)}},{"./_array-species-constructor":17}],19:[function(t,e,n){"use strict";var r=t("./_a-function"),o=t("./_is-object"),i=t("./_invoke"),a=[].slice,s={},c=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};e.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?c(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},{"./_a-function":6,"./_invoke":49,"./_is-object":54}],20:[function(t,e,n){var r=t("./_cof"),o=t("./_wks")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};e.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},{"./_cof":21,"./_wks":129}],21:[function(t,e,n){var r={}.toString;e.exports=function(t){return r.call(t).slice(8,-1)}},{}],22:[function(t,e,n){"use strict";var r=t("./_object-dp").f,o=t("./_object-create"),i=t("./_redefine-all"),a=t("./_ctx"),s=t("./_an-instance"),c=t("./_for-of"),u=t("./_iter-define"),l=t("./_iter-step"),f=t("./_set-species"),p=t("./_descriptors"),h=t("./_meta").fastKey,d=t("./_validate-collection"),m=p?"_s":"size",_=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(t,e,n,u){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=r&&c(r,n,t[u],t)});return i(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},"delete":function(t){var n=d(this,e),r=_(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[m]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!_(d(this,e),t)}}),p&&r(l.prototype,"size",{get:function(){return d(this,e)[m]}}),l},def:function(t,e,n){var r,o,i=_(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[m]++,"F"!==o&&(t._i[o]=i)),t},getEntry:_,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},{"./_an-instance":9,"./_ctx":28,"./_descriptors":32,"./_for-of":42,"./_iter-define":58,"./_iter-step":60,"./_meta":68,"./_object-create":73,"./_object-dp":74,"./_redefine-all":93,"./_set-species":100,"./_validate-collection":126}],23:[function(t,e,n){var r=t("./_classof"),o=t("./_array-from-iterable");e.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},{"./_array-from-iterable":13,"./_classof":20}],24:[function(t,e,n){"use strict";var r=t("./_redefine-all"),o=t("./_meta").getWeak,i=t("./_an-object"),a=t("./_is-object"),s=t("./_an-instance"),c=t("./_for-of"),u=t("./_array-methods"),l=t("./_has"),f=t("./_validate-collection"),p=u(5),h=u(6),d=0,m=function(t){return t._l||(t._l=new _)},_=function(){this.a=[]},g=function(t,e){return p(t.a,function(t){return t[0]===e})};_.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},e.exports={getConstructor:function(t,e,n,i){var u=t(function(t,r){s(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=r&&c(r,n,t[i],t)});return r(u.prototype,{"delete":function(t){if(!a(t))return!1;var n=o(t);return n===!0?m(f(this,e))["delete"](t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return n===!0?m(f(this,e)).has(t):n&&l(n,this._i)}}),u},def:function(t,e,n){var r=o(i(e),!0);return r===!0?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},{"./_an-instance":9,"./_an-object":10,"./_array-methods":15,"./_for-of":42,"./_has":44,"./_is-object":54,"./_meta":68,"./_redefine-all":93,"./_validate-collection":126}],25:[function(t,e,n){"use strict";var r=t("./_global"),o=t("./_export"),i=t("./_redefine"),a=t("./_redefine-all"),s=t("./_meta"),c=t("./_for-of"),u=t("./_an-instance"),l=t("./_is-object"),f=t("./_fails"),p=t("./_iter-detect"),h=t("./_set-to-string-tag"),d=t("./_inherit-if-required");e.exports=function(t,e,n,m,_,g){var v=r[t],y=v,b=_?"set":"add",w=y&&y.prototype,x={},S=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof y&&(g||w.forEach&&!f(function(){(new y).entries().next()}))){var j=new y,k=j[b](g?{}:-0,1)!=j,P=f(function(){j.has(1)}),E=p(function(t){new y(t)}),O=!g&&f(function(){for(var t=new y,e=5;e--;)t[b](e,e);return!t.has(-0)});E||(y=e(function(e,n){u(e,y,t);var r=d(new v,e,y);return void 0!=n&&c(n,_,r[b],r),r}),y.prototype=w,w.constructor=y),(P||O)&&(S("delete"),S("has"),_&&S("get")),(O||k)&&S(b),g&&w.clear&&delete w.clear}else y=m.getConstructor(e,t,_,b),a(y.prototype,n),s.NEED=!0;return h(y,t),x[t]=y,o(o.G+o.W+o.F*(y!=v),x),g||m.setStrong(y,t,_),y}},{"./_an-instance":9,"./_export":36,"./_fails":38,"./_for-of":42,"./_global":43,"./_inherit-if-required":48,"./_is-object":54,"./_iter-detect":59,"./_meta":68,"./_redefine":94,"./_redefine-all":93,"./_set-to-string-tag":101}],26:[function(t,e,n){var r=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},{}],27:[function(t,e,n){"use strict";var r=t("./_object-dp"),o=t("./_property-desc");e.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},{"./_object-dp":74,"./_property-desc":92}],28:[function(t,e,n){var r=t("./_a-function");e.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},{"./_a-function":6}],29:[function(t,e,n){"use strict";var r=t("./_fails"),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};e.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},{"./_fails":38}],30:[function(t,e,n){"use strict";var r=t("./_an-object"),o=t("./_to-primitive"),i="number";e.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},{"./_an-object":10,"./_to-primitive":120}],31:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],32:[function(t,e,n){e.exports=!t("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":38}],33:[function(t,e,n){var r=t("./_is-object"),o=t("./_global").document,i=r(o)&&r(o.createElement);e.exports=function(t){return i?o.createElement(t):{}}},{"./_global":43,"./_is-object":54}],34:[function(t,e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],35:[function(t,e,n){var r=t("./_object-keys"),o=t("./_object-gops"),i=t("./_object-pie");e.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),c=i.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},{"./_object-gops":80,"./_object-keys":83,"./_object-pie":84}],36:[function(t,e,n){var r=t("./_global"),o=t("./_core"),i=t("./_hide"),a=t("./_redefine"),s=t("./_ctx"),c="prototype",u=function(t,e,n){var l,f,p,h,d=t&u.F,m=t&u.G,_=t&u.S,g=t&u.P,v=t&u.B,y=m?r:_?r[e]||(r[e]={}):(r[e]||{})[c],b=m?o:o[e]||(o[e]={}),w=b[c]||(b[c]={});m&&(n=e);for(l in n)f=!d&&y&&void 0!==y[l],p=(f?y:n)[l],h=v&&f?s(p,r):g&&"function"==typeof p?s(Function.call,p):p,y&&a(y,l,p,t&u.U),b[l]!=p&&i(b,l,h),g&&w[l]!=p&&(w[l]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},{"./_core":26,"./_ctx":28,"./_global":43,"./_hide":45,"./_redefine":94}],37:[function(t,e,n){var r=t("./_wks")("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(o){}}return!0}},{"./_wks":129}],38:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],39:[function(t,e,n){"use strict";var r=t("./_hide"),o=t("./_redefine"),i=t("./_fails"),a=t("./_defined"),s=t("./_wks");e.exports=function(t,e,n){var c=s(t),u=n(a,c,""[t]),l=u[0],f=u[1];i(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,c,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},{"./_defined":31,"./_fails":38,"./_hide":45,"./_redefine":94,"./_wks":129}],40:[function(t,e,n){"use strict";var r=t("./_an-object");e.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{"./_an-object":10}],41:[function(t,e,n){"use strict";function r(t,e,n,u,l,f,p,h){for(var d,m,_=l,g=0,v=!!p&&s(p,h,3);g<u;){if(g in n){if(d=v?v(n[g],g,e):n[g],m=!1,i(d)&&(m=d[c],m=void 0!==m?!!m:o(d)),m&&f>0)_=r(t,e,d,a(d.length),_,f-1)-1;else{if(_>=9007199254740991)throw TypeError();t[_]=d}_++}g++}return _}var o=t("./_is-array"),i=t("./_is-object"),a=t("./_to-length"),s=t("./_ctx"),c=t("./_wks")("isConcatSpreadable");e.exports=r},{"./_ctx":28,"./_is-array":52,"./_is-object":54,"./_to-length":118,"./_wks":129}],42:[function(t,e,n){var r=t("./_ctx"),o=t("./_iter-call"),i=t("./_is-array-iter"),a=t("./_an-object"),s=t("./_to-length"),c=t("./core.get-iterator-method"),u={},l={},n=e.exports=function(t,e,n,f,p){var h,d,m,_,g=p?function(){return t}:c(t),v=r(n,f,e?2:1),y=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(h=s(t.length);h>y;y++)if(_=e?v(a(d=t[y])[0],d[1]):v(t[y]),_===u||_===l)return _}else for(m=g.call(t);!(d=m.next()).done;)if(_=o(m,v,d.value,e),_===u||_===l)return _};n.BREAK=u,n.RETURN=l},{"./_an-object":10,"./_ctx":28,"./_is-array-iter":51,"./_iter-call":56,"./_to-length":118,"./core.get-iterator-method":130}],43:[function(t,e,n){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],44:[function(t,e,n){var r={}.hasOwnProperty;e.exports=function(t,e){return r.call(t,e)}},{}],45:[function(t,e,n){var r=t("./_object-dp"),o=t("./_property-desc");e.exports=t("./_descriptors")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},{"./_descriptors":32,"./_object-dp":74,"./_property-desc":92}],46:[function(t,e,n){var r=t("./_global").document;e.exports=r&&r.documentElement},{"./_global":43}],47:[function(t,e,n){e.exports=!t("./_descriptors")&&!t("./_fails")(function(){return 7!=Object.defineProperty(t("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":32,"./_dom-create":33,"./_fails":38}],48:[function(t,e,n){var r=t("./_is-object"),o=t("./_set-proto").set;e.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},{"./_is-object":54,"./_set-proto":99}],49:[function(t,e,n){e.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],50:[function(t,e,n){var r=t("./_cof");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},{"./_cof":21}],51:[function(t,e,n){var r=t("./_iterators"),o=t("./_wks")("iterator"),i=Array.prototype;e.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},{"./_iterators":61,"./_wks":129}],52:[function(t,e,n){var r=t("./_cof");e.exports=Array.isArray||function(t){return"Array"==r(t)}},{"./_cof":21}],53:[function(t,e,n){var r=t("./_is-object"),o=Math.floor;e.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},{"./_is-object":54}],54:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],55:[function(t,e,n){var r=t("./_is-object"),o=t("./_cof"),i=t("./_wks")("match");e.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},{"./_cof":21,"./_is-object":54,"./_wks":129}],56:[function(t,e,n){var r=t("./_an-object");e.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(i){var a=t["return"];throw void 0!==a&&r(a.call(t)),i}}},{"./_an-object":10}],57:[function(t,e,n){"use strict";var r=t("./_object-create"),o=t("./_property-desc"),i=t("./_set-to-string-tag"),a={};t("./_hide")(a,t("./_wks")("iterator"),function(){return this}),e.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},{"./_hide":45,"./_object-create":73,"./_property-desc":92,"./_set-to-string-tag":101,"./_wks":129}],58:[function(t,e,n){"use strict";var r=t("./_library"),o=t("./_export"),i=t("./_redefine"),a=t("./_hide"),s=t("./_iterators"),c=t("./_iter-create"),u=t("./_set-to-string-tag"),l=t("./_object-gpo"),f=t("./_wks")("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",d="keys",m="values",_=function(){return this};e.exports=function(t,e,n,g,v,y,b){c(n,e,g);var w,x,S,j=function(t){if(!p&&t in O)return O[t];switch(t){case d:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",P=v==m,E=!1,O=t.prototype,C=O[f]||O[h]||v&&O[v],M=C||j(v),A=v?P?j("entries"):M:void 0,L="Array"==e?O.entries||C:C;if(L&&(S=l(L.call(new t)),S!==Object.prototype&&S.next&&(u(S,k,!0),r||"function"==typeof S[f]||a(S,f,_))),P&&C&&C.name!==m&&(E=!0,M=function(){return C.call(this)}),r&&!b||!p&&!E&&O[f]||a(O,f,M),s[e]=M,s[k]=_,v)if(w={values:P?M:j(m),keys:y?M:j(d),entries:A},b)for(x in w)x in O||i(O,x,w[x]);else o(o.P+o.F*(p||E),e,w);return w}},{"./_export":36,"./_hide":45,"./_iter-create":57,"./_iterators":61,"./_library":62,"./_object-gpo":81,"./_redefine":94,"./_set-to-string-tag":101,"./_wks":129}],59:[function(t,e,n){var r=t("./_wks")("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}e.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(s){}return n}},{"./_wks":129}],60:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],61:[function(t,e,n){e.exports={}},{}],62:[function(t,e,n){e.exports=!1},{}],63:[function(t,e,n){var r=Math.expm1;e.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||r(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},{}],64:[function(t,e,n){var r=t("./_math-sign"),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),c=o(2,-126),u=function(t){return t+1/i-1/i};e.exports=Math.fround||function(t){var e,n,o=Math.abs(t),l=r(t);return o<c?l*u(o/c/a)*c*a:(e=(1+a/i)*o,n=e-(e-o),n>s||n!=n?l*(1/0):l*n)}},{"./_math-sign":67}],65:[function(t,e,n){e.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},{}],66:[function(t,e,n){e.exports=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-(1/0)?t:(t-e)*(o-r)/(n-e)+r}},{}],67:[function(t,e,n){e.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},{}],68:[function(t,e,n){var r=t("./_uid")("meta"),o=t("./_is-object"),i=t("./_has"),a=t("./_object-dp").f,s=0,c=Object.isExtensible||function(){return!0},u=!t("./_fails")(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},h=function(t){return u&&d.NEED&&c(t)&&!i(t,r)&&l(t),t},d=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:h}},{"./_fails":38,"./_has":44,"./_is-object":54,"./_object-dp":74,"./_uid":124}],69:[function(t,e,n){var r=t("./es6.map"),o=t("./_export"),i=t("./_shared")("metadata"),a=i.store||(i.store=new(t("./es6.weak-map"))),s=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i},c=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},u=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){s(n,r,!0).set(t,e)},f=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},p=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},h=function(t){o(o.S,"Reflect",t)};e.exports={store:a,map:s,has:c,get:u,set:l,keys:f,key:p,exp:h}},{"./_export":36,"./_shared":103,"./es6.map":161,"./es6.weak-map":267}],70:[function(t,e,n){var r=t("./_global"),o=t("./_task").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==t("./_cof")(a);e.exports=function(){var t,e,n,u=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(u)}}else n=function(){o.call(r,u)};else{var f=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=f=!f;
2
+ }}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},{"./_cof":21,"./_global":43,"./_task":113}],71:[function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=o(e),this.reject=o(n)}var o=t("./_a-function");e.exports.f=function(t){return new r(t)}},{"./_a-function":6}],72:[function(t,e,n){"use strict";var r=t("./_object-keys"),o=t("./_object-gops"),i=t("./_object-pie"),a=t("./_to-object"),s=t("./_iobject"),c=Object.assign;e.exports=!c||t("./_fails")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=o.f,f=i.f;c>u;)for(var p,h=s(arguments[u++]),d=l?r(h).concat(l(h)):r(h),m=d.length,_=0;m>_;)f.call(h,p=d[_++])&&(n[p]=h[p]);return n}:c},{"./_fails":38,"./_iobject":50,"./_object-gops":80,"./_object-keys":83,"./_object-pie":84,"./_to-object":119}],73:[function(t,e,n){var r=t("./_an-object"),o=t("./_object-dps"),i=t("./_enum-bug-keys"),a=t("./_shared-key")("IE_PROTO"),s=function(){},c="prototype",u=function(){var e,n=t("./_dom-create")("iframe"),r=i.length,o="<",a=">";for(n.style.display="none",t("./_html").appendChild(n),n.src="javascript:",e=n.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),u=e.F;r--;)delete u[c][i[r]];return u()};e.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},{"./_an-object":10,"./_dom-create":33,"./_enum-bug-keys":34,"./_html":46,"./_object-dps":75,"./_shared-key":102}],74:[function(t,e,n){var r=t("./_an-object"),o=t("./_ie8-dom-define"),i=t("./_to-primitive"),a=Object.defineProperty;n.f=t("./_descriptors")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},{"./_an-object":10,"./_descriptors":32,"./_ie8-dom-define":47,"./_to-primitive":120}],75:[function(t,e,n){var r=t("./_object-dp"),o=t("./_an-object"),i=t("./_object-keys");e.exports=t("./_descriptors")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},{"./_an-object":10,"./_descriptors":32,"./_object-dp":74,"./_object-keys":83}],76:[function(t,e,n){"use strict";e.exports=t("./_library")||!t("./_fails")(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete t("./_global")[e]})},{"./_fails":38,"./_global":43,"./_library":62}],77:[function(t,e,n){var r=t("./_object-pie"),o=t("./_property-desc"),i=t("./_to-iobject"),a=t("./_to-primitive"),s=t("./_has"),c=t("./_ie8-dom-define"),u=Object.getOwnPropertyDescriptor;n.f=t("./_descriptors")?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(n){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},{"./_descriptors":32,"./_has":44,"./_ie8-dom-define":47,"./_object-pie":84,"./_property-desc":92,"./_to-iobject":117,"./_to-primitive":120}],78:[function(t,e,n){var r=t("./_to-iobject"),o=t("./_object-gopn").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(e){return a.slice()}};e.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(r(t))}},{"./_object-gopn":79,"./_to-iobject":117}],79:[function(t,e,n){var r=t("./_object-keys-internal"),o=t("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},{"./_enum-bug-keys":34,"./_object-keys-internal":82}],80:[function(t,e,n){n.f=Object.getOwnPropertySymbols},{}],81:[function(t,e,n){var r=t("./_has"),o=t("./_to-object"),i=t("./_shared-key")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},{"./_has":44,"./_shared-key":102,"./_to-object":119}],82:[function(t,e,n){var r=t("./_has"),o=t("./_to-iobject"),i=t("./_array-includes")(!1),a=t("./_shared-key")("IE_PROTO");e.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},{"./_array-includes":14,"./_has":44,"./_shared-key":102,"./_to-iobject":117}],83:[function(t,e,n){var r=t("./_object-keys-internal"),o=t("./_enum-bug-keys");e.exports=Object.keys||function(t){return r(t,o)}},{"./_enum-bug-keys":34,"./_object-keys-internal":82}],84:[function(t,e,n){n.f={}.propertyIsEnumerable},{}],85:[function(t,e,n){var r=t("./_export"),o=t("./_core"),i=t("./_fails");e.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},{"./_core":26,"./_export":36,"./_fails":38}],86:[function(t,e,n){var r=t("./_object-keys"),o=t("./_to-iobject"),i=t("./_object-pie").f;e.exports=function(t){return function(e){for(var n,a=o(e),s=r(a),c=s.length,u=0,l=[];c>u;)i.call(a,n=s[u++])&&l.push(t?[n,a[n]]:a[n]);return l}}},{"./_object-keys":83,"./_object-pie":84,"./_to-iobject":117}],87:[function(t,e,n){var r=t("./_object-gopn"),o=t("./_object-gops"),i=t("./_an-object"),a=t("./_global").Reflect;e.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},{"./_an-object":10,"./_global":43,"./_object-gopn":79,"./_object-gops":80}],88:[function(t,e,n){var r=t("./_global").parseFloat,o=t("./_string-trim").trim;e.exports=1/r(t("./_string-ws")+"-0")!==-(1/0)?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},{"./_global":43,"./_string-trim":111,"./_string-ws":112}],89:[function(t,e,n){var r=t("./_global").parseInt,o=t("./_string-trim").trim,i=t("./_string-ws"),a=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},{"./_global":43,"./_string-trim":111,"./_string-ws":112}],90:[function(t,e,n){e.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},{}],91:[function(t,e,n){var r=t("./_an-object"),o=t("./_is-object"),i=t("./_new-promise-capability");e.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),a=n.resolve;return a(e),n.promise}},{"./_an-object":10,"./_is-object":54,"./_new-promise-capability":71}],92:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],93:[function(t,e,n){var r=t("./_redefine");e.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},{"./_redefine":94}],94:[function(t,e,n){var r=t("./_global"),o=t("./_hide"),i=t("./_has"),a=t("./_uid")("src"),s="toString",c=Function[s],u=(""+c).split(s);t("./_core").inspectSource=function(t){return c.call(t)},(e.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},{"./_core":26,"./_global":43,"./_has":44,"./_hide":45,"./_uid":124}],95:[function(t,e,n){e.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},{}],96:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},{}],97:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_a-function"),i=t("./_ctx"),a=t("./_for-of");e.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,c=arguments[1];return o(this),e=void 0!==c,e&&o(c),void 0==t?new this:(n=[],e?(r=0,s=i(c,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},{"./_a-function":6,"./_ctx":28,"./_export":36,"./_for-of":42}],98:[function(t,e,n){"use strict";var r=t("./_export");e.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},{"./_export":36}],99:[function(t,e,n){var r=t("./_is-object"),o=t("./_an-object"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=t("./_ctx")(Function.call,t("./_object-gopd").f(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(o){n=!0}return function(t,e){return i(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:i}},{"./_an-object":10,"./_ctx":28,"./_is-object":54,"./_object-gopd":77}],100:[function(t,e,n){"use strict";var r=t("./_global"),o=t("./_object-dp"),i=t("./_descriptors"),a=t("./_wks")("species");e.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},{"./_descriptors":32,"./_global":43,"./_object-dp":74,"./_wks":129}],101:[function(t,e,n){var r=t("./_object-dp").f,o=t("./_has"),i=t("./_wks")("toStringTag");e.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},{"./_has":44,"./_object-dp":74,"./_wks":129}],102:[function(t,e,n){var r=t("./_shared")("keys"),o=t("./_uid");e.exports=function(t){return r[t]||(r[t]=o(t))}},{"./_shared":103,"./_uid":124}],103:[function(t,e,n){var r=t("./_core"),o=t("./_global"),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:t("./_library")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":26,"./_global":43,"./_library":62}],104:[function(t,e,n){var r=t("./_an-object"),o=t("./_a-function"),i=t("./_wks")("species");e.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},{"./_a-function":6,"./_an-object":10,"./_wks":129}],105:[function(t,e,n){"use strict";var r=t("./_fails");e.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},{"./_fails":38}],106:[function(t,e,n){var r=t("./_to-integer"),o=t("./_defined");e.exports=function(t){return function(e,n){var i,a,s=String(o(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(i=s.charCodeAt(c),i<55296||i>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):(i-55296<<10)+(a-56320)+65536)}}},{"./_defined":31,"./_to-integer":116}],107:[function(t,e,n){var r=t("./_is-regexp"),o=t("./_defined");e.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},{"./_defined":31,"./_is-regexp":55}],108:[function(t,e,n){var r=t("./_export"),o=t("./_fails"),i=t("./_defined"),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+o+"</"+e+">"};e.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},{"./_defined":31,"./_export":36,"./_fails":38}],109:[function(t,e,n){var r=t("./_to-length"),o=t("./_string-repeat"),i=t("./_defined");e.exports=function(t,e,n,a){var s=String(i(t)),c=s.length,u=void 0===n?" ":String(n),l=r(e);if(l<=c||""==u)return s;var f=l-c,p=o.call(u,Math.ceil(f/u.length));return p.length>f&&(p=p.slice(0,f)),a?p+s:s+p}},{"./_defined":31,"./_string-repeat":110,"./_to-length":118}],110:[function(t,e,n){"use strict";var r=t("./_to-integer"),o=t("./_defined");e.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},{"./_defined":31,"./_to-integer":116}],111:[function(t,e,n){var r=t("./_export"),o=t("./_defined"),i=t("./_fails"),a=t("./_string-ws"),s="["+a+"]",c="​…",u=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),f=function(t,e,n){var o={},s=i(function(){return!!a[t]()||c[t]()!=c}),u=o[t]=s?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},p=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(l,"")),t};e.exports=f},{"./_defined":31,"./_export":36,"./_fails":38,"./_string-ws":112}],112:[function(t,e,n){e.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},{}],113:[function(t,e,n){var r,o,i,a=t("./_ctx"),s=t("./_invoke"),c=t("./_html"),u=t("./_dom-create"),l=t("./_global"),f=l.process,p=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,m=l.Dispatch,_=0,g={},v="onreadystatechange",y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){y.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++_]=function(){s("function"==typeof t?t:Function(t),e)},r(_),_},h=function(t){delete g[t]},"process"==t("./_cof")(f)?r=function(t){f.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r=v in u("script")?function(t){c.appendChild(u("script"))[v]=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),e.exports={set:p,clear:h}},{"./_cof":21,"./_ctx":28,"./_dom-create":33,"./_global":43,"./_html":46,"./_invoke":49}],114:[function(t,e,n){var r=t("./_to-integer"),o=Math.max,i=Math.min;e.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},{"./_to-integer":116}],115:[function(t,e,n){var r=t("./_to-integer"),o=t("./_to-length");e.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},{"./_to-integer":116,"./_to-length":118}],116:[function(t,e,n){var r=Math.ceil,o=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?o:r)(t)}},{}],117:[function(t,e,n){var r=t("./_iobject"),o=t("./_defined");e.exports=function(t){return r(o(t))}},{"./_defined":31,"./_iobject":50}],118:[function(t,e,n){var r=t("./_to-integer"),o=Math.min;e.exports=function(t){return t>0?o(r(t),9007199254740991):0}},{"./_to-integer":116}],119:[function(t,e,n){var r=t("./_defined");e.exports=function(t){return Object(r(t))}},{"./_defined":31}],120:[function(t,e,n){var r=t("./_is-object");e.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":54}],121:[function(t,e,n){"use strict";if(t("./_descriptors")){var r=t("./_library"),o=t("./_global"),i=t("./_fails"),a=t("./_export"),s=t("./_typed"),c=t("./_typed-buffer"),u=t("./_ctx"),l=t("./_an-instance"),f=t("./_property-desc"),p=t("./_hide"),h=t("./_redefine-all"),d=t("./_to-integer"),m=t("./_to-length"),_=t("./_to-index"),g=t("./_to-absolute-index"),v=t("./_to-primitive"),y=t("./_has"),b=t("./_classof"),w=t("./_is-object"),x=t("./_to-object"),S=t("./_is-array-iter"),j=t("./_object-create"),k=t("./_object-gpo"),P=t("./_object-gopn").f,E=t("./core.get-iterator-method"),O=t("./_uid"),C=t("./_wks"),M=t("./_array-methods"),A=t("./_array-includes"),L=t("./_species-constructor"),I=t("./es6.array.iterator"),T=t("./_iterators"),N=t("./_iter-detect"),R=t("./_set-species"),D=t("./_array-fill"),F=t("./_array-copy-within"),B=t("./_object-dp"),H=t("./_object-gopd"),$=B.f,U=H.f,z=o.RangeError,W=o.TypeError,V=o.Uint8Array,q="ArrayBuffer",G="Shared"+q,K="BYTES_PER_ELEMENT",Q="prototype",J=Array[Q],Y=c.ArrayBuffer,X=c.DataView,Z=M(0),tt=M(2),et=M(3),nt=M(4),rt=M(5),ot=M(6),it=A(!0),at=A(!1),st=I.values,ct=I.keys,ut=I.entries,lt=J.lastIndexOf,ft=J.reduce,pt=J.reduceRight,ht=J.join,dt=J.sort,mt=J.slice,_t=J.toString,gt=J.toLocaleString,vt=C("iterator"),yt=C("toStringTag"),bt=O("typed_constructor"),wt=O("def_constructor"),xt=s.CONSTR,St=s.TYPED,jt=s.VIEW,kt="Wrong length!",Pt=M(1,function(t,e){return At(L(t,t[wt]),e)}),Et=i(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Ot=!!V&&!!V[Q].set&&i(function(){new V(1).set({})}),Ct=function(t,e){var n=d(t);if(n<0||n%e)throw z("Wrong offset!");return n},Mt=function(t){if(w(t)&&St in t)return t;throw W(t+" is not a typed array!")},At=function(t,e){if(!(w(t)&&bt in t))throw W("It is not a typed array constructor!");return new t(e)},Lt=function(t,e){return It(L(t,t[wt]),e)},It=function(t,e){for(var n=0,r=e.length,o=At(t,r);r>n;)o[n]=e[n++];return o},Tt=function(t,e,n){$(t,e,{get:function(){return this._d[n]}})},Nt=function(t){var e,n,r,o,i,a,s=x(t),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,p=E(s);if(void 0!=p&&!S(p)){for(a=p.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(f&&c>2&&(l=u(l,arguments[2],2)),e=0,n=m(s.length),o=At(this,n);n>e;e++)o[e]=f?l(s[e],e):s[e];return o},Rt=function(){for(var t=0,e=arguments.length,n=At(this,e);e>t;)n[t]=arguments[t++];return n},Dt=!!V&&i(function(){gt.call(new V(1))}),Ft=function(){return gt.apply(Dt?mt.call(Mt(this)):Mt(this),arguments)},Bt={copyWithin:function(t,e){return F.call(Mt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Mt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(Mt(this),arguments)},filter:function(t){return Lt(this,tt(Mt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Mt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Mt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Mt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Mt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Mt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Mt(this),arguments)},lastIndexOf:function(t){return lt.apply(Mt(this),arguments)},map:function(t){return Pt(Mt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ft.apply(Mt(this),arguments)},reduceRight:function(t){return pt.apply(Mt(this),arguments)},reverse:function(){for(var t,e=this,n=Mt(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Mt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Mt(this),t)},subarray:function(t,e){var n=Mt(this),r=n.length,o=g(t,r);return new(L(n,n[wt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,m((void 0===e?r:g(e,r))-o))}},Ht=function(t,e){return Lt(this,mt.call(Mt(this),t,e))},$t=function(t){Mt(this);var e=Ct(arguments[1],1),n=this.length,r=x(t),o=m(r.length),i=0;if(o+e>n)throw z(kt);for(;i<o;)this[e+i]=r[i++]},Ut={entries:function(){return ut.call(Mt(this))},keys:function(){return ct.call(Mt(this))},values:function(){return st.call(Mt(this))}},zt=function(t,e){return w(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Wt=function(t,e){return zt(t,e=v(e,!0))?f(2,t[e]):U(t,e)},Vt=function(t,e,n){return!(zt(t,e=v(e,!0))&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?$(t,e,n):(t[e]=n.value,t)};xt||(H.f=Wt,B.f=Vt),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:Vt}),i(function(){_t.call({})})&&(_t=gt=function(){return ht.call(this)});var qt=h({},Bt);h(qt,Ut),p(qt,vt,Ut.values),h(qt,{slice:Ht,set:$t,constructor:function(){},toString:_t,toLocaleString:Ft}),Tt(qt,"buffer","b"),Tt(qt,"byteOffset","o"),Tt(qt,"byteLength","l"),Tt(qt,"length","e"),$(qt,yt,{get:function(){return this[St]}}),e.exports=function(t,e,n,c){c=!!c;var u=t+(c?"Clamped":"")+"Array",f="get"+t,h="set"+t,d=o[u],g=d||{},v=d&&k(d),y=!d||!s.ABV,x={},S=d&&d[Q],E=function(t,n){var r=t._d;return r.v[f](n*e+r.o,Et)},O=function(t,n,r){var o=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,Et)},C=function(t,e){$(t,e,{get:function(){return E(this,e)},set:function(t){return O(this,e,t)},enumerable:!0})};y?(d=n(function(t,n,r,o){l(t,d,u,"_d");var i,a,s,c,f=0,h=0;if(w(n)){if(!(n instanceof Y||(c=b(n))==q||c==G))return St in n?It(d,n):Nt.call(d,n);i=n,h=Ct(r,e);var g=n.byteLength;if(void 0===o){if(g%e)throw z(kt);if(a=g-h,a<0)throw z(kt)}else if(a=m(o)*e,a+h>g)throw z(kt);s=a/e}else s=_(n),a=s*e,i=new Y(a);for(p(t,"_d",{b:i,o:h,l:a,e:s,v:new X(i)});f<s;)C(t,f++)}),S=d[Q]=j(qt),p(S,"constructor",d)):i(function(){d(1)})&&i(function(){new d((-1))})&&N(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=n(function(t,n,r,o){l(t,d,u);var i;return w(n)?n instanceof Y||(i=b(n))==q||i==G?void 0!==o?new g(n,Ct(r,e),o):void 0!==r?new g(n,Ct(r,e)):new g(n):St in n?It(d,n):Nt.call(d,n):new g(_(n))}),Z(v!==Function.prototype?P(g).concat(P(v)):P(g),function(t){t in d||p(d,t,g[t])}),d[Q]=S,r||(S.constructor=d));var M=S[vt],A=!!M&&("values"==M.name||void 0==M.name),L=Ut.values;p(d,bt,!0),p(S,St,u),p(S,jt,!0),p(S,wt,d),(c?new d(1)[yt]==u:yt in S)||$(S,yt,{get:function(){return u}}),x[u]=d,a(a.G+a.W+a.F*(d!=g),x),a(a.S,u,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){g.of.call(d,1)}),u,{from:Nt,of:Rt}),K in S||p(S,K,e),a(a.P,u,Bt),R(u),a(a.P+a.F*Ot,u,{set:$t}),a(a.P+a.F*!A,u,Ut),r||S.toString==_t||(S.toString=_t),a(a.P+a.F*i(function(){new d(1).slice()}),u,{slice:Ht}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!i(function(){S.toLocaleString.call([1,2])})),u,{toLocaleString:Ft}),T[u]=A?M:L,r||A||p(S,vt,L)}}else e.exports=function(){}},{"./_an-instance":9,"./_array-copy-within":11,"./_array-fill":12,"./_array-includes":14,"./_array-methods":15,"./_classof":20,"./_ctx":28,"./_descriptors":32,"./_export":36,"./_fails":38,"./_global":43,"./_has":44,"./_hide":45,"./_is-array-iter":51,"./_is-object":54,"./_iter-detect":59,"./_iterators":61,"./_library":62,"./_object-create":73,"./_object-dp":74,"./_object-gopd":77,"./_object-gopn":79,"./_object-gpo":81,"./_property-desc":92,"./_redefine-all":93,"./_set-species":100,"./_species-constructor":104,"./_to-absolute-index":114,"./_to-index":115,"./_to-integer":116,"./_to-length":118,"./_to-object":119,"./_to-primitive":120,"./_typed":123,"./_typed-buffer":122,"./_uid":124,"./_wks":129,"./core.get-iterator-method":130,"./es6.array.iterator":142}],122:[function(t,e,n){"use strict";function r(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,c=(1<<s)-1,u=c>>1,l=23===e?$(2,-24)-$(2,-77):0,f=0,p=t<0||0===t&&1/t<0?1:0;for(t=H(t),t!=t||t===F?(o=t!=t?1:0,r=c):(r=U(z(t)/W),t*(i=$(2,-r))<1&&(r--,i*=2),t+=r+u>=1?l/i:l*$(2,1-u),t*i>=2&&(r++,i/=2),r+u>=c?(o=0,r=c):r+u>=1?(o=(t*i-1)*$(2,e),r+=u):(o=t*$(2,u-1)*$(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<<e|o,s+=e;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*p,a}function o(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,s=o-7,c=n-1,u=t[c--],l=127&u;for(u>>=7;s>0;l=256*l+t[c],c--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[c],c--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:u?-F:F;r+=$(2,e),l-=a}return(u?-1:1)*r*$(2,l-e)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function c(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function u(t){return r(t,52,8)}function l(t){return r(t,23,4)}function f(t,e,n){P(t[A],e,{get:function(){return this[n]}})}function p(t,e,n,r){var o=+n,i=j(o);if(i+e>t[Q])throw D(I);var a=t[K]._b,s=i+t[J],c=a.slice(s,s+e);return r?c:c.reverse()}function h(t,e,n,r,o,i){var a=+n,s=j(a);if(s+e>t[Q])throw D(I);for(var c=t[K]._b,u=s+t[J],l=r(+o),f=0;f<e;f++)c[u+f]=l[i?f:e-f-1]}var d=t("./_global"),m=t("./_descriptors"),_=t("./_library"),g=t("./_typed"),v=t("./_hide"),y=t("./_redefine-all"),b=t("./_fails"),w=t("./_an-instance"),x=t("./_to-integer"),S=t("./_to-length"),j=t("./_to-index"),k=t("./_object-gopn").f,P=t("./_object-dp").f,E=t("./_array-fill"),O=t("./_set-to-string-tag"),C="ArrayBuffer",M="DataView",A="prototype",L="Wrong length!",I="Wrong index!",T=d[C],N=d[M],R=d.Math,D=d.RangeError,F=d.Infinity,B=T,H=R.abs,$=R.pow,U=R.floor,z=R.log,W=R.LN2,V="buffer",q="byteLength",G="byteOffset",K=m?"_b":V,Q=m?"_l":q,J=m?"_o":G;if(g.ABV){if(!b(function(){T(1)})||!b(function(){new T((-1))})||b(function(){return new T,new T(1.5),new T(NaN),T.name!=C})){T=function(t){return w(this,T),new B(j(t))};for(var Y,X=T[A]=B[A],Z=k(B),tt=0;Z.length>tt;)(Y=Z[tt++])in T||v(T,Y,B[Y]);_||(X.constructor=T)}var et=new N(new T(2)),nt=N[A].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||y(N[A],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else T=function(t){w(this,T,C);var e=j(t);this._b=E.call(new Array(e),0),this[Q]=e},N=function(t,e,n){w(this,N,M),w(t,T,M);var r=t[Q],o=x(e);if(o<0||o>r)throw D("Wrong offset!");if(n=void 0===n?r-o:S(n),o+n>r)throw D(L);this[K]=t,this[J]=o,this[Q]=n},m&&(f(T,q,"_l"),f(N,V,"_b"),f(N,q,"_l"),f(N,G,"_o")),y(N[A],{getInt8:function(t){return p(this,1,t)[0]<<24>>24},getUint8:function(t){return p(this,1,t)[0]},getInt16:function(t){var e=p(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=p(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return i(p(this,4,t,arguments[1]))},getUint32:function(t){return i(p(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(p(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(p(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){h(this,1,t,a,e)},setUint8:function(t,e){h(this,1,t,a,e)},setInt16:function(t,e){h(this,2,t,s,e,arguments[2])},setUint16:function(t,e){h(this,2,t,s,e,arguments[2])},setInt32:function(t,e){h(this,4,t,c,e,arguments[2])},setUint32:function(t,e){h(this,4,t,c,e,arguments[2])},setFloat32:function(t,e){h(this,4,t,l,e,arguments[2])},setFloat64:function(t,e){h(this,8,t,u,e,arguments[2])}});O(T,C),O(N,M),v(N[A],g.VIEW,!0),n[C]=T,n[M]=N},{"./_an-instance":9,"./_array-fill":12,"./_descriptors":32,"./_fails":38,"./_global":43,"./_hide":45,"./_library":62,"./_object-dp":74,"./_object-gopn":79,"./_redefine-all":93,"./_set-to-string-tag":101,"./_to-index":115,"./_to-integer":116,"./_to-length":118,"./_typed":123}],123:[function(t,e,n){for(var r,o=t("./_global"),i=t("./_hide"),a=t("./_uid"),s=a("typed_array"),c=a("view"),u=!(!o.ArrayBuffer||!o.DataView),l=u,f=0,p=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<p;)(r=o[h[f++]])?(i(r.prototype,s,!0),i(r.prototype,c,!0)):l=!1;e.exports={ABV:u,CONSTR:l,TYPED:s,VIEW:c}},{"./_global":43,"./_hide":45,"./_uid":124}],124:[function(t,e,n){var r=0,o=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+o).toString(36))}},{}],125:[function(t,e,n){var r=t("./_global"),o=r.navigator;e.exports=o&&o.userAgent||""},{"./_global":43}],126:[function(t,e,n){var r=t("./_is-object");e.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},{"./_is-object":54}],127:[function(t,e,n){var r=t("./_global"),o=t("./_core"),i=t("./_library"),a=t("./_wks-ext"),s=t("./_object-dp").f;e.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},{"./_core":26,"./_global":43,"./_library":62,"./_object-dp":74,"./_wks-ext":128}],128:[function(t,e,n){n.f=t("./_wks")},{"./_wks":129}],129:[function(t,e,n){var r=t("./_shared")("wks"),o=t("./_uid"),i=t("./_global").Symbol,a="function"==typeof i,s=e.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))};s.store=r},{"./_global":43,"./_shared":103,"./_uid":124}],130:[function(t,e,n){var r=t("./_classof"),o=t("./_wks")("iterator"),i=t("./_iterators");e.exports=t("./_core").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},{"./_classof":20,"./_core":26,"./_iterators":61,"./_wks":129}],131:[function(t,e,n){var r=t("./_export"),o=t("./_replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return o(t)}})},{"./_export":36,"./_replacer":95}],132:[function(t,e,n){var r=t("./_export");r(r.P,"Array",{copyWithin:t("./_array-copy-within")}),t("./_add-to-unscopables")("copyWithin")},{"./_add-to-unscopables":8,"./_array-copy-within":11,"./_export":36}],133:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(4);r(r.P+r.F*!t("./_strict-method")([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},{"./_array-methods":15,"./_export":36,"./_strict-method":105}],134:[function(t,e,n){var r=t("./_export");r(r.P,"Array",{fill:t("./_array-fill")}),t("./_add-to-unscopables")("fill")},{"./_add-to-unscopables":8,"./_array-fill":12,"./_export":36}],135:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(2);r(r.P+r.F*!t("./_strict-method")([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},{"./_array-methods":15,"./_export":36,"./_strict-method":105}],136:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),t("./_add-to-unscopables")(i)},{"./_add-to-unscopables":8,"./_array-methods":15,"./_export":36}],137:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),t("./_add-to-unscopables")(i)},{"./_add-to-unscopables":8,"./_array-methods":15,"./_export":36}],138:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(0),i=t("./_strict-method")([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},{"./_array-methods":15,"./_export":36,"./_strict-method":105}],139:[function(t,e,n){"use strict";var r=t("./_ctx"),o=t("./_export"),i=t("./_to-object"),a=t("./_iter-call"),s=t("./_is-array-iter"),c=t("./_to-length"),u=t("./_create-property"),l=t("./core.get-iterator-method");o(o.S+o.F*!t("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,_=void 0!==m,g=0,v=l(p);if(_&&(m=r(m,d>2?arguments[2]:void 0,2)),void 0==v||h==Array&&s(v))for(e=c(p.length),n=new h(e);e>g;g++)u(n,g,_?m(p[g],g):p[g]);else for(f=v.call(p),n=new h;!(o=f.next()).done;g++)u(n,g,_?a(f,m,[o.value,g],!0):o.value);return n.length=g,n}})},{"./_create-property":27,"./_ctx":28,"./_export":36,"./_is-array-iter":51,"./_iter-call":56,"./_iter-detect":59,"./_to-length":118,"./_to-object":119,"./core.get-iterator-method":130}],140:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-includes")(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!t("./_strict-method")(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},{"./_array-includes":14,"./_export":36,"./_strict-method":105}],141:[function(t,e,n){var r=t("./_export");r(r.S,"Array",{isArray:t("./_is-array")})},{"./_export":36,"./_is-array":52}],142:[function(t,e,n){"use strict";var r=t("./_add-to-unscopables"),o=t("./_iter-step"),i=t("./_iterators"),a=t("./_to-iobject");e.exports=t("./_iter-define")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":8,"./_iter-define":58,"./_iter-step":60,"./_iterators":61,"./_to-iobject":117}],143:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-iobject"),i=[].join;r(r.P+r.F*(t("./_iobject")!=Object||!t("./_strict-method")(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},{"./_export":36,"./_iobject":50,"./_strict-method":105,"./_to-iobject":117}],144:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-iobject"),i=t("./_to-integer"),a=t("./_to-length"),s=[].lastIndexOf,c=!!s&&1/[1].lastIndexOf(1,-0)<0;
3
+ r(r.P+r.F*(c||!t("./_strict-method")(s)),"Array",{lastIndexOf:function(t){if(c)return s.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},{"./_export":36,"./_strict-method":105,"./_to-integer":116,"./_to-iobject":117,"./_to-length":118}],145:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(1);r(r.P+r.F*!t("./_strict-method")([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},{"./_array-methods":15,"./_export":36,"./_strict-method":105}],146:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_create-property");r(r.S+r.F*t("./_fails")(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},{"./_create-property":27,"./_export":36,"./_fails":38}],147:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-reduce");r(r.P+r.F*!t("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},{"./_array-reduce":16,"./_export":36,"./_strict-method":105}],148:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-reduce");r(r.P+r.F*!t("./_strict-method")([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},{"./_array-reduce":16,"./_export":36,"./_strict-method":105}],149:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_html"),i=t("./_cof"),a=t("./_to-absolute-index"),s=t("./_to-length"),c=[].slice;r(r.P+r.F*t("./_fails")(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=a(t,n),u=a(e,n),l=s(u-o),f=new Array(l),p=0;p<l;p++)f[p]="String"==r?this.charAt(o+p):this[o+p];return f}})},{"./_cof":21,"./_export":36,"./_fails":38,"./_html":46,"./_to-absolute-index":114,"./_to-length":118}],150:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-methods")(3);r(r.P+r.F*!t("./_strict-method")([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},{"./_array-methods":15,"./_export":36,"./_strict-method":105}],151:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_a-function"),i=t("./_to-object"),a=t("./_fails"),s=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!t("./_strict-method")(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},{"./_a-function":6,"./_export":36,"./_fails":38,"./_strict-method":105,"./_to-object":119}],152:[function(t,e,n){t("./_set-species")("Array")},{"./_set-species":100}],153:[function(t,e,n){var r=t("./_export");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},{"./_export":36}],154:[function(t,e,n){var r=t("./_export"),o=t("./_date-to-iso-string");r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},{"./_date-to-iso-string":29,"./_export":36}],155:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-object"),i=t("./_to-primitive");r(r.P+r.F*t("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},{"./_export":36,"./_fails":38,"./_to-object":119,"./_to-primitive":120}],156:[function(t,e,n){var r=t("./_wks")("toPrimitive"),o=Date.prototype;r in o||t("./_hide")(o,r,t("./_date-to-primitive"))},{"./_date-to-primitive":30,"./_hide":45,"./_wks":129}],157:[function(t,e,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],s=r.getTime;new Date(NaN)+""!=o&&t("./_redefine")(r,i,function(){var t=s.call(this);return t===t?a.call(this):o})},{"./_redefine":94}],158:[function(t,e,n){var r=t("./_export");r(r.P,"Function",{bind:t("./_bind")})},{"./_bind":19,"./_export":36}],159:[function(t,e,n){"use strict";var r=t("./_is-object"),o=t("./_object-gpo"),i=t("./_wks")("hasInstance"),a=Function.prototype;i in a||t("./_object-dp").f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},{"./_is-object":54,"./_object-dp":74,"./_object-gpo":81,"./_wks":129}],160:[function(t,e,n){var r=t("./_object-dp").f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||t("./_descriptors")&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},{"./_descriptors":32,"./_object-dp":74}],161:[function(t,e,n){"use strict";var r=t("./_collection-strong"),o=t("./_validate-collection"),i="Map";e.exports=t("./_collection")(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},{"./_collection":25,"./_collection-strong":22,"./_validate-collection":126}],162:[function(t,e,n){var r=t("./_export"),o=t("./_math-log1p"),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},{"./_export":36,"./_math-log1p":65}],163:[function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=t("./_export"),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},{"./_export":36}],164:[function(t,e,n){var r=t("./_export"),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},{"./_export":36}],165:[function(t,e,n){var r=t("./_export"),o=t("./_math-sign");r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},{"./_export":36,"./_math-sign":67}],166:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},{"./_export":36}],167:[function(t,e,n){var r=t("./_export"),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},{"./_export":36}],168:[function(t,e,n){var r=t("./_export"),o=t("./_math-expm1");r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},{"./_export":36,"./_math-expm1":63}],169:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{fround:t("./_math-fround")})},{"./_export":36,"./_math-fround":64}],170:[function(t,e,n){var r=t("./_export"),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,c=0;a<s;)n=o(arguments[a++]),c<n?(r=c/n,i=i*r*r+1,c=n):n>0?(r=n/c,i+=r*r):i+=n;return c===1/0?1/0:c*Math.sqrt(i)}})},{"./_export":36}],171:[function(t,e,n){var r=t("./_export"),o=Math.imul;r(r.S+r.F*t("./_fails")(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},{"./_export":36,"./_fails":38}],172:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},{"./_export":36}],173:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{log1p:t("./_math-log1p")})},{"./_export":36,"./_math-log1p":65}],174:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},{"./_export":36}],175:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{sign:t("./_math-sign")})},{"./_export":36,"./_math-sign":67}],176:[function(t,e,n){var r=t("./_export"),o=t("./_math-expm1"),i=Math.exp;r(r.S+r.F*t("./_fails")(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},{"./_export":36,"./_fails":38,"./_math-expm1":63}],177:[function(t,e,n){var r=t("./_export"),o=t("./_math-expm1"),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},{"./_export":36,"./_math-expm1":63}],178:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},{"./_export":36}],179:[function(t,e,n){"use strict";var r=t("./_global"),o=t("./_has"),i=t("./_cof"),a=t("./_inherit-if-required"),s=t("./_to-primitive"),c=t("./_fails"),u=t("./_object-gopn").f,l=t("./_object-gopd").f,f=t("./_object-dp").f,p=t("./_string-trim").trim,h="Number",d=r[h],m=d,_=d.prototype,g=i(t("./_object-create")(_))==h,v="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=v?e.trim():p(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,c=e.slice(2),u=0,l=c.length;u<l;u++)if(a=c.charCodeAt(u),a<48||a>o)return NaN;return parseInt(c,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(g?c(function(){_.valueOf.call(n)}):i(n)!=h)?a(new m(y(e)),n,d):y(e)};for(var b,w=t("./_descriptors")?u(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(m,b=w[x])&&!o(d,b)&&f(d,b,l(m,b));d.prototype=_,_.constructor=d,t("./_redefine")(r,h,d)}},{"./_cof":21,"./_descriptors":32,"./_fails":38,"./_global":43,"./_has":44,"./_inherit-if-required":48,"./_object-create":73,"./_object-dp":74,"./_object-gopd":77,"./_object-gopn":79,"./_redefine":94,"./_string-trim":111,"./_to-primitive":120}],180:[function(t,e,n){var r=t("./_export");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":36}],181:[function(t,e,n){var r=t("./_export"),o=t("./_global").isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},{"./_export":36,"./_global":43}],182:[function(t,e,n){var r=t("./_export");r(r.S,"Number",{isInteger:t("./_is-integer")})},{"./_export":36,"./_is-integer":53}],183:[function(t,e,n){var r=t("./_export");r(r.S,"Number",{isNaN:function(t){return t!=t}})},{"./_export":36}],184:[function(t,e,n){var r=t("./_export"),o=t("./_is-integer"),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},{"./_export":36,"./_is-integer":53}],185:[function(t,e,n){var r=t("./_export");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":36}],186:[function(t,e,n){var r=t("./_export");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":36}],187:[function(t,e,n){var r=t("./_export"),o=t("./_parse-float");r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},{"./_export":36,"./_parse-float":88}],188:[function(t,e,n){var r=t("./_export"),o=t("./_parse-int");r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},{"./_export":36,"./_parse-int":89}],189:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-integer"),i=t("./_a-number-value"),a=t("./_string-repeat"),s=1..toFixed,c=Math.floor,u=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",p=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=c(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=c(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+a.call(f,7-n.length)+n}return e},m=function(t,e,n){return 0===e?n:e%2===1?m(t,e-1,n*t):m(t*t,e/2,n)},_=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!t("./_fails")(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,c=i(this,l),u=o(t),g="",v=f;if(u<0||u>20)throw RangeError(l);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(g="-",c=-c),c>1e-21)if(e=_(c*m(2,69,1))-69,n=e<0?c*m(2,-e,1):c/m(2,e,1),n*=4503599627370496,e=52-e,e>0){for(p(0,n),r=u;r>=7;)p(1e7,0),r-=7;for(p(m(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),p(1,1),h(2),v=d()}else p(0,n),p(1<<-e,0),v=d()+a.call(f,u);return u>0?(s=v.length,v=g+(s<=u?"0."+a.call(f,u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u))):v=g+v,v}})},{"./_a-number-value":7,"./_export":36,"./_fails":38,"./_string-repeat":110,"./_to-integer":116}],190:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_fails"),i=t("./_a-number-value"),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},{"./_a-number-value":7,"./_export":36,"./_fails":38}],191:[function(t,e,n){var r=t("./_export");r(r.S+r.F,"Object",{assign:t("./_object-assign")})},{"./_export":36,"./_object-assign":72}],192:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{create:t("./_object-create")})},{"./_export":36,"./_object-create":73}],193:[function(t,e,n){var r=t("./_export");r(r.S+r.F*!t("./_descriptors"),"Object",{defineProperties:t("./_object-dps")})},{"./_descriptors":32,"./_export":36,"./_object-dps":75}],194:[function(t,e,n){var r=t("./_export");r(r.S+r.F*!t("./_descriptors"),"Object",{defineProperty:t("./_object-dp").f})},{"./_descriptors":32,"./_export":36,"./_object-dp":74}],195:[function(t,e,n){var r=t("./_is-object"),o=t("./_meta").onFreeze;t("./_object-sap")("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},{"./_is-object":54,"./_meta":68,"./_object-sap":85}],196:[function(t,e,n){var r=t("./_to-iobject"),o=t("./_object-gopd").f;t("./_object-sap")("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},{"./_object-gopd":77,"./_object-sap":85,"./_to-iobject":117}],197:[function(t,e,n){t("./_object-sap")("getOwnPropertyNames",function(){return t("./_object-gopn-ext").f})},{"./_object-gopn-ext":78,"./_object-sap":85}],198:[function(t,e,n){var r=t("./_to-object"),o=t("./_object-gpo");t("./_object-sap")("getPrototypeOf",function(){return function(t){return o(r(t))}})},{"./_object-gpo":81,"./_object-sap":85,"./_to-object":119}],199:[function(t,e,n){var r=t("./_is-object");t("./_object-sap")("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},{"./_is-object":54,"./_object-sap":85}],200:[function(t,e,n){var r=t("./_is-object");t("./_object-sap")("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},{"./_is-object":54,"./_object-sap":85}],201:[function(t,e,n){var r=t("./_is-object");t("./_object-sap")("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},{"./_is-object":54,"./_object-sap":85}],202:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{is:t("./_same-value")})},{"./_export":36,"./_same-value":96}],203:[function(t,e,n){var r=t("./_to-object"),o=t("./_object-keys");t("./_object-sap")("keys",function(){return function(t){return o(r(t))}})},{"./_object-keys":83,"./_object-sap":85,"./_to-object":119}],204:[function(t,e,n){var r=t("./_is-object"),o=t("./_meta").onFreeze;t("./_object-sap")("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},{"./_is-object":54,"./_meta":68,"./_object-sap":85}],205:[function(t,e,n){var r=t("./_is-object"),o=t("./_meta").onFreeze;t("./_object-sap")("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},{"./_is-object":54,"./_meta":68,"./_object-sap":85}],206:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{setPrototypeOf:t("./_set-proto").set})},{"./_export":36,"./_set-proto":99}],207:[function(t,e,n){"use strict";var r=t("./_classof"),o={};o[t("./_wks")("toStringTag")]="z",o+""!="[object z]"&&t("./_redefine")(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},{"./_classof":20,"./_redefine":94,"./_wks":129}],208:[function(t,e,n){var r=t("./_export"),o=t("./_parse-float");r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},{"./_export":36,"./_parse-float":88}],209:[function(t,e,n){var r=t("./_export"),o=t("./_parse-int");r(r.G+r.F*(parseInt!=o),{parseInt:o})},{"./_export":36,"./_parse-int":89}],210:[function(t,e,n){"use strict";var r,o,i,a,s=t("./_library"),c=t("./_global"),u=t("./_ctx"),l=t("./_classof"),f=t("./_export"),p=t("./_is-object"),h=t("./_a-function"),d=t("./_an-instance"),m=t("./_for-of"),_=t("./_species-constructor"),g=t("./_task").set,v=t("./_microtask")(),y=t("./_new-promise-capability"),b=t("./_perform"),w=t("./_user-agent"),x=t("./_promise-resolve"),S="Promise",j=c.TypeError,k=c.process,P=k&&k.versions,E=P&&P.v8||"",O=c[S],C="process"==l(k),M=function(){},A=o=y.f,L=!!function(){try{var e=O.resolve(1),n=(e.constructor={})[t("./_wks")("species")]=function(t){t(M,M)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(M)instanceof n&&0!==E.indexOf("6.6")&&w.indexOf("Chrome/66")===-1}catch(r){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},T=function(t,e){if(!t._n){t._n=!0;var n=t._c;v(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(o||(2==t._h&&D(t),t._h=1),s===!0?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?u(j("Promise-chain cycle")):(i=I(n))?i.call(n,c,u):c(n)):u(r)}catch(f){l&&!a&&l.exit(),u(f)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&N(t)})}},N=function(t){g.call(c,function(){var e,n,r,o=t._v,i=R(t);if(i&&(e=b(function(){C?k.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=C||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(t){g.call(c,function(){var e;C?k.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),T(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw j("Promise can't be resolved itself");(e=I(t))?v(function(){var r={_w:n,_d:!1};try{e.call(t,u(B,r,1),u(F,r,1))}catch(o){F.call(r,o)}}):(n._v=t,n._s=1,T(n,!1))}catch(r){F.call({_w:n,_d:!1},r)}}};L||(O=function(t){d(this,O,S,"_h"),h(t),r.call(this);try{t(u(B,this,1),u(F,this,1))}catch(e){F.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=t("./_redefine-all")(O.prototype,{then:function(t,e){var n=A(_(this,O));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=C?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},"catch":function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(B,t,1),this.reject=u(F,t,1)},y.f=A=function(t){return t===O||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!L,{Promise:O}),t("./_set-to-string-tag")(O,S),t("./_set-species")(S),a=t("./_core")[S],f(f.S+f.F*!L,S,{reject:function(t){var e=A(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(s||!L),S,{resolve:function(t){return x(s&&this===a?O:this,t)}}),f(f.S+f.F*!(L&&t("./_iter-detect")(function(t){O.all(t)["catch"](M)})),S,{all:function(t){var e=this,n=A(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;m(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=A(e),r=n.reject,o=b(function(){m(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},{"./_a-function":6,"./_an-instance":9,"./_classof":20,"./_core":26,"./_ctx":28,"./_export":36,"./_for-of":42,"./_global":43,"./_is-object":54,"./_iter-detect":59,"./_library":62,"./_microtask":70,"./_new-promise-capability":71,"./_perform":90,"./_promise-resolve":91,"./_redefine-all":93,"./_set-species":100,"./_set-to-string-tag":101,"./_species-constructor":104,"./_task":113,"./_user-agent":125,"./_wks":129}],211:[function(t,e,n){var r=t("./_export"),o=t("./_a-function"),i=t("./_an-object"),a=(t("./_global").Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!t("./_fails")(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),c=i(n);return a?a(r,e,c):s.call(r,e,c)}})},{"./_a-function":6,"./_an-object":10,"./_export":36,"./_fails":38,"./_global":43}],212:[function(t,e,n){var r=t("./_export"),o=t("./_object-create"),i=t("./_a-function"),a=t("./_an-object"),s=t("./_is-object"),c=t("./_fails"),u=t("./_bind"),l=(t("./_global").Reflect||{}).construct,f=c(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),p=!c(function(){l(function(){})});r(r.S+r.F*(f||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!f)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,h=o(s(c)?c:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},{"./_a-function":6,"./_an-object":10,"./_bind":19,"./_export":36,"./_fails":38,"./_global":43,"./_is-object":54,"./_object-create":73}],213:[function(t,e,n){var r=t("./_object-dp"),o=t("./_export"),i=t("./_an-object"),a=t("./_to-primitive");o(o.S+o.F*t("./_fails")(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(o){return!1}}})},{"./_an-object":10,"./_export":36,"./_fails":38,"./_object-dp":74,"./_to-primitive":120}],214:[function(t,e,n){var r=t("./_export"),o=t("./_object-gopd").f,i=t("./_an-object");r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},{"./_an-object":10,"./_export":36,"./_object-gopd":77}],215:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_an-object"),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};t("./_iter-create")(i,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},{"./_an-object":10,"./_export":36,"./_iter-create":57}],216:[function(t,e,n){var r=t("./_object-gopd"),o=t("./_export"),i=t("./_an-object");o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},{"./_an-object":10,"./_export":36,"./_object-gopd":77}],217:[function(t,e,n){var r=t("./_export"),o=t("./_object-gpo"),i=t("./_an-object");r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},{"./_an-object":10,"./_export":36,"./_object-gpo":81}],218:[function(t,e,n){function r(t,e){var n,s,l=arguments.length<3?t:arguments[2];return u(t)===l?t[e]:(n=o.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:c(s=i(t))?r(s,e,l):void 0}var o=t("./_object-gopd"),i=t("./_object-gpo"),a=t("./_has"),s=t("./_export"),c=t("./_is-object"),u=t("./_an-object");s(s.S,"Reflect",{get:r})},{"./_an-object":10,"./_export":36,"./_has":44,"./_is-object":54,"./_object-gopd":77,"./_object-gpo":81}],219:[function(t,e,n){var r=t("./_export");r(r.S,"Reflect",{has:function(t,e){return e in t}})},{"./_export":36}],220:[function(t,e,n){var r=t("./_export"),o=t("./_an-object"),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},{"./_an-object":10,"./_export":36}],221:[function(t,e,n){var r=t("./_export");r(r.S,"Reflect",{ownKeys:t("./_own-keys")})},{"./_export":36,"./_own-keys":87}],222:[function(t,e,n){var r=t("./_export"),o=t("./_an-object"),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(e){return!1}}})},{"./_an-object":10,"./_export":36}],223:[function(t,e,n){var r=t("./_export"),o=t("./_set-proto");o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(n){return!1}}})},{"./_export":36,"./_set-proto":99}],224:[function(t,e,n){function r(t,e,n){var c,p,h=arguments.length<4?t:arguments[3],d=i.f(l(t),e);if(!d){if(f(p=a(t)))return r(p,e,n,h);d=u(0)}if(s(d,"value")){if(d.writable===!1||!f(h))return!1;if(c=i.f(h,e)){if(c.get||c.set||c.writable===!1)return!1;c.value=n,o.f(h,e,c)}else o.f(h,e,u(0,n));return!0}return void 0!==d.set&&(d.set.call(h,n),!0)}var o=t("./_object-dp"),i=t("./_object-gopd"),a=t("./_object-gpo"),s=t("./_has"),c=t("./_export"),u=t("./_property-desc"),l=t("./_an-object"),f=t("./_is-object");c(c.S,"Reflect",{set:r})},{"./_an-object":10,"./_export":36,"./_has":44,"./_is-object":54,"./_object-dp":74,"./_object-gopd":77,"./_object-gpo":81,"./_property-desc":92}],225:[function(t,e,n){var r=t("./_global"),o=t("./_inherit-if-required"),i=t("./_object-dp").f,a=t("./_object-gopn").f,s=t("./_is-regexp"),c=t("./_flags"),u=r.RegExp,l=u,f=u.prototype,p=/a/g,h=/a/g,d=new u(p)!==p;if(t("./_descriptors")&&(!d||t("./_fails")(function(){return h[t("./_wks")("match")]=!1,u(p)!=p||u(h)==h||"/a/i"!=u(p,"i")}))){u=function(t,e){var n=this instanceof u,r=s(t),i=void 0===e;return!n&&r&&t.constructor===u&&i?t:o(d?new l(r&&!i?t.source:t,e):l((r=t instanceof u)?t.source:t,r&&i?c.call(t):e),n?this:f,u)};for(var m=(function(t){t in u||i(u,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),_=a(l),g=0;_.length>g;)m(_[g++]);f.constructor=u,u.prototype=f,t("./_redefine")(r,"RegExp",u)}t("./_set-species")("RegExp")},{"./_descriptors":32,"./_fails":38,"./_flags":40,"./_global":43,"./_inherit-if-required":48,"./_is-regexp":55,"./_object-dp":74,"./_object-gopn":79,"./_redefine":94,"./_set-species":100,"./_wks":129}],226:[function(t,e,n){t("./_descriptors")&&"g"!=/./g.flags&&t("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:t("./_flags")})},{"./_descriptors":32,"./_flags":40,"./_object-dp":74}],227:[function(t,e,n){t("./_fix-re-wks")("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},{"./_fix-re-wks":39}],228:[function(t,e,n){t("./_fix-re-wks")("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},{"./_fix-re-wks":39}],229:[function(t,e,n){t("./_fix-re-wks")("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},{"./_fix-re-wks":39}],230:[function(t,e,n){t("./_fix-re-wks")("split",2,function(e,n,r){"use strict";var o=t("./_is-regexp"),i=r,a=[].push,s="split",c="length",u="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[c]||2!="ab"[s](/(?:ab)*/)[c]||4!="."[s](/(.?)(.?)/)[c]||"."[s](/()()/)[c]>1||""[s](/.?/)[c]){var l=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,s,f,p,h,d=[],m=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),_=0,g=void 0===e?4294967295:e>>>0,v=new RegExp(t.source,m+"g");for(l||(r=new RegExp("^"+v.source+"$(?!\\s)",m));(s=v.exec(n))&&(f=s.index+s[0][c],!(f>_&&(d.push(n.slice(_,s.index)),!l&&s[c]>1&&s[0].replace(r,function(){for(h=1;h<arguments[c]-2;h++)void 0===arguments[h]&&(s[h]=void 0)}),s[c]>1&&s.index<n[c]&&a.apply(d,s.slice(1)),p=s[0][c],_=f,d[c]>=g)));)v[u]===s.index&&v[u]++;return _===n[c]?!p&&v.test("")||d.push(""):d.push(n.slice(_)),d[c]>g?d.slice(0,g):d}}else"0"[s](void 0,0)[c]&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(t,o){var i=e(this),a=void 0==t?void 0:t[n];return void 0!==a?a.call(t,i,o):r.call(String(i),t,o)},r]})},{"./_fix-re-wks":39,"./_is-regexp":55}],231:[function(t,e,n){"use strict";t("./es6.regexp.flags");var r=t("./_an-object"),o=t("./_flags"),i=t("./_descriptors"),a="toString",s=/./[a],c=function(e){t("./_redefine")(RegExp.prototype,a,e,!0)};t("./_fails")(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):s.name!=a&&c(function(){return s.call(this)})},{"./_an-object":10,"./_descriptors":32,"./_fails":38,"./_flags":40,"./_redefine":94,"./es6.regexp.flags":226}],232:[function(t,e,n){"use strict";var r=t("./_collection-strong"),o=t("./_validate-collection"),i="Set";e.exports=t("./_collection")(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t=0===t?0:t,t)}},r)},{"./_collection":25,"./_collection-strong":22,"./_validate-collection":126}],233:[function(t,e,n){"use strict";t("./_string-html")("anchor",function(t){return function(e){return t(this,"a","name",e)}})},{"./_string-html":108}],234:[function(t,e,n){"use strict";t("./_string-html")("big",function(t){return function(){return t(this,"big","","")}})},{"./_string-html":108}],235:[function(t,e,n){"use strict";t("./_string-html")("blink",function(t){return function(){return t(this,"blink","","")}})},{"./_string-html":108}],236:[function(t,e,n){"use strict";t("./_string-html")("bold",function(t){return function(){return t(this,"b","","")}})},{"./_string-html":108}],237:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_string-at")(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},{"./_export":36,"./_string-at":106}],238:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-length"),i=t("./_string-context"),a="endsWith",s=""[a];r(r.P+r.F*t("./_fails-is-regexp")(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),c=void 0===n?r:Math.min(o(n),r),u=String(t);return s?s.call(e,u,c):e.slice(c-u.length,c)===u}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":107,"./_to-length":118}],239:[function(t,e,n){"use strict";t("./_string-html")("fixed",function(t){return function(){return t(this,"tt","","")}})},{"./_string-html":108}],240:[function(t,e,n){"use strict";t("./_string-html")("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},{"./_string-html":108}],241:[function(t,e,n){"use strict";t("./_string-html")("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},{"./_string-html":108}],242:[function(t,e,n){var r=t("./_export"),o=t("./_to-absolute-index"),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},{"./_export":36,"./_to-absolute-index":114}],243:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_string-context"),i="includes";r(r.P+r.F*t("./_fails-is-regexp")(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":107}],244:[function(t,e,n){"use strict";t("./_string-html")("italics",function(t){return function(){return t(this,"i","","")}})},{"./_string-html":108}],245:[function(t,e,n){"use strict";var r=t("./_string-at")(!0);t("./_iter-define")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},{"./_iter-define":58,"./_string-at":106}],246:[function(t,e,n){"use strict";t("./_string-html")("link",function(t){return function(e){return t(this,"a","href",e)}})},{"./_string-html":108}],247:[function(t,e,n){var r=t("./_export"),o=t("./_to-iobject"),i=t("./_to-length");r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("");
4
+ }})},{"./_export":36,"./_to-iobject":117,"./_to-length":118}],248:[function(t,e,n){var r=t("./_export");r(r.P,"String",{repeat:t("./_string-repeat")})},{"./_export":36,"./_string-repeat":110}],249:[function(t,e,n){"use strict";t("./_string-html")("small",function(t){return function(){return t(this,"small","","")}})},{"./_string-html":108}],250:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-length"),i=t("./_string-context"),a="startsWith",s=""[a];r(r.P+r.F*t("./_fails-is-regexp")(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":107,"./_to-length":118}],251:[function(t,e,n){"use strict";t("./_string-html")("strike",function(t){return function(){return t(this,"strike","","")}})},{"./_string-html":108}],252:[function(t,e,n){"use strict";t("./_string-html")("sub",function(t){return function(){return t(this,"sub","","")}})},{"./_string-html":108}],253:[function(t,e,n){"use strict";t("./_string-html")("sup",function(t){return function(){return t(this,"sup","","")}})},{"./_string-html":108}],254:[function(t,e,n){"use strict";t("./_string-trim")("trim",function(t){return function(){return t(this,3)}})},{"./_string-trim":111}],255:[function(t,e,n){"use strict";var r=t("./_global"),o=t("./_has"),i=t("./_descriptors"),a=t("./_export"),s=t("./_redefine"),c=t("./_meta").KEY,u=t("./_fails"),l=t("./_shared"),f=t("./_set-to-string-tag"),p=t("./_uid"),h=t("./_wks"),d=t("./_wks-ext"),m=t("./_wks-define"),_=t("./_enum-keys"),g=t("./_is-array"),v=t("./_an-object"),y=t("./_is-object"),b=t("./_to-iobject"),w=t("./_to-primitive"),x=t("./_property-desc"),S=t("./_object-create"),j=t("./_object-gopn-ext"),k=t("./_object-gopd"),P=t("./_object-dp"),E=t("./_object-keys"),O=k.f,C=P.f,M=j.f,A=r.Symbol,L=r.JSON,I=L&&L.stringify,T="prototype",N=h("_hidden"),R=h("toPrimitive"),D={}.propertyIsEnumerable,F=l("symbol-registry"),B=l("symbols"),H=l("op-symbols"),$=Object[T],U="function"==typeof A,z=r.QObject,W=!z||!z[T]||!z[T].findChild,V=i&&u(function(){return 7!=S(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=O($,e);r&&delete $[e],C(t,e,n),r&&t!==$&&C($,e,r)}:C,q=function(t){var e=B[t]=S(A[T]);return e._k=t,e},G=U&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},K=function(t,e,n){return t===$&&K(H,e,n),v(t),e=w(e,!0),v(n),o(B,e)?(n.enumerable?(o(t,N)&&t[N][e]&&(t[N][e]=!1),n=S(n,{enumerable:x(0,!1)})):(o(t,N)||C(t,N,x(1,{})),t[N][e]=!0),V(t,e,n)):C(t,e,n)},Q=function(t,e){v(t);for(var n,r=_(e=b(e)),o=0,i=r.length;i>o;)K(t,n=r[o++],e[n]);return t},J=function(t,e){return void 0===e?S(t):Q(S(t),e)},Y=function(t){var e=D.call(this,t=w(t,!0));return!(this===$&&o(B,t)&&!o(H,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,N)&&this[N][t])||e)},X=function(t,e){if(t=b(t),e=w(e,!0),t!==$||!o(B,e)||o(H,e)){var n=O(t,e);return!n||!o(B,e)||o(t,N)&&t[N][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=M(b(t)),r=[],i=0;n.length>i;)o(B,e=n[i++])||e==N||e==c||r.push(e);return r},tt=function(t){for(var e,n=t===$,r=M(n?H:b(t)),i=[],a=0;r.length>a;)!o(B,e=r[a++])||n&&!o($,e)||i.push(B[e]);return i};U||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(H,n),o(this,N)&&o(this[N],t)&&(this[N][t]=!1),V(this,t,x(1,n))};return i&&W&&V($,t,{configurable:!0,set:e}),q(t)},s(A[T],"toString",function(){return this._k}),k.f=X,P.f=K,t("./_object-gopn").f=j.f=Z,t("./_object-pie").f=Y,t("./_object-gops").f=tt,i&&!t("./_library")&&s($,"propertyIsEnumerable",Y,!0),d.f=function(t){return q(h(t))}),a(a.G+a.W+a.F*!U,{Symbol:A});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=E(h.store),ot=0;rt.length>ot;)m(rt[ot++]);a(a.S+a.F*!U,"Symbol",{"for":function(t){return o(F,t+="")?F[t]:F[t]=A(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!U,"Object",{create:J,defineProperty:K,defineProperties:Q,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),L&&a(a.S+a.F*(!U||u(function(){var t=A();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(y(e)||void 0!==t)&&!G(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,I.apply(L,r)}}),A[T][R]||t("./_hide")(A[T],R,A[T].valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},{"./_an-object":10,"./_descriptors":32,"./_enum-keys":35,"./_export":36,"./_fails":38,"./_global":43,"./_has":44,"./_hide":45,"./_is-array":52,"./_is-object":54,"./_library":62,"./_meta":68,"./_object-create":73,"./_object-dp":74,"./_object-gopd":77,"./_object-gopn":79,"./_object-gopn-ext":78,"./_object-gops":80,"./_object-keys":83,"./_object-pie":84,"./_property-desc":92,"./_redefine":94,"./_set-to-string-tag":101,"./_shared":103,"./_to-iobject":117,"./_to-primitive":120,"./_uid":124,"./_wks":129,"./_wks-define":127,"./_wks-ext":128}],256:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_typed"),i=t("./_typed-buffer"),a=t("./_an-object"),s=t("./_to-absolute-index"),c=t("./_to-length"),u=t("./_is-object"),l=t("./_global").ArrayBuffer,f=t("./_species-constructor"),p=i.ArrayBuffer,h=i.DataView,d=o.ABV&&l.isView,m=p.prototype.slice,_=o.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(l!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,g,{isView:function(t){return d&&d(t)||u(t)&&_ in t}}),r(r.P+r.U+r.F*t("./_fails")(function(){return!new p(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(f(this,p))(c(o-r)),u=new h(this),l=new h(i),d=0;r<o;)l.setUint8(d++,u.getUint8(r++));return i}}),t("./_set-species")(g)},{"./_an-object":10,"./_export":36,"./_fails":38,"./_global":43,"./_is-object":54,"./_set-species":100,"./_species-constructor":104,"./_to-absolute-index":114,"./_to-length":118,"./_typed":123,"./_typed-buffer":122}],257:[function(t,e,n){var r=t("./_export");r(r.G+r.W+r.F*!t("./_typed").ABV,{DataView:t("./_typed-buffer").DataView})},{"./_export":36,"./_typed":123,"./_typed-buffer":122}],258:[function(t,e,n){t("./_typed-array")("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],259:[function(t,e,n){t("./_typed-array")("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],260:[function(t,e,n){t("./_typed-array")("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],261:[function(t,e,n){t("./_typed-array")("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],262:[function(t,e,n){t("./_typed-array")("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],263:[function(t,e,n){t("./_typed-array")("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],264:[function(t,e,n){t("./_typed-array")("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],265:[function(t,e,n){t("./_typed-array")("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},{"./_typed-array":121}],266:[function(t,e,n){t("./_typed-array")("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},{"./_typed-array":121}],267:[function(t,e,n){"use strict";var r,o=t("./_array-methods")(0),i=t("./_redefine"),a=t("./_meta"),s=t("./_object-assign"),c=t("./_collection-weak"),u=t("./_is-object"),l=t("./_fails"),f=t("./_validate-collection"),p="WeakMap",h=a.getWeak,d=Object.isExtensible,m=c.ufstore,_={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(u(t)){var e=h(t);return e===!0?m(f(this,p)).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(f(this,p),t,e)}},y=e.exports=t("./_collection")(p,g,v,c,!0,!0);l(function(){return 7!=(new y).set((Object.freeze||Object)(_),7).get(_)})&&(r=c.getConstructor(g,p),s(r.prototype,v),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];i(e,t,function(e,o){if(u(e)&&!d(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},{"./_array-methods":15,"./_collection":25,"./_collection-weak":24,"./_fails":38,"./_is-object":54,"./_meta":68,"./_object-assign":72,"./_redefine":94,"./_validate-collection":126}],268:[function(t,e,n){"use strict";var r=t("./_collection-weak"),o=t("./_validate-collection"),i="WeakSet";t("./_collection")(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},{"./_collection":25,"./_collection-weak":24,"./_validate-collection":126}],269:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_flatten-into-array"),i=t("./_to-object"),a=t("./_to-length"),s=t("./_a-function"),c=t("./_array-species-create");r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return s(t),e=a(r.length),n=c(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),t("./_add-to-unscopables")("flatMap")},{"./_a-function":6,"./_add-to-unscopables":8,"./_array-species-create":18,"./_export":36,"./_flatten-into-array":41,"./_to-length":118,"./_to-object":119}],270:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_flatten-into-array"),i=t("./_to-object"),a=t("./_to-length"),s=t("./_to-integer"),c=t("./_array-species-create");r(r.P,"Array",{flatten:function(){var t=arguments[0],e=i(this),n=a(e.length),r=c(e,0);return o(r,e,e,n,0,void 0===t?1:s(t)),r}}),t("./_add-to-unscopables")("flatten")},{"./_add-to-unscopables":8,"./_array-species-create":18,"./_export":36,"./_flatten-into-array":41,"./_to-integer":116,"./_to-length":118,"./_to-object":119}],271:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_array-includes")(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),t("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":8,"./_array-includes":14,"./_export":36}],272:[function(t,e,n){var r=t("./_export"),o=t("./_microtask")(),i=t("./_global").process,a="process"==t("./_cof")(i);r(r.G,{asap:function(t){var e=a&&i.domain;o(e?e.bind(t):t)}})},{"./_cof":21,"./_export":36,"./_global":43,"./_microtask":70}],273:[function(t,e,n){var r=t("./_export"),o=t("./_cof");r(r.S,"Error",{isError:function(t){return"Error"===o(t)}})},{"./_cof":21,"./_export":36}],274:[function(t,e,n){var r=t("./_export");r(r.G,{global:t("./_global")})},{"./_export":36,"./_global":43}],275:[function(t,e,n){t("./_set-collection-from")("Map")},{"./_set-collection-from":97}],276:[function(t,e,n){t("./_set-collection-of")("Map")},{"./_set-collection-of":98}],277:[function(t,e,n){var r=t("./_export");r(r.P+r.R,"Map",{toJSON:t("./_collection-to-json")("Map")})},{"./_collection-to-json":23,"./_export":36}],278:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},{"./_export":36}],279:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},{"./_export":36}],280:[function(t,e,n){var r=t("./_export"),o=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*o}})},{"./_export":36}],281:[function(t,e,n){var r=t("./_export"),o=t("./_math-scale"),i=t("./_math-fround");r(r.S,"Math",{fscale:function(t,e,n,r,a){return i(o(t,e,n,r,a))}})},{"./_export":36,"./_math-fround":64,"./_math-scale":66}],282:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},{"./_export":36}],283:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>16,c=o>>16,u=(s*a>>>0)+(i*a>>>16);return s*c+(u>>16)+((i*c>>>0)+(u&n)>>16)}})},{"./_export":36}],284:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},{"./_export":36}],285:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},{"./_export":36}],286:[function(t,e,n){var r=t("./_export"),o=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*o}})},{"./_export":36}],287:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{scale:t("./_math-scale")})},{"./_export":36,"./_math-scale":66}],288:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},{"./_export":36}],289:[function(t,e,n){var r=t("./_export");r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>>16,c=o>>>16,u=(s*a>>>0)+(i*a>>>16);return s*c+(u>>>16)+((i*c>>>0)+(u&n)>>>16)}})},{"./_export":36}],290:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-object"),i=t("./_a-function"),a=t("./_object-dp");t("./_descriptors")&&r(r.P+t("./_object-forced-pam"),"Object",{__defineGetter__:function(t,e){a.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},{"./_a-function":6,"./_descriptors":32,"./_export":36,"./_object-dp":74,"./_object-forced-pam":76,"./_to-object":119}],291:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-object"),i=t("./_a-function"),a=t("./_object-dp");t("./_descriptors")&&r(r.P+t("./_object-forced-pam"),"Object",{__defineSetter__:function(t,e){a.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},{"./_a-function":6,"./_descriptors":32,"./_export":36,"./_object-dp":74,"./_object-forced-pam":76,"./_to-object":119}],292:[function(t,e,n){var r=t("./_export"),o=t("./_object-to-array")(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},{"./_export":36,"./_object-to-array":86}],293:[function(t,e,n){var r=t("./_export"),o=t("./_own-keys"),i=t("./_to-iobject"),a=t("./_object-gopd"),s=t("./_create-property");r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,u=o(r),l={},f=0;u.length>f;)n=c(r,e=u[f++]),void 0!==n&&s(l,e,n);return l}})},{"./_create-property":27,"./_export":36,"./_object-gopd":77,"./_own-keys":87,"./_to-iobject":117}],294:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-object"),i=t("./_to-primitive"),a=t("./_object-gpo"),s=t("./_object-gopd").f;t("./_descriptors")&&r(r.P+t("./_object-forced-pam"),"Object",{__lookupGetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=s(n,r))return e.get;while(n=a(n))}})},{"./_descriptors":32,"./_export":36,"./_object-forced-pam":76,"./_object-gopd":77,"./_object-gpo":81,"./_to-object":119,"./_to-primitive":120}],295:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_to-object"),i=t("./_to-primitive"),a=t("./_object-gpo"),s=t("./_object-gopd").f;t("./_descriptors")&&r(r.P+t("./_object-forced-pam"),"Object",{__lookupSetter__:function(t){var e,n=o(this),r=i(t,!0);do if(e=s(n,r))return e.set;while(n=a(n))}})},{"./_descriptors":32,"./_export":36,"./_object-forced-pam":76,"./_object-gopd":77,"./_object-gpo":81,"./_to-object":119,"./_to-primitive":120}],296:[function(t,e,n){var r=t("./_export"),o=t("./_object-to-array")(!1);r(r.S,"Object",{values:function(t){return o(t)}})},{"./_export":36,"./_object-to-array":86}],297:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_global"),i=t("./_core"),a=t("./_microtask")(),s=t("./_wks")("observable"),c=t("./_a-function"),u=t("./_an-object"),l=t("./_an-instance"),f=t("./_redefine-all"),p=t("./_hide"),h=t("./_for-of"),d=h.RETURN,m=function(t){return null==t?void 0:c(t)},_=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},v=function(t){g(t)||(t._o=void 0,_(t))},y=function(t,e){u(t),this._c=void 0,this._o=t,t=new b(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(o){return void t.error(o)}g(this)&&_(this)};y.prototype=f({},{unsubscribe:function(){v(this)}});var b=function(t){this._s=t};b.prototype=f({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=m(n.next);if(r)return r.call(n,t)}catch(o){try{v(e)}finally{throw o}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=m(n.error);if(!r)throw t;t=r.call(n,t)}catch(o){try{_(e)}finally{throw o}}return _(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=m(n.complete);t=r?r.call(n,t):void 0}catch(o){try{_(e)}finally{throw o}}return _(e),t}}});var w=function(t){l(this,w,"Observable","_f")._f=c(t)};f(w.prototype,{subscribe:function(t){return new y(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(n,r){c(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(n){r(n),o.unsubscribe()}},error:r,complete:n})})}}),f(w,{from:function(t){var e="function"==typeof this?this:w,n=m(u(t)[s]);if(n){var r=u(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(h(t,!1,function(t){if(e.next(t),n)return d})===d)return}catch(r){if(n)throw r;return void e.error(r)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),p(w.prototype,s,function(){return this}),r(r.G,{Observable:w}),t("./_set-species")("Observable")},{"./_a-function":6,"./_an-instance":9,"./_an-object":10,"./_core":26,"./_export":36,"./_for-of":42,"./_global":43,"./_hide":45,"./_microtask":70,"./_redefine-all":93,"./_set-species":100,"./_wks":129}],298:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_core"),i=t("./_global"),a=t("./_species-constructor"),s=t("./_promise-resolve");r(r.P+r.R,"Promise",{"finally":function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},{"./_core":26,"./_export":36,"./_global":43,"./_promise-resolve":91,"./_species-constructor":104}],299:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_new-promise-capability"),i=t("./_perform");r(r.S,"Promise",{"try":function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},{"./_export":36,"./_new-promise-capability":71,"./_perform":90}],300:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},{"./_an-object":10,"./_metadata":69}],301:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(e),n,!1);if(void 0===r||!r["delete"](t))return!1;if(r.size)return!0;var c=s.get(e);return c["delete"](n),!!c.size||s["delete"](e)}})},{"./_an-object":10,"./_metadata":69}],302:[function(t,e,n){var r=t("./es6.set"),o=t("./_array-from-iterable"),i=t("./_metadata"),a=t("./_an-object"),s=t("./_object-gpo"),c=i.keys,u=i.key,l=function(t,e){var n=c(t,e),i=s(t);if(null===i)return n;var a=l(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:u(arguments[1]))}})},{"./_an-object":10,"./_array-from-iterable":13,"./_metadata":69,"./_object-gpo":81,"./es6.set":232}],303:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=t("./_object-gpo"),a=r.has,s=r.get,c=r.key,u=function(t,e,n){var r=a(t,e,n);if(r)return s(t,e,n);var o=i(e);return null!==o?u(t,o,n):void 0};r.exp({getMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:c(arguments[2]))}})},{"./_an-object":10,"./_metadata":69,"./_object-gpo":81}],304:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},{"./_an-object":10,"./_metadata":69}],305:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},{"./_an-object":10,"./_metadata":69}],306:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=t("./_object-gpo"),a=r.has,s=r.key,c=function(t,e,n){var r=a(t,e,n);if(r)return!0;var o=i(e);return null!==o&&c(t,o,n)};r.exp({hasMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},{"./_an-object":10,"./_metadata":69,"./_object-gpo":81}],307:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},{"./_an-object":10,"./_metadata":69}],308:[function(t,e,n){var r=t("./_metadata"),o=t("./_an-object"),i=t("./_a-function"),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?o:i)(n),a(r))}}})},{"./_a-function":6,"./_an-object":10,"./_metadata":69}],309:[function(t,e,n){t("./_set-collection-from")("Set")},{"./_set-collection-from":97}],310:[function(t,e,n){t("./_set-collection-of")("Set")},{"./_set-collection-of":98}],311:[function(t,e,n){var r=t("./_export");r(r.P+r.R,"Set",{toJSON:t("./_collection-to-json")("Set")})},{"./_collection-to-json":23,"./_export":36}],312:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_string-at")(!0);r(r.P,"String",{at:function(t){return o(this,t)}})},{"./_export":36,"./_string-at":106}],313:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_defined"),i=t("./_to-length"),a=t("./_is-regexp"),s=t("./_flags"),c=RegExp.prototype,u=function(t,e){this._r=t,this._s=e};t("./_iter-create")(u,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(o(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(t.lastIndex),new u(r,e)}})},{"./_defined":31,"./_export":36,"./_flags":40,"./_is-regexp":55,"./_iter-create":57,"./_to-length":118}],314:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_string-pad"),i=t("./_user-agent");r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},{"./_export":36,"./_string-pad":109,"./_user-agent":125}],315:[function(t,e,n){"use strict";var r=t("./_export"),o=t("./_string-pad"),i=t("./_user-agent");r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":36,"./_string-pad":109,"./_user-agent":125}],316:[function(t,e,n){"use strict";t("./_string-trim")("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},{"./_string-trim":111}],317:[function(t,e,n){"use strict";t("./_string-trim")("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},{"./_string-trim":111}],318:[function(t,e,n){t("./_wks-define")("asyncIterator")},{"./_wks-define":127}],319:[function(t,e,n){t("./_wks-define")("observable")},{"./_wks-define":127}],320:[function(t,e,n){var r=t("./_export");r(r.S,"System",{global:t("./_global")})},{"./_export":36,"./_global":43}],321:[function(t,e,n){t("./_set-collection-from")("WeakMap")},{"./_set-collection-from":97}],322:[function(t,e,n){t("./_set-collection-of")("WeakMap")},{"./_set-collection-of":98}],323:[function(t,e,n){t("./_set-collection-from")("WeakSet")},{"./_set-collection-from":97}],324:[function(t,e,n){t("./_set-collection-of")("WeakSet")},{"./_set-collection-of":98}],325:[function(t,e,n){for(var r=t("./es6.array.iterator"),o=t("./_object-keys"),i=t("./_redefine"),a=t("./_global"),s=t("./_hide"),c=t("./_iterators"),u=t("./_wks"),l=u("iterator"),f=u("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(h),m=0;m<d.length;m++){var _,g=d[m],v=h[g],y=a[g],b=y&&y.prototype;if(b&&(b[l]||s(b,l,p),b[f]||s(b,f,g),c[g]=p,v))for(_ in r)b[_]||i(b,_,r[_],!0)}},{"./_global":43,"./_hide":45,"./_iterators":61,"./_object-keys":83,"./_redefine":94,"./_wks":129,"./es6.array.iterator":142}],326:[function(t,e,n){var r=t("./_export"),o=t("./_task");r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},{"./_export":36,"./_task":113}],327:[function(t,e,n){var r=t("./_global"),o=t("./_export"),i=t("./_user-agent"),a=[].slice,s=/MSIE .\./.test(i),c=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},{"./_export":36,"./_global":43,"./_user-agent":125}],328:[function(t,e,n){t("./modules/es6.symbol"),t("./modules/es6.object.create"),t("./modules/es6.object.define-property"),t("./modules/es6.object.define-properties"),t("./modules/es6.object.get-own-property-descriptor"),t("./modules/es6.object.get-prototype-of"),t("./modules/es6.object.keys"),t("./modules/es6.object.get-own-property-names"),t("./modules/es6.object.freeze"),t("./modules/es6.object.seal"),t("./modules/es6.object.prevent-extensions"),t("./modules/es6.object.is-frozen"),t("./modules/es6.object.is-sealed"),t("./modules/es6.object.is-extensible"),t("./modules/es6.object.assign"),t("./modules/es6.object.is"),t("./modules/es6.object.set-prototype-of"),t("./modules/es6.object.to-string"),t("./modules/es6.function.bind"),t("./modules/es6.function.name"),t("./modules/es6.function.has-instance"),t("./modules/es6.parse-int"),t("./modules/es6.parse-float"),t("./modules/es6.number.constructor"),t("./modules/es6.number.to-fixed"),t("./modules/es6.number.to-precision"),t("./modules/es6.number.epsilon"),t("./modules/es6.number.is-finite"),t("./modules/es6.number.is-integer"),t("./modules/es6.number.is-nan"),t("./modules/es6.number.is-safe-integer"),t("./modules/es6.number.max-safe-integer"),t("./modules/es6.number.min-safe-integer"),t("./modules/es6.number.parse-float"),t("./modules/es6.number.parse-int"),t("./modules/es6.math.acosh"),t("./modules/es6.math.asinh"),t("./modules/es6.math.atanh"),t("./modules/es6.math.cbrt"),t("./modules/es6.math.clz32"),t("./modules/es6.math.cosh"),t("./modules/es6.math.expm1"),t("./modules/es6.math.fround"),t("./modules/es6.math.hypot"),t("./modules/es6.math.imul"),t("./modules/es6.math.log10"),t("./modules/es6.math.log1p"),t("./modules/es6.math.log2"),t("./modules/es6.math.sign"),t("./modules/es6.math.sinh"),t("./modules/es6.math.tanh"),t("./modules/es6.math.trunc"),t("./modules/es6.string.from-code-point"),t("./modules/es6.string.raw"),t("./modules/es6.string.trim"),t("./modules/es6.string.iterator"),t("./modules/es6.string.code-point-at"),t("./modules/es6.string.ends-with"),t("./modules/es6.string.includes"),t("./modules/es6.string.repeat"),t("./modules/es6.string.starts-with"),t("./modules/es6.string.anchor"),t("./modules/es6.string.big"),t("./modules/es6.string.blink"),t("./modules/es6.string.bold"),t("./modules/es6.string.fixed"),t("./modules/es6.string.fontcolor"),t("./modules/es6.string.fontsize"),t("./modules/es6.string.italics"),t("./modules/es6.string.link"),t("./modules/es6.string.small"),t("./modules/es6.string.strike"),t("./modules/es6.string.sub"),t("./modules/es6.string.sup"),t("./modules/es6.date.now"),t("./modules/es6.date.to-json"),t("./modules/es6.date.to-iso-string"),t("./modules/es6.date.to-string"),t("./modules/es6.date.to-primitive"),t("./modules/es6.array.is-array"),t("./modules/es6.array.from"),t("./modules/es6.array.of"),t("./modules/es6.array.join"),t("./modules/es6.array.slice"),t("./modules/es6.array.sort"),t("./modules/es6.array.for-each"),t("./modules/es6.array.map"),t("./modules/es6.array.filter"),t("./modules/es6.array.some"),t("./modules/es6.array.every"),t("./modules/es6.array.reduce"),t("./modules/es6.array.reduce-right"),t("./modules/es6.array.index-of"),t("./modules/es6.array.last-index-of"),t("./modules/es6.array.copy-within"),t("./modules/es6.array.fill"),t("./modules/es6.array.find"),t("./modules/es6.array.find-index"),t("./modules/es6.array.species"),t("./modules/es6.array.iterator"),t("./modules/es6.regexp.constructor"),t("./modules/es6.regexp.to-string"),t("./modules/es6.regexp.flags"),t("./modules/es6.regexp.match"),t("./modules/es6.regexp.replace"),t("./modules/es6.regexp.search"),t("./modules/es6.regexp.split"),t("./modules/es6.promise"),t("./modules/es6.map"),t("./modules/es6.set"),t("./modules/es6.weak-map"),t("./modules/es6.weak-set"),t("./modules/es6.typed.array-buffer"),t("./modules/es6.typed.data-view"),t("./modules/es6.typed.int8-array"),t("./modules/es6.typed.uint8-array"),t("./modules/es6.typed.uint8-clamped-array"),t("./modules/es6.typed.int16-array"),t("./modules/es6.typed.uint16-array"),t("./modules/es6.typed.int32-array"),t("./modules/es6.typed.uint32-array"),t("./modules/es6.typed.float32-array"),t("./modules/es6.typed.float64-array"),t("./modules/es6.reflect.apply"),t("./modules/es6.reflect.construct"),t("./modules/es6.reflect.define-property"),t("./modules/es6.reflect.delete-property"),t("./modules/es6.reflect.enumerate"),t("./modules/es6.reflect.get"),t("./modules/es6.reflect.get-own-property-descriptor"),t("./modules/es6.reflect.get-prototype-of"),t("./modules/es6.reflect.has"),t("./modules/es6.reflect.is-extensible"),t("./modules/es6.reflect.own-keys"),t("./modules/es6.reflect.prevent-extensions"),t("./modules/es6.reflect.set"),t("./modules/es6.reflect.set-prototype-of"),t("./modules/es7.array.includes"),t("./modules/es7.array.flat-map"),t("./modules/es7.array.flatten"),t("./modules/es7.string.at"),t("./modules/es7.string.pad-start"),t("./modules/es7.string.pad-end"),t("./modules/es7.string.trim-left"),t("./modules/es7.string.trim-right"),t("./modules/es7.string.match-all"),t("./modules/es7.symbol.async-iterator"),t("./modules/es7.symbol.observable"),t("./modules/es7.object.get-own-property-descriptors"),t("./modules/es7.object.values"),t("./modules/es7.object.entries"),t("./modules/es7.object.define-getter"),t("./modules/es7.object.define-setter"),t("./modules/es7.object.lookup-getter"),t("./modules/es7.object.lookup-setter"),t("./modules/es7.map.to-json"),t("./modules/es7.set.to-json"),t("./modules/es7.map.of"),t("./modules/es7.set.of"),t("./modules/es7.weak-map.of"),t("./modules/es7.weak-set.of"),t("./modules/es7.map.from"),t("./modules/es7.set.from"),t("./modules/es7.weak-map.from"),t("./modules/es7.weak-set.from"),t("./modules/es7.global"),t("./modules/es7.system.global"),t("./modules/es7.error.is-error"),t("./modules/es7.math.clamp"),t("./modules/es7.math.deg-per-rad"),t("./modules/es7.math.degrees"),t("./modules/es7.math.fscale"),t("./modules/es7.math.iaddh"),t("./modules/es7.math.isubh"),t("./modules/es7.math.imulh"),t("./modules/es7.math.rad-per-deg"),t("./modules/es7.math.radians"),t("./modules/es7.math.scale"),t("./modules/es7.math.umulh"),t("./modules/es7.math.signbit"),t("./modules/es7.promise.finally"),t("./modules/es7.promise.try"),t("./modules/es7.reflect.define-metadata"),t("./modules/es7.reflect.delete-metadata"),t("./modules/es7.reflect.get-metadata"),
5
+ t("./modules/es7.reflect.get-metadata-keys"),t("./modules/es7.reflect.get-own-metadata"),t("./modules/es7.reflect.get-own-metadata-keys"),t("./modules/es7.reflect.has-metadata"),t("./modules/es7.reflect.has-own-metadata"),t("./modules/es7.reflect.metadata"),t("./modules/es7.asap"),t("./modules/es7.observable"),t("./modules/web.timers"),t("./modules/web.immediate"),t("./modules/web.dom.iterable"),e.exports=t("./modules/_core")},{"./modules/_core":26,"./modules/es6.array.copy-within":132,"./modules/es6.array.every":133,"./modules/es6.array.fill":134,"./modules/es6.array.filter":135,"./modules/es6.array.find":137,"./modules/es6.array.find-index":136,"./modules/es6.array.for-each":138,"./modules/es6.array.from":139,"./modules/es6.array.index-of":140,"./modules/es6.array.is-array":141,"./modules/es6.array.iterator":142,"./modules/es6.array.join":143,"./modules/es6.array.last-index-of":144,"./modules/es6.array.map":145,"./modules/es6.array.of":146,"./modules/es6.array.reduce":148,"./modules/es6.array.reduce-right":147,"./modules/es6.array.slice":149,"./modules/es6.array.some":150,"./modules/es6.array.sort":151,"./modules/es6.array.species":152,"./modules/es6.date.now":153,"./modules/es6.date.to-iso-string":154,"./modules/es6.date.to-json":155,"./modules/es6.date.to-primitive":156,"./modules/es6.date.to-string":157,"./modules/es6.function.bind":158,"./modules/es6.function.has-instance":159,"./modules/es6.function.name":160,"./modules/es6.map":161,"./modules/es6.math.acosh":162,"./modules/es6.math.asinh":163,"./modules/es6.math.atanh":164,"./modules/es6.math.cbrt":165,"./modules/es6.math.clz32":166,"./modules/es6.math.cosh":167,"./modules/es6.math.expm1":168,"./modules/es6.math.fround":169,"./modules/es6.math.hypot":170,"./modules/es6.math.imul":171,"./modules/es6.math.log10":172,"./modules/es6.math.log1p":173,"./modules/es6.math.log2":174,"./modules/es6.math.sign":175,"./modules/es6.math.sinh":176,"./modules/es6.math.tanh":177,"./modules/es6.math.trunc":178,"./modules/es6.number.constructor":179,"./modules/es6.number.epsilon":180,"./modules/es6.number.is-finite":181,"./modules/es6.number.is-integer":182,"./modules/es6.number.is-nan":183,"./modules/es6.number.is-safe-integer":184,"./modules/es6.number.max-safe-integer":185,"./modules/es6.number.min-safe-integer":186,"./modules/es6.number.parse-float":187,"./modules/es6.number.parse-int":188,"./modules/es6.number.to-fixed":189,"./modules/es6.number.to-precision":190,"./modules/es6.object.assign":191,"./modules/es6.object.create":192,"./modules/es6.object.define-properties":193,"./modules/es6.object.define-property":194,"./modules/es6.object.freeze":195,"./modules/es6.object.get-own-property-descriptor":196,"./modules/es6.object.get-own-property-names":197,"./modules/es6.object.get-prototype-of":198,"./modules/es6.object.is":202,"./modules/es6.object.is-extensible":199,"./modules/es6.object.is-frozen":200,"./modules/es6.object.is-sealed":201,"./modules/es6.object.keys":203,"./modules/es6.object.prevent-extensions":204,"./modules/es6.object.seal":205,"./modules/es6.object.set-prototype-of":206,"./modules/es6.object.to-string":207,"./modules/es6.parse-float":208,"./modules/es6.parse-int":209,"./modules/es6.promise":210,"./modules/es6.reflect.apply":211,"./modules/es6.reflect.construct":212,"./modules/es6.reflect.define-property":213,"./modules/es6.reflect.delete-property":214,"./modules/es6.reflect.enumerate":215,"./modules/es6.reflect.get":218,"./modules/es6.reflect.get-own-property-descriptor":216,"./modules/es6.reflect.get-prototype-of":217,"./modules/es6.reflect.has":219,"./modules/es6.reflect.is-extensible":220,"./modules/es6.reflect.own-keys":221,"./modules/es6.reflect.prevent-extensions":222,"./modules/es6.reflect.set":224,"./modules/es6.reflect.set-prototype-of":223,"./modules/es6.regexp.constructor":225,"./modules/es6.regexp.flags":226,"./modules/es6.regexp.match":227,"./modules/es6.regexp.replace":228,"./modules/es6.regexp.search":229,"./modules/es6.regexp.split":230,"./modules/es6.regexp.to-string":231,"./modules/es6.set":232,"./modules/es6.string.anchor":233,"./modules/es6.string.big":234,"./modules/es6.string.blink":235,"./modules/es6.string.bold":236,"./modules/es6.string.code-point-at":237,"./modules/es6.string.ends-with":238,"./modules/es6.string.fixed":239,"./modules/es6.string.fontcolor":240,"./modules/es6.string.fontsize":241,"./modules/es6.string.from-code-point":242,"./modules/es6.string.includes":243,"./modules/es6.string.italics":244,"./modules/es6.string.iterator":245,"./modules/es6.string.link":246,"./modules/es6.string.raw":247,"./modules/es6.string.repeat":248,"./modules/es6.string.small":249,"./modules/es6.string.starts-with":250,"./modules/es6.string.strike":251,"./modules/es6.string.sub":252,"./modules/es6.string.sup":253,"./modules/es6.string.trim":254,"./modules/es6.symbol":255,"./modules/es6.typed.array-buffer":256,"./modules/es6.typed.data-view":257,"./modules/es6.typed.float32-array":258,"./modules/es6.typed.float64-array":259,"./modules/es6.typed.int16-array":260,"./modules/es6.typed.int32-array":261,"./modules/es6.typed.int8-array":262,"./modules/es6.typed.uint16-array":263,"./modules/es6.typed.uint32-array":264,"./modules/es6.typed.uint8-array":265,"./modules/es6.typed.uint8-clamped-array":266,"./modules/es6.weak-map":267,"./modules/es6.weak-set":268,"./modules/es7.array.flat-map":269,"./modules/es7.array.flatten":270,"./modules/es7.array.includes":271,"./modules/es7.asap":272,"./modules/es7.error.is-error":273,"./modules/es7.global":274,"./modules/es7.map.from":275,"./modules/es7.map.of":276,"./modules/es7.map.to-json":277,"./modules/es7.math.clamp":278,"./modules/es7.math.deg-per-rad":279,"./modules/es7.math.degrees":280,"./modules/es7.math.fscale":281,"./modules/es7.math.iaddh":282,"./modules/es7.math.imulh":283,"./modules/es7.math.isubh":284,"./modules/es7.math.rad-per-deg":285,"./modules/es7.math.radians":286,"./modules/es7.math.scale":287,"./modules/es7.math.signbit":288,"./modules/es7.math.umulh":289,"./modules/es7.object.define-getter":290,"./modules/es7.object.define-setter":291,"./modules/es7.object.entries":292,"./modules/es7.object.get-own-property-descriptors":293,"./modules/es7.object.lookup-getter":294,"./modules/es7.object.lookup-setter":295,"./modules/es7.object.values":296,"./modules/es7.observable":297,"./modules/es7.promise.finally":298,"./modules/es7.promise.try":299,"./modules/es7.reflect.define-metadata":300,"./modules/es7.reflect.delete-metadata":301,"./modules/es7.reflect.get-metadata":303,"./modules/es7.reflect.get-metadata-keys":302,"./modules/es7.reflect.get-own-metadata":305,"./modules/es7.reflect.get-own-metadata-keys":304,"./modules/es7.reflect.has-metadata":306,"./modules/es7.reflect.has-own-metadata":307,"./modules/es7.reflect.metadata":308,"./modules/es7.set.from":309,"./modules/es7.set.of":310,"./modules/es7.set.to-json":311,"./modules/es7.string.at":312,"./modules/es7.string.match-all":313,"./modules/es7.string.pad-end":314,"./modules/es7.string.pad-start":315,"./modules/es7.string.trim-left":316,"./modules/es7.string.trim-right":317,"./modules/es7.symbol.async-iterator":318,"./modules/es7.symbol.observable":319,"./modules/es7.system.global":320,"./modules/es7.weak-map.from":321,"./modules/es7.weak-map.of":322,"./modules/es7.weak-set.from":323,"./modules/es7.weak-set.of":324,"./modules/web.dom.iterable":325,"./modules/web.immediate":326,"./modules/web.timers":327}],329:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=g();return t.compile=function(e,n){return l.compile(e,n,t)},t.precompile=function(e,n){return l.precompile(e,n,t)},t.AST=c["default"],t.Compiler=l.Compiler,t.JavaScriptCompiler=p["default"],t.Parser=u.parser,t.parse=u.parse,t}n.__esModule=!0;var i=t("./handlebars.runtime"),a=r(i),s=t("./handlebars/compiler/ast"),c=r(s),u=t("./handlebars/compiler/base"),l=t("./handlebars/compiler/compiler"),f=t("./handlebars/compiler/javascript-compiler"),p=r(f),h=t("./handlebars/compiler/visitor"),d=r(h),m=t("./handlebars/no-conflict"),_=r(m),g=a["default"].create,v=o();v.create=o,_["default"](v),v.Visitor=d["default"],v["default"]=v,n["default"]=v,e.exports=n["default"]},{"./handlebars.runtime":330,"./handlebars/compiler/ast":332,"./handlebars/compiler/base":333,"./handlebars/compiler/compiler":335,"./handlebars/compiler/javascript-compiler":337,"./handlebars/compiler/visitor":340,"./handlebars/no-conflict":354}],330:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(){var t=new s.HandlebarsEnvironment;return h.extend(t,s),t.SafeString=u["default"],t.Exception=f["default"],t.Utils=h,t.escapeExpression=h.escapeExpression,t.VM=m,t.template=function(e){return m.template(e,t)},t}n.__esModule=!0;var a=t("./handlebars/base"),s=o(a),c=t("./handlebars/safe-string"),u=r(c),l=t("./handlebars/exception"),f=r(l),p=t("./handlebars/utils"),h=o(p),d=t("./handlebars/runtime"),m=o(d),_=t("./handlebars/no-conflict"),g=r(_),v=i();v.create=i,g["default"](v),v["default"]=v,n["default"]=v,e.exports=n["default"]},{"./handlebars/base":331,"./handlebars/exception":344,"./handlebars/no-conflict":354,"./handlebars/runtime":355,"./handlebars/safe-string":356,"./handlebars/utils":357}],331:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},c.registerDefaultHelpers(this),u.registerDefaultDecorators(this)}n.__esModule=!0,n.HandlebarsEnvironment=o;var i=t("./utils"),a=t("./exception"),s=r(a),c=t("./helpers"),u=t("./decorators"),l=t("./logger"),f=r(l),p="4.0.11";n.VERSION=p;var h=7;n.COMPILER_REVISION=h;var d={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};n.REVISION_CHANGES=d;var m="[object Object]";o.prototype={constructor:o,logger:f["default"],log:f["default"].log,registerHelper:function(t,e){if(i.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(i.toString.call(t)===m)i.extend(this.partials,t);else{if("undefined"==typeof e)throw new s["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(i.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var _=f["default"].log;n.log=_,n.createFrame=i.createFrame,n.logger=f["default"]},{"./decorators":342,"./exception":344,"./helpers":345,"./logger":353,"./utils":357}],332:[function(t,e,n){"use strict";n.__esModule=!0;var r={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!r.helpers.scopedId(t)&&!t.depth}}};n["default"]=r,e.exports=n["default"]},{}],333:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if("Program"===t.type)return t;s["default"].yy=h,h.locInfo=function(t){return new h.SourceLocation(e&&e.srcName,t)};var n=new u["default"](e);return n.accept(s["default"].parse(t))}n.__esModule=!0,n.parse=i;var a=t("./parser"),s=o(a),c=t("./whitespace-control"),u=o(c),l=t("./helpers"),f=r(l),p=t("../utils");n.parser=s["default"];var h={};p.extend(h,f)},{"../utils":357,"./helpers":336,"./parser":338,"./whitespace-control":341}],334:[function(t,e,n){"use strict";function r(t,e,n){if(i.isArray(t)){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e.wrap(t[o],n));return r}return"boolean"==typeof t||"number"==typeof t?t+"":t}function o(t){this.srcFile=t,this.source=[]}n.__esModule=!0;var i=t("../utils"),a=void 0;try{if("function"!=typeof define||!define.amd){var s=t("source-map");a=s.SourceNode}}catch(c){}a||(a=function(t,e,n,r){this.src="",r&&this.add(r)},a.prototype={add:function(t){i.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){i.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),o.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,n=this.source.length;e<n;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new a(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof a?t:(t=r(t,this,e),new a(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,n){return n=this.generateList(n),this.wrap([t,e?"."+e+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var o=r(t[n],this);"undefined"!==o&&e.push([this.quotedString(n),":",o])}var i=this.generateList(e);return i.prepend("{"),i.add("}"),i},generateList:function(t){for(var e=this.empty(),n=0,o=t.length;n<o;n++)n&&e.add(","),e.add(r(t[n],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},n["default"]=o,e.exports=n["default"]},{"../utils":357,"source-map":359}],335:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){}function i(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=n.parse(t,e),o=(new n.Compiler).compile(r,e);return(new n.JavaScriptCompiler).compile(o,e)}function a(t,e,n){function r(){var r=n.parse(t,e),o=(new n.Compiler).compile(r,e),i=(new n.JavaScriptCompiler).compile(o,e,void 0,!0);return n.template(i)}function o(t,e){return i||(i=r()),i.call(this,t,e)}if(void 0===e&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=f.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var i=void 0;return o._setup=function(t){return i||(i=r()),i._setup(t)},o._child=function(t,e,n,o){return i||(i=r()),i._child(t,e,n,o)},o}function s(t,e){if(t===e)return!0;if(f.isArray(t)&&f.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!s(t[n],e[n]))return!1;return!0}}function c(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}n.__esModule=!0,n.Compiler=o,n.precompile=i,n.compile=a;var u=t("../exception"),l=r(u),f=t("../utils"),p=t("./ast"),h=r(p),d=[].slice;o.prototype={compiler:o,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var n=0;n<e;n++){var r=this.opcodes[n],o=t.opcodes[n];if(r.opcode!==o.opcode||!s(r.args,o.args))return!1}e=this.children.length;for(var n=0;n<e;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var n=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},n)for(var r in n)r in n&&(this.options.knownHelpers[r]=n[r]);return this.accept(t)},compileProgram:function(t){var e=new this.compiler,n=e.compile(t,this.options),r=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[r]=n,this.useDepths=this.useDepths||n.useDepths,r},accept:function(t){if(!this[t.type])throw new l["default"]("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,n=e.length,r=0;r<n;r++)this.accept(e[r]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){c(t);var e=t.program,n=t.inverse;e=e&&this.compileProgram(e),n=n&&this.compileProgram(n);var r=this.classifySexpr(t);"helper"===r?this.helperSexpr(t,e,n):"simple"===r?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,n),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,e,void 0),r=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,r.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new l["default"]("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=t.name.original,o="SubExpression"===t.name.type;o&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var i=t.indent||"";this.options.preventIndent&&i&&(this.opcode("appendContent",i),i=""),this.opcode("invokePartial",o,r,i),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){c(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var r=t.path,o=r.parts[0],i=null!=e||null!=n;this.opcode("getContext",r.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",o,i)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var r=this.setupFullMustacheParams(t,e,n),o=t.path,i=o.parts[0];if(this.options.knownHelpers[i])this.opcode("invokeKnownHelper",r.length,i);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+i,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",r.length,o.original,h["default"].helpers.simpleId(o))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=h["default"].helpers.scopedId(t),r=!t.depth&&!n&&this.blockParamIndex(e);r?this.opcode("lookupBlockParam",r,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,r=e.length;for(this.opcode("pushHash");n<r;n++)this.pushParam(e[n].value);for(;n--;)this.opcode("assignToHash",e[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:d.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=h["default"].helpers.simpleId(t.path),n=e&&!!this.blockParamIndex(t.path.parts[0]),r=!n&&h["default"].helpers.helperExpression(t),o=!n&&(r||e);if(o&&!r){var i=t.path.parts[0],a=this.options;a.knownHelpers[i]?r=!0:a.knownHelpersOnly&&(o=!1)}return r?"helper":o?"ambiguous":"simple"},pushParams:function(t){for(var e=0,n=t.length;e<n;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var n=void 0;if(!t.parts||h["default"].helpers.scopedId(t)||t.depth||(n=this.blockParamIndex(t.parts[0])),n){var r=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,r)}else e=t.original||e,e.replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,n,r){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",e),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",r),o},blockParamIndex:function(t){for(var e=0,n=this.options.blockParams.length;e<n;e++){var r=this.options.blockParams[e],o=r&&f.indexOf(r,t);if(r&&o>=0)return[e,o]}}}},{"../exception":344,"../utils":357,"./ast":332}],336:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new _["default"](t.path.original+" doesn't match "+e,n)}}function i(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function a(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t}function s(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}}function c(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function u(t,e,n){n=this.locInfo(n);for(var r=t?"@":"",o=[],i=0,a="",s=0,c=e.length;s<c;s++){var u=e[s].part,l=e[s].original!==u;if(r+=(e[s].separator||"")+u,l||".."!==u&&"."!==u&&"this"!==u)o.push(u);else{if(o.length>0)throw new _["default"]("Invalid path: "+r,{loc:n});".."===u&&(i++,a+="../")}}return{type:"PathExpression",data:t,depth:i,parts:o,original:r,loc:n}}function l(t,e,n,r,o,i){var a=r.charAt(3)||r.charAt(2),s="{"!==a&&"&"!==a,c=/\*/.test(r);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:s,strip:o,loc:this.locInfo(i)}}function f(t,e,n,r){o(t,n),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function p(t,e,n,r,i,a){r&&r.path&&o(t,r);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,u=void 0;if(n){if(s)throw new _["default"]("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),u=n.strip,c=n.program}return i&&(i=c,c=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:u,closeStrip:r&&r.strip,loc:this.locInfo(a)}}function h(t,e){if(!e&&t.length){var n=t[0].loc,r=t[t.length-1].loc;n&&r&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function d(t,e,n,r){return o(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}n.__esModule=!0,n.SourceLocation=i,n.id=a,n.stripFlags=s,n.stripComment=c,n.preparePath=u,n.prepareMustache=l,n.prepareRawBlock=f,n.prepareBlock=p,n.prepareProgram=h,n.preparePartialBlock=d;var m=t("../exception"),_=r(m)},{"../exception":344}],337:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){this.value=t}function i(){}function a(t,e,n,r){var o=e.popStack(),i=0,a=n.length;for(t&&a--;i<a;i++)o=e.nameLookup(o,n[i],r);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(n[i]),")"]:o}n.__esModule=!0;var s=t("../base"),c=t("../exception"),u=r(c),l=t("../utils"),f=t("./code-gen"),p=r(f);i.prototype={nameLookup:function(t,e){return i.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=s.COMPILER_REVISION,e=s.REVISION_CHANGES[t];return[t,e]},appendToBuffer:function(t,e,n){return l.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,n,r){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.opcodes,i=void 0,a=void 0,s=void 0,c=void 0;for(s=0,c=o.length;s<c;s++)i=o[s],this.source.currentLocation=i.loc,a=a||i.loc,this[i.opcode].apply(this,i.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new u["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),r?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var l=this.createFunctionContext(r);if(this.isChild)return l;var f={compiler:this.compilerInfo(),main:l};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var p=this.context,h=p.programs,d=p.decorators;for(s=0,c=h.length;s<c;s++)h[s]&&(f[s]=h[s],d[s]&&(f[s+"_d"]=d[s],f.useDecorators=!0));return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),r?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),e.srcName?(f=f.toStringWithSourceMap({file:e.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new p["default"](this.options.srcName),this.decorators=new p["default"](this.options.srcName)},createFunctionContext:function(t){var e="",n=this.stackVars.concat(this.registers.list);n.length>0&&(e+=", "+n.join(", "));var r=0;for(var o in this.aliases){var i=this.aliases[o];this.aliases.hasOwnProperty(o)&&i.children&&i.referenceCount>1&&(e+=", alias"+ ++r+"="+o,i.children[0]="alias"+r)}var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var s=this.mergeSource(e);return t?(a.push(s),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",s,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,r=void 0,o=void 0,i=void 0,a=void 0;return this.source.each(function(t){t.appendToBuffer?(i?t.prepend(" + "):i=t,a=t):(i&&(o?i.prepend("buffer += "):r=!0,a.add(";"),i=a=void 0),o=!0,e||(n=!1))}),n?i?(i.prepend("return "),a.add(";")):o||this.source.push('return "";'):(t+=", buffer = "+(r?"":this.initializeBuffer()),i?(i.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(r?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,r){var o=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[o++])),this.resolvePath("context",t,o,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,r,o){var i=this;if(this.options.strict||this.options.assumeObjects)return void this.push(a(this.options.strict&&o,this,e,t));for(var s=e.length;n<s;n++)this.replaceStack(function(o){var a=i.nameLookup(o,e[n],t);return r?[" && ",a]:[" != null ? ",a," : ",o]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){
6
+ var n=this.nameLookup("decorators",e,"decorator"),r=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",r])," || fn;"])},invokeHelper:function(t,e,n){var r=this.popStack(),o=this.setupHelper(t,e),i=n?[o.name," || "]:"",a=["("].concat(i,r);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",o.callParams))},invokeKnownHelper:function(t,e){var n=this.setupHelper(t,e);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,t,e),o=this.lastHelper=this.nameLookup("helpers",t,"helper"),i=["(","(helper = ",o," || ",n,")"];this.options.strict||(i[0]="(helper = ",i.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",i,r.paramsInit?["),(",r.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",r.callParams)," : helper))"])},invokePartial:function(t,e,n){var r=[],o=this.setupParams(e,1,r);t&&(e=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",t?r.unshift(e):r.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),r.push(o),this.push(this.source.functionCall("container.invokePartial","",r))},assignToHash:function(t){var e=this.popStack(),n=void 0,r=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var i=this.hash;n&&(i.contexts[t]=n),r&&(i.types[t]=r),o&&(i.ids[t]=o),i.values[t]=e},pushId:function(t,e,n){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:i,compileChildren:function(t,e){for(var n=t.children,r=void 0,o=void 0,i=0,a=n.length;i<a;i++){r=n[i],o=new this.compiler;var s=this.matchExistingProgram(r);if(null==s){this.context.programs.push("");var c=this.context.programs.length;r.index=c,r.name="program"+c,this.context.programs[c]=o.compile(r,e,this.context,!this.precompile),this.context.decorators[c]=o.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=s.index,r.name="program"+s.index,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams}},matchExistingProgram:function(t){for(var e=0,n=this.context.environments.length;e<n;e++){var r=this.context.environments[e];if(r&&r.equals(t))return r}},programExpression:function(t){var e=this.environment.children[t],n=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof o||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new o(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],n=void 0,r=void 0,i=void 0;if(!this.isInline())throw new u["default"]("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof o)n=[a.value],e=["(",n],i=!0;else{r=!0;var s=this.incrStack();e=["((",this.push(s)," = ",a,")"],n=this.topStack()}var c=t.call(this,n);i||this.popStack(),r&&this.stackSlot--,this.push(e.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];if(r instanceof o)this.compileStack.push(r);else{var i=this.incrStack();this.pushSource([i," = ",r,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),n=(e?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof o)return n.value;if(!e){if(!this.stackSlot)throw new u["default"]("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof o?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,n){var r=[],o=this.setupHelperArgs(e,t,r,n),i=this.nameLookup("helpers",e,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:r,paramsInit:o,name:i,callParams:[a].concat(r)}},setupParams:function(t,e,n){var r={},o=[],i=[],a=[],s=!n,c=void 0;s&&(n=[]),r.name=this.quotedString(t),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var u=this.popStack(),l=this.popStack();(l||u)&&(r.fn=l||"container.noop",r.inverse=u||"container.noop");for(var f=e;f--;)c=this.popStack(),n[f]=c,this.trackIds&&(a[f]=this.popStack()),this.stringParams&&(i[f]=this.popStack(),o[f]=this.popStack());return s&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(a)),this.stringParams&&(r.types=this.source.generateArray(i),r.contexts=this.source.generateArray(o)),this.options.data&&(r.data="data"),this.useBlockParams&&(r.blockParams="blockParams"),r},setupHelperArgs:function(t,e,n,r){var o=this.setupParams(t,e,n);return o=this.objectLiteral(o),r?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.push(o),""):o}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=i.RESERVED_WORDS={},n=0,r=t.length;n<r;n++)e[t[n]]=!0}(),i.isValidJavaScriptVariableName=function(t){return!i.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},n["default"]=i,e.exports=n["default"]},{"../base":331,"../exception":344,"../utils":357,"./code-gen":334}],338:[function(t,e,n){"use strict";n.__esModule=!0;var r=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,n,r,o,i,a){var s=i.length-1;switch(o){case 1:return i[s-1];case 2:this.$=r.prepareProgram(i[s]);break;case 3:this.$=i[s];break;case 4:this.$=i[s];break;case 5:this.$=i[s];break;case 6:this.$=i[s];break;case 7:this.$=i[s];break;case 8:this.$=i[s];break;case 9:this.$={type:"CommentStatement",value:r.stripComment(i[s]),strip:r.stripFlags(i[s],i[s]),loc:r.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:i[s],value:i[s],loc:r.locInfo(this._$)};break;case 11:this.$=r.prepareRawBlock(i[s-2],i[s-1],i[s],this._$);break;case 12:this.$={path:i[s-3],params:i[s-2],hash:i[s-1]};break;case 13:this.$=r.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!1,this._$);break;case 14:this.$=r.prepareBlock(i[s-3],i[s-2],i[s-1],i[s],!0,this._$);break;case 15:this.$={open:i[s-5],path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:r.stripFlags(i[s-5],i[s])};break;case 16:this.$={path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:r.stripFlags(i[s-5],i[s])};break;case 17:this.$={path:i[s-4],params:i[s-3],hash:i[s-2],blockParams:i[s-1],strip:r.stripFlags(i[s-5],i[s])};break;case 18:this.$={strip:r.stripFlags(i[s-1],i[s-1]),program:i[s]};break;case 19:var c=r.prepareBlock(i[s-2],i[s-1],i[s],i[s],!1,this._$),u=r.prepareProgram([c],i[s-1].loc);u.chained=!0,this.$={strip:i[s-2].strip,program:u,chain:!0};break;case 20:this.$=i[s];break;case 21:this.$={path:i[s-1],strip:r.stripFlags(i[s-2],i[s])};break;case 22:this.$=r.prepareMustache(i[s-3],i[s-2],i[s-1],i[s-4],r.stripFlags(i[s-4],i[s]),this._$);break;case 23:this.$=r.prepareMustache(i[s-3],i[s-2],i[s-1],i[s-4],r.stripFlags(i[s-4],i[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:i[s-3],params:i[s-2],hash:i[s-1],indent:"",strip:r.stripFlags(i[s-4],i[s]),loc:r.locInfo(this._$)};break;case 25:this.$=r.preparePartialBlock(i[s-2],i[s-1],i[s],this._$);break;case 26:this.$={path:i[s-3],params:i[s-2],hash:i[s-1],strip:r.stripFlags(i[s-4],i[s])};break;case 27:this.$=i[s];break;case 28:this.$=i[s];break;case 29:this.$={type:"SubExpression",path:i[s-3],params:i[s-2],hash:i[s-1],loc:r.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:i[s],loc:r.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:r.id(i[s-2]),value:i[s],loc:r.locInfo(this._$)};break;case 32:this.$=r.id(i[s-1]);break;case 33:this.$=i[s];break;case 34:this.$=i[s];break;case 35:this.$={type:"StringLiteral",value:i[s],original:i[s],loc:r.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(i[s]),original:Number(i[s]),loc:r.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===i[s],original:"true"===i[s],loc:r.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:r.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:r.locInfo(this._$)};break;case 40:this.$=i[s];break;case 41:this.$=i[s];break;case 42:this.$=r.preparePath(!0,i[s],this._$);break;case 43:this.$=r.preparePath(!1,i[s],this._$);break;case 44:i[s-2].push({part:r.id(i[s]),original:i[s],separator:i[s-1]}),this.$=i[s-2];break;case 45:this.$=[{part:r.id(i[s]),original:i[s]}];break;case 46:this.$=[];break;case 47:i[s-1].push(i[s]);break;case 48:this.$=[i[s]];break;case 49:i[s-1].push(i[s]);break;case 50:this.$=[];break;case 51:i[s-1].push(i[s]);break;case 58:this.$=[];break;case 59:i[s-1].push(i[s]);break;case 64:this.$=[];break;case 65:i[s-1].push(i[s]);break;case 70:this.$=[];break;case 71:i[s-1].push(i[s]);break;case 78:this.$=[];break;case 79:i[s-1].push(i[s]);break;case 82:this.$=[];break;case 83:i[s-1].push(i[s]);break;case 86:this.$=[];break;case 87:i[s-1].push(i[s]);break;case 90:this.$=[];break;case 91:i[s-1].push(i[s]);break;case 94:this.$=[];break;case 95:i[s-1].push(i[s]);break;case 98:this.$=[i[s]];break;case 99:i[s-1].push(i[s]);break;case 100:this.$=[i[s]];break;case 101:i[s-1].push(i[s])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=n.lexer.lex()||1,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],o=[null],i=[],a=this.table,s="",c=0,u=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var f=this.lexer.yylloc;i.push(f);var p=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var h,d,m,_,g,v,y,b,w,x={};;){if(m=r[r.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null!==h&&"undefined"!=typeof h||(h=e()),_=a[m]&&a[m][h]),"undefined"==typeof _||!_.length||!_[0]){var S="";if(!l){w=[];for(v in a[m])this.terminals_[v]&&v>2&&w.push("'"+this.terminals_[v]+"'");S=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[h]||h)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==h?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(S,{text:this.lexer.match,token:this.terminals_[h]||h,line:this.lexer.yylineno,loc:f,expected:w})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+h);switch(_[0]){case 1:r.push(h),o.push(this.lexer.yytext),i.push(this.lexer.yylloc),r.push(_[1]),h=null,d?(h=d,d=null):(u=this.lexer.yyleng,s=this.lexer.yytext,c=this.lexer.yylineno,f=this.lexer.yylloc,l>0&&l--);break;case 2:if(y=this.productions_[_[1]][1],x.$=o[o.length-y],x._$={first_line:i[i.length-(y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(y||1)].first_column,last_column:i[i.length-1].last_column},p&&(x._$.range=[i[i.length-(y||1)].range[0],i[i.length-1].range[1]]),g=this.performAction.call(x,s,u,c,this.yy,_[1],o,i),"undefined"!=typeof g)return g;y&&(r=r.slice(0,-1*y*2),o=o.slice(0,-1*y),i=i.slice(0,-1*y)),r.push(this.productions_[_[1]][0]),o.push(x.$),i.push(x._$),b=a[r[r.length-2]][r[r.length-1]],r.push(b);break;case 3:return!0}}return!0}},n=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r,o;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length&&(n=this._input.match(this.rules[i[a]]),!n||e&&!(n[0].length>e[0].length)||(e=n,r=a,this.options.flex));a++);return e?(o=e[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,i[r],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,n,r){function o(t,n){return e.yytext=e.yytext.substr(t,e.yyleng-n)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(o(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(o(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),
7
+ 54;case 30:return this.popState(),33;case 31:return e.yytext=o(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=o(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=n,t.prototype=e,e.Parser=t,new t}();n["default"]=r,e.exports=n["default"]},{}],339:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return(new i).accept(t)}function i(){this.padding=0}n.__esModule=!0,n.print=o,n.PrintVisitor=i;var a=t("./visitor"),s=r(a);i.prototype=new s["default"],i.prototype.pad=function(t){for(var e="",n=0,r=this.padding;n<r;n++)e+=" ";return e+=t+"\n"},i.prototype.Program=function(t){var e="",n=t.body,r=void 0,o=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(r=0,o=t.blockParams.length;r<o;r++)i+=" "+t.blockParams[r];i+=" ]",e+=this.pad(i)}for(r=0,o=n.length;r<o;r++)e+=this.accept(n[r]);return this.padding--,e},i.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")},i.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")},i.prototype.BlockStatement=i.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad(("DecoratorBlock"===t.type?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e},i.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")},i.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")},i.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")},i.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")},i.prototype.SubExpression=function(t){for(var e=t.params,n=[],r=void 0,o=0,i=e.length;o<i;o++)n.push(this.accept(e[o]));return e="["+n.join(", ")+"]",r=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+r},i.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e},i.prototype.StringLiteral=function(t){return'"'+t.value+'"'},i.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"},i.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"},i.prototype.UndefinedLiteral=function(){return"UNDEFINED"},i.prototype.NullLiteral=function(){return"NULL"},i.prototype.Hash=function(t){for(var e=t.pairs,n=[],r=0,o=e.length;r<o;r++)n.push(this.accept(e[r]));return"HASH{"+n.join(", ")+"}"},i.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}},{"./visitor":340}],340:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){this.parents=[]}function i(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function a(t){i.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function s(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}n.__esModule=!0;var c=t("../exception"),u=r(c);o.prototype={constructor:o,mutating:!1,acceptKey:function(t,e){var n=this.accept(t[e]);if(this.mutating){if(n&&!o.prototype[n.type])throw new u["default"]('Unexpected node type "'+n.type+'" found when accepting '+e+" on "+t.type);t[e]=n}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new u["default"](t.type+" requires "+e)},acceptArray:function(t){for(var e=0,n=t.length;e<n;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,n--)},accept:function(t){if(t){if(!this[t.type])throw new u["default"]("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:e!==!1?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:i,Decorator:i,BlockStatement:a,DecoratorBlock:a,PartialStatement:s,PartialBlockStatement:function(t){s.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:i,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},n["default"]=o,e.exports=n["default"]},{"../exception":344}],341:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function i(t,e,n){void 0===e&&(e=t.length);var r=t[e-1],o=t[e-2];return r?"ContentStatement"===r.type?(o||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:n}function a(t,e,n){void 0===e&&(e=-1);var r=t[e+1],o=t[e+2];return r?"ContentStatement"===r.type?(o||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:n}function s(t,e,n){var r=t[null==e?0:e+1];if(r&&"ContentStatement"===r.type&&(n||!r.rightStripped)){var o=r.value;r.value=r.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==o}}function c(t,e,n){var r=t[null==e?t.length-1:e-1];if(r&&"ContentStatement"===r.type&&(n||!r.leftStripped)){var o=r.value;return r.value=r.value.replace(n?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==o,r.leftStripped}}n.__esModule=!0;var u=t("./visitor"),l=r(u);o.prototype=new l["default"],o.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var r=t.body,o=0,u=r.length;o<u;o++){var l=r[o],f=this.accept(l);if(f){var p=i(r,o,n),h=a(r,o,n),d=f.openStandalone&&p,m=f.closeStandalone&&h,_=f.inlineStandalone&&p&&h;f.close&&s(r,o,!0),f.open&&c(r,o,!0),e&&_&&(s(r,o),c(r,o)&&"PartialStatement"===l.type&&(l.indent=/([ \t]+$)/.exec(r[o-1].original)[1])),e&&d&&(s((l.program||l.inverse).body),c(r,o)),e&&m&&(s(r,o),c((l.inverse||l.program).body))}}return t},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,r=n,o=n;if(n&&n.chained)for(r=n.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var u={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:a(e.body),closeStandalone:i((r||e).body)};if(t.openStrip.close&&s(e.body,null,!0),n){var l=t.inverseStrip;l.open&&c(e.body,null,!0),l.close&&s(r.body,null,!0),t.closeStrip.open&&c(o.body,null,!0),!this.options.ignoreStandalone&&i(e.body)&&a(r.body)&&(c(e.body),s(r.body))}else t.closeStrip.open&&c(e.body,null,!0);return u},o.prototype.Decorator=o.prototype.MustacheStatement=function(t){return t.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},n["default"]=o,e.exports=n["default"]},{"./visitor":340}],342:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){a["default"](t)}n.__esModule=!0,n.registerDefaultDecorators=o;var i=t("./decorators/inline"),a=r(i)},{"./decorators/inline":343}],343:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("../utils");n["default"]=function(t){t.registerDecorator("inline",function(t,e,n,o){var i=t;return e.partials||(e.partials={},i=function(o,i){var a=n.partials;n.partials=r.extend({},a,e.partials);var s=t(o,i);return n.partials=a,s}),e.partials[o.args[0]]=o.fn,i})},e.exports=n["default"]},{"../utils":357}],344:[function(t,e,n){"use strict";function r(t,e){var n=e&&e.loc,i=void 0,a=void 0;n&&(i=n.start.line,a=n.start.column,t+=" - "+i+":"+a);for(var s=Error.prototype.constructor.call(this,t),c=0;c<o.length;c++)this[o[c]]=s[o[c]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{n&&(this.lineNumber=i,Object.defineProperty?Object.defineProperty(this,"column",{value:a,enumerable:!0}):this.column=a)}catch(u){}}n.__esModule=!0;var o=["description","fileName","lineNumber","message","name","number","stack"];r.prototype=new Error,n["default"]=r,e.exports=n["default"]},{}],345:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){a["default"](t),c["default"](t),l["default"](t),p["default"](t),d["default"](t),_["default"](t),v["default"](t)}n.__esModule=!0,n.registerDefaultHelpers=o;var i=t("./helpers/block-helper-missing"),a=r(i),s=t("./helpers/each"),c=r(s),u=t("./helpers/helper-missing"),l=r(u),f=t("./helpers/if"),p=r(f),h=t("./helpers/log"),d=r(h),m=t("./helpers/lookup"),_=r(m),g=t("./helpers/with"),v=r(g)},{"./helpers/block-helper-missing":346,"./helpers/each":347,"./helpers/helper-missing":348,"./helpers/if":349,"./helpers/log":350,"./helpers/lookup":351,"./helpers/with":352}],346:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("../utils");n["default"]=function(t){t.registerHelper("blockHelperMissing",function(e,n){var o=n.inverse,i=n.fn;if(e===!0)return i(this);if(e===!1||null==e)return o(this);if(r.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):o(this);if(n.data&&n.ids){var a=r.createFrame(n.data);a.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:a}}return i(e,n)})},e.exports=n["default"]},{"../utils":357}],347:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o=t("../utils"),i=t("../exception"),a=r(i);n["default"]=function(t){t.registerHelper("each",function(t,e){function n(e,n,i){u&&(u.key=e,u.index=n,u.first=0===n,u.last=!!i,l&&(u.contextPath=l+e)),c+=r(t[e],{data:u,blockParams:o.blockParams([t[e],e],[l+e,null])})}if(!e)throw new a["default"]("Must pass iterator to #each");var r=e.fn,i=e.inverse,s=0,c="",u=void 0,l=void 0;if(e.data&&e.ids&&(l=o.appendContextPath(e.data.contextPath,e.ids[0])+"."),o.isFunction(t)&&(t=t.call(this)),e.data&&(u=o.createFrame(e.data)),t&&"object"==typeof t)if(o.isArray(t))for(var f=t.length;s<f;s++)s in t&&n(s,s,s===t.length-1);else{var p=void 0;for(var h in t)t.hasOwnProperty(h)&&(void 0!==p&&n(p,s-1),p=h,s++);void 0!==p&&n(p,s-1,!0)}return 0===s&&(c=i(this)),c})},e.exports=n["default"]},{"../exception":344,"../utils":357}],348:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o=t("../exception"),i=r(o);n["default"]=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new i["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=n["default"]},{"../exception":344}],349:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("../utils");n["default"]=function(t){t.registerHelper("if",function(t,e){return r.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||r.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,n){return t.helpers["if"].call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},e.exports=n["default"]},{"../utils":357}],350:[function(t,e,n){"use strict";n.__esModule=!0,n["default"]=function(t){t.registerHelper("log",function(){for(var e=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var o=1;null!=n.hash.level?o=n.hash.level:n.data&&null!=n.data.level&&(o=n.data.level),e[0]=o,t.log.apply(t,e)})},e.exports=n["default"]},{}],351:[function(t,e,n){"use strict";n.__esModule=!0,n["default"]=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},e.exports=n["default"]},{}],352:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("../utils");n["default"]=function(t){t.registerHelper("with",function(t,e){r.isFunction(t)&&(t=t.call(this));var n=e.fn;if(r.isEmpty(t))return e.inverse(this);var o=e.data;return e.data&&e.ids&&(o=r.createFrame(e.data),o.contextPath=r.appendContextPath(e.data.contextPath,e.ids[0])),n(t,{data:o,blockParams:r.blockParams([t],[o&&o.contextPath])})})},e.exports=n["default"]},{"../utils":357}],353:[function(t,e,n){"use strict";n.__esModule=!0;var r=t("./utils"),o={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=r.indexOf(o.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=o.lookupLevel(t),"undefined"!=typeof console&&o.lookupLevel(o.level)<=t){var e=o.methodMap[t];console[e]||(e="log");for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];console[e].apply(console,r)}}};n["default"]=o,e.exports=n["default"]},{"./utils":357}],354:[function(t,e,n){(function(t){"use strict";n.__esModule=!0,n["default"]=function(e){var n="undefined"!=typeof t?t:window,r=n.Handlebars;e.noConflict=function(){return n.Handlebars===e&&(n.Handlebars=r),e}},e.exports=n["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],355:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){var e=t&&t[0]||1,n=g.COMPILER_REVISION;if(e!==n){if(e<n){var r=g.REVISION_CHANGES[n],o=g.REVISION_CHANGES[e];throw new _["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new _["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function a(t,e){function n(n,r,o){o.hash&&(r=d.extend({},r,o.hash),o.ids&&(o.ids[0]=!0)),n=e.VM.resolvePartial.call(this,n,r,o);var i=e.VM.invokePartial.call(this,n,r,o);if(null==i&&e.compile&&(o.partials[o.name]=e.compile(n,t.compilerOptions,e),i=o.partials[o.name](r,o)),null!=i){if(o.indent){for(var a=i.split("\n"),s=0,c=a.length;s<c&&(a[s]||s+1!==c);s++)a[s]=o.indent+a[s];i=a.join("\n")}return i}throw new _["default"]("The partial "+o.name+" could not be compiled when running in runtime-only mode")}function r(e){function n(e){return""+t.main(o,e,o.helpers,o.partials,a,c,s)}var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=i.data;r._setup(i),!i.partial&&t.useData&&(a=f(e,a));var s=void 0,c=t.useBlockParams?[]:void 0;return t.useDepths&&(s=i.depths?e!=i.depths[0]?[e].concat(i.depths):i.depths:[e]),(n=p(t.main,n,o,i.depths||[],a,c))(e,i)}if(!e)throw new _["default"]("No environment passed to template");if(!t||!t.main)throw new _["default"]("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var o={strict:function(t,e){if(!(e in t))throw new _["default"]('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var n=t.length,r=0;r<n;r++)if(t[r]&&null!=t[r][e])return t[r][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:d.escapeExpression,invokePartial:n,fn:function(e){var n=t[e];return n.decorator=t[e+"_d"],n},programs:[],program:function(t,e,n,r,o){var i=this.programs[t],a=this.fn(t);return e||o||r||n?i=s(this,t,a,e,n,r,o):i||(i=this.programs[t]=s(this,t,a)),i},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var n=t||e;return t&&e&&t!==e&&(n=d.extend({},e,t)),n},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};return r.isTop=!0,r._setup=function(n){n.partial?(o.helpers=n.helpers,o.partials=n.partials,o.decorators=n.decorators):(o.helpers=o.merge(n.helpers,e.helpers),t.usePartial&&(o.partials=o.merge(n.partials,e.partials)),(t.usePartial||t.useDecorators)&&(o.decorators=o.merge(n.decorators,e.decorators)))},r._child=function(e,n,r,i){if(t.useBlockParams&&!r)throw new _["default"]("must pass block params");if(t.useDepths&&!i)throw new _["default"]("must pass parent depths");return s(o,e,t[e],n,0,r,i)},r}function s(t,e,n,r,o,i,a){function s(e){var o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=a;return!a||e==a[0]||e===t.nullContext&&null===a[0]||(s=[e].concat(a)),n(t,e,t.helpers,t.partials,o.data||r,i&&[o.blockParams].concat(i),s)}return s=p(n,s,t,a,r,i),s.program=e,s.depth=a?a.length:0,s.blockParams=o||0,s}function c(t,e,n){return t?t.call||n.name||(n.name=t,t=n.partials[t]):t="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],t}function u(t,e,n){var r=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var o=void 0;if(n.fn&&n.fn!==l&&!function(){n.data=g.createFrame(n.data);var t=n.fn;o=n.data["partial-block"]=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=g.createFrame(n.data),n.data["partial-block"]=r,t(e,n)},t.partials&&(n.partials=d.extend({},n.partials,t.partials))}(),void 0===t&&o&&(t=o),void 0===t)throw new _["default"]("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function l(){return""}function f(t,e){return e&&"root"in e||(e=e?g.createFrame(e):{},e.root=t),e}function p(t,e,n,r,o,i){if(t.decorator){var a={};e=t.decorator(e,a,n,r&&r[0],o,i,r),d.extend(e,a)}return e}n.__esModule=!0,n.checkRevision=i,n.template=a,n.wrapProgram=s,n.resolvePartial=c,n.invokePartial=u,n.noop=l;var h=t("./utils"),d=o(h),m=t("./exception"),_=r(m),g=t("./base")},{"./base":331,"./exception":344,"./utils":357}],356:[function(t,e,n){"use strict";function r(t){this.string=t}n.__esModule=!0,r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},n["default"]=r,e.exports=n["default"]},{}],357:[function(t,e,n){"use strict";function r(t){return f[t]}function o(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}function i(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function a(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return h.test(t)?t.replace(p,r):t}function s(t){return!t&&0!==t||!(!_(t)||0!==t.length)}function c(t){var e=o({},t);return e._parent=t,e}function u(t,e){return t.path=e,t}function l(t,e){return(t?t+".":"")+e}n.__esModule=!0,n.extend=o,n.indexOf=i,n.escapeExpression=a,n.isEmpty=s,n.createFrame=c,n.blockParams=u,n.appendContextPath=l;var f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},p=/[&<>"'`=]/g,h=/[&<>"'`=]/,d=Object.prototype.toString;n.toString=d;var m=function(t){return"function"==typeof t};m(/x/)&&(n.isFunction=m=function(t){return"function"==typeof t&&"[object Function]"===d.call(t)}),n.isFunction=m;var _=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===d.call(t)};n.isArray=_},{}],358:[function(t,e,n){function r(e,n){var r=t("fs"),i=r.readFileSync(n,"utf8");e.exports=o.compile(i)}var o=t("../dist/cjs/handlebars")["default"],i=t("../dist/cjs/handlebars/compiler/printer");o.PrintVisitor=i.PrintVisitor,o.print=i.print,e.exports=o,"undefined"!=typeof t&&t.extensions&&(t.extensions[".handlebars"]=r,t.extensions[".hbs"]=r)},{"../dist/cjs/handlebars":329,"../dist/cjs/handlebars/compiler/printer":339,fs:4}],359:[function(t,e,n){n.SourceMapGenerator=t("./source-map/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=t("./source-map/source-map-consumer").SourceMapConsumer,n.SourceNode=t("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":366,"./source-map/source-map-generator":367,"./source-map/source-node":368}],360:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(){this._array=[],this._set={}}var o=t("./util");r.fromArray=function(t,e){for(var n=new r,o=0,i=t.length;o<i;o++)n.add(t[o],e);return n},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(t,e){var n=this.has(t),r=this._array.length;n&&!e||this._array.push(t),n||(this._set[o.toSetString(t)]=r)},r.prototype.has=function(t){return Object.prototype.hasOwnProperty.call(this._set,o.toSetString(t))},r.prototype.indexOf=function(t){if(this.has(t))return this._set[o.toSetString(t)];throw new Error('"'+t+'" is not in the set.')},r.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},r.prototype.toArray=function(){return this._array.slice()},e.ArraySet=r})},{"./util":369,amdefine:1}],361:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t){return t<0?(-t<<1)+1:(t<<1)+0}function o(t){var e=1===(1&t),n=t>>1;return e?-n:n}var i=t("./base64"),a=5,s=1<<a,c=s-1,u=s;e.encode=function(t){var e,n="",o=r(t);do e=o&c,o>>>=a,o>0&&(e|=u),n+=i.encode(e);while(o>0);return n},e.decode=function(t,e,n){var r,s,l=t.length,f=0,p=0;do{if(e>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(s=i.decode(t.charCodeAt(e++)),s===-1)throw new Error("Invalid base64 digit: "+t.charAt(e-1));r=!!(s&u),s&=c,f+=s<<p,p+=a}while(r);n.value=o(f),n.rest=e}})},{"./base64":362,amdefine:1}],362:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(t){if(0<=t&&t<r.length)return r[t];throw new TypeError("Must be between 0 and 63: "+aNumber)},e.decode=function(t){var e=65,n=90,r=97,o=122,i=48,a=57,s=43,c=47,u=26,l=52;return e<=t&&t<=n?t-e:r<=t&&t<=o?t-r+u:i<=t&&t<=a?t-i+l:t==s?62:t==c?63:-1}})},{amdefine:1}],363:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t,n,o,i,a,s){var c=Math.floor((n-t)/2)+t,u=a(o,i[c],!0);return 0===u?c:u>0?n-c>1?r(c,n,o,i,a,s):s==e.LEAST_UPPER_BOUND?n<i.length?n:-1:c:c-t>1?r(t,c,o,i,a,s):s==e.LEAST_UPPER_BOUND?c:t<0?-1:t}e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2,e.search=function(t,n,o,i){if(0===n.length)return-1;var a=r(-1,n.length,t,n,o,i||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(n[a],n[a-1],!0);)--a;return a}})},{amdefine:1}],364:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t,e){var n=t.generatedLine,r=e.generatedLine,o=t.generatedColumn,a=e.generatedColumn;return r>n||r==n&&a>=o||i.compareByGeneratedPositionsInflated(t,e)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=t("./util");o.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},o.prototype.add=function(t){r(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=o})},{"./util":369,amdefine:1}],365:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function o(t,e){return Math.round(t+Math.random()*(e-t))}function i(t,e,n,a){if(n<a){var s=o(n,a),c=n-1;r(t,s,a);for(var u=t[a],l=n;l<a;l++)e(t[l],u)<=0&&(c+=1,r(t,c,l));r(t,c+1,l);var f=c+1;i(t,e,n,f-1),i(t,e,f+1,a)}}e.quickSort=function(t,e){i(t,e,0,t.length-1)}})},{amdefine:1}],366:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t){var e=t;return"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,""))),null!=e.sections?new a(e):new o(e)}function o(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=s.getArg(e,"version"),r=s.getArg(e,"sources"),o=s.getArg(e,"names",[]),i=s.getArg(e,"sourceRoot",null),a=s.getArg(e,"sourcesContent",null),c=s.getArg(e,"mappings"),l=s.getArg(e,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);r=r.map(s.normalize),this._names=u.fromArray(o,!0),this._sources=u.fromArray(r,!0),this.sourceRoot=i,this.sourcesContent=a,this._mappings=c,this.file=l}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(t){var e=t;"string"==typeof t&&(e=JSON.parse(t.replace(/^\)\]\}'/,"")));var n=s.getArg(e,"version"),o=s.getArg(e,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new u,this._names=new u;var i={line:-1,column:0};this._sections=o.map(function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var e=s.getArg(t,"offset"),n=s.getArg(e,"line"),o=s.getArg(e,"column");if(n<i.line||n===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=e,{generatedOffset:{generatedLine:n+1,generatedColumn:o+1},consumer:new r(s.getArg(t,"map"))}})}var s=t("./util"),c=t("./binary-search"),u=t("./array-set").ArraySet,l=t("./base64-vlq"),f=t("./quick-sort").quickSort;r.fromSourceMap=function(t){return o.fromSourceMap(t)},r.prototype._version=3,r.prototype.__generatedMappings=null,Object.defineProperty(r.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),r.prototype.__originalMappings=null,Object.defineProperty(r.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),r.prototype._charIsMappingSeparator=function(t,e){var n=t.charAt(e);return";"===n||","===n},r.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},r.GENERATED_ORDER=1,r.ORIGINAL_ORDER=2,r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.prototype.eachMapping=function(t,e,n){var o,i=e||null,a=n||r.GENERATED_ORDER;switch(a){case r.GENERATED_ORDER:o=this._generatedMappings;break;case r.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var c=this.sourceRoot;o.map(function(t){var e=null===t.source?null:this._sources.at(t.source);return null!=e&&null!=c&&(e=s.join(c,e)),{source:e,generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}},this).forEach(t,i)},r.prototype.allGeneratedPositionsFor=function(t){var e=s.getArg(t,"line"),n={source:s.getArg(t,"source"),originalLine:e,originalColumn:s.getArg(t,"column",0)};if(null!=this.sourceRoot&&(n.source=s.relative(this.sourceRoot,n.source)),!this._sources.has(n.source))return[];n.source=this._sources.indexOf(n.source);var r=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,c.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===t.column)for(var a=i.originalLine;i&&i.originalLine===a;)r.push({line:s.getArg(i,"generatedLine",null),column:s.getArg(i,"generatedColumn",null),lastColumn:s.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var u=i.originalColumn;i&&i.originalLine===e&&i.originalColumn==u;)r.push({line:s.getArg(i,"generatedLine",null),column:s.getArg(i,"generatedColumn",null),lastColumn:s.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return r},e.SourceMapConsumer=r,o.prototype=Object.create(r.prototype),o.prototype.consumer=r,o.fromSourceMap=function(t){var e=Object.create(o.prototype),n=e._names=u.fromArray(t._names.toArray(),!0),r=e._sources=u.fromArray(t._sources.toArray(),!0);e.sourceRoot=t._sourceRoot,e.sourcesContent=t._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=t._file;for(var a=t._mappings.toArray().slice(),c=e.__generatedMappings=[],l=e.__originalMappings=[],p=0,h=a.length;p<h;p++){var d=a[p],m=new i;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=r.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=n.indexOf(d.name)),l.push(m)),c.push(m)}return f(e.__originalMappings,s.compareByOriginalPositions),e},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(t){return null!=this.sourceRoot?s.join(this.sourceRoot,t):t},this)}}),o.prototype._parseMappings=function(t,e){for(var n,r,o,a,c,u=1,p=0,h=0,d=0,m=0,_=0,g=t.length,v=0,y={},b={},w=[],x=[];v<g;)if(";"===t.charAt(v))u++,v++,p=0;else if(","===t.charAt(v))v++;else{for(n=new i,n.generatedLine=u,a=v;a<g&&!this._charIsMappingSeparator(t,a);a++);if(r=t.slice(v,a),o=y[r])v+=r.length;else{for(o=[];v<a;)l.decode(t,v,b),c=b.value,v=b.rest,o.push(c);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[r]=o}n.generatedColumn=p+o[0],p=n.generatedColumn,o.length>1&&(n.source=m+o[1],m+=o[1],n.originalLine=h+o[2],h=n.originalLine,n.originalLine+=1,n.originalColumn=d+o[3],d=n.originalColumn,o.length>4&&(n.name=_+o[4],_+=o[4])),x.push(n),"number"==typeof n.originalLine&&w.push(n)}f(x,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,f(w,s.compareByOriginalPositions),this.__originalMappings=w},o.prototype._findMapping=function(t,e,n,r,o,i){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[r]);return c.search(t,e,o,i)},o.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(e.generatedLine===n.generatedLine){e.lastGeneratedColumn=n.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(t){var e={generatedLine:s.getArg(t,"line"),generatedColumn:s.getArg(t,"column")},n=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(t,"bias",r.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===e.generatedLine){var i=s.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=s.join(this.sourceRoot,i)));var a=s.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),
8
+ {source:i,line:s.getArg(o,"originalLine",null),column:s.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return null==t}))},o.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(t=s.relative(this.sourceRoot,t)),this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];var n;if(null!=this.sourceRoot&&(n=s.urlParse(this.sourceRoot))){var r=t.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(t){var e=s.getArg(t,"source");if(null!=this.sourceRoot&&(e=s.relative(this.sourceRoot,e)),!this._sources.has(e))return{line:null,column:null,lastColumn:null};e=this._sources.indexOf(e);var n={source:e,originalLine:s.getArg(t,"line"),originalColumn:s.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(t,"bias",r.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:s.getArg(i,"generatedLine",null),column:s.getArg(i,"generatedColumn",null),lastColumn:s.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=o,a.prototype=Object.create(r.prototype),a.prototype.constructor=r,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var n=0;n<this._sections[e].consumer.sources.length;n++)t.push(this._sections[e].consumer.sources[n]);return t}}),a.prototype.originalPositionFor=function(t){var e={generatedLine:s.getArg(t,"line"),generatedColumn:s.getArg(t,"column")},n=c.search(e,this._sections,function(t,e){var n=t.generatedLine-e.generatedOffset.generatedLine;return n?n:t.generatedColumn-e.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:e.generatedLine-(r.generatedOffset.generatedLine-1),column:e.generatedColumn-(r.generatedOffset.generatedLine===e.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(t,e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],o=r.consumer.sourceContentFor(t,!0);if(o)return o}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var n=this._sections[e];if(n.consumer.sources.indexOf(s.getArg(t,"source"))!==-1){var r=n.consumer.generatedPositionFor(t);if(r){var o={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},a.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],o=r.consumer._generatedMappings,i=0;i<o.length;i++){var a=o[n],c=r.consumer._sources.at(a.source);null!==r.consumer.sourceRoot&&(c=s.join(r.consumer.sourceRoot,c)),this._sources.add(c),c=this._sources.indexOf(c);var u=r.consumer._names.at(a.name);this._names.add(u),u=this._names.indexOf(u);var l={source:c,generatedLine:a.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:a.column+(r.generatedOffset.generatedLine===a.generatedLine)?r.generatedOffset.generatedColumn-1:0,originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),"number"==typeof l.originalLine&&this.__originalMappings.push(l)}f(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),f(this.__originalMappings,s.compareByOriginalPositions)},e.IndexedSourceMapConsumer=a})},{"./array-set":360,"./base64-vlq":361,"./binary-search":363,"./quick-sort":365,"./util":369,amdefine:1}],367:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t){t||(t={}),this._file=i.getArg(t,"file",null),this._sourceRoot=i.getArg(t,"sourceRoot",null),this._skipValidation=i.getArg(t,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new s,this._sourcesContents=null}var o=t("./base64-vlq"),i=t("./util"),a=t("./array-set").ArraySet,s=t("./mapping-list").MappingList;r.prototype._version=3,r.fromSourceMap=function(t){var e=t.sourceRoot,n=new r({file:t.file,sourceRoot:e});return t.eachMapping(function(t){var r={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(r.source=t.source,null!=e&&(r.source=i.relative(e,r.source)),r.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(r.name=t.name)),n.addMapping(r)}),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&n.setSourceContent(e,r)}),n},r.prototype.addMapping=function(t){var e=i.getArg(t,"generated"),n=i.getArg(t,"original",null),r=i.getArg(t,"source",null),o=i.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,n,r,o),null==r||this._sources.has(r)||this._sources.add(r),null==o||this._names.has(o)||this._names.add(o),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:o})},r.prototype.setSourceContent=function(t,e){var n=t;null!=this._sourceRoot&&(n=i.relative(this._sourceRoot,n)),null!=e?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(n)]=e):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},r.prototype.applySourceMap=function(t,e,n){var r=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=t.file}var o=this._sourceRoot;null!=o&&(r=i.relative(o,r));var s=new a,c=new a;this._mappings.unsortedForEach(function(e){if(e.source===r&&null!=e.originalLine){var a=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=a.source&&(e.source=a.source,null!=n&&(e.source=i.join(n,e.source)),null!=o&&(e.source=i.relative(o,e.source)),e.originalLine=a.line,e.originalColumn=a.column,null!=a.name&&(e.name=a.name))}var u=e.source;null==u||s.has(u)||s.add(u);var l=e.name;null==l||c.has(l)||c.add(l)},this),this._sources=s,this._names=c,t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=i.join(n,e)),null!=o&&(e=i.relative(o,e)),this.setSourceContent(e,r))},this)},r.prototype._validateMapping=function(t,e,n,r){if((!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0)||e||n||r)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:e,name:r}))},r.prototype._serializeMappings=function(){for(var t,e=0,n=1,r=0,a=0,s=0,c=0,u="",l=this._mappings.toArray(),f=0,p=l.length;f<p;f++){if(t=l[f],t.generatedLine!==n)for(e=0;t.generatedLine!==n;)u+=";",n++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(t,l[f-1]))continue;u+=","}u+=o.encode(t.generatedColumn-e),e=t.generatedColumn,null!=t.source&&(u+=o.encode(this._sources.indexOf(t.source)-c),c=this._sources.indexOf(t.source),u+=o.encode(t.originalLine-1-a),a=t.originalLine-1,u+=o.encode(t.originalColumn-r),r=t.originalColumn,null!=t.name&&(u+=o.encode(this._names.indexOf(t.name)-s),s=this._names.indexOf(t.name)))}return u},r.prototype._generateSourcesContent=function(t,e){return t.map(function(t){if(!this._sourcesContents)return null;null!=e&&(t=i.relative(e,t));var n=i.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=r})},{"./array-set":360,"./base64-vlq":361,"./mapping-list":364,"./util":369,amdefine:1}],368:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t,e,n,r,o){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==n?null:n,this.name=null==o?null:o,this[c]=!0,null!=r&&this.add(r)}var o=t("./source-map-generator").SourceMapGenerator,i=t("./util"),a=/(\r?\n)/,s=10,c="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(t,e,n){function o(t,e){if(null===t||void 0===t.source)s.add(e);else{var o=n?i.join(n,t.source):t.source;s.add(new r(t.originalLine,t.originalColumn,o,e,t.name))}}var s=new r,c=t.split(a),u=function(){var t=c.shift(),e=c.shift()||"";return t+e},l=1,f=0,p=null;return e.eachMapping(function(t){if(null!==p){if(!(l<t.generatedLine)){var e=c[0],n=e.substr(0,t.generatedColumn-f);return c[0]=e.substr(t.generatedColumn-f),f=t.generatedColumn,o(p,n),void(p=t)}var n="";o(p,u()),l++,f=0}for(;l<t.generatedLine;)s.add(u()),l++;if(f<t.generatedColumn){var e=c[0];s.add(e.substr(0,t.generatedColumn)),c[0]=e.substr(t.generatedColumn),f=t.generatedColumn}p=t},this),c.length>0&&(p&&o(p,u()),s.add(c.join(""))),e.sources.forEach(function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),s.setSourceContent(t,r))}),s},r.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(t){this.add(t)},this);else{if(!t[c]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},r.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[c]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},r.prototype.walk=function(t){for(var e,n=0,r=this.children.length;n<r;n++)e=this.children[n],e[c]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},r.prototype.join=function(t){var e,n,r=this.children.length;if(r>0){for(e=[],n=0;n<r-1;n++)e.push(this.children[n]),e.push(t);e.push(this.children[n]),this.children=e}return this},r.prototype.replaceRight=function(t,e){var n=this.children[this.children.length-1];return n[c]?n.replaceRight(t,e):"string"==typeof n?this.children[this.children.length-1]=n.replace(t,e):this.children.push("".replace(t,e)),this},r.prototype.setSourceContent=function(t,e){this.sourceContents[i.toSetString(t)]=e},r.prototype.walkSourceContents=function(t){for(var e=0,n=this.children.length;e<n;e++)this.children[e][c]&&this.children[e].walkSourceContents(t);for(var r=Object.keys(this.sourceContents),e=0,n=r.length;e<n;e++)t(i.fromSetString(r[e]),this.sourceContents[r[e]])},r.prototype.toString=function(){var t="";return this.walk(function(e){t+=e}),t},r.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},n=new o(t),r=!1,i=null,a=null,c=null,u=null;return this.walk(function(t,o){e.code+=t,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&a===o.line&&c===o.column&&u===o.name||n.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:e.line,column:e.column},name:o.name}),i=o.source,a=o.line,c=o.column,u=o.name,r=!0):r&&(n.addMapping({generated:{line:e.line,column:e.column}}),i=null,r=!1);for(var l=0,f=t.length;l<f;l++)t.charCodeAt(l)===s?(e.line++,e.column=0,l+1===f?(i=null,r=!1):r&&n.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:e.line,column:e.column},name:o.name})):e.column++}),this.walkSourceContents(function(t,e){n.setSourceContent(t,e)}),{code:e.code,map:n}},e.SourceNode=r})},{"./source-map-generator":367,"./util":369,amdefine:1}],369:[function(t,e,n){if("function"!=typeof r)var r=t("amdefine")(e,t);r(function(t,e,n){function r(t,e,n){if(e in t)return t[e];if(3===arguments.length)return n;throw new Error('"'+e+'" is a required argument.')}function o(t){var e=t.match(m);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function i(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function a(t){var e=t,n=o(t);if(n){if(!n.path)return t;e=n.path}for(var r,a="/"===e.charAt(0),s=e.split(/\/+/),c=0,u=s.length-1;u>=0;u--)r=s[u],"."===r?s.splice(u,1):".."===r?c++:c>0&&(""===r?(s.splice(u+1,c),c=0):(s.splice(u,2),c--));return e=s.join("/"),""===e&&(e=a?"/":"."),n?(n.path=e,i(n)):e}function s(t,e){""===t&&(t="."),""===e&&(e=".");var n=o(e),r=o(t);if(r&&(t=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),i(n);if(n||e.match(_))return e;if(r&&!r.host&&!r.path)return r.host=e,i(r);var s="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return r?(r.path=s,i(r)):s}function c(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var n=0;0!==e.indexOf(t+"/");){var r=t.lastIndexOf("/");if(r<0)return e;if(t=t.slice(0,r),t.match(/^([^\/]+:\/)?\/*$/))return e;++n}return Array(n+1).join("../")+e.substr(t.length+1)}function u(t){return"$"+t}function l(t){return t.substr(1)}function f(t,e,n){var r=t.source-e.source;return 0!==r?r:(r=t.originalLine-e.originalLine,0!==r?r:(r=t.originalColumn-e.originalColumn,0!==r||n?r:(r=t.generatedColumn-e.generatedColumn,0!==r?r:(r=t.generatedLine-e.generatedLine,0!==r?r:t.name-e.name))))}function p(t,e,n){var r=t.generatedLine-e.generatedLine;return 0!==r?r:(r=t.generatedColumn-e.generatedColumn,0!==r||n?r:(r=t.source-e.source,0!==r?r:(r=t.originalLine-e.originalLine,0!==r?r:(r=t.originalColumn-e.originalColumn,0!==r?r:t.name-e.name))))}function h(t,e){return t===e?0:t>e?1:-1}function d(t,e){var n=t.generatedLine-e.generatedLine;return 0!==n?n:(n=t.generatedColumn-e.generatedColumn,0!==n?n:(n=h(t.source,e.source),0!==n?n:(n=t.originalLine-e.originalLine,0!==n?n:(n=t.originalColumn-e.originalColumn,0!==n?n:h(t.name,e.name)))))}e.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;e.urlParse=o,e.urlGenerate=i,e.normalize=a,e.join=s,e.relative=c,e.toSetString=u,e.fromSetString=l,e.compareByOriginalPositions=f,e.compareByGeneratedPositionsDeflated=p,e.compareByGeneratedPositionsInflated=d})},{amdefine:1}],370:[function(t,e,n){"use strict";n.__esModule=!0;n.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),n.addEventListener=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},n.removeEventListener=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},n.getConfirmation=function(t,e){return e(window.confirm(t))},n.supportsHistory=function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)},n.supportsPopStateOnHashChange=function(){return window.navigator.userAgent.indexOf("Trident")===-1},n.supportsGoWithoutReloadUsingHash=function(){return window.navigator.userAgent.indexOf("Firefox")===-1},n.isExtraneousPopstateEvent=function(t){return void 0===t.state&&navigator.userAgent.indexOf("CriOS")===-1}},{}],371:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0,n.locationsAreEqual=n.createLocation=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=t("resolve-pathname"),a=r(i),s=t("value-equal"),c=r(s),u=t("./PathUtils");n.createLocation=function(t,e,n,r){var i=void 0;"string"==typeof t?(i=(0,u.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,a["default"])(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i},n.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,c["default"])(t.state,e.state)}},{"./PathUtils":372,"resolve-pathname":380,"value-equal":381}],372:[function(t,e,n){"use strict";n.__esModule=!0;var r=(n.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},n.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},n.hasBasename=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)});n.stripBasename=function(t,e){return r(t,e)?t.substr(e.length):t},n.stripTrailingSlash=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},n.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},n.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},{}],373:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=t("warning"),s=r(a),c=t("invariant"),u=r(c),l=t("./LocationUtils"),f=t("./PathUtils"),p=t("./createTransitionManager"),h=r(p),d=t("./DOMUtils"),m="popstate",_="hashchange",g=function(){try{return window.history.state||{}}catch(t){return{}}},v=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u["default"])(d.canUseDOM,"Browser history needs a DOM");var e=window.history,n=(0,d.supportsHistory)(),r=!(0,d.supportsPopStateOnHashChange)(),a=t.forceRefresh,c=void 0!==a&&a,p=t.getUserConfirmation,v=void 0===p?d.getConfirmation:p,y=t.keyLength,b=void 0===y?6:y,w=t.basename?(0,f.stripTrailingSlash)((0,f.addLeadingSlash)(t.basename)):"",x=function(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname,a=o.search,c=o.hash,u=i+a+c;return(0,s["default"])(!w||(0,f.hasBasename)(u,w),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+u+'" to begin with "'+w+'".'),w&&(u=(0,f.stripBasename)(u,w)),(0,l.createLocation)(u,r,n)},S=function(){return Math.random().toString(36).substr(2,b)},j=(0,h["default"])(),k=function(t){i(W,t),W.length=e.length,j.notifyListeners(W.location,W.action)},P=function(t){(0,d.isExtraneousPopstateEvent)(t)||C(x(t.state))},E=function(){C(x(g()))},O=!1,C=function(t){if(O)O=!1,k();else{var e="POP";j.confirmTransitionTo(t,e,v,function(n){n?k({action:e,location:t}):M(t)})}},M=function(t){var e=W.location,n=L.indexOf(e.key);n===-1&&(n=0);var r=L.indexOf(t.key);r===-1&&(r=0);var o=n-r;o&&(O=!0,R(o))},A=x(g()),L=[A.key],I=function(t){return w+(0,f.createPath)(t)},T=function(t,r){(0,s["default"])(!("object"===("undefined"==typeof t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i="PUSH",a=(0,l.createLocation)(t,r,S(),W.location);j.confirmTransitionTo(a,i,v,function(t){if(t){var r=I(a),o=a.key,u=a.state;if(n)if(e.pushState({key:o,state:u},null,r),c)window.location.href=r;else{var l=L.indexOf(W.location.key),f=L.slice(0,l===-1?0:l+1);f.push(a.key),L=f,k({action:i,location:a})}else(0,s["default"])(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},N=function(t,r){(0,s["default"])(!("object"===("undefined"==typeof t?"undefined":o(t))&&void 0!==t.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i="REPLACE",a=(0,l.createLocation)(t,r,S(),W.location);j.confirmTransitionTo(a,i,v,function(t){if(t){var r=I(a),o=a.key,u=a.state;if(n)if(e.replaceState({key:o,state:u},null,r),c)window.location.replace(r);else{var l=L.indexOf(W.location.key);l!==-1&&(L[l]=a.key),k({action:i,location:a})}else(0,s["default"])(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},R=function(t){e.go(t)},D=function(){return R(-1)},F=function(){return R(1)},B=0,H=function(t){B+=t,1===B?((0,d.addEventListener)(window,m,P),r&&(0,d.addEventListener)(window,_,E)):0===B&&((0,d.removeEventListener)(window,m,P),r&&(0,d.removeEventListener)(window,_,E))},$=!1,U=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=j.setPrompt(t);return $||(H(1),$=!0),function(){return $&&($=!1,H(-1)),e()}},z=function(t){var e=j.appendListener(t);return H(1),function(){H(-1),e()}},W={length:e.length,action:"POP",location:A,createHref:I,push:T,replace:N,go:R,goBack:D,goForward:F,block:U,listen:z};return W};n["default"]=v},{"./DOMUtils":370,"./LocationUtils":371,"./PathUtils":372,"./createTransitionManager":374,invariant:375,warning:382}],374:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var o=t("warning"),i=r(o),a=function(){var t=null,e=function(e){return(0,i["default"])(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var a="function"==typeof t?t(e,n):t;"string"==typeof a?"function"==typeof r?r(a,o):((0,i["default"])(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(a!==!1)}else o(!0)},r=[],o=function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},a=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:a}};n["default"]=a},{warning:382}],375:[function(t,e,n){(function(t){"use strict";var n=function(e,n,r,o,i,a,s,c){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===n)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,s,c],f=0;u=new Error(n.replace(/%s/g,function(){return l[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=n}).call(this,t("_process"))},{_process:379}],376:[function(t,e,n){t("whatwg-fetch"),e.exports=self.fetch.bind(self)},{"whatwg-fetch":383}],377:[function(t,e,n){!function(t,n){"function"==typeof define&&define.amd?define(function(){return n(t,t.document,void 0)}):"object"==typeof e&&"object"==typeof e.exports?e.exports=n(t,t.document,void 0):n(t,t.document,void 0)}("undefined"!=typeof window?window:this,function(t,e,n){"use strict";var r="OverlayScrollbars",o={o:"object",f:"function",a:"array",s:"string",b:"boolean",n:"number",u:"undefined",z:"null"},i={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},a={wW:function(){return t.innerWidth||e.documentElement[i.cW]||e.body[i.cW]},wH:function(){return t.innerHeight||e.documentElement[i.cH]||e.body[i.cH]},mO:function(){return t.MutationObserver||t.WebKitMutationObserver||t.WebkitMutationObserver||t.MozMutationObserver||n},rO:function(){return t.ResizeObserver||t.WebKitResizeObserver||t.WebkitResizeObserver||t.MozResizeObserver||n},rAF:function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}},cAF:function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||function(e){return t.clearTimeout(e)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},prvD:function(t){t.preventDefault&&t.cancelable?t.preventDefault():t.returnValue=!1},inA:function(t,e){for(var n=0;n<e.length;n++)try{if(e[n]===t)return n}catch(r){}return-1},page:function(t){t=t.originalEvent||t;var r="page",o="client",i="X",a="Y",s=t.target||t.srcElement||e,c=s.ownerDocument||e,u=c.documentElement,l=c.body;if(t.touches!==n){var f=t.touches[0];return{x:f[r+i],y:f[r+a]}}return!t[r+i]&&t[o+i]&&null!=t[o+i]?{x:t[o+i]+(u&&u.scrollLeft||l&&l.scrollLeft||0)-(u&&u.clientLeft||l&&l.clientLeft||0),y:t[o+a]+(u&&u.scrollTop||l&&l.scrollTop||0)-(u&&u.clientTop||l&&l.clientTop||0)}:{x:t[r+i],y:t[r+a]}},mBtn:function(t){return t.which||t.button===n?t.which:1&t.button?1:2&t.button?3:4&t.button?2:0},bind:function(t,e){if(typeof t!==o.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},i=function(){return t.apply(this instanceof r?this:e,n.concat(Array.prototype.slice.call(arguments)))};return t.prototype&&(r.prototype=t.prototype),i.prototype=new r,i}},s=t.jQuery,c=function(r){function i(t){var e=!!t&&"length"in t&&t.length,n=k(t);return!P(n)&&(n===o.a||0===e||typeof e===o.n&&e>0&&e-1 in t)}function a(t){var e=t.match(m)||[];return e.join(g)}function s(t,n){for(var r=(t.parentNode||e).querySelectorAll(n)||[],o=r.length;o--;)if(r[o]==t)return!0;return!1}function c(t,e,n){k(n)===o.s?t.insertAdjacentHTML(e,n):n.nodeType?t.insertAdjacentElement(e,n):t.insertAdjacentElement(e,n[0])}function u(t,e,r){try{t.style[e]!==n&&(t.style[e]=l(e,r))}catch(o){}}function l(t,e){return x[t.toLowerCase()]||k(e)!==o.n||(e=e+="px"),e}function f(t,e){var n,r;e!==!1&&t.q.splice(0,1),t.q.length>0?(r=t.q[0],h(t.el,r.props,r.duration,r.easing,r.complete,!0)):(n=M(t,w),n>-1&&w.splice(n,1))}function p(t,e,n){e===y?t[e]=n:e===b?t[e]=n:u(t,e,n)}function h(t,e,n,o,i,a){var s,c,u,l,h,d,m,_=C(n),g={},v={},x=0;for(_?(o=n.easing,u=n.start,l=n.progress,h=n.step,d=n.specialEasing,i=n.complete,m=n.duration):m=n,d=d||{},m=m||400,o=o||"swing",a=a||!1;x<w.length;x++)if(w[x].el===t){c=w[x];break}c||(c={el:t,q:[]},w.push(c));for(s in e)s===y||s===b?g[s]=t[s]:g[s]=L(t).css(s);for(s in g)g[s]!==e[s]&&(v[s]=e[s]);if(O(v))a&&f(c);else{var j,k,E,A,I,T,N,R,D,F=a?0:M(B,c.q),B={props:v,duration:_?n:m,easing:o,complete:i};if(F===-1&&(F=c.q.length,c.q.push(B)),0===F)if(m>0)N=r.now(),R=function(){j=r.now(),D=j-N,k=B.stop||D>=m,E=1-(Math.max(0,N+m-j)/m||0);for(s in v)A=g[s],I=v[s],T=(I-A)*S[d[s]||o](E,E*m,0,1,m)+A,p(t,s,T),P(h)&&h(T,{elem:t,prop:s,start:A,now:T,end:I,pos:E,options:{easing:o,speacialEasing:d,duration:m,complete:i,step:h},startTime:N});P(l)&&l({},E,Math.max(0,m-D)),k?(f(c),P(i)&&i()):B.frame=r.rAF()(R)},B.frame=r.rAF()(R);else{for(s in v)p(t,s,v[s]);f(c)}}}function d(t,e,n){for(var o,i,a,s=0;s<w.length;s++)if(o=w[s],o.el===t){if(o.q.length>0){if(i=o.q[0],i.stop=!0,r.cAF()(i.frame),o.q.splice(0,1),n)for(a in i.props)p(t,a,i.props[a]);e?o.q=[]:f(o,!1)}break}}var m=/[^\x20\t\r\n\f]+/g,_=Object.prototype.toString,g=" ",v="",y="scrollLeft",b="scrollTop",w=[],x={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},S={swing:function(t,e,n,r,o){return.5-Math.cos(t*Math.PI)/2},linear:function(t,e,n,r,o){return t},easeInQuad:function(t,e,n,r,o){return r*(e/=o)*e+n},easeOutQuad:function(t,e,n,r,o){return-r*(e/=o)*(e-2)+n},easeInOutQuad:function(t,e,n,r,o){return(e/=o/2)<1?r/2*e*e+n:-r/2*(--e*(e-2)-1)+n},easeInCubic:function(t,e,n,r,o){return r*(e/=o)*e*e+n},easeOutCubic:function(t,e,n,r,o){return r*((e=e/o-1)*e*e+1)+n},easeInOutCubic:function(t,e,n,r,o){return(e/=o/2)<1?r/2*e*e*e+n:r/2*((e-=2)*e*e+2)+n},easeInQuart:function(t,e,n,r,o){return r*(e/=o)*e*e*e+n},easeOutQuart:function(t,e,n,r,o){return-r*((e=e/o-1)*e*e*e-1)+n},easeInOutQuart:function(t,e,n,r,o){return(e/=o/2)<1?r/2*e*e*e*e+n:-r/2*((e-=2)*e*e*e-2)+n},easeInQuint:function(t,e,n,r,o){return r*(e/=o)*e*e*e*e+n},easeOutQuint:function(t,e,n,r,o){return r*((e=e/o-1)*e*e*e*e+1)+n},easeInOutQuint:function(t,e,n,r,o){return(e/=o/2)<1?r/2*e*e*e*e*e+n:r/2*((e-=2)*e*e*e*e+2)+n},easeInSine:function(t,e,n,r,o){return-r*Math.cos(e/o*(Math.PI/2))+r+n},easeOutSine:function(t,e,n,r,o){return r*Math.sin(e/o*(Math.PI/2))+n},easeInOutSine:function(t,e,n,r,o){return-r/2*(Math.cos(Math.PI*e/o)-1)+n},easeInExpo:function(t,e,n,r,o){return 0==e?n:r*Math.pow(2,10*(e/o-1))+n},easeOutExpo:function(t,e,n,r,o){return e==o?n+r:r*(-Math.pow(2,-10*e/o)+1)+n},easeInOutExpo:function(t,e,n,r,o){return 0==e?n:e==o?n+r:(e/=o/2)<1?r/2*Math.pow(2,10*(e-1))+n:r/2*(-Math.pow(2,-10*--e)+2)+n},easeInCirc:function(t,e,n,r,o){return-r*(Math.sqrt(1-(e/=o)*e)-1)+n},easeOutCirc:function(t,e,n,r,o){return r*Math.sqrt(1-(e=e/o-1)*e)+n},easeInOutCirc:function(t,e,n,r,o){return(e/=o/2)<1?-r/2*(Math.sqrt(1-e*e)-1)+n:r/2*(Math.sqrt(1-(e-=2)*e)+1)+n},easeInElastic:function(t,e,n,r,o){var i=1.70158,a=0,s=r;if(0==e)return n;if(1==(e/=o))return n+r;if(a||(a=.3*o),s<Math.abs(r)){s=r;var i=a/4}else var i=a/(2*Math.PI)*Math.asin(r/s);return-(s*Math.pow(2,10*(e-=1))*Math.sin((e*o-i)*(2*Math.PI)/a))+n},easeOutElastic:function(t,e,n,r,o){var i=1.70158,a=0,s=r;if(0==e)return n;if(1==(e/=o))return n+r;if(a||(a=.3*o),s<Math.abs(r)){s=r;var i=a/4}else var i=a/(2*Math.PI)*Math.asin(r/s);return s*Math.pow(2,-10*e)*Math.sin((e*o-i)*(2*Math.PI)/a)+r+n},easeInOutElastic:function(t,e,n,r,o){var i=1.70158,a=0,s=r;if(0==e)return n;if(2==(e/=o/2))return n+r;if(a||(a=o*(.3*1.5)),s<Math.abs(r)){s=r;var i=a/4}else var i=a/(2*Math.PI)*Math.asin(r/s);return e<1?-.5*(s*Math.pow(2,10*(e-=1))*Math.sin((e*o-i)*(2*Math.PI)/a))+n:s*Math.pow(2,-10*(e-=1))*Math.sin((e*o-i)*(2*Math.PI)/a)*.5+r+n},easeInBack:function(t,e,r,o,i,a){return a==n&&(a=1.70158),o*(e/=i)*e*((a+1)*e-a)+r},easeOutBack:function(t,e,r,o,i,a){return a==n&&(a=1.70158),o*((e=e/i-1)*e*((a+1)*e+a)+1)+r},easeInOutBack:function(t,e,r,o,i,a){return a==n&&(a=1.70158),(e/=i/2)<1?o/2*(e*e*(((a*=1.525)+1)*e-a))+r:o/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)+r},easeInBounce:function(t,e,n,r,o){return r-this.easeOutBounce(t,o-e,0,r,o)+n},easeOutBounce:function(t,e,n,r,o){return(e/=o)<1/2.75?r*(7.5625*e*e)+n:e<2/2.75?r*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?r*(7.5625*(e-=2.25/2.75)*e+.9375)+n:r*(7.5625*(e-=2.625/2.75)*e+.984375)+n},easeInOutBounce:function(t,e,n,r,o){return e<o/2?.5*this.easeInBounce(t,2*e,0,r,o)+n:.5*this.easeOutBounce(t,2*e-o,0,r,o)+.5*r+n}},j=function(){var t,e,r,i,a,s,c=arguments[0]||{},u=1,l=arguments.length,f=!1;for("boolean"==typeof c&&(f=c,c=arguments[1]||{},u=2),typeof c!==o.o&&!k(c)===o.f&&(c={}),
9
+ l===u&&(c=L,--u);u<l;u++)if(null!=(a=arguments[u]))for(i in a)t=c[i],r=a[i],c!==r&&(f&&r&&(C(r)||(e=E(r)))?(e?(e=!1,s=t&&E(t)?t:[]):s=t&&C(t)?t:{},c[i]=j(f,s,r)):r!==n&&(c[i]=r));return c},k=function(t){return t===n?t+v:null===t?t+v:_.call(t).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},P=function(t){return k(t)===o.f},E=function(t){return k(t)===o.a},O=function(t){for(var e in t)return!1;return!0},C=function(t){if(!t||k(t)!==o.o)return!1;var e,n=Object.prototype.hasOwnProperty,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return typeof e===o.u||n.call(t,e)},M=r.inA,A=function(t,e){var n=0;if(i(t))for(;n<t.length&&e.call(t[n],n,t[n])!==!1;n++);else for(n in t)if(e.call(t[n],n,t[n])===!1)break;return t},L=function(t){if(0===arguments.length)return this;var n,r,a=new L,s=t,c=0;if(k(t)===o.s)for(s=[],"<"===t.charAt(0)?(r=e.createElement("div"),r.innerHTML=t,n=r.children):n=e.querySelectorAll(t);c<n.length;c++)s.push(n[c]);if(s){for(k(s)===o.s||i(s)||(s=[s]),c=0;c<s.length;c++)a[c]=s[c];a.length=s.length}return a};return L.prototype={on:function(t,e){t=(t||v).match(m)||[v];var n,r;return this.each(function(){r=this;try{if(r.addEventListener)for(n=0;n<t.length;n++)r.addEventListener(t[n],e);else if(r.detachEvent)for(n=0;n<t.length;n++)r.attachEvent("on"+t[n],e)}catch(o){}})},off:function(t,e){t=(t||v).match(m)||[v];var n,r;return this.each(function(){r=this;try{if(r.removeEventListener)for(n=0;n<t.length;n++)r.removeEventListener(t[n],e);else if(r.detachEvent)for(n=0;n<t.length;n++)r.detachEvent("on"+t[n],e)}catch(o){}})},one:function(t,e){return this.each(function(){var n=L(this),r=function(o){e.call(this,o),n.off(t,r)};n.on(t,r)})},trigger:function(t){var n,r;return this.each(function(){n=this,e.createEvent?(r=e.createEvent("HTMLEvents"),r.initEvent(t,!0,!1),n.dispatchEvent(r)):n.fireEvent("on"+t)})},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)},append:function(t){return this.each(function(){c(this,"beforeend",t)})},prepend:function(t){return this.each(function(){c(this,"afterbegin",t)})},before:function(t){return this.each(function(){c(this,"beforebegin",t)})},after:function(t){return this.each(function(){c(this,"afterend",t)})},remove:function(){return this.each(function(){var t=this,e=t.parentNode;null!=e&&e.removeChild(t)})},unwrap:function(){var t,e,n,r=[];for(this.each(function(){n=this.parentNode,M(n,r)===-1&&r.push(n)}),t=0;t<r.length;t++){for(e=r[t],n=e.parentNode;e.firstChild;)n.insertBefore(e.firstChild,e);n.removeChild(e)}return this},wrapAll:function(t){for(var e,n=this,r=L(t)[0],o=r,i=n[0].parentNode,a=n[0].previousSibling;o.childNodes.length>0;)o=o.childNodes[0];for(e=0;n.length-e;o.firstChild===n[0]&&e++)o.appendChild(n[e]);var s=a?a.nextSibling:i.firstChild;return i.insertBefore(r,s),this},wrapInner:function(t){return this.each(function(){var e=L(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){return this.each(function(){L(this).wrapAll(t)})},css:function(e,r){var i,a,s,c=t.getComputedStyle;return k(e)===o.s?r===n?(i=this[0],s=c?c(i,null):i.currentStyle[e],c&&null!=s?s.getPropertyValue(e):i.style[e]):this.each(function(){u(this,e,r)}):this.each(function(){for(a in e)u(this,a,e[a])})},hasClass:function(t){for(var e,n,r=0,o=g+t+g;e=this[r++];)if(n=e.classList){if(n.contains(t))return!0}else if(1===e.nodeType&&(g+a(e.className+v)+g).indexOf(o)>-1)return!0;return!1},addClass:function(t){var e,r,o,i,s,c,u,l,f=0,p=0;if(t)for(e=t.match(m)||[];r=this[f++];)if(l=r.classList,u===n&&(u=l!==n),u)for(;s=e[p++];)l.add(s);else if(i=r.className+v,o=1===r.nodeType&&g+a(i)+g){for(;s=e[p++];)o.indexOf(g+s+g)<0&&(o+=s+g);c=a(o),i!==c&&(r.className=c)}return this},removeClass:function(t){var e,r,o,i,s,c,u,l,f=0,p=0;if(t)for(e=t.match(m)||[];r=this[f++];)if(l=r.classList,u===n&&(u=l!==n),u)for(;s=e[p++];)l.remove(s);else if(i=r.className+v,o=1===r.nodeType&&g+a(i)+g){for(;s=e[p++];)for(;o.indexOf(g+s+g)>-1;)o=o.replace(g+s+g,g);c=a(o),i!==c&&(r.className=c)}return this},hide:function(){return this.each(function(){this.style.display="none"})},show:function(){return this.each(function(){this.style.display="block"})},attr:function(t,e){for(var r=0;r<this.length;r++){var o=this[r];if(e===n)return o.getAttribute(t);o.setAttribute(t,e)}return this},removeAttr:function(t){return this.each(function(){this.removeAttribute(t)})},offset:function(){var n=this[0],r=n.getBoundingClientRect(),o=t.pageXOffset||e.documentElement[y],i=t.pageYOffset||e.documentElement[b];return{top:r.top+i,left:r.left+o}},position:function(){var t=this[0];return{top:t.offsetTop,left:t.offsetLeft}},scrollLeft:function(t){for(var e=0;e<this.length;e++){var r=this[e];if(t===n)return r[y];r[y]=t}return this},scrollTop:function(t){for(var e=0;e<this.length;e++){var r=this[e];if(t===n)return r[b];r[b]=t}return this},val:function(t){var e=this[0];return t?(e.value=t,this):e.value},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){return L(this[t>=0?t:this.length+t])},find:function(t){var e,n=[];return this.each(function(){var r=this,o=r.querySelectorAll(t);for(e=0;e<o.length;e++)n.push(o[e])}),L(n)},children:function(t){var e,n,r,o=[];return this.each(function(){for(n=this.children,r=0;r<n.length;r++)e=n[r],t?(e.matches&&e.matches(t)||s(e,t))&&o.push(e):o.push(e)}),L(o)},parent:function(t){var e,n=[];return this.each(function(){e=this.parentNode,t&&!L(e).is(t)||n.push(e)}),L(n)},is:function(t){var e,n,r;for(r=0;r<this.length;r++){if(e=this[r],n=e.style.display,":visible"===t)return"none"!==n;if(":hidden"===t)return"none"===n;if(e.matches&&e.matches(t)||s(e,t))return!0}return!1},contents:function(){var t,e,n=[];return this.each(function(){for(t=this.childNodes,e=0;e<t.length;e++)n.push(t[e])}),L(n)},each:function(t){return A(this,t)},animate:function(t,e,n,r){return this.each(function(){h(this,t,e,n,r)})},stop:function(t,e){return this.each(function(){d(this,t,e)})}},j(L,{extend:j,type:k,isFunction:P,isArray:E,isEmptyObject:O,isPlainObject:C,inArray:M,each:A}),L}(a),u=function(t){function e(t,e){t[s]=e,a.push(t)}function r(e){var n=t.inA(e,a);n>-1&&(delete e[s],a.splice(n,1))}function o(t){return i(t)!==n}function i(e){var n=t.inA(e,a);if(n>-1)return a[n][s]}var a=[],s="__overlayScrollbars__";return{all:function(){return a},add:e,rem:r,has:o,get:i}}(a),l=function(a,c,u){function l(){d||(d=new f(_.d)),m||(m=new p(d))}function f(r){function o(t){var r=!1,o="Webkit Moz ms O".split(" "),i=e.createElement("div"),a=null,s=0;if(t=t.toLowerCase(),i.style[t]!==n&&(r=!0),!r)for(a=t.charAt(0).toUpperCase()+t.substr(1);s<o.length;s++)if(i.style[o[s]+a]!==n){r=!0;break}return r}function s(t){return{x:t[i.oH]-t[i.cH],y:t[i.oW]-t[i.cW]}}var l=this,f="overflow",p="hidden",h="scroll",d=u("body"),m=u('<div id="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>'),_=m[0],g=u(m.children("div").eq(0)),v=_[i.oH];d.append(m),0===v&&m.hide().show();var y=s(_),b={x:0===y.x,y:0===y.y};u.extend(l,{defaultOptions:r,autoUpdateLoop:!1,autoUpdateRecommended:!a.mO(),nativeScrollbarSize:y,nativeScrollbarIsOverlaid:b,nativeScrollbarStyling:function(){return m.addClass("os-viewport-native-scrollbars-invisible"),m.css(f,p).hide().css(f,h).show(),_[i.oH]-_[i.cH]===0&&_[i.oW]-_[i.cW]===0}(),overlayScrollbarDummySize:{x:30,y:30},msie:function(){var e,n=t.navigator.userAgent,r="indexOf",o="substring",i=n[r]("MSIE "),a=n[r]("Trident/"),s=n[r]("Edge/"),c=n[r]("rv:"),u=t.parseInt;return i>0?e=u(n[o](i+5,n[r](".",i)),10):a>0?e=u(n[o](c+3,n[r](".",c)),10):s>0&&(e=u(n[o](s+5,n[r](".",s)),10)),e}(),cssCalc:function(){var t,n,r=e.createElement("div"),o=["calc","-webkit-calc","-moz-calc","-o-calc"];for(t=0;t<o.length;++t)if(n=o[t],r.style.cssText="width:"+n+"(1px);",r.style.length)return n;return null}(),restrictedMeasuring:function(){m.css(f,p);var t={w:_[i.sW],h:_[i.sH]};m.css(f,"visible");var e={w:_[i.sW],h:_[i.sH]};return t.w-e.w!==0||t.h-e.h!==0}(),rtlScrollBehavior:function(){m.css({"overflow-y":p,"overflow-x":h,direction:"rtl"}).scrollLeft(0);var t=m.offset(),e=g.offset();m.scrollLeft(999);var n=g.offset();return{i:t.left===e.left,n:e.left-n.left===0}}(),supportTransform:o("transform"),supportTransition:o("transition"),supportPassiveEvents:function(){var e=!1;try{t.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(n){}return e}(),supportResizeObserver:!!a.rO(),supportMutationObserver:!!a.mO()}),m.removeAttr(i.s).remove(),function(){function e(t,e){var n=Math.abs(t),r=Math.abs(e);return!(n===r||n+1===r||n-1===r)}function n(){var e=t.screen.deviceXDPI||0,n=t.screen.logicalXDPI||1;return t.devicePixelRatio||e/n}if(!b.x||!b.y){var r=a.wW(),o=a.wH(),i=n();u(t).on("resize",function(){if(c.all().length>0){var t=a.wW(),f=a.wH(),p=t-r,h=f-o;if(0===p&&0===h)return;var _=Math.round(t/(r/100)),g=Math.round(f/(o/100)),v=Math.abs(p),y=Math.abs(h),b=Math.abs(_),w=Math.abs(g),x=n(),S=v>2&&y>2,j=!e(b,w),k=x!==i&&i>0,P=!(S&&j&&k);P||(d.append(m),l.nativeScrollbarSize=s(m[0]),m.remove(),u.each(c.all(),function(){c.has(this)&&c.get(this).update("zoom")})),r=t,o=f,i=x}})}}()}function p(t){var e,r=this,o="autoUpdate",i=o+"Interval",s=[],c=[],l=!1,f=33,p=f,h=a.now(),d=function(){if(s.length>0&&l){e=a.rAF()(function(){d()});var t=a.now(),r=t-h;if(r>p){h=t-r%p;for(var u=f,m=0;m<s.length;m++){var _=s[m];if(_!==n){var g=_.options(),v=g[o],y=Math.max(1,g[i]),b=a.now();(v===!0||null===v)&&b-c[m]>y&&(_.update("auto"),c[m]=new Date(b+=y)),u=Math.max(1,Math.min(u,y))}}p=u}}else p=f};r.add=function(e){u.inArray(e,s)===-1&&(s.push(e),c.push(a.now()),s.length>0&&!l&&(l=!0,t.autoUpdateLoop=l,d()))},r.remove=function(r){var o=u.inArray(r,s);o>-1&&(c.splice(o,1),s.splice(o,1),0===s.length&&l&&(l=!1,t.autoUpdateLoop=l,e!==n&&(a.cAF()(e),e=-1)))}}function h(l,f,p,h){function d(t,e,n){for(var r=e.split(pr),o=0;o<r.length;o++)t[0].addEventListener(r[o],n,{passive:!0})}function m(t,e,n){for(var r=e.split(pr),o=0;o<r.length;o++)t[0].removeEventListener(r[o],n,{passive:!0})}function g(t,e){var r=3333333,s=a.rO(),c="animationstart mozAnimationStart webkitAnimationStart MSAnimationStart",l="childNodes",f=function(){t[gr](r)[_r](Zt?Ct.n?-r:Ct.i?0:r:r),e()};if(Ft){var h=t.append(dt(Yr+" observed")).contents()[0],d=h[Er]=new s(f);d.observe(h)}else if(At>9||!Mt){t.prepend(dt(Yr,dt({className:Xr,dir:"ltr"},dt(Xr,dt(Zr))+dt(Xr,dt({className:Zr,style:"width: 200%; height: 200%"})))));var m,_,g,v,y=t[0][l][0][l][0],b=u(y[l][1]),w=u(y[l][0]),x=u(w[0][l][0]),S=y[i.oW],j=y[i.oH],k=2,P=p.nativeScrollbarSize,E=function(){w[_r](r)[gr](r),b[_r](r)[gr](r)},O=function(){_=0,m&&(S=g,j=v,f())},C=function(t){return g=y[i.oW],v=y[i.oH],m=g!=S||v!=j,t&&m&&!_?(a.cAF()(_),_=a.rAF()(O)):t||O(),E(),t&&(a.prvD(t),a.stpP(t)),!1},M={},A={};A[Jn]=-((P.y+1)*k),A[Yn]=P.x*-k,A[Xn]=P.y*-k,A[Zn]=-((P.x+1)*k),u(y).css(A),w.on(sr,C),b.on(sr,C),t.on(c,function(){C(!1)}),M[nr]=r,M[rr]=r,x.css(M),E()}else{var L=ce[0],I=L.attachEvent,T=At!==n;if(I)t.prepend(dt(Yr)),ht(t,fr+Yr)[0].attachEvent("onresize",f);else{var N=L.createElement(o.o);N.setAttribute("tabindex","-1"),N.setAttribute(i.c,Yr),N.onload=function(){var t=this.contentDocument.defaultView;t.addEventListener("resize",f),t.document.documentElement.style.display="none"},N.type="text/html",T&&t.prepend(N),N.data="about:blank",T||t.prepend(N),t.on(c,f)}}if(t[0]===de[0]){var R=function(){var e=pe.css("direction"),n={},o=0,i=!1;return e!==$e&&("ltr"===e?(n[Zn]=0,n[Yn]=ar,o=r):(n[Zn]=ar,n[Yn]=0,o=Ct.n?-r:Ct.i?0:r),de.children().eq(0).css(n),t[_r](o)[gr](r),$e=e,i=!0),i};R(),t.on(sr,function(t){return R()&&K(),a.prvD(t),a.stpP(t),!1})}}function v(t){if(Ft){var e=t.contents()[0];e[Er].disconnect(),delete e[Er]}else jt(t.children(fr+Yr).eq(0))}function y(t){if(t!==n&&Ft){var e=t.contents()[0];e[Er].unobserve(e)}}function b(t){if(t!==n&&Ft){var e=t.contents()[0];e[Er].observe(e)}}function w(){xn&&!wn&&(yn.observe(pe[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[i.i,i.c,i.s]}),bn.observe(Ut?fe[0]:ye[0],{attributes:!0,attributeOldValue:!0,subtree:!Ut,childList:!Ut,characterData:!Ut,attributeFilter:Ut?["wrap","cols","rows"]:[i.i,i.c,i.s]}),wn=!0)}function x(){xn&&wn&&(yn.disconnect(),bn.disconnect(),wn=!1)}function S(){if(!te){var t=de[0],e={w:t[i.sW],h:t[i.sH]};if(Ht){var n=vt(e,sn);sn=e,n&&K(!0,!1)}else sn=e}}function j(){An&&Z(!0)}function k(){An&&!le.hasClass(_o)&&Z(!1)}function P(){Mn&&(Z(!0),clearTimeout(Pn),Pn=setTimeout(function(){Mn&&!$t&&Z(!1)},100))}function E(t){var e=oe.callbacks;te||(ee!==n?clearTimeout(ee):((Cn||Mn)&&Z(!0),ft()||xt(pe,Dr),ot(e.onScrollStart,t)),et(!0,ge[_r]()),et(!1,ge[gr]()),ot(e.onScroll,t),ee=setTimeout(function(){$t||(O(),ot(e.onScrollStop,t))},Vn))}function O(){clearTimeout(ee),ee=n,(Cn||Mn)&&Z(!1),ft()||St(pe,Dr)}function C(){G(),Bn.update(ar)}function M(t){var e=t.keyCode;if(!lt(e)){if(0===So.length){var n=function(){G(),Bn.update(ar)};n(),Sn=setInterval(n,1e3/60)}u.inArray(e,So)===-1&&So.push(e)}}function A(t){var e=t.keyCode;if(!lt(e)){var n=u.inArray(e,So);n>-1&&So.splice(n,1),0===So.length&&(G(),Bn.update(ar),clearInterval(Sn))}}function L(){setTimeout(function(){$t||(G(),Bn.update(ar))},50)}function I(){jn=!0}function T(){jn=!1,clearInterval(Sn),So=[],G(),Bn.update(ar)}function N(t){return fe[_r](Ct.i&&hn?9999999:0),fe[gr](0),a.prvD(t),a.stpP(t),!1}function R(t){if(!te){var e=t.originalEvent||t,r=e.touches!==n;(1===a.mBtn(t)||r)&&(wn&&(Tn=!0,x()),jo=a.page(t),ko.w=pe[0][i.oW]-(Vt?0:Gt),ko.h=pe[0][i.oH]-(Vt?0:Kt),ce.on(kr,B).on(br,D).on(yr,F),xt(le,_o),we.setCapture&&we.setCapture(),a.prvD(t),a.stpP(t))}}function D(t){var e=a.page(t),n={};(Dn||Rn)&&(n[nr]=ko.w+e.x-jo.x),(Fn||Rn)&&(n[rr]=ko.h+e.y-jo.y),pe.css(n),a.stpP(t)}function F(t){var e=t!==n;ce.off(kr,B).off(br,D).off(yr,F),St(le,_o),we.releaseCapture&&we.releaseCapture(),e&&(Tn&&w(),Bn.update(ar)),Tn=!1}function B(t){return a.prvD(t),!1}function H(){K()}function $(){var t={};return zt&&ve&&(t.w=ct(ve.css(tr+nr)),t.h=ct(ve.css(tr+rr)),t.c=vt(t,vn),t.f=!0),vn=t,t.c}function U(t,e){var r=e!==n&&null!==e?e.split(pr):ir,o=t!==n&&null!==t?t.split(pr):ir;if(r===ir&&o===ir)return!1;var i,a,s,c,l=st(o,r),f=!1,p=mn!==n&&null!==mn?mn.split(pr):[ir],h=dn!==n&&null!==dn?dn.split(pr):[ir],d=u.inArray(go,l),m=l[i];for(d>-1&&l.splice(d,1),i=0;i<l.length;i++)if(m=l[i],0!==m.indexOf(Mr)){for(s=!0,c=!0,a=0;a<p.length;a++)if(m===p[a]){s=!1;break}for(a=0;a<h.length;a++)if(m===h[a]){c=!1;break}if(s&&c){f=!0;break}}return f}function z(t){var e=t.attributeName,n=t.target,r=t.type,a="closest";if(n===ye[0])return null===e;if("attributes"===r&&(e===i.c||e===i.s)&&!Ut){if(typeof n[a]!==o.f)return!0;if(null!==n[a](fr+Yr)||null!==n[a](fr+eo)||null!==n[a](fr+co))return!1}return!0}function W(){if(te)return!1;var t,e=Ut&&Ie&&!Je?fe.val().length:0,n=!wn&&Ie&&!Ut,r={};n&&(t=ye.css(or),r[or]=Zt?Yn:Zn,r[nr]=ar,ye.css(r));var o={w:pt()[i.sW]+e,h:pt()[i.sH]+e};n&&(r[or]=t,r[nr]=cr,ye.css(r));var a=$(),s=vt(o,an)||a;return an=o,s}function V(){if(te||wn)return!1;var t=pe.attr(i.i)||ir,e=gt(t,Xe),n=pe.attr(i.c)||ir,r=gt(n,Ze),o=pe.attr(i.s)||ir,a=gt(o,tn),s=pe.is(":visible")||ir,c=gt(s,en),u=Ut?fe.attr("rows")||ir:ir,l=gt(u,nn),f=Ut?fe.attr("cols")||ir:ir,p=gt(f,rn),h=Ut?fe.attr("wrap")||ir:ir,d=gt(h,on);return Xe=t,r&&(r=U(Ze,n)),Ze=n,tn=o,en=s,nn=u,rn=f,on=h,e||r||a||c||l||p||d}function q(t){if(!Ht)return!0;var e=[nr,tr+nr,er+nr,Gn+Zn,Gn+Yn,Zn,Yn,"font-weight","word-spacing"],n=[Kn+Zn,Kn+Yn,Qn+Zn+nr,Qn+Yn+nr],r=[rr,tr+rr,er+rr,Gn+Jn,Gn+Xn,Jn,Xn,"line-height"],o=[Kn+Jn,Kn+Xn,Qn+Jn+nr,Qn+Xn+nr],i="s",a="v-s",s=Ve.x===i||Ve.x===a,c=Ve.y===i||Ve.y===a,u=!1,l=function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1};return c&&(u=l(r,t),u||Vt||(u=l(o,t))),s&&!u&&(u=l(e,t),u||Vt||(u=l(n,t))),u}function G(){if(!te){var t,e,n,r,o=!Je,a=zn.w-(Vt||Ue||!Ie?0:Kt+Jt),s=zn.h-(Vt||Ue||!Te?0:Kt+Jt),c={},u=Ie||o,l=fe[0];return c[tr+nr]=ir,c[tr+rr]=ir,c[nr]=ar,fe.css(c),t=l[i.oW],e=u?Math.max(t,l[i.sW]-1):1,e+=Ie?Yt+(Vt?0:o?0:Gt+Qt):0,c[nr]=Ie?e:cr,c[rr]=ar,fe.css(c),n=l[i.oH],r=Math.max(n,l[i.sH]-1),c[nr]=e,c[rr]=r,be.css(c),c[tr+nr]=a+(!Vt&&Ie?Gt+Qt:0),c[tr+rr]=s+(!Vt&&Te?Kt+Jt:0),fe.css(c),{ow:t,oh:n,dw:e,dh:r}}}function K(t,e,r){var o=a.now(),s=yo>0&&Ht&&o-ie<yo&&!Te&&!Ie;if(clearTimeout(ae),s&&(vo.h=t,vo.c=e,vo.f=r,ae=setTimeout(K,yo)),!($t||s||te||Ht&&!r&&pe.is(":hidden")||"inline"===pe.css("display"))){ie=o,t=t||vo.h,e=e||vo.c,r=r||vo.f,vo={},t=t!==n&&t,e=e!==n&&e,r=r!==n&&r,!Lt||Et.x&&Et.y?Tt=wt(!0,{},p.nativeScrollbarSize):(Tt.x=0,Tt.y=0),Wn={x:3*(Tt.x+(Et.x?0:3)),y:3*(Tt.y+(Et.y?0:3))},y(de),y(he);var c={l:ge[_r](),t:ge[gr]()},l=oe.callbacks,f=oe.scrollbars,_=oe.textarea,v=l.onUpdated,S=l.onOverflowChanged,E=l.onOverflowAmountChanged,O=l.onDirectionChanged,C=l.onContentSizeChanged,M=l.onHostSizeChanged,A=f.visibility,L=gt(A,cn,r),I=f.autoHide,T=gt(I,un,r),N=f.clickScrolling,D=gt(N,ln,r),F=f.dragScrolling,B=gt(F,fn,r),H=oe.className,U=gt(H,dn,r),z=oe.resize,W=gt(z,pn,r)&&!zt,V=!!Ut&&"off"!==fe.attr("wrap"),q=gt(V,Je,r),Q=oe.paddingAbsolute,J=gt(Q,Ue,r),Y=oe.clipAlways,rt=gt(Y,ze,r),at=oe.sizeAutoCapable&&!zt,st=gt(at,Qe,r),lt=oe.nativeScrollbarsOverlaid.showNativeScrollbars,ft=gt(lt,Ge),ht=oe.autoUpdate,mt=gt(ht,Ke),_t=oe.overflowBehavior,bt=vt(_t,Ve,ur,lr,r),jt=_.dynWidth,kt=gt(gn,Pt),Pt=_.dynHeight,At=gt(_n,Pt);if(On="n"===I,Cn="s"===I,Mn="m"===I,An="l"===I,En=f.autoHideDelay,Ln=f.touchSupport,mn=dn,Nn="n"===z,Rn="b"===z,Dn="h"===z,Fn="v"===z,hn=oe.normalizeRTL,lt=lt&&Et.x&&Et.y,cn=A,un=I,ln=N,fn=F,dn=H,pn=z,Je=V,Ue=Q,ze=Y,Qe=at,Ge=lt,Ke=ht,Ve=wt(!0,{},_t),gn=jt,_n=Pt,U&&(St(pe,mn+pr+go),xt(pe,H!==n&&null!==H&&H.length>0?H:go)),mt&&(ht===!0?(x(),h.add(Bn)):null===ht&&Mt?(x(),h.add(Bn)):(h.remove(Bn),w())),st)if(at)if(me===n&&(me=u(dt(Qr)),_e.before(me)),qt)he.show();else{he=u(dt(Jr)),me.before(he);var Nt={w:-1,h:-1};g(he,function(){var t={w:he[0][i.oW],h:he[0][i.oH]};vt(t,Nt)&&(Ht&&Te&&t.h>0||Ie&&t.w>0?K():(Ht&&!Te&&0===t.h||!Ie&&0===t.w)&&K()),Nt=t}),qt=!0,null!==It&&he.css(rr,It+"(100% + 1px)")}else qt&&he.hide();r&&(de.find("*").trigger(sr),qt&&he.find("*").trigger(sr));var Rt,Ft=pe.css("direction"),Wt=gt(Ft,He,r),ee=pe.css("box-sizing"),ne=gt(ee,Re,r),re={c:r,t:ct(pe.css(Kn+Jn)),r:ct(pe.css(Kn+Yn)),b:ct(pe.css(Kn+Xn)),l:ct(pe.css(Kn+Zn))};try{Rt=qt?he[0].getBoundingClientRect():null}catch(se){return}Zt="rtl"===Ft,Vt="border-box"===ee;var ce=Zt?Zn:Yn,ue=Zt?Yn:Zn,le=pe[0],xe=_e[0],Se=!1,je=!(!qt||"none"===pe.css(or))&&(0===Math.round(Rt.right-Rt.left)&&(!!Q||le[i.cW]-Gt>0));if(at&&!je){var ke=le[i.oW],Pe=me.css(nr);me.css(nr,ar);var Ee=le[i.oW];me.css(nr,Pe),Se=ke!==Ee,Se||(me.css(nr,ke+1),Ee=le[i.oW],me.css(nr,Pe),Se=ke!==Ee)}var $e=(je||Se)&&at,Xe=gt($e,Ie,r),Ze=!$e&&Ie,tn=!!qt&&0===Math.round(Rt.bottom-Rt.top),en=gt(tn,Te,r),nn=!tn&&Te,rn="-"+nr,on=$e&&Vt||!Vt,an=tn&&Vt||!Vt,sn={c:r,t:an?ct(pe.css(Qn+Jn+rn)):0,r:on?ct(pe.css(Qn+Yn+rn)):0,b:an?ct(pe.css(Qn+Xn+rn)):0,l:on?ct(pe.css(Qn+Zn+rn)):0},yn={c:r,t:ct(pe.css(Gn+Jn)),r:ct(pe.css(Gn+Yn)),b:ct(pe.css(Gn+Xn)),l:ct(pe.css(Gn+Zn))},bn={h:String(pe.css(er+rr)),w:String(pe.css(er+nr))},xn={},Sn={};if(Gt=re.l+re.r,Kt=re.t+re.b,re.c=yt(re,De),Qt=sn.l+sn.r,Jt=sn.t+sn.b,sn.c=yt(sn,Fe),Yt=yn.l+yn.r,Xt=yn.t+yn.b,yn.c=yt(yn,Be),bn.ih=ct(bn.h),bn.iw=ct(bn.w),bn.ch=bn.h.indexOf("px")>-1,bn.cw=bn.w.indexOf("px")>-1,bn.c=vt(bn,Ne,r),He=Ft,Re=ee,Ie=$e,Te=tn,De=re,Fe=sn,Be=yn,Ne=bn,Wt&&qt&&he.css(or,ue),re.c||Wt||J||Xe||en||ne||st){var kn={},Pn={};it(Sn,Gn,[-re.t,-re.r,-re.b,-re.l]),Q?(it(kn,ir,[re.t,re.r,re.b,re.l]),Ut?it(Pn,Kn):it(xn,Kn)):(it(kn,ir),Ut?it(Pn,Kn,[re.t,re.r,re.b,re.l]):it(xn,Kn,[re.t,re.r,re.b,re.l])),_e.css(kn),fe.css(Pn)}zn={w:xe[i.oW],h:xe[i.oH]};var In=!!Ut&&G();if(tn&&(en||J||ne||bn.c||re.c||sn.c)?(bn.cw&&(xn[er+rr]=bn.ch?bn.ih-(Q?Kt:0)+(Vt?-Jt:Kt):ir),xn[rr]=ar):(en||J)&&(xn[er+rr]=ir,xn[rr]=cr),$e&&(Xe||J||ne||bn.c||re.c||sn.c||Wt)?(bn.cw&&(xn[er+nr]=bn.cw?bn.iw-(Q?Gt:0)+(Vt?-Qt:Gt)+(Et.y?Ot.y:0):ir),xn[nr]=ar,Sn[er+nr]=cr):(Xe||J)&&(xn[er+nr]=ir,xn[nr]=cr,xn[or]=ir,Sn[er+nr]=ir),$e&&(bn.cw||(xn[er+nr]=ir),Sn[nr]=Ut&&jt?In.dw:ar,xn[nr]=ar,xn[or]=ue),tn&&(bn.ch||(xn[er+rr]=ir),Sn[rr]=Ut?Pt?In.dh:ar:ye[0][i.cH]),at&&me.css(Sn),ye.css(xn),xn={},Sn={},Ae=Ae||{x:!1,y:!1},t||e||Wt||ne||J||Xe||$e||en||tn||bn.c||ft||bt||rt||W||L||kt||At||q||J||kt||At||r){var Tn="overflow",$n=Tn+"-x",Un=Tn+"-y",Vn="hidden",qn="visible",fr=Bt?Et.x||Et.y||zn.w<Wn.y||zn.h<Wn.x||tn:tn,hr={},dr=Ae.y&&Le.ys&&!lt?Et.y?ge.css(ce):-Tt.y:0,mr=Ae.x&&Le.xs&&!lt?Et.x?ge.css(Xn):-Tt.x:0;it(hr,ir),ge.css(hr),fr&&ye.css(Tn,Vn);var yr=pt(),Sr=Bt&&!fr?ge[0]:yr,jr={w:yr[i.cW],h:yr[i.cH]},kr={w:Math.max(yr[i.sW],Sr[i.sW]),h:Math.max(yr[i.sH],Sr[i.sH])},Pr={w:Ut&&In&&!jt?In.ow:$e?jr.w:kr.w,h:Ut&&In&&!Pt?In.oh:tn?jr.h:kr.h};hr[Xn]=nn?ir:mr,hr[ce]=Ze?ir:dr,ge.css(hr);var Er={w:le[i.cW],h:le[i.cH]},Or={w:Math.max(Pr.w+(Q?Gt:0),Er.w-Gt)-(jt&&Ut&&$e?Yt+(Vt?0:Gt+Qt):0),h:Math.max(Pr.h+(Q?Kt:0),Er.h-Kt)};if(Or.c=vt(Or,We,r),We=Or,at){(Or.c||tn||$e)&&(Sn[nr]=Or.w,Sn[rr]=Or.h);var Cr=Sn[nr]+(Vt?Qt:-Gt),Mr=Sn[rr]+(Vt?Jt:-Gt),Ar={};(!$e||!$e&&sn.c)&&(Sn[nr]=Er.w-(Vt?0:Gt+Qt)-1-Yt),(!tn||!tn&&sn.c)&&(Sn[rr]=Er.h-(Vt?0:Kt+Jt)-1-Xt),bn.cw&&bn.iw===Cr&&(Sn[nr]=Cr+(Vt?0:Gt)+1),bn.ch&&bn.ih===Mr&&(Sn[rr]=Mr+(Vt?0:Kt)+1),$e&&(jr.w<zn.w||Ut&&!V)&&0===Gt&&(Ut&&(Ar[nr]=ct(be.css(nr))-1),Sn[nr]-=1),tn&&(jr.h<zn.h||Ut)&&0===Kt&&(Ut&&(Ar[rr]=ct(be.css(rr))-1),Sn[rr]-=1),Pr.h>0&&(Sn[nr]=Math.max(1,Sn[nr]),Sn[rr]=Math.max(1,Sn[rr])),Ut&&be.css(Ar),me.css(Sn)}$e&&(xn[nr]=cr),!$e||Vt||wn||(xn[or]="none"),ye.css(xn),xn={};var Lr=yr.getBoundingClientRect(),Ir={w:Math.max(yr[i.sW],Sr[i.sW]),h:Math.max(yr[i.sH],Sr[i.sH])};if(fr&&ye.css(Tn,ir),Lr.width){var Tr=Lr.width,$r=Lr.height,Ur=.001;Ir.w+=ct(Tr+Ur)-Tr,Ir.h+=ct($r+Ur)-$r}Ir.c=e=vt(Ir,Ce,r),Ce=Ir,Er={w:le[i.cW],h:le[i.cH]},t=vt(Er,Oe),Oe=Er,zn={w:xe[i.oW],h:xe[i.oH]};var zr={x:"v-s"===_t.x,y:"v-s"===_t.y},Wr={x:"v-h"===_t.x,y:"v-h"===_t.y},Vr={x:"s"===_t.x,y:"s"===_t.y},qr={x:Math.max(0,Math.round(100*(Ir.w-Er.w+(Q?Gt:0)))/100),y:Math.max(0,Math.round(100*(Ir.h-Er.h+(Q?Kt:0)))/100)},Gr=Ut&&(0===zn.w||0===zn.h);Gr&&(qr.x=0,qr.y=0);var Yr={x:qr.x>0,y:qr.y>0},Xr={x:Yr.x,y:Yr.y};(zr.x||Wr.x)&&(Xr.x=Yr.y&&!zr.y&&!Wr.y),(zr.y||Wr.y)&&(Xr.y=Yr.x&&!zr.x&&!Wr.x),Xr.xs=!!Xr.x&&(Vr.x||zr.x),Xr.ys=!!Xr.y&&(Vr.y||zr.y);var Zr={x:Yr.x&&Xr.xs,y:Yr.y&&Xr.ys},to=qe;if(qr.c=vt(qr,qe,ur,lr,r),qe=qr,Yr.c=vt(Yr,Ae,ur,lr,r),Ae=Yr,Xr.c=vt(Xr,Le,ur,lr,r),Le=Xr,Et.x||Et.y){var eo=r,no={};if((Yr.x||Yr.y)&&(no.w=Et.y&&Yr.y?Ir.w+Ot.y:ir,no.h=Et.x&&Yr.x?Ir.h+Ot.x:ir,eo=gt(no,Me,r),Me=no),Yr.c||Xr.c||Ir.c||Wt||Xe||en||$e||tn||ft){var ro="px solid transparent";xn[Qn+ue]=ir,xn[Gn+ue]=ir,Et.x&&Yr.x&&Xr.xs?(tn&&(xn[Gn+Xn]=lt?ir:Ot.x),tn||lt?xn[Qn+Xn]=ir:xn[Qn+Xn]=Ot.x+ro):(no.h=ir,eo=!0,xn[Qn+Xn]=ir,xn[Gn+Xn]=ir),Et.y&&Yr.y&&Xr.ys?($e&&(xn[Gn+ce]=lt?ir:Ot.y),lt?xn[Qn+ce]=ir:xn[Qn+ce]=Ot.y+ro):(no.w=ir,eo=!0,xn[Qn+ce]=ir,xn[Gn+ce]=ir)}if(lt&&(no.w=ir,no.h=ir,eo=!0),eo){var oo={};oo[nr]=Xr.y?no.w:ir,oo[rr]=Xr.x?no.h:ir,ve===n&&(ve=u(dt(Kr)),ge.prepend(ve)),ve.css(oo)}ye.css(xn)}var io={},kn={};if(t||Yr.c||Xr.c||Ir.c||bt||ne||ft||Wt||rt||en){io[ue]=ir;var ao=function(){io[Xn]=ir,Hn.h=0},so=function(){io[ce]=ir,Hn.w=0};if(Yr.x&&Xr.xs?(io[$n]=sr,lt?ao():(io[Xn]=-(Et.x?Ot.x:Tt.x),Hn.h=Et.x?Ot.y:0)):(io[$n]=ir,ao()),Yr.y&&Xr.ys?(io[Un]=sr,lt?so():(io[ce]=-(Et.y?Ot.y:Tt.y),Hn.w=Et.y?Ot.x:0)):(io[Un]=ir,so()),(zn.h<Wn.x||zn.w<Wn.y)&&(Yr.x&&Xr.x&&!Et.x||Yr.y&&Xr.y&&!Et.y)?(io[Kn+Jn]=Wn.x,io[Gn+Jn]=-Wn.x,io[Kn+ue]=Wn.y,io[Gn+ue]=-Wn.y):(io[Kn+Jn]=ir,io[Gn+Jn]=ir,io[Kn+ue]=ir,io[Gn+ue]=ir),io[Kn+ce]=ir,io[Gn+ce]=ir,Yr.x&&Xr.x||Yr.y&&Xr.y||Gr?Ut&&Gr&&(kn[$n]=Vn,kn[Un]=Vn):(!Y||Wr.x||zr.x||Wr.y||zr.y)&&(Ut&&(kn[$n]=ir,kn[Un]=ir),io[$n]=qn,io[Un]=qn),_e.css(kn),ge.css(io),io={},(Yr.c||ne||Xe||en)&&(!Et.x||!Et.y)){var co=ye[0],ho=co.style;ho.webkitTransform="scale(1)",ho.display="run-in";co[i.oH];ho.display=ir,ho.webkitTransform=ir}if(ft&&lt){pe.hide();le[i.oH];pe.show()}}if(xn={},Wt||Xe||en)if(Zt&&$e){var mo=ye.css(or),_o=Math.round(ye.css(or,ir).css(Zn,ir).position().left);ye.css(or,mo);var bo=Math.round(ye.position().left);_o!==bo&&(xn[Zn]=_o)}else xn[Zn]=ir;ye.css(xn);var wo="v"===A,xo="h"===A,So="a"===A,jo=a.bind(X,0,!0,!0,Zr.x),ko=a.bind(X,0,!1,!0,Zr.y),Po=a.bind(X,0,!0,!1,Zr.x),Eo=a.bind(X,0,!1,!1,Zr.y);if(Xr.x||Xr.y?xt(pe,Fr):St(pe,Fr),Xr.x?xt(pe,Br):St(pe,Br),Xr.y?xt(pe,Hr):St(pe,Hr),Wt&&(Zt?xt(pe,Nr):St(pe,Nr)),zt&&xt(pe,Rr),W){var Oo=function(){we.on(vr,R)},Co=function(){we.off(vr,R)};Nn?(xt(pe,Rr),St(we,[uo,lo,fo,po].join(pr)),Co()):(St(pe,Rr),xt(we,uo),Rn?xt(we,lo):Dn?xt(we,fo):Fn&&xt(we,po),Co(),Oo())}if((L||bt||Xr.c||Yr.c||ft)&&(lt?ft&&(St(pe,Dr),lt&&(Po(),Eo())):So?(Zr.x?jo():Po(),Zr.y?ko():Eo()):wo?(jo(),ko()):xo&&(Po(),Eo())),T||ft){var Mo=function(t){Dt?t?d(pe,br,P):(d(pe,wr,j),d(pe,xr,k)):t?pe.on(br,P):pe.on(wr,j).on(xr,k)},Ao=function(){Dt?(m(pe,br,P),m(pe,wr,j),m(pe,xr,k)):pe.off(br,P).off(wr,j).off(xr,k)};An||Mn?(Ao(),Mo(Mn)):Ao(),On?Z(!0):Z(!1,!0)}if((t||qr.c||en||Xe||W||ne||J||ft||Wt)&&(tt(!0),et(!0,c.l),tt(!1),et(!1,c.t)),D&&nt(!0,N),B&&nt(!1,F),Ut&&e){var Lo=ut();if(Lo){var Io=Ye===n||Lo.rows!==Ye.rows,To=Lo.cR,No=Lo.cC,Ro=Lo.w,Do=Lo.r,Fo=Lo.c,Bo=Lo.p,Ho=Lo.m,$o=Ho===Bo&&jn,Uo={x:V||No!==Fo||To!==Ro?-1:qe.x,y:(V?$o||Io&&to!==n&&c.t===to.y:($o||Io)&&To===Do)?qe.y:-1},zo=Uo.x>-1,Wo=Uo.y>-1;(zo||Wo)&&(Wo&&ge[gr](Uo.y),zo&&(Zt&&hn&&Ct.i?ge[_r](0):ge[_r](Uo.x)))}Ye=Lo}else Ut||(Zt&&Ct.i&&Et.y&&Yr.x&&hn&&(c.l+=Hn.w||0),ge[_r](c.l),ge[gr](c.t));Wt&&ot(O,{isRTL:Zt,dir:Ft}),t&&ot(M,{width:Oe.w,height:Oe.h}),e&&ot(C,{width:Ce.w,height:Ce.h}),(Yr.c||Xr.c)&&ot(S,{x:Yr.x,y:Yr.y,xScrollable:Xr.xs,yScrollable:Xr.ys,clipped:Xr.x||Xr.y}),qr.c&&ot(E,{x:qr.x,y:qr.y})}zt&&(Yr.c||vn.c)&&(vn.f||$(),Et.y&&Yr.x&&ye.css(tr+nr,vn.w+Ot.y),Et.x&&Yr.y&&ye.css(tr+rr,vn.h+Ot.x),vn.c=!1),b(de),b(he),ot(v,{forced:r})}}function Q(t){re=wt(!0,{},re,_.v(t,_.t,!0)),oe=wt(!0,{},oe,_.v(t,_.t,!1,!0))}function J(){xe=u(dt(eo+pr+ho)),Se=u(dt(no)),je=u(dt(oo)),ke=u(dt(eo+pr+mo)),Pe=u(dt(no)),Ee=u(dt(oo)),xe.append(Se),Se.append(je),ke.append(Pe),Pe.append(Ee),_e.after(ke),_e.after(xe),Nt&&(xe.on(Pr,function(t){t.target===xe[0]&&(tt(!0),et(!0,ge[_r]()))}),ke.on(Pr,function(t){t.target===ke[0]&&(tt(!1),et(!1,ge[gr]()))})),Y(!0),Y(!1),we=u(dt(co)),pe.append(we)}function Y(t){var e,r,o,i=rt(t),s=i.xy,c=sr+i.LT,u="active",l=1,f=function(){l=.5},p=function(){l=1},h=function(n){var o=i.i.tl,u=i.i.hl,l=i.i.ms,f=u/2+a.page(n)[s]-r,p=(f-u/2)/(o-u),h=l*p;h=isFinite(h)?h:0,Zt&&t&&(Ct.n||!Ct.n&&!Ct.i)&&(h*=-1),ge[c](e+h),Dt||a.prvD(n)},d=function(t){t=t||t.originalEvent,St(le,_o),St(i.h,u),St(i.t,u),St(i.s,u),ce.off(br,h).off(yr,d).off(Sr,m).off(jr,_).off(kr,B),p(),e=n,r=n,o!==n&&(Bn.scrollStop(),clearTimeout(o),o=n);var a=pe[0].getBoundingClientRect();t.clientX>=a.left&&t.clientX<=a.right&&t.clientY>=a.top&&t.clientY<=a.bottom||k(),(Cn||Mn)&&Z(!1)},m=function(t){16==t.keyCode&&f()},_=function(t){16==t.keyCode&&p()};i.h.on(vr,function(o){if(!te){var l=o.originalEvent||o,f=l.touches!==n;ft()||!fn||f&&!Ln||(1===a.mBtn(o)||f)&&(e=ge[c](),e=e===n?0:e,(Zt&&t&&!Ct.n||!Zt)&&(e=e<0?0:e),r=a.page(o)[s],xt(le,_o),xt(i.h,u),xt(i.s,u),ce.on(br,h).on(yr,d).on(kr,B),!At&&Wt||a.prvD(o),a.stpP(o))}}),i.t.on(vr,function(e){if(!te){var c=e.originalEvent||e,p=c.touches!==n;if(!ft()&&ln&&(!p||Ln)&&(1===a.mBtn(e)||p)){var h,g=zn[i._wh],v=i.t.offset()[i.lt],y=!0;e.shiftKey&&f();var b=function(){if(!$t){var e=i.i.ho,a=i.i.hl,s=r-v,c=200*l,u=y?Math.max(333,c):c,f={},p=Zt&&t&&(!Ct.i&&!Ct.n||hn),d=e>s;p&&(d=e<s),d?(h===n&&(h=!0),f[i.xy]="-="+g):(h===n&&(h=!1),f[i.xy]="+="+g),Bn.scrollStop(),Bn.scroll(f,c,"linear");var m=h?e<=s:e+a>=s;p&&(m=h?e+a>=s:e<=s),m?(clearTimeout(o),Bn.scrollStop(),o=n):o=setTimeout(b,u),y=!1}};r=a.page(e)[s],xt(le,_o),xt(i.t,u),xt(i.s,u),ce.on(yr,d).on(Sr,m).on(jr,_).on(kr,B),b(),a.prvD(e),a.stpP(e)}}}).hover(function(){(Cn||Mn)&&(In=!0,Z(!0))},function(){(Cn||Mn)&&(In=!1,Z(!1))}),i.s.on(vr,function(t){a.stpP(t)})}function X(t,e,n){var r=t?Lr:Ir,o=t?xe:ke;e?St(pe,r):xt(pe,r),n?St(o,ao):xt(o,ao)}function Z(t,e){if(clearTimeout(kn),t)St(xe,so),St(ke,so);else{var n="active",r=function(){if(!In&&!$t){var t=je.hasClass(n)||Ee.hasClass(n);!t&&(Cn||Mn||An)&&xt(xe,so),!t&&(Cn||Mn||An)&&xt(ke,so)}};En>0&&e!==!0?kn=setTimeout(r,En):r()}}function tt(t){var e={},n=rt(t),r=1e6,o=Math.min(1,(Oe[n._wh]-(Ue?t?Gt:Kt:0))/Ce[n._wh]);e[n.wh]=Math.floor(100*o*r)/r+"%",ft()||n.h.css(e),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=o}function et(t,e){var n,r,o=Zt&&t,i={},a=rt(t),s="translate(",c="transform",u=ge[0][sr+a.WH]-ge[0]["client"+a.WH],l=a.i.hl,f=a.t[0]["offset"+a.WH],p=f-l,h=p;Ct.n&&o&&(u*=-1),r=e/u,r=isNaN(r)?0:Math.min(1,r),a.i.ms=u,a.i.cs=e,a.i.csr=r,h*=r,h=isNaN(h)?0:h,o&&(Ct.n||!Ct.n&&!Ct.i)&&(h=f-l-h),h=Math.max(0,h),Rt?(o&&(h=-(f-l-h)),n=t?s+h+"px, 0)":s+"0, "+h+"px)",i["-webkit-"+c]=n,i["-moz-"+c]=n,i["-ms-"+c]=n,i["-o-"+c]=n,i[c]=n):i[a.lt]=h,ft()||a.h.css(i),a.i.ho=h,a.i.tl=f}function nt(t,e){var n=e?"removeClass":"addClass",r=t?Se:je,o=t?Pe:Ee,i=t?ro:io;r[n](i),o[n](i)}function rt(t){return{wh:t?nr:rr,WH:t?"Width":"Height",lt:t?Zn:Jn,LT:t?"Left":"Top",xy:t?ur:lr,XY:t?"X":"Y",_wh:t?"w":"h",_lt:t?"l":"t",t:t?Se:Pe,h:t?je:Ee,s:t?xe:ke,i:t?$n:Un}}function ot(t,e){Ht&&u.isFunction(t)&&t.call(Bn,e)}function it(t,e,r){r===n&&(r=[ir,ir,ir,ir]),t[e+Jn]=r[0],t[e+Yn]=r[1],t[e+Xn]=r[2],t[e+Zn]=r[3]}function at(e){var n="ownerDocument",r="HTMLElement",i=e&&e[n]?e[n].parentWindow||t:t;return typeof i[r]===o.o?e instanceof i[r]:e&&typeof e===o.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===o.s}function st(t,e){var n,r,o=[],i=[];for(n=0;n<t.length;n++)o[t[n]]=!0;for(n=0;n<e.length;n++)o[e[n]]?delete o[e[n]]:o[e[n]]=!0;for(r in o)i.push(r);return i}function ct(e){var n=t.parseInt(e);return isNaN(n)?0:n}function ut(){var t=fe[0].selectionStart;if(t!==n){var e,r,o="length",i=fe.val(),a=i[o],s=i.split("\n"),c=s[o],u=i.substr(0,t).split("\n"),l=0,f=0,p=u[o],h=u[u[o]-1][o];for(r=0;r<s[o];r++)e=s[r][o],e>f&&(l=r+1,f=e);return{cR:p,cC:h,r:c,c:f,w:l,p:t,m:a}}}function lt(t){for(var e=0;e<xo.length;e++)if(t===xo[e])return!0;return!1}function ft(){return Ge&&Et.x&&Et.y}function pt(){return Ut?be[0]:ye[0]}function ht(t,e){return u.prototype.find.call(t,e).eq(0)}function dt(t,e){return"<div "+(t?bt(t)===o.s?'class="'+t+'"':function(){var e,n="";if(u.isPlainObject(t))for(e in t)n+=("className"===e?"class":e)+'="'+t[e]+'" ';return n}():ir)+">"+(e?e:ir)+"</div>"}function mt(t,e){for(var n,r=e.split(fr),i=0;i<r.length;i++){if(!t.hasOwnProperty(r[i]))return;n=t[r[i]],i<r.length&&bt(n)===o.o&&(t=n)}return n}function _t(t,e,n){for(var r=e.split(fr),o=r.length,i=0,a={},s=a;i<o;i++)a=a[r[i]]=i+1<o?{}:n;u.extend(t,s,!0)}function gt(t,e,r){return r===!0?r:e===n||t!==e}function vt(t,e,r,o,i){if(i===!0)return i;if(o===n&&i===n){if(r===!0)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,e===n||(t[r]!==e[r]||t[o]!==e[o])}function yt(t,e){return e===n||(t.t!==e.t||t.r!==e.r||t.b!==e.b||t.l!==e.l)}function bt(t){return u.type(t)}function wt(){return u.extend.apply(this,arguments)}function xt(t,e){return u.prototype.addClass.call(t,e)}function St(t,e){return u.prototype.removeClass.call(t,e)}function jt(t){return u.prototype.remove.call(t)}function kt(t,n){ne=p.defaultOptions,Lt=p.nativeScrollbarStyling,Tt=wt(!0,{},p.nativeScrollbarSize),Et=wt(!0,{},p.nativeScrollbarIsOverlaid),Ot=wt(!0,{},p.overlayScrollbarDummySize),Ct=wt(!0,{},p.rtlScrollBehavior),Q(wt(!0,{},ne,n));var r=oe.callbacks;if(Et.x&&Et.x&&!oe.nativeScrollbarsOverlaid.initialize)return ot(r.onInitializationWithdrawn),!1;It=p.cssCalc,At=p.msie,Mt=p.autoUpdateRecommended,Nt=p.supportTransition,Rt=p.supportTransform,Dt=p.supportPassiveEvents,Ft=p.supportResizeObserver,xn=p.supportMutationObserver,Bt=p.restrictedMeasuring,ce=u(t.ownerDocument),se=u(ce[0].defaultView||ce[0].parentWindow),ue=ht(ce,"html"),le=ht(ue,"body"),fe=u(t),Ut=fe.is("textarea"),zt=fe.is("body"),Wt=ce[0]!==e;var o;if(zt&&(o={},o.l=Math.max(fe[_r](),ue[_r](),se[_r]()),o.t=Math.max(fe[gr](),ue[gr](),se[gr]())),Ut){
10
+ fe.wrap(dt(Ar)),xt(fe,$r+pr+to),pe=fe.parent();var s={};oe.sizeAutoCapable||(s[nr]=fe.css(nr),s[rr]=fe.css(rr)),pe.css(s).wrapInner(dt(Gr+pr+to)).wrapInner(dt(Wr+pr+to)).wrapInner(dt(zr+pr+to)),ye=ht(pe,fr+Gr),ge=ht(pe,fr+Wr),_e=ht(pe,fr+zr),be=u(dt(Ur)),ye.prepend(be),fe.on(sr,N).on("drop",L).on("focus",I).on("focusout",T),At>9||!Mt?fe.on("input",C):fe.on(Sr,M).on(jr,A)}else xt(fe,Mr),pe=fe,pe.wrapInner(dt(Gr)).wrapInner(dt(Wr)).wrapInner(dt(zr)),ye=ht(pe,fr+Gr),ge=ht(pe,fr+Wr),_e=ht(pe,fr+zr),ye.on(Pr,function(t){Ke!==!0&&(t=t.originalEvent||t,q(t.propertyName)&&K(ar))});if(J(),Dt?d(ge,sr,E):ge.on(sr,E),Lt&&xt(ge,Et.x&&Et.y?qr:Vr),xn){var c,l,f,h,m,_,v=a.mO(),y=a.now();yn=new v(function(t){if(Ht&&!te){var e,n=!1;u.each(t,function(){if(e=this,c=e.target,l=e.attributeName,n=l===i.c?U(e.oldValue,c.className):l!==i.s||e.oldValue!==c.style.cssText)return!1}),n&&Bn.update(ar)}}),bn=new v(function(t){if(Ht&&!te){var e,n=!1;u.each(t,function(){return e=this,n=z(e),!n}),n&&(h=a.now(),m=Te||Ie,_=function(){$t||(y=h,Ut&&G(),m?Bn.update():Bn.update(ar))},clearTimeout(f),wo<=0||h-y>wo||!m?_():f=setTimeout(_,wo))}})}return zt&&(xt(ue,Cr),ge[_r](o.l),ge[gr](o.t)),de=u(dt("os-resize-observer-host")),pe.prepend(de),g(de,S),S(),Bn.update(ar),setTimeout(function(){Nt&&!$t&&xt(pe,Tr)},333),Ht=!0,ot(r.onInitialized),Ht}if(at(l)){if(c.has(l)){var Pt=c.get(l);return Pt.options(f),Pt}var Et,Ot,Ct,Mt,At,Lt,It,Tt,Nt,Rt,Dt,Ft,Bt,Ht,$t,Ut,zt,Wt,Vt,qt,Gt,Kt,Qt,Jt,Yt,Xt,Zt,te,ee,ne,re,oe,ie,ae,se,ce,ue,le,fe,pe,he,de,me,_e,ge,ve,ye,be,we,xe,Se,je,ke,Pe,Ee,Oe,Ce,Me,Ae,Le,Ie,Te,Ne,Re,De,Fe,Be,He,$e,Ue,ze,We,Ve,qe,Ge,Ke,Qe,Je,Ye,Xe,Ze,tn,en,nn,rn,on,an,sn,cn,un,ln,fn,pn,hn,dn,mn,_n,gn,vn,yn,bn,wn,xn,Sn,jn,kn,Pn,En,On,Cn,Mn,An,Ln,In,Tn,Nn,Rn,Dn,Fn,Bn=new t[r],Hn={},$n={},Un={},zn={},Wn={},Vn=175,qn="-hidden",Gn="margin-",Kn="padding-",Qn="border-",Jn="top",Yn="right",Xn="bottom",Zn="left",tr="min-",er="max-",nr="width",rr="height",or="float",ir="",ar="auto",sr="scroll",cr="100%",ur="x",lr="y",fr=".",pr=" ",hr="scrollbar",dr="-horizontal",mr="-vertical",_r=sr+"Left",gr=sr+"Top",vr="mousedown touchstart",yr="mouseup touchend touchcancel",br="mousemove touchmove",wr="mouseenter",xr="mouseleave",Sr="keydown",jr="keyup",kr="selectstart",Pr="transitionend webkitTransitionEnd oTransitionEnd",Er="__overlayScrollbarsRO__",Or="os-",Cr=Or+"html",Mr=Or+"host",Ar=Mr+"-textarea",Lr=Mr+"-"+hr+dr+qn,Ir=Mr+"-"+hr+mr+qn,Tr=Mr+"-transition",Nr=Mr+"-rtl",Rr=Mr+"-resize-disabled",Dr=Mr+"-scrolling",Fr=Mr+"-overflow",Br=Fr+"-x",Hr=Fr+"-y",$r=Or+"textarea",Ur=$r+"-cover",zr=Or+"padding",Wr=Or+"viewport",Vr=Wr+"-native-scrollbars-invisible",qr=Wr+"-native-scrollbars-overlaid",Gr=Or+"content",Kr=Or+"content-arrange",Qr=Or+"content-glue",Jr=Or+"size-auto-observer",Yr=Or+"resize-observer",Xr=Or+"resize-observer-item",Zr=Xr+"-final",to=Or+"text-inherit",eo=Or+hr,no=eo+"-track",ro=no+"-off",oo=eo+"-handle",io=oo+"-off",ao=eo+"-unusable",so=eo+"-"+ar+qn,co=eo+"-corner",uo=co+"-resize",lo=uo+"-both",fo=uo+dr,po=uo+mr,ho=eo+dr,mo=eo+mr,_o=Or+"dragging",go=Or+"theme-none",vo={},yo=33,bo=[],wo=11,xo=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],So=[],jo={},ko={};return Bn.sleep=function(){te=!0},Bn.update=function(t){var e,n,r="zoom"===t,o="img",i="load";t===ar?(e=V(),n=W(),(e||n)&&K(!1,n)):r?K(!0,!0):(t=te||t,te=!1,K(!1,!1,t)),Ut||r||ye.find(o).each(function(t,e){var n=a.inA(e,bo);n===-1&&(e=u(e),e.off(i,H).on(i,H))})},Bn.options=function(t,e){if(u.isEmptyObject(t)||!u.isPlainObject(t)){if(bt(t)===o.s){if(arguments.length>=2){var n={};return _t(n,t,e),Q(n),void K()}return mt(re,t)}return re}Q(t);var r=te||!1;te=!1,K(),te=r},Bn.destroy=function(){$t=!0,h.remove(Bn),x(),v(de),qt&&v(he),jt(de),me!==n&&jt(me),ve!==n&&jt(ve),qt&&jt(he),Dt?(m(pe,br,P),m(pe,wr,j),m(pe,xr,k)):pe.off(br,P).off(wr,j).off(xr,k),jt(xe),jt(ke),we&&jt(we),Nn||F(),ye.contents().unwrap().unwrap().unwrap(),zt&&St(ue,Cr),Ut?(fe.off(sr,N).off("drop",L).off("focus",I).off("focusout",T),At>9||!Mt?fe.off("input",C):fe.off(Sr,M).off(jr,A),jt(be),St(fe,$r+pr+to).unwrap().removeAttr(i.s),jt(pe)):(St(fe,Mr),St(pe,[Mr,Rr,Nr,Lr,Ir,Tr,Dr,Fr,Br,Hr,go,dn].join(pr)));for(var t=0;t<bo.length;t++)u(bo[t]).off("load",H);bo=n,c.rem(l),ot(oe.callbacks.onDestroyed);for(var e in Bn)delete Bn[e];Bn=n},Bn.scroll=function(e,r,a,c){if(0===arguments.length||e===n){var l=$n,f=Un,p=hn&&Zt&&Ct.i,h=hn&&Zt&&Ct.n,d=l.cs,m=l.csr,_=l.ms;return m=p?1-m:m,d=p?_-d:d,d*=h?-1:1,_*=h?-1:1,{x:{position:d,ratio:m,max:_,handleOffset:l.ho,handleLength:l.hl,handleLengthRatio:l.hlr,trackLength:l.tl,isRTL:Zt,isRTLNormalized:hn},y:{position:f.cs,ratio:f.csr,max:f.ms,handleOffset:f.ho,handleLength:f.hl,handleLengthRatio:f.hlr,trackLength:f.tl}}}var g,v=[ur,Zn,"l"],y=[lr,Jn,"t"],b=["+=","-=","*=","/="],w={},x=bt(r)===o.o,S="end",j="begin",k="center",P="nearest",E={axis:"xy",block:[j,j],margin:[0,0,0,0]},O=[ur,lr,"xy","yx"],C=[j,S,k,P],M=e.hasOwnProperty("el"),A=M?e.el:e,L=!!(A instanceof u||s)&&A instanceof s,I=!L&&at(A),T=function(t,e){for(g=0;g<e.length;g++)if(t===e[g])return!0;return!1},N=function(t){var e={};if(bt(t)===o.a&&t.length>0)e.x=t[0],e.y=t[1];else if(bt(t)===o.s||bt(t)===o.n)e.x=t,e.y=t;else if(bt(t)===o.o){t=wt({},t),g=0;for(var n in t)t.hasOwnProperty(n)&&(g>2&&delete t[n],g++);var r=function(e){var n=e?v:y;for(g=0;g<n.length;g++)if(n[g]in t)return t[n[g]]};e.x=r(!0),e.y=r(!1)}return e},R=function(e,r){var i,a,s,c=e?$n:Un,u=c.cs,l=c.ms,f=" * ",p=Zt&&e,h=p&&Ct.n&&!hn,d="replace";if(bt(r)===o.s){if(r.length>2){var m=r.substr(0,2);for(g=0;g<b.length;g++)if(m===b[g]){i=b[g];break}}r=i!==n?r.substr(2):r,r=r[d](/min/g,0),r=r[d](/</g,0),r=r[d](/max/g,(h?"-":ir)+cr),r=r[d](/>/g,(h?"-":ir)+cr),r=r[d](/px/g,ir),r=r[d](/%/g,f+l*(p&&Ct.n?-1:1)/100),r=r[d](/vw/g,f+zn.w),r=r[d](/vh/g,f+zn.h),a=ct(t.parseFloat(t.eval(r)).toFixed())}else bt(r)===o.n&&(a=r);if(!isNaN(a)&&a!==n&&bt(a)===o.n){var _=hn&&p,v=u*(_&&Ct.n?-1:1),y=_&&Ct.i,w=_&&Ct.n;switch(v=y?l-v:v,i){case"+=":s=v+a;break;case"-=":s=v-a;break;case"*=":s=v*a;break;case"/=":s=v/a;break;default:s=a}y&&(s=l-s),w&&(s*=-1),p&&Ct.n?(s=Math.max(l,s),s=Math.min(0,s)):(s=Math.min(l,s),s=Math.max(0,s)),s===u&&(s=n)}return s};if(L||I){var D=L?A:u(A);if(0===D.length)return;if(M){var F,B,H,$=e.axis,U=e.block,z=bt(U),W=e.margin,V=bt(W);if(z===o.s)U=[U,U];else if(z===o.a)if(B=U.length,B>2||B<1)U=n;else{for(F=!0,1===B&&(U[1]=j),g=0;g<B;g++){var q=U[g];if(bt(q)!==o.s||!T(q,C)){F=!1;break}}F||(U=n)}else U=n;if(V===o.n)W=[W,W,W,W];else if(V===o.b)W=W?[ct(D.css(Gn+Jn)),ct(D.css(Gn+Yn)),ct(D.css(Gn+Xn)),ct(D.css(Gn+Zn))]:[0,0,0,0];else if(V===o.a)if(H=W.length,2!==H&&4!==H)W=n;else{for(F=!0,g=0;g<H;g++)if(bt(W[g])!==o.n){F=!1;break}F?2===H&&(W=[W[0],W[1],W[0],W[1]]):W=n}else W=n;E.axis=T($,O)?$:E.axis,E.block=U||E.block,E.margin=W||E.margin}var G=D.offset(),K=_e.offset(),Q={l:$n.cs,t:Un.cs},J=E.axis,Y=E.block,X=E.margin,Z={x:Y[0]===(Zt?j:S),y:Y[1]===S},tt={x:Y[0]===k,y:Y[1]===k},et={x:Y[0]===P,y:Y[1]===P},nt={},ot=Z.x||Z.y||tt.x||tt.y||et.x||et.y;G.top-=X[0],G.left-=X[3];var it={x:Math.round(G.left-K.left+Q.l),y:Math.round(G.top-K.top+Q.t)};if(Zt&&(Ct.n||Ct.i||(it.x=Math.round(K.left-G.left+Q.l)),Ct.n&&hn&&(it.x*=-1),Ct.i&&hn&&(it.x=Math.round(K.left-G.left+($n.ms-Q.l)))),ot){var st,ut={};Rt?(st=D[0].getBoundingClientRect(),ut={w:st[nr],h:st[rr]}):ut={w:D[0][i.oW],h:D[0][i.oH]};var lt={w:ut.w+X[3]+X[1],h:ut.h+X[0]+X[2]},ft=function(t){var e=rt(t),n=e._wh,r=e.lt,o=e.xy,i=tt[o]?2:1,a=G[r]+lt[n]/2,s=K[r]+zn[n]/2;et[o]&&(nt[o]=lt[n]<=zn[n]&&G[r]>=K[r]&&G[r]+lt[n]<=K[r]+zn[n],Z[o]=lt[n]<zn[n]?a>s:a<s),(Z[o]||tt[o])&&(it[o]-=(zn[n]/i-lt[n]/i)*(t&&Zt&&hn?-1:1))};ft(!0),ft(!1)}(J===ur||nt.y)&&delete it.y,(J===lr||nt.x)&&delete it.x,e=it}w.x=R(!0,N(e).x),w.y=R(!1,N(e).y);var pt=w.x!==n,ht=w.y!==n;if(r>0||x){var dt={};if(pt&&(dt[_r]=w.x),ht&&(dt[gr]=w.y),x)ge.animate(dt,r);else{var mt={duration:r,complete:c};if(bt(a)===o.a){var _t={};_t[_r]=a[0],_t[gr]=a[1],mt.specialEasing=_t}else mt.easing=a;ge.animate(dt,mt)}}else pt&&ge[_r](w.x),ht&&ge[gr](w.y)},Bn.scrollStop=function(t,e,n){ge.stop(t,e,n)},Bn.getElements=function(){return{target:fe[0],host:pe[0],padding:_e[0],viewport:ge[0],content:ye[0],scrollbarHorizontal:{scrollbar:xe[0],track:Se[0],handle:je[0]},scrollbarVertical:{scrollbar:ke[0],track:Pe[0],handle:Ee[0]},scrollbarCorner:we}},Bn.getState=function(t){var e=function(t){if(!u.isPlainObject(t))return t;var e=wt(!0,{},t),n=function(t,n){e.hasOwnProperty(t)&&(e[n]=e[t],delete e[t])};return n("w",nr),n("h",rr),delete e.c,e},n={sleeping:e(te)||!1,autoUpdate:e(!wn),widthAuto:e(Ie),heightAuto:e(Te),padding:e(De),overflowAmount:e(qe),hideOverflow:e(Le),hasOverflow:e(Ae),contentScrollSize:e(Ce),viewportSize:e(zn),hostSize:e(Oe),documentMixed:e(Wt)};return bt(t)===o.s?mt(n,t):n},kt(l,f)?(c.add(l,Bn),Bn):void(Bn=n)}}var d,m,_=function(){var t=[o.b,o.n,o.s,o.a,o.o,o.f,o.z],e=" ",n=":",r=[o.z,o.s],i=o.b,a=o.n,s=[o.z,i],c=[o.z,o.f],l="n:none b:both h:horizontal v:vertical",f="v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden",p="v:visible h:hidden a:auto",h="n:never s:scroll l:leave m:move",d={className:["os-theme-dark",r],resize:["none",l],sizeAutoCapable:[!0,i],clipAlways:[!0,i],normalizeRTL:[!0,i],paddingAbsolute:[!1,i],autoUpdate:[null,s],autoUpdateInterval:[33,a],nativeScrollbarsOverlaid:{showNativeScrollbars:[!1,i],initialize:[!0,i]},overflowBehavior:{x:["scroll",f],y:["scroll",f]},scrollbars:{visibility:["auto",p],autoHide:["never",h],autoHideDelay:[800,a],dragScrolling:[!0,i],clickScrolling:[!1,i],touchSupport:[!0,i]},textarea:{dynWidth:[!1,i],dynHeight:[!1,i]},callbacks:{onInitialized:[null,c],onInitializationWithdrawn:[null,c],onDestroyed:[null,c],onScrollStart:[null,c],onScroll:[null,c],onScrollStop:[null,c],onOverflowChanged:[null,c],onOverflowAmountChanged:[null,c],onDirectionChanged:[null,c],onContentSizeChanged:[null,c],onHostSizeChanged:[null,c],onUpdated:[null,c]}},m=function(t){var e=function(n){var r,i,a;for(r in n)n.hasOwnProperty(r)&&(i=n[r],a=u.type(i),a===o.a?n[r]=i[t?1:0]:a===o.o&&(n[r]=e(i)));return n};return e(u.extend(!0,{},d))};return{d:m(),t:m(!0),v:function(r,i,a,s,c){var l={},f=u.extend(!0,{},r),p=function(r,i,c,l){for(var f in i)if(i.hasOwnProperty(f)&&r.hasOwnProperty(f)){var h,d,m,_,g,v,y,b,w=!1,x=i[f],S=u.type(x),j=u.type(x)!==o.a?[x]:x,k=r[f],P=u.type(k),E=l?l+".":"",O='The option "'+E+f+"\" wasn't set, because",C=[],M=[];if(S===o.o)c[f]={},p(k,x,c[f],E+f),u.isEmptyObject(k)&&delete r[f];else{for(v=0;v<j.length;v++)if(g=j[v],S=u.type(g),m=S===o.s&&u.inArray(g,t)===-1)for(C.push(o.s),h=g.split(e),M=M.concat(h),y=0;y<h.length;y++){for(d=h[y].split(n),_=d[0],b=0;b<d.length;b++)if(k===d[b]){w=!0;break}if(w)break}else if(C.push(g),P===g){w=!0;break}w?c[f]=m&&s?_:k:a&&console.warn(O+" it doesn't accept the type [ "+P.toUpperCase()+' ] with the value of "'+k+'".\r\nAccepted types are: [ '+C.join(", ").toUpperCase()+" ]."+(M.length>0?"\r\nValid strings are: [ "+M.join(", ").split(n).join(", ")+" ].":"")),delete r[f]}}};return p(f,i,l),c?u.extend(!0,l,f):!u.isEmptyObject(f)&&a&&console.warn("The following options are discarded due to invalidity:\r\n"+JSON.stringify(f,null,2)),l}}}();return t[r]=function(e,o){if(0===arguments.length)return this;l();var i,a,s=[];return u.isPlainObject(o)?e&&e.length?(u.each(e,function(){i=this,i!==n&&s.push(h(i,o,d,m))}),a=s.length>1?s:s[0]):a=h(e,o,d,m):e&&(e.length&&e.length>0?(u.each(e,function(){i=c.get(this),"!"===o?i instanceof t[r]&&s.push(i):s.push(i)}),a=s.length>1?s:s[0]):a=c.get(e)),a},t[r].globals=function(){l();var t=u.extend(!0,{},d);return delete t.msie,t},t[r].defaultOptions=function(t){l();var e=d.defaultOptions;return t===n?u.extend(!0,{},e):void(d.defaultOptions=u.extend(!0,{},e,_.v(t,_.t,!0)))},t[r]}(a,u,c);return s&&s.fn&&(s.fn.overlayScrollbars=function(t){var e=this;return s.isPlainObject(t)?(s.each(e,function(){l(this,t)}),e):l(e,t)}),l})},{}],378:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var o=t[r];"."===o?t.splice(r,1):".."===o?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return o.exec(t).slice(1)};n.resolve=function(){for(var n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,o="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!o).join("/"),(o?"/":"")+n||"."},n.normalize=function(t){var o=n.isAbsolute(t),i="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!o).join("/"),t||o||(t="."),t&&i&&(t+="/"),(o?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var o=r(t.split("/")),i=r(e.split("/")),a=Math.min(o.length,i.length),s=a,c=0;c<a;c++)if(o[c]!==i[c]){s=c;break}for(var u=[],c=s;c<o.length;c++)u.push("..");return u=u.concat(i.slice(s)),u.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=i(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=i(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return i(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:379}],379:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(f===setTimeout)return setTimeout(t,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(t,0);try{return f(t,0)}catch(e){try{return f.call(null,t,0)}catch(e){return f.call(this,t,0)}}}function a(t){if(p===clearTimeout)return clearTimeout(t);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function s(){_&&d&&(_=!1,d.length?m=d.concat(m):g=-1,m.length&&c())}function c(){if(!_){var t=i(s);_=!0;for(var e=m.length;e;){for(d=m,m=[];++g<e;)d&&d[g].run();g=-1,e=m.length}d=null,_=!1,a(t)}}function u(t,e){this.fun=t,this.array=e}function l(){}var f,p,h=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(t){f=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(t){p=o}}();var d,m=[],_=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];m.push(new u(t,e)),1!==m.length||_||i(c)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=l,h.addListener=l,h.once=l,h.off=l,h.removeListener=l,h.removeAllListeners=l,h.emit=l,h.prependListener=l,h.prependOnceListener=l,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],380:[function(t,e,n){"use strict";function r(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&r(t),s=e&&r(e),c=a||s;if(t&&r(t)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var u=void 0;if(i.length){var l=i[i.length-1];u="."===l||".."===l||""===l}else u=!1;for(var f=0,p=i.length;p>=0;p--){var h=i[p];"."===h?o(i,p):".."===h?(o(i,p),f++):f&&(o(i,p),f--)}if(!c)for(;f--;f)i.unshift("..");!c||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return u&&"/"!==d.substr(-1)&&(d+="/"),d}n.__esModule=!0,n["default"]=i,e.exports=n["default"]},{}],381:[function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(t,n){return r(t,e[n])});var n="undefined"==typeof t?"undefined":o(t),i="undefined"==typeof e?"undefined":o(e);if(n!==i)return!1;if("object"===n){var a=t.valueOf(),s=e.valueOf();if(a!==t||s!==e)return r(a,s);var c=Object.keys(t),u=Object.keys(e);return c.length===u.length&&c.every(function(n){return r(t[n],e[n])})}return!1}n.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n["default"]=r,e.exports=n["default"]},{}],382:[function(t,e,n){(function(t){"use strict";var n=function(){};"production"!==t.env.NODE_ENV&&(n=function(t,e,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;o<r;o++)n[o-2]=arguments[o];if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(e.length<10||/^[s\W]*$/.test(e))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+e);if(!t){var i=0,a="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(s){}}}),e.exports=n}).call(this,t("_process"))},{_process:379}],383:[function(t,e,n){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return g.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function c(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function u(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function f(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(g.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(g.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(g.arrayBuffer&&g.blob&&y(t))this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!g.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!b(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):g.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},g.blob&&(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return c(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(u(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},g.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(t){var e=t.toUpperCase();return w.indexOf(e)>-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new o(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new o(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function m(t){var e=new o,n=t.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e}function _(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var g={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(g.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],y=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&v.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];this.map[t]=o?o+","+r:r},o.prototype["delete"]=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,r){this.map[e(t)]=n(r)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},g.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];_.redirect=function(t,e){if(x.indexOf(e)===-1)throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=h,t.Response=_,t.fetch=function(t,e){return new Promise(function(n,r){var o=new h(t,e),i=new XMLHttpRequest;i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:m(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL");var e="response"in i?i.response:i.responseText;n(new _(e,t))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&g.blob&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}],384:[function(t,e,n){(function(e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=t("history/createBrowserHistory"),i=n(o),a="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,s=n(a),c=t("./pages/header"),u=t("./pages/collections"),l=t("./utils/template"),f=t("./utils/importer"),p=t("./utils/helper"),h=t("./utils/modal");window._babelPolyfill||t("babel-polyfill");var d=function m(){var t=this;r(this,m),this.pageLoaded=function(){t.items.push(h.modal),t.items.push(c.header),t.items.push(l.template),t.items.push(p.helper),envato_elements_admin.license_activated&&(t.items.push(u.kitCollections),t.items.push(f.importer));var e=!0,n=!1,r=void 0;try{for(var o,i=t.items[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;a.pageLoaded&&a.pageLoaded()}}catch(s){n=!0,r=s}finally{try{!e&&i["return"]&&i["return"]()}finally{if(n)throw r}}t.navigationListen(),t.clickListen()},this.clickListen=function(){var e=t;(0,s["default"])("body").on("click",".envato-elements--action",function(t){return!1}).on("mousedown",".envato-elements--action",function(t){if(t&&t.target&&!(0,s["default"])(t.target).parents(".os-scrollbar").length)switch(t.which){case 1:t.preventDefault();var n=(0,s["default"])(t.target);n.data("nav-top")&&window.scrollTo(0,0);var r={navType:n.data("nav-type"),categorySlug:n.data("category-slug"),collectionId:n.data("collection-id"),templateId:n.data("template-id"),searchParams:n.data("search")||{page:1}};return e.navigationEvent(r,"click"),!1}})},this.navigationListen=function(){t.history=(0,i["default"])({});var e=t.history.location;t.navigationChange(e,"init"),t.unlisten=t.history.listen(function(e,n){t.navigationChange(e,n)})},this.navigationChange=function(e,n){h.modal.closeModal();var r=e.search.substring(1),o={location:e,page:t.getQueryVariable(r,"page"),navType:"category",categorySlug:t.getQueryVariable(r,"category"),collectionId:t.getQueryVariable(r,"collection_id"),templateId:t.getQueryVariable(r,"template_id"),searchParams:{page:t.getQueryVariable(r,"pg",1)}};o.templateId?o.navType="template":o.collectionId?o.navType="collection":o.categorySlug||(o.categorySlug="elementor"),t.navigationEvent(o,n)},this.navigationEvent=function(e,n){var r=!0,o=!1,i=void 0;try{for(var a,s=t.items[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var c=a.value;c.navigationChange&&c.navigationChange(t,e,n)}}catch(u){o=!0,i=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}},this.getQueryVariable=function(t,e,n){for(var r=t.split("&"),o=0;o<r.length;o++){var i=r[o].split("=");if(decodeURIComponent(i[0])===e)return decodeURIComponent(i[1])}return n},this.items=[],this.history=null,this.unlisten=null};(0,s["default"])(function(){var t=new d;t.pageLoaded()})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./pages/collections":388,"./pages/header":389,"./utils/helper":394,"./utils/importer":395,"./utils/modal":397,"./utils/template":399,"babel-polyfill":2,"history/createBrowserHistory":373}],385:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionCache=void 0;var i=t("../utils/config"),a="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,s=r(a),c=t("../utils/template"),u=t("../utils/api"),l=t("./template"),f=t("../utils/objectCache"),p=r(f),h=t("../utils/error"),d=t("overlayscrollbars"),m=r(d),_=t("../utils/lazyLoader"),g=(n.collectionCache=new p["default"](function(t,e,n){var r=e&&e.collectionId?e.collectionId:"loading";return"undefined"==typeof t[r]&&(t[r]=new g),n&&t[r].setParent(n),t[r].updateData(e),t[r]}),function v(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.collectionId,r=void 0!==n&&n;o(this,v),this.setParent=function(e){t.parent=e},this.getReplaceData=function(){var e=t.data;return t.parent&&(e=Object.assign({},t.parent.getReplaceData(),e)),e},this.updateData=function(e){Object.assign(t.data,t.data,e)},this.getDataFromAPI=function(){return new Promise(function(e,n){u.api.get("collection/"+t.data.categorySlug+"/?collection_id="+t.data.collectionId,!1).then(function(r){r&&r.data?(t.updateData(r.data),e()):(h.error.displayError("Collection API Error","undefined"!=typeof err.error?err.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n())},function(t){t&&"undefined"!=typeof t.code&&"rest_cookie_invalid_nonce"===t.code?(h.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):h.error.displayError("Collection API Error","undefined"!=typeof t.error?t.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.renderCollectionFromAPI=function(){return new Promise(function(e,n){c.template.pageLoading(),i.config.state("requestedCollectionId")!==t.data.collectionId?t.getDataFromAPI().then(function(){t.$dom=c.template.renderMainDom("tmpl-envato-elements__collections-single",t.getReplaceData());var n=t.$dom.find(".envato-elements__collections-templates"),r=!0,o=!1,i=void 0;try{for(var a,s=t.data.templates[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,f=l.templateCache.getItem(u,t);f.renderTemplateDom(n)}}catch(p){o=!0,i=p}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}t.horizontalScrollInit(),c.template.mainRenderFinished(),e()},function(){n()}):(c.template.mainRenderFinished(),e())})},this.renderSummaryDom=function(e){t.$container=e,t.$dom=c.template.getDom("tmpl-envato-elements__collections-single",t.getReplaceData()),t.$container.append(t.$dom);var n=t.$dom.find(".envato-elements__collections-templates"),r=!0,o=!1,i=void 0;try{for(var a,s=t.data.templates[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,f=l.templateCache.getItem(u,t);f.renderTemplateDom(n)}}catch(p){o=!0,i=p}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}t.horizontalScrollInit()},this.horizontalScrollInit=function(){t.scroller&&(t.scroller.destroy(),t.scroller=null),t.scroller=(0,m["default"])(t.$dom.find(".envato-elements__collections-scroller"),{className:"os-theme-round-dark",overflowBehavior:{y:"hidden"},scrollbars:{autoHide:"never"},callbacks:{onScroll:function(){_.lazyLoader.checkVisible()}}})},this.openDetailView=function(e){var n=null,r=!0,o=!1,i=void 0;try{for(var a,s=t.data.templates[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var c=a.value,u=l.templateCache.getItem(c,t);
11
+ e&&e!==u.data.templateId||(n=u)}}catch(f){o=!0,i=f}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}if(n){t.$dom.addClass("envato-elements__collections-single--open"),window.scrollTo(0,t.$dom.offset().top-130),setTimeout(function(){t.$dom.addClass("envato-elements__collections-single--opened")},500);var p=t.$dom.find(".envato-elements__collections-single-detail");n.renderHighlightedDom(p),t.scroller&&t.scroller.scroll(n.$dom,500)}},this.closeDetailView=function(){t.scroller&&t.scroller.scroll({x:0},500),(0,s["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),t.$dom.removeClass("envato-elements__collections-single--open").removeClass("envato-elements__collections-single--opened")},this.data={collectionId:r,categorySlug:"",pageTitle:"Items",collectionName:"loading",collectionUrl:"#",templates:[],templateObjects:[]},this.$dom=null,this.$container=null,this.scroller=null})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/api":390,"../utils/config":391,"../utils/error":392,"../utils/lazyLoader":396,"../utils/objectCache":398,"../utils/template":399,"./template":387,overlayscrollbars:377}],386:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.collectionsCache=void 0;var i=t("../utils/config"),a=t("../utils/template"),s=t("../utils/api"),c=t("../utils/error"),u=t("./collection"),l=t("../utils/objectCache"),f=r(l),p=(n.collectionsCache=new f["default"](function(t,e){var n=e&&e.categorySlug?e.categorySlug:"loading";return"undefined"==typeof t[n]&&(t[n]=new p),t[n].updateData(e),t[n]}),function h(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.categorySlug;o(this,h),this.updateData=function(e){Object.assign(t.data,t.data,e)},this.renderPageFromAPI=function(){return new Promise(function(e,n){a.template.pageLoading(),s.api.post("collections/"+t.data.categorySlug,{search:t.data.searchParams}).then(function(r){if(r&&r.data){if(t.data.collections=[],t.updateData(r.data),i.config.state("requestedCategorySlug")!==t.data.categorySlug)return n();if(t.$dom=a.template.renderMainDom("tmpl-envato-elements__collections",t.getReplaceData()),t.$collectionsHolder=t.$dom.find(".envato-elements__collections-content"),t.$collectionsHolder&&t.data.collections&&t.data.collections.length){var o=!0,s=!1,l=void 0;try{for(var f,p=t.data.collections[Symbol.iterator]();!(o=(f=p.next()).done);o=!0){var h=f.value,d=u.collectionCache.getItem(h,t);d.renderSummaryDom(t.$collectionsHolder)}}catch(m){s=!0,l=m}finally{try{!o&&p["return"]&&p["return"]()}finally{if(s)throw l}}}i.config.state("currentCategorySlug",t.data.categorySlug),a.template.mainRenderFinished(),e()}else c.error.displayError("Collections Data Error","undefined"!=typeof m.error?m.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()},function(t){t&&"undefined"!=typeof t.code&&"rest_cookie_invalid_nonce"===t.code?(c.error.displayError("API Token Expired","Refreshing please wait..."),setTimeout(function(){window.location.reload()},500)):c.error.displayError("Collections Data Error","undefined"!=typeof t.error?t.error:'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.'),n()})})},this.closeCollections=function(){t.currentlyOpen&&(t.currentlyOpen.closeDetailView(),t.currentlyOpen=null)},this.openCollection=function(e,n){var r=u.collectionCache.getItem({collectionId:e});r&&(!t.currentlyOpen||n&&t.currentlyOpen===r||t.closeCollections(),t.currentlyOpen=r,n&&r.openDetailView(n))},this.getReplaceData=function(){if(t.data.pagination=[],t.data.page_number&&t.data.total_results&&t.data.per_page&&t.data.total_results>t.data.per_page)for(var e=0;e<t.data.total_results/t.data.per_page;e++)t.data.pagination.push({pageNumber:e,pageLabel:e+1,pageCurrent:parseInt(t.data.page_number)===e+1});return t.data},this.data={categorySlug:n,pageTitle:"Items",collections:[],searchParams:{}},this.currentlyOpen=null})},{"../utils/api":390,"../utils/config":391,"../utils/error":392,"../utils/objectCache":398,"../utils/template":399,"./collection":385}],387:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.templateCache=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,a=r(i),s=t("../utils/template"),c=t("../utils/lazyLoader"),u=t("../utils/objectCache"),l=r(u),f=t("overlayscrollbars"),p=r(f),h=(n.templateCache=new l["default"](function(t,e,n){var r=e&&e.templateId?e.templateId:"loading";return"undefined"==typeof t[r]&&(t[r]=new h(e)),n&&t[r].setParent(n),t[r].updateData(e),t[r]}),function d(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.templateId,r=void 0!==n&&n;o(this,d),this.setParent=function(e){e&&(t.parent=e)},this.updateData=function(e){Object.assign(t.data,t.data,e)},this.getReplaceData=function(){var e=t.data;return t.parent&&(e=Object.assign({},t.parent.getReplaceData(),e)),e},this.renderTemplateDom=function(e){t.$dom=s.template.getDom("tmpl-envato-elements__collection-template-cell",t.getReplaceData()),e.append(t.$dom),c.lazyLoader.addLazy(t.$dom)},this.renderHighlightedDom=function(e){(0,a["default"])(".envato-elements__collection-template-cell--active").removeClass("envato-elements__collection-template-cell--active"),t.$dom.addClass("envato-elements__collection-template-cell--active");var n=s.template.getDom("tmpl-envato-elements__collection-preview",t.getReplaceData());e.empty().append(n),t.verticalScroll&&(t.verticalScroll.destroy(),t.verticalScroll=null),t.verticalScroll=(0,p["default"])(e.find(".envato-elements__collection-detail-thumbnail"),{className:"os-theme-round-dark",overflowBehavior:{x:"hidden"},scrollbars:{autoHide:"never"}})},this.data={templateId:r,templateName:"loading",templateUrl:"#",previewThumb:"#",previewThumbAspect:"100%"},this.$dom=null,this.lastScrollPos=0,this.lastImageMarginTop=0,this.verticalScroll=null});n["default"]=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/lazyLoader":396,"../utils/objectCache":398,"../utils/template":399,overlayscrollbars:377}],388:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.kitCollections=void 0;var o=t("../utils/config"),i=t("../objects/collections"),a=t("../objects/collection"),s=(t("../utils/template"),function c(){var t=this;r(this,c),this.pageLoaded=function(){},this.loadCategoryItems=function(e,n,r){var a=t.categories[n],s=i.collectionsCache.getItem({category:a,pageTitle:a.page_title,categorySlug:n,searchParams:r});o.config.state("requestedCategorySlug")===n&&"collection-close"===e?s.closeCollections():(o.config.state("requestedCategorySlug",n),s.renderPageFromAPI().then(function(){s.closeCollections()})["catch"](function(){}))},this.loadCollectionItems=function(e,n,r,s,c){var u=t.categories[n];if(o.config.state("requestedCategorySlug")===n){var l=i.collectionsCache.getItem({category:u,pageTitle:u.page_title,categorySlug:n,searchParams:r});switch(o.config.state("requestedCollectionId",s),o.config.state("requestedTemplateId",c),e){case"collection":l.openCollection(s);break;case"template":l.openCollection(s,c)}}else{var f=a.collectionCache.getItem({category:u,pageTitle:u.page_title,categorySlug:n,searchParams:r,collectionId:s});f.renderCollectionFromAPI().then(function(){o.config.state("requestedCollectionId",s),c&&(o.config.state("requestedTemplateId",c),f.openDetailView(c))})["catch"](function(){})}},this.navigationChange=function(e,n,r){if(n&&n.categorySlug&&r&&n.navType&&"PUSH"!==r&&"undefined"!=typeof t.categories[n.categorySlug])switch(n.navType){case"category":case"collection-close":"POP"!==r&&e.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&pg="+n.searchParams.page,"history"),t.loadCategoryItems(n.navType,n.categorySlug,n.searchParams);break;case"collection":"POP"!==r&&e.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId,"history"),t.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId);break;case"template":"POP"!==r&&e.history.push("?"+o.config.get("admin_slug")+"&category="+n.categorySlug+"&collection_id="+n.collectionId+"&template_id="+n.templateId,"history"),t.loadCollectionItems(n.navType,n.categorySlug,n.searchParams,n.collectionId,n.templateId)}},this.categories=o.config.get("categories")});n.kitCollections=new s},{"../objects/collection":385,"../objects/collections":386,"../utils/config":391,"../utils/template":399}],389:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.header=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,a=r(i),s=(t("../utils/config"),function c(){var t=this;o(this,c),this.pageLoaded=function(){t.$fixedHeader=(0,a["default"])(".envato-elements__wrapper--fixed"),t.setFixedHeader(),(0,a["default"])(window).resize(function(){t.setFixedHeader()})},this.setFixedHeader=function(){t.$fixedHeader&&t.$fixedHeader.length&&t.$fixedHeader.find(".envato-elements__header").width(t.$fixedHeader.width()).addClass("envato-elements__header--set")},this.navigationChange=function(t,e,n){e&&e.categorySlug&&((0,a["default"])(".envato-elements__header-menuitem").removeClass("envato-elements__header-menuitem--current"),(0,a["default"])('.envato-elements__header-menuitem[data-category-slug="'+e.categorySlug+'"]').addClass("envato-elements__header-menuitem--current"))},this.$fixedHeader=null});n.header=new s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/config":391}],390:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.api=void 0;var i=t("./fetchWP"),a=r(i),s=t("./config"),c=function u(){var t=this;o(this,u),this.fetch=function(){return t.fetchWP},this.get=function(e,n){return new Promise(function(r,o){t.fetchWP.get(e).then(function(o){n&&o&&"undefined"!=typeof o.data&&(t.localCache[e]=o),r(o)},function(t){return o(t)}),n&&"undefined"!=typeof t.localCache[e]&&r(t.localCache[e])})},this.post=function(e,n){return t.fetchWP.post(e,n)},this.localCache={},this.fetchWP=new a["default"]({restURL:s.config.get("api_url"),restNonce:s.config.get("api_nonce")})};n.api=new c},{"./config":391,"./fetchWP":393}],391:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(){var t=this;r(this,i),this.get=function(e){return"undefined"!=typeof t.config[e]&&t.config[e]},this.state=function(e,n){return"undefined"!=typeof n?(t.stateData[e]=n,n):"undefined"!=typeof t.stateData[e]&&t.stateData[e]},this.config=envato_elements_admin,this.stateData={}};n.config=new o},{}],392:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.error=void 0;var o=t("./modal"),i=t("./template"),a=function s(){r(this,s),this.pageLoaded=function(){},this.displayError=function(t,e,n){n!==!1&&(n=!0),i.template.pageFinishedLoading(),o.modal.closeModal(),o.modal.openModal("tmpl-envato-elements__error-modal",{title:t,message:e,reactivate:n})}};n.error=new a},{"./modal":397,"./template":399}],393:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("isomorphic-fetch"),s=r(a),c=["get","post","put","delete"],u=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,t),this.options=n,!n.restURL)throw new Error("restURL option is required");if(!n.restNonce)throw new Error("restNonce option is required");c.forEach(function(t){e[t]=e._setup(t)})}return i(t,[{key:"_setup",value:function(t){var e=this;return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o={credentials:"same-origin",method:t,headers:{Accept:"application/json","Content-Type":"application/json","X-WP-Nonce":e.options.restNonce}};return r&&(o.body=JSON.stringify(r)),(0,s["default"])(e.options.restURL+n,o).then(function(t){return t.json().then(function(e){return t.ok&&(e.loading=!1,"undefined"==typeof e.success||"undefined"!=typeof e.error||e.success||(e.error=!0)),t.ok?e:Promise.reject(e)})})}}}]),t}();n["default"]=u},{"isomorphic-fetch":376}],394:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.helper=void 0;var o=t("./modal"),i=function a(){var t=this;r(this,a),this.pageLoaded=function(){},this.navigationChange=function(e,n,r){n&&n.navType&&"help-modal"===n.navType?t.loadHelpModal():n&&n.navType&&"terms-modal"===n.navType&&t.loadTermsModal()},this.loadHelpModal=function(){o.modal.openModal("tmpl-envato-elements__help-modal",{})},this.loadTermsModal=function(){o.modal.openModal("tmpl-envato-elements__terms-modal",{})}};n.helper=new i},{"./modal":397}],395:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.importer=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,a=r(i),s=t("./api"),c=t("./template"),u=t("../objects/collection"),l=t("./config"),f=t("./error"),p=t("../objects/template"),h=function d(){var t=this;o(this,d),this.pageLoaded=function(){t.$holder=(0,a["default"])(".envato-elements__importer-wrapper"),t.$holder.append(c.template.getDom("tmpl-envato-elements__importer",{})),t.importData={imports:[]},t.loadImportHistory()},this.navigationChange=function(e,n,r){n&&n.templateId&&n.collectionId&&n.navType&&"import-template"===n.navType?t.startBackgroundImport(n.categorySlug,n.collectionId,n.templateId):n&&n.templateId&&n.collectionId&&n.navType&&"insert-template-create-page"===n.navType&&t.startBackgroundInsertCreate(n.categorySlug,n.collectionId,n.templateId)},this.startBackgroundInsertCreate=function(e,n,r){var o=(0,a["default"])('.envato-elements__create-page-name[data-template-id="'+r+'"]'),i=o.val();if(!i.length)return void f.error.displayError("Create Page","Please enter a valid Page Name and try again ",!1);if("undefined"==typeof t.pendingCreates[r]){t.pendingCreates[r]=!0,(0,a["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var c=(0,a["default"])('.envato-elements-insert-button[data-template-id="'+r+'"]');c.html("Creating <span></span>").addClass("envato-elements-insert-button--inserting"),c.parents(".envato-elements__collection-template-option").addClass("..envato-elements__collection-template-option--inserting"),t.setImportStatus("Creating Page:",i),s.api.post("insert/"+e+"/process",{collectionId:n,templateId:r,insertType:"create-page",pageName:i}).then(function(e){t.setImportStatus("Page Created:",e.page_name,e.page_url),c.html("Page Created <span></span>").removeClass("envato-elements-insert-button--inserting").addClass("envato-elements-insert-button--inserted"),t.refreshAfterImportOrInsert(n,r)},function(t){})["finally"](function(){delete t.pendingCreates[r]})}},this.startBackgroundImport=function(e,n,r){if("undefined"==typeof t.pendingImports[r]){t.pendingImports[r]=!0,(0,a["default"])('.envato-elements-import-button[data-template-id="'+r+'"]').html("Importing <span></span>").removeClass("envato-elements-import-button--imported").addClass("envato-elements-import-button--importing"),(0,a["default"])('.envato-elements-template-status[data-template-id="'+r+'"]').removeClass("envato-elements-template-status--imported").addClass("envato-elements-template-status--importing");var o=p.templateCache.getItem({templateId:r},t);t.setImportStatus("Importing:",o.data.templateName),s.api.post("import/"+e+"/process",{collectionId:n,templateId:r,importType:"library"}).then(function(e){t.setImportStatus("Imported:",o.data.templateName,e.url),t.refreshAfterImportOrInsert(n,e.templateId)},function(t){})["finally"](function(){delete t.pendingImports[r]})}},this.getReplaceData=function(){return t.importData},this.refreshImportList=function(){var e=c.template.getDom("tmpl-envato-elements__importer-list",t.getReplaceData()),n=t.$holder.find(".envato-elements__importer");n.find(".envato-elements__importer-list").remove(),n.append(e)},this.setThumbStates=function(){if(0<t.importData.imports.length){var e=!0,n=!1,r=void 0;try{for(var o,i=t.importData.imports[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var s=o.value;(s.imported||"undefined"!=typeof s.inserted&&s.inserted.length>0)&&(0,a["default"])('.envato-elements-template-status[data-template-id="'+s.templateId+'"]').removeClass("envato-elements-template-status--inserting").removeClass("envato-elements-template-status--importing").addClass("envato-elements-template-status--imported")}}catch(c){n=!0,r=c}finally{try{!e&&i["return"]&&i["return"]()}finally{if(n)throw r}}}},this.loadImportHistory=function(){s.api.get("import/status",!1).then(function(e){e&&e.data&&(Object.assign(t.importData,t.importData,e.data),t.refreshImportList(),t.setThumbStates())},function(t){})},this.setImportStatus=function(t,e,n){(0,a["default"])(".envato-elements__importer-status").html("<strong>"+t+"</strong> "+(n?'<a href="'+n+'" target="_blank">'+e+"</a>":e)).addClass("--active")},this.refreshAfterImportOrInsert=function(e,n){t.loadImportHistory();var r=u.collectionCache.getItem({collectionId:e});r.getDataFromAPI().then(function(){l.config.state("requestedTemplateId")===n&&r.openDetailView(n)})},this.$holder=null,this.pendingImports={},this.pendingCreates={}};n.importer=new h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../objects/collection":385,"../objects/template":387,"./api":390,"./config":391,"./error":392,"./template":399}],396:[function(t,e,n){(function(t){"use strict";function e(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.lazyLoader=void 0;var o="undefined"!=typeof window?window.jQuery:"undefined"!=typeof t?t.jQuery:null,i=e(o),a=function s(){var t=this;r(this,s),this.throttle=function(t,e){var n=!1;return function(){n||(t.call(),n=!0,setTimeout(function(){n=!1,t.call()},e))}},this.addLazy=function(e){t.lazyObjects.push(e)},this.checkVisibleCallback=function(){var e=(0,i["default"])(window).scrollTop(),n=e+(0,i["default"])(window).height(),r=(0,i["default"])(window).width();for(var o in t.lazyObjects)if(t.lazyObjects.hasOwnProperty(o))if(t.lazyObjects[o]&&document.body.contains(t.lazyObjects[o].get(0))){if(t.lazyObjects[o].hasClass("--lazyloaded"))delete t.lazyObjects[o];else if(t.lazyObjects[o]){var a=t.lazyObjects[o].offset().top,s=t.lazyObjects[o].offset().left,c=s+t.lazyObjects[o].width(),u=a+t.lazyObjects[o].height();a<=n&&u>=e&&c>0&&s<r&&(t.lazyObjects[o].find("[data-src]").each(function(){(0,i["default"])(this).css("background-image",'url("'+(0,i["default"])(this).data("src")+'")').addClass("--lazyloaded")}),delete t.lazyObjects[o])}}else delete t.lazyObjects[o]},this.checkVisible=this.throttle(this.checkVisibleCallback,150),this.lazyObjects=[],window.addEventListener("resize",this.checkVisible),window.addEventListener("scroll",this.checkVisible)};n.lazyLoader=new a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],397:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.modal=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,a=r(i),s=t("./template"),c=function u(){var t=this;o(this,u),this.pageLoaded=function(){(0,a["default"])("body").on("click",function(e){t.modalOpen&&!(0,a["default"])(e.target).parents(".envato-elements__modal-inner-bg").length&&t.closeModal()}).on("click",".envato-elements__modal-close",function(e){return e.preventDefault(),t.closeModal(),!1})},this.closeModal=function(){t.modalOpen=!1,t.$modalHolder&&t.$modalHolder.empty(),(0,a["default"])("body").removeClass("envato-elements--modal-open")},this.openModal=function(e,n){t.$modalHolder=(0,a["default"])(".envato-elements__modal-holder"),t.$modalDom=s.template.getDom(e,n),t.$modalHolder.empty(),t.$modalHolder.append(t.$modalDom),t.modalOpen=!0,(0,a["default"])("body").addClass("envato-elements--modal-open")},this.$modalHolder=null,this.$modalDom=null,this.modalOpen=!1};n.modal=new c}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./template":399}],398:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function i(t){var e=this;r(this,i),this.getItem=function(t,n){return e.lookup(e.items,t,n)},this.items={},this.lookup=t};n["default"]=o},{}],399:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.template=void 0;var i="undefined"!=typeof window?window.jQuery:"undefined"!=typeof e?e.jQuery:null,a=r(i),s=t("handlebars"),c=r(s),u=t("../pages/header"),l=t("./importer"),f=t("./lazyLoader"),p=function h(){var t=this;o(this,h),this.pageLoaded=function(){t.$holder=(0,a["default"])(".envato-elements__content-dynamic")},this.getDom=function(e,n){return"undefined"==typeof t.templates[e]&&(t.templates[e]=c["default"].compile(document.getElementById(e).innerHTML)),n.contentTypeName="Template Kit",(0,a["default"])(t.templates[e](n))},this.renderMainDom=function(e,n){var r=t.getDom(e,n);return t.setMainDom(r),r},this.setMainDom=function(e){return t.$holder.empty(),t.$holder.append(e),setTimeout(u.header.setFixedHeader,100),e},this.pageLoading=function(){t.$holder.addClass("envato-elements__content-dynamic--loading")},this.pageFinishedLoading=function(){t.$holder.removeClass("envato-elements__content-dynamic--loading")},this.mainRenderFinished=function(){t.pageFinishedLoading(),l.importer.refreshImportList(),f.lazyLoader.checkVisibleCallback()},this.$holder=null,this.templates={},c["default"].registerHelper("if_eq",function(t,e,n){return t===e?n.fn(this):n.inverse(this)})};n.template=new p}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../pages/header":389,"./importer":395,"./lazyLoader":396,handlebars:358}]},{},[384]);
12
+ //# sourceMappingURL=app.min.js.map
envato-elements.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Envato Elements - Template Kits (Beta)
4
+ * Description: Beautifully designed, Free templates, Handcrafted for popular WordPress page builders.
5
+ * Author: Envato
6
+ * Author URI: https://envato.com
7
+ * Version: 0.0.6
8
+ * License: GPLv3 or later
9
+ * License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
+ *
11
+ * Text Domain: envato-elements
12
+ *
13
+ * @package Envato/Envato_Elements
14
+ *
15
+ * Elements for WordPress is free software: you can redistribute it and/or modify
16
+ * it under the terms of the GNU General Public License as published by
17
+ * the Free Software Foundation, either version 3 of the License, or
18
+ * any later version.
19
+ *
20
+ * Elements for WordPress is distributed in the hope that it will be useful,
21
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ * GNU General Public License for more details.
24
+ */
25
+
26
+ if ( ! defined( 'ABSPATH' ) ) {
27
+ exit;
28
+ }
29
+
30
+ define( 'ENVATO_ELEMENTS_SLUG', 'envato-elements' );
31
+ define( 'ENVATO_ELEMENTS_VER', '0.0.6' );
32
+ define( 'ENVATO_ELEMENTS_FILE', __FILE__ );
33
+ define( 'ENVATO_ELEMENTS_DIR', plugin_dir_path( ENVATO_ELEMENTS_FILE ) );
34
+ define( 'ENVATO_ELEMENTS_URI', plugins_url( '/', ENVATO_ELEMENTS_FILE ) );
35
+ define( 'ENVATO_ELEMENTS_DEBUG', false );
36
+ define( 'ENVATO_ELEMENTS_CONTENT_NAME', 'Template Kit' );
37
+
38
+ add_action( 'plugins_loaded', 'envato_elements_load_plugin_textdomain' );
39
+
40
+ if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
41
+ add_action( 'admin_notices', 'envato_elements_fail_php_version' );
42
+ } elseif ( ! version_compare( get_bloginfo( 'version' ), '4.6', '>=' ) ) {
43
+ add_action( 'admin_notices', 'envato_elements_fail_wp_version' );
44
+ } else {
45
+ require ENVATO_ELEMENTS_DIR . 'inc/bootstrap.php';
46
+ }
47
+
48
+
49
+ /**
50
+ * Load Envato Elements textdomain.
51
+ *
52
+ * Load gettext translate for Envato Elements text domain.
53
+ *
54
+ * @since 0.0.2
55
+ *
56
+ * @return void
57
+ */
58
+ function envato_elements_load_plugin_textdomain() {
59
+ load_plugin_textdomain( 'envato-elements' );
60
+ }
61
+
62
+
63
+ /**
64
+ * Envato Elements admin notice for minimum PHP version.
65
+ *
66
+ * Warning when the site doesn't have the minimum required PHP version.
67
+ *
68
+ * @since 0.0.2
69
+ *
70
+ * @return void
71
+ */
72
+ function envato_elements_fail_php_version() {
73
+ /* translators: %s: PHP version */
74
+ $message = sprintf( esc_html__( 'Envato Elements requires PHP version %s+, plugin is currently NOT ACTIVE.', 'envato-elements' ), '5.4' );
75
+ $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
76
+ echo wp_kses_post( $html_message );
77
+ }
78
+
79
+ /**
80
+ * Envato Elements admin notice for minimum WordPress version.
81
+ *
82
+ * Warning when the site doesn't have the minimum required WordPress version.
83
+ *
84
+ * @since 0.0.2
85
+ *
86
+ * @return void
87
+ */
88
+ function envato_elements_fail_wp_version() {
89
+ /* translators: %s: WordPress version */
90
+ $message = sprintf( esc_html__( 'Envato Elements requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT ACTIVE.', 'envato-elements' ), '4.6' );
91
+ $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
92
+ echo wp_kses_post( $html_message );
93
+ }
inc/bootstrap.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements: Bootstrap File
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ spl_autoload_register(
19
+ function ( $class ) {
20
+ $prefix = __NAMESPACE__;
21
+ $base_dir = __DIR__;
22
+ $len = strlen( $prefix );
23
+ if ( strncmp( $prefix, $class, $len ) !== 0 ) {
24
+ return;
25
+ }
26
+ $relative_class = strtolower( substr( $class, $len + 1 ) );
27
+ $relative_class = 'class-' . $relative_class;
28
+ $file = $base_dir . DIRECTORY_SEPARATOR . str_replace( [ '\\', '_' ], [ '/', '-' ], $relative_class ) . '.php';
29
+ if ( file_exists( $file ) ) {
30
+ require $file;
31
+ } else {
32
+ die( esc_html( basename( $file ) . ' missing.' ) );
33
+ }
34
+ }
35
+ );
36
+
37
+
38
+ if ( ! defined( 'ENVATO_ELEMENTS_TESTS' ) ) {
39
+ // In tests we run the instance manually.
40
+ Plugin::get_instance();
41
+ CPT_Kits::get_instance();
42
+ Collection::get_instance();
43
+ License::get_instance();
44
+ Elementor::get_instance();
45
+ REST::get_instance();
46
+ Feedback::get_instance();
47
+ Statistics::get_instance();
48
+ }
inc/class-api.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * API controller for updates, stats and content.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class API extends Base {
24
+
25
+ const API_ENDPOINT = 'https://wp.envatoextensions.com/wp-json/elements-content/v1/';
26
+
27
+ /**
28
+ *
29
+ * @param array $body_args
30
+ *
31
+ * @return \stdClass|\WP_Error
32
+ */
33
+ public function api_call( $endpoint, $body_args = [], $post = true, $force = false ) {
34
+
35
+ // We add the endpoints we can happily cache here.
36
+ $cache_endpoints = apply_filters(
37
+ 'envato_elements_api_cache_endpoints', [
38
+ 'collections',
39
+ 'version',
40
+ 'collection',
41
+ 'photos',
42
+ ]
43
+ );
44
+
45
+ $body_args = apply_filters( 'envato_elements_api_body_args', $body_args );
46
+
47
+ $cache_key = 'envato_elements_' . md5( serialize( [ self::API_ENDPOINT . $endpoint, $body_args ] ) );
48
+ $data = false;
49
+
50
+ if ( in_array( $endpoint, $cache_endpoints, true ) && ! $force && ! ENVATO_ELEMENTS_DEBUG ) {
51
+ // check if cache exists.
52
+ $data = get_transient( $cache_key );
53
+ if ( $data ) {
54
+ return $data;
55
+ }
56
+ }
57
+
58
+ if ( $post ) {
59
+ $response = wp_remote_post(
60
+ self::API_ENDPOINT . $endpoint, [
61
+ 'sslverify' => false, // Some hosts require this unfortunately :(
62
+ 'user-agent' => 'Mozilla/5.0 (Envato Elements ' . ENVATO_ELEMENTS_VER . ';) ' . home_url(),
63
+ 'timeout' => 20,
64
+ 'body' => $body_args,
65
+ ]
66
+ );
67
+ } else {
68
+ $response = wp_remote_get(
69
+ self::API_ENDPOINT . $endpoint . '?' . http_build_query( $body_args ), [
70
+ 'sslverify' => false, // Some hosts require this unfortunately :(
71
+ 'user-agent' => 'Mozilla/5.0 (Envato Elements ' . ENVATO_ELEMENTS_VER . ';) ' . home_url(),
72
+ 'timeout' => 20,
73
+ ]
74
+ );
75
+ }
76
+
77
+ if ( ! $data ) {
78
+ if ( is_wp_error( $response ) ) {
79
+ return $response;
80
+ }
81
+
82
+ $data = json_decode( wp_remote_retrieve_body( $response ), true );
83
+
84
+ $response_code = wp_remote_retrieve_response_code( $response );
85
+ if ( 200 !== (int) $response_code ) {
86
+ return new \WP_Error( $response_code, $data && ! empty( $data['message'] ) ? $data : __( 'HTTP Error', 'envato-elements' ) );
87
+ }
88
+
89
+ if ( empty( $data ) || ! is_array( $data ) ) {
90
+ return new \WP_Error( 'no_json', __( 'An error occurred, please try again', 'envato-elements' ) );
91
+ }
92
+
93
+ $data = $this->filter_api_response( $data, $endpoint );
94
+
95
+ if ( in_array( $endpoint, $cache_endpoints, true ) ) {
96
+ set_transient( $cache_key, $data, 60 * 5 );
97
+ }
98
+ }
99
+
100
+ return $data;
101
+ }
102
+
103
+ /**
104
+ *
105
+ * @param $data
106
+ * @param $endpoint
107
+ *
108
+ * @return mixed
109
+ */
110
+ public function filter_api_response( $data, $endpoint ) {
111
+
112
+ Notices::get_instance()->sniff_api_response_for_messages( $data, $endpoint );
113
+
114
+ return $data;
115
+ }
116
+
117
+
118
+ }
inc/class-base.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Envato Elements plugin.
20
+ *
21
+ * The main plugin handler class is responsible for initializing Envato Elements. The
22
+ * class registers and all the components required to run the plugin.
23
+ *
24
+ * @since 0.0.2
25
+ */
26
+ class Base {
27
+
28
+ const PAGE_SLUG = ENVATO_ELEMENTS_SLUG;
29
+ /**
30
+ * Holds the plugin instance.
31
+ *
32
+ * @since 0.0.2
33
+ * @access protected
34
+ * @static
35
+ *
36
+ * @var Base
37
+ */
38
+ private static $instances = [];
39
+
40
+ /**
41
+ * Disable class cloning and throw an error on object clone.
42
+ *
43
+ * The whole idea of the singleton design pattern is that there is a single
44
+ * object. Therefore, we don't want the object to be cloned.
45
+ *
46
+ * @access public
47
+ * @since 0.0.2
48
+ */
49
+ public function __clone() {
50
+ // Cloning instances of the class is forbidden.
51
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'envato-elements' ), '1.0.0' );
52
+ }
53
+
54
+ /**
55
+ * Disable unserializing of the class.
56
+ *
57
+ * @access public
58
+ * @since 0.0.2
59
+ */
60
+ public function __wakeup() {
61
+ // Unserializing instances of the class is forbidden.
62
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'envato-elements' ), '1.0.0' );
63
+ }
64
+
65
+ /**
66
+ * Sets up a single instance of the plugin.
67
+ *
68
+ * @since 0.0.2
69
+ * @access public
70
+ * @static
71
+ *
72
+ * @return Base An instance of the class.
73
+ */
74
+ public static function get_instance() {
75
+ $module = get_called_class();
76
+ if ( ! isset( self::$instances[ $module ] ) ) {
77
+ self::$instances[ $module ] = new $module();
78
+ }
79
+
80
+ return self::$instances[ $module ];
81
+ }
82
+
83
+ /**
84
+ * Initializing Envato Elements plugin.
85
+ *
86
+ * @since 0.0.2
87
+ * @access private
88
+ */
89
+ public function __construct() {
90
+
91
+ add_action( 'init', [ $this, 'init' ], 0 );
92
+
93
+ }
94
+
95
+ public $content = '';
96
+ public $header = '';
97
+
98
+ /**
99
+ * Runs in the init WordPress hook and sets everything up.
100
+ *
101
+ * @since 0.0.2
102
+ * @access public
103
+ */
104
+ public function init() {
105
+
106
+ }
107
+
108
+ public function get_url() {
109
+ return admin_url( 'admin.php?page=' . self::PAGE_SLUG );
110
+ }
111
+
112
+ /**
113
+ * Render a template
114
+ *
115
+ * @param string $default_template_path The path to the template, relative to the plugin's `views` folder
116
+ *
117
+ * @return string
118
+ */
119
+ protected function render_template( $default_template_path, $variables = [] ) {
120
+ do_action( 'elements_render_template_pre', $default_template_path, $this );
121
+ $template_path = ENVATO_ELEMENTS_DIR . 'views/' . $default_template_path;
122
+ $template_path = apply_filters( 'elements_template_path', $template_path );
123
+ if ( is_file( $template_path ) ) {
124
+ ob_start();
125
+ extract( $variables );
126
+ require $template_path;
127
+ $template_content = apply_filters( 'elements_template_content', ob_get_clean(), $default_template_path, $template_path, $this );
128
+ } else {
129
+ $template_content = '';
130
+ }
131
+ do_action( 'elements_render_template_post', $default_template_path, $this, $template_path, $template_content );
132
+
133
+ return $template_content;
134
+ }
135
+
136
+
137
+ }
inc/class-category.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Category registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Category extends Base {
24
+
25
+ public $categories = [];
26
+
27
+ /**
28
+ * Category constructor.
29
+ */
30
+ public function __construct() {
31
+ parent::__construct();
32
+
33
+ $this->categories = [];
34
+ $this->categories['elementor'] = [
35
+ 'url' => add_query_arg( 'category', 'elementor', Collection::get_instance()->get_url() ),
36
+ 'nav_title' => 'Elementor',
37
+ 'edit_button' => 'Edit Template with Elementor',
38
+ 'page_title' => 'Elementor ' . ENVATO_ELEMENTS_CONTENT_NAME . 's',
39
+ 'type' => 'templates',
40
+ ];
41
+ $this->categories['beaver-builder'] = [
42
+ 'url' => add_query_arg( 'category', 'beaver-builder', Collection::get_instance()->get_url() ),
43
+ 'nav_title' => 'Beaver Builder',
44
+ 'edit_button' => 'Edit Page with Beaver Builder',
45
+ 'page_title' => 'Beaver Builder ' . ENVATO_ELEMENTS_CONTENT_NAME . 's',
46
+ 'type' => 'templates',
47
+ ];
48
+
49
+ }
50
+
51
+ public function get_remote_categorys() {
52
+
53
+ $api_data = [
54
+ 'all' => 1,
55
+ ];
56
+
57
+ return API::get_instance()->api_call( 'categories', $api_data );
58
+
59
+ }
60
+
61
+ public function get_current( $category = false ) {
62
+ $current_category = $category ? $category : ( ! empty( $_GET['category'] ) && isset( $this->categories[ $_GET['category'] ] ) ? $_GET['category'] : 'elementor' );
63
+ $current = new \stdClass();
64
+ $current->slug = $current_category;
65
+ $current->nav_title = $this->categories[ $current_category ]['nav_title'];
66
+ $current->edit_button = $this->categories[ $current_category ]['edit_button'];
67
+ $current->page_title = $this->categories[ $current_category ]['page_title'];
68
+ $current->type = $this->categories[ $current_category ]['type'];
69
+
70
+ return $current;
71
+ }
72
+
73
+
74
+ public function header_nav() {
75
+
76
+ $current = $this->get_current();
77
+
78
+ ?>
79
+
80
+ <nav class="envato-elements__header-menu">
81
+ <?php foreach ( $this->categories as $slug => $category ) { ?>
82
+ <a href="<?php echo esc_url( $category['url'] ); ?>"
83
+ class="envato-elements__header-menuitem envato-elements--action<?php echo $current->slug === $slug ? ' envato-elements__header-menuitem--current' : ''; ?>"
84
+ data-nav-top="top"
85
+ data-nav-type="category"
86
+ data-category-slug="<?php echo esc_attr( $slug ); ?>"
87
+ ><?php echo esc_html( $category['nav_title'] ); ?></a>
88
+ <?php } ?>
89
+ </nav>
90
+ <?php
91
+ }
92
+
93
+ public function pre_collection_all() {
94
+ $this->pre_collection_plugin_check();
95
+ }
96
+
97
+ public function pre_collection_single() {
98
+ $this->pre_collection_plugin_check();
99
+ }
100
+
101
+ public function pre_collection_plugin_check() {
102
+ Required_Plugin::get_instance()->display_notice( $this->category );
103
+ }
104
+
105
+ }
inc/class-collection-beaver-builder.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Collection registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Collection_Beaver_Builder extends Collection {
24
+
25
+ public function __construct() {
26
+ parent::__construct();
27
+ $this->category = 'beaver-builder';
28
+ }
29
+
30
+
31
+ public function install_remote_template( $collection_id, $template_id ) {
32
+
33
+ $local_collection = new CPT_Kits();
34
+ $local_collection_cache = $local_collection->get_pending_import( $collection_id, $template_id );
35
+ if ( $local_collection_cache && $local_collection_cache->post_parent ) {
36
+ // we have a parent associated post, proceed with import.
37
+ $import_result = $local_collection->perform_import(
38
+ $local_collection_cache->ID, [
39
+ 'post_meta' => [
40
+ '_fl_meta_custom' => 'envato',
41
+ ],
42
+ ]
43
+ );
44
+
45
+ $this->process_scheduled_page_inserts( $local_collection_cache->ID );
46
+
47
+ delete_post_meta( $local_collection_cache->ID, 'elements_import_lock' );
48
+
49
+ return $import_result;
50
+ }
51
+
52
+ return false;
53
+
54
+ }
55
+
56
+ public function edit_post_link( $post_id ) {
57
+ return add_query_arg( 'fl_builder', '', get_permalink( $post_id ) );
58
+ }
59
+
60
+
61
+ // Called when the rest API is returning details about this template.
62
+ public function filter_installed_status( $collection ) {
63
+
64
+ $imported_templates = CPT_Kits::get_instance()->get_imported_templates();
65
+ if ( ! empty( $collection['templates'] ) ) {
66
+ foreach ( $collection['templates'] as $id => $template ) {
67
+ foreach ( $imported_templates as $imported_template ) {
68
+ if ( $imported_template['categorySlug'] === $this->category && $imported_template['templateId'] === $template['templateId'] && $imported_template['imported'] ) {
69
+ $collection['templates'][ $id ]['templateInstalled'] = true;
70
+ $collection['templates'][ $id ]['templateInstalledID'] = $imported_template['ID'];
71
+ $collection['templates'][ $id ]['templateInstalledURL'] = $this->edit_post_link( $imported_template['ID'] );
72
+ $collection['templates'][ $id ]['templateInstalleText'] = Category::get_instance()->get_current()->edit_button;
73
+
74
+ // We also return the "Inserted Template" details so our template can choose to display this information.
75
+ if ( ! empty( $imported_template['inserted'] ) ) {
76
+ $collection['templates'][ $id ]['templateInserted'] = $imported_template['inserted'];
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+ return $collection;
84
+ }
85
+
86
+
87
+ public function process_scheduled_page_inserts( $local_template_id ) {
88
+
89
+ $created_page_id = 0;
90
+
91
+ $cpt_kits = new CPT_Kits();
92
+ $local_template = get_post( $local_template_id );
93
+ if ( $local_template && $local_template->ID && $local_template->post_type === $cpt_kits->cpt_slug && 'publish' === $local_template->post_status ) {
94
+
95
+ $all_post = get_post( $local_template->ID );
96
+ $all_meta = get_post_meta( $local_template->ID );
97
+ unset( $all_meta['template_data'] );
98
+
99
+ // Find out what destinations we have to inject this data into.
100
+ $insert_history = get_post_meta( $local_template_id, 'insert_history', true );
101
+ if ( ! is_array( $insert_history ) || ! $insert_history ) {
102
+ $insert_history = [];
103
+ }
104
+ foreach ( $insert_history as $key => $val ) {
105
+ if ( ! $val['completed'] ) {
106
+
107
+ if ( ! empty( $val['destination_post_id'] ) ) {
108
+
109
+ if ( 'create-page' === $val['insert_type'] ) {
110
+ foreach ( $all_meta as $meta_key => $meta_val ) {
111
+ if ( $meta_val && ! empty( $meta_val[0] ) ) {
112
+ update_post_meta( $val['destination_post_id'], $meta_key, maybe_unserialize( $meta_val[0] ) );
113
+ }
114
+ }
115
+ wp_update_post(
116
+ [
117
+ 'ID' => $val['destination_post_id'],
118
+ 'post_content' => $all_post->post_content,
119
+ ]
120
+ );
121
+ }
122
+ $created_page_id = $val['destination_post_id'];
123
+ $insert_history[ $key ]['completed'] = true;
124
+ }
125
+ }
126
+ }
127
+ update_post_meta( $local_template_id, 'insert_history', $insert_history );
128
+ }
129
+ return $created_page_id;
130
+ }
131
+
132
+
133
+ }
inc/class-collection-elementor.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Collection registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Collection_Elementor extends Collection {
24
+
25
+ public function __construct() {
26
+ parent::__construct();
27
+ $this->category = 'elementor';
28
+ add_filter( 'elementor/utils/is_post_type_support', [ $this, 'elementor_post_type_support' ], 10, 3 );
29
+ }
30
+
31
+ public function elementor_post_type_support( $is_supported, $post_id, $post_type ) {
32
+ if ( $post_id && CPT_Kits::get_instance()->cpt_slug === $post_type ) {
33
+ return true;
34
+ }
35
+
36
+ return $is_supported;
37
+ }
38
+
39
+ public function trashed_post( $post_id = false ) {
40
+
41
+ }
42
+
43
+ public function install_remote_template( $collection_id, $template_id ) {
44
+
45
+ $local_collection = new CPT_Kits();
46
+ $local_collection_cache = $local_collection->get_pending_import( $collection_id, $template_id );
47
+ if ( $local_collection_cache && $local_collection_cache->post_parent ) {
48
+ // we have a parent associated post, proceed with import.
49
+ $import_settings = [
50
+ 'post_meta' => [
51
+ '_elementor_template_type' => 'page',
52
+ '_wp_page_template' => 'elementor_canvas',
53
+ '_elements_collection_id' => $collection_id,
54
+ '_elements_template_id' => $template_id,
55
+ ],
56
+ ];
57
+ // We import it twice. First into our local CPT collection (used only for Beaver really)
58
+ $import_result = $local_collection->perform_import( $local_collection_cache->ID, $import_settings );
59
+
60
+ // Check if the user has requested a Library import as well.
61
+ $import_type = get_post_meta( $local_collection_cache->ID, 'import_type', true );
62
+ if ( $import_type && 'library' === $import_type && $import_result && ! is_wp_error( $import_result ) && ! empty( $import_result['post_id'] ) ) {
63
+
64
+
65
+ $template = get_post_meta( $local_collection_cache->ID, 'template_data', true );
66
+ if ( $template && ! empty( $template['import'] ) ) {
67
+ // Sweet, we've got a copy of this in our Kit CPT, we'll just clone this over to Elementor
68
+ $post = get_post( $import_result['post_id'] );
69
+ if ( $post ) {
70
+
71
+ $local_collection_post_parent = get_post( $local_collection_cache->post_parent );
72
+ $args = array(
73
+ 'comment_status' => $post->comment_status,
74
+ 'ping_status' => $post->ping_status,
75
+ 'post_author' => get_current_user_id(),
76
+ 'post_content' => $post->post_content,
77
+ 'post_excerpt' => $post->post_excerpt,
78
+ 'post_name' => 'elements-' . $post->post_name,
79
+ 'post_parent' => 0,
80
+ 'post_password' => '',
81
+ 'post_status' => 'publish',
82
+ 'post_title' => $local_collection_post_parent->post_title . ' > ' . $template['import']['post_title'],
83
+ 'post_type' => 'elementor_library',
84
+ 'to_ping' => $post->to_ping,
85
+ 'menu_order' => $post->menu_order,
86
+ );
87
+
88
+ /*
89
+ * insert the post by wp_insert_post() function
90
+ */
91
+ $new_post_id = wp_insert_post( $args );
92
+
93
+ if ( $new_post_id && ! is_wp_error( $new_post_id ) ) {
94
+ global $wpdb;
95
+ /*
96
+ * duplicate all post meta just in two SQL queries
97
+ */
98
+ $post_meta_infos = $wpdb->get_results( $wpdb->prepare( "SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id = %d", $import_result['post_id'] ) );
99
+ if ( count( $post_meta_infos ) != 0 ) {
100
+ $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
101
+ $sql_query_sel = array();
102
+ foreach ( $post_meta_infos as $meta_info ) {
103
+ $meta_key = $meta_info->meta_key;
104
+ $meta_value = esc_sql( $meta_info->meta_value );
105
+ $sql_query_sel[] = "SELECT $new_post_id, '$meta_key', '$meta_value'";
106
+ }
107
+ $sql_query .= implode( ' UNION ALL ', $sql_query_sel );
108
+ $wpdb->query( $sql_query );
109
+ }
110
+
111
+ update_post_meta( $new_post_id, '_source_kit_id', $import_result['post_id'] ); // Required to figure out imported state.
112
+ wp_set_object_terms( $new_post_id, 'page', 'elementor_library_type' );
113
+ $importer = new Import();
114
+ $importer->elementor_post( $new_post_id );
115
+
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ // Process any scheduled page inserts too
122
+ $this->process_scheduled_page_inserts( $local_collection_cache->ID );
123
+
124
+ delete_post_meta( $local_collection_cache->ID, 'elements_import_lock' );
125
+
126
+ return $import_result;
127
+ }
128
+
129
+ return false;
130
+
131
+ }
132
+
133
+
134
+ /**
135
+ * @param $collection
136
+ *
137
+ * @return mixed
138
+ */
139
+ public function filter_installed_status( $collection ) {
140
+
141
+ $imported_templates = CPT_Kits::get_instance()->get_imported_templates();
142
+ if ( ! empty( $collection['templates'] ) && class_exists( '\Elementor\Plugin' ) ) {
143
+ foreach ( $collection['templates'] as $id => $template ) {
144
+ foreach ( $imported_templates as $imported_template ) {
145
+ if ( $imported_template['categorySlug'] === $this->category && $imported_template['templateId'] === $template['templateId'] ) {
146
+ // we find the my library entry instead of our custom CPT ID.
147
+ if ( $imported_template['imported'] ) {
148
+ // Todo: store global query of all library `_source_kit_id` items so we don't query on each one.
149
+ $cc_args = [
150
+ 'posts_per_page' => - 1,
151
+ 'post_type' => 'elementor_library',
152
+ 'meta_key' => '_source_kit_id',
153
+ 'meta_value' => $imported_template['ID'],
154
+ ];
155
+ $has_elementor_library = false;
156
+ $cc_query = new \WP_Query( $cc_args );
157
+ if ( $cc_query->have_posts() ) {
158
+ $posts = $cc_query->get_posts();
159
+ $post = current( $posts );
160
+ if ( $post && $post->ID ) {
161
+ $imported_template['ID'] = $post->ID;
162
+ $has_elementor_library = true;
163
+ }
164
+ }
165
+
166
+ if ( $has_elementor_library ) {
167
+ $collection['templates'][ $id ]['templateInstalled'] = true;
168
+ $collection['templates'][ $id ]['templateInstalledID'] = $imported_template['ID'];
169
+ $collection['templates'][ $id ]['templateInstalledURL'] = \Elementor\Plugin::$instance->documents->get( $imported_template['ID'] )->get_edit_url();
170
+ $collection['templates'][ $id ]['templateInstalleText'] = Category::get_instance()->get_current()->edit_button;
171
+ }
172
+ }
173
+ // We also return the "Inserted Template" details so our template can choose to display this information.
174
+ if ( ! empty( $imported_template['inserted'] ) ) {
175
+ $collection['templates'][ $id ]['templateInserted'] = $imported_template['inserted'];
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ return $collection;
183
+ }
184
+
185
+ /**
186
+ * @param $local_template_id
187
+ *
188
+ * @return int
189
+ */
190
+ public function process_scheduled_page_inserts( $local_template_id ) {
191
+
192
+ $created_page_id = 0;
193
+
194
+ $cpt_kits = new CPT_Kits();
195
+ $local_template = get_post( $local_template_id );
196
+ if ( $local_template && $local_template->ID && $local_template->post_type === $cpt_kits->cpt_slug && 'publish' === $local_template->post_status ) {
197
+ // get the elementor template contents first:
198
+ $source_document = \Elementor\Plugin::$instance->documents->get( $local_template->ID );
199
+ $source_elements = $source_document->get_elements_raw_data();
200
+
201
+ // Find out what destinations we have to inject this data into.
202
+ $insert_history = get_post_meta( $local_template_id, 'insert_history', true );
203
+ if ( ! is_array( $insert_history ) || ! $insert_history ) {
204
+ $insert_history = [];
205
+ }
206
+ foreach ( $insert_history as $key => $val ) {
207
+ if ( ! $val['completed'] ) {
208
+
209
+ if ( ! empty( $val['destination_post_id'] ) ) {
210
+
211
+ if ( 'create-page' === $val['insert_type'] ) {
212
+ update_post_meta( $val['destination_post_id'], '_wp_page_template', 'elementor_canvas' );
213
+ }
214
+
215
+ $destination_post = get_post( $val['destination_post_id'] );
216
+ $destination_document = \Elementor\Plugin::$instance->documents->get( $val['destination_post_id'] );
217
+ $data = $destination_document->get_data();
218
+ if ( ! isset( $data['settings'] ) ) {
219
+ $data['settings'] = [];
220
+ }
221
+ if ( empty( $data['settings']['post_status'] ) ) {
222
+ $data['settings']['post_status'] = $destination_post->post_status;
223
+ }
224
+ $destination_elements = $destination_document->get_elements_raw_data();
225
+ if ( ! $destination_document->is_built_with_elementor() ) {
226
+ $destination_elements = \Elementor\Plugin::$instance->db->_get_new_editor_from_wp_editor( $val['destination_post_id'] );
227
+ update_post_meta( $val['destination_post_id'], '_elementor_edit_mode', true );
228
+ }
229
+ foreach ( $source_elements as $source_element ) {
230
+ $destination_elements[] = $source_element;
231
+ }
232
+ if ( $destination_elements ) {
233
+ $data['elements'] = $destination_elements;
234
+ $destination_document->save( $data );
235
+ $insert_history[ $key ]['completed'] = true;
236
+ $created_page_id = $val['destination_post_id'];
237
+ }
238
+ }
239
+ }
240
+ }
241
+ update_post_meta( $local_template_id, 'insert_history', $insert_history );
242
+ }
243
+
244
+ return $created_page_id;
245
+ }
246
+
247
+ }
inc/class-collection-photos.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Collections: Collection_Photos class
4
+ *
5
+ * This class is used to manage collections of Elements photos.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Photo Collection management.
20
+ *
21
+ * @since 0.0.2
22
+ *
23
+ * @see Collection
24
+ */
25
+ class Collection_Photos extends Collection {
26
+
27
+ /**
28
+ * Collection_Photos constructor.
29
+ */
30
+ public function __construct() {
31
+ parent::__construct();
32
+ $this->category = 'photos';
33
+ }
34
+
35
+ /**
36
+ * Get photo collections from Elements API.
37
+ *
38
+ * @return array
39
+ */
40
+ public function get_remote_collections() {
41
+
42
+ $api_data = [
43
+ 'beta' => true,
44
+ ];
45
+
46
+ Feedback::get_instance()->page_view( 'all-photos' );
47
+
48
+ $data = API::get_instance()->api_call( 'photos', $api_data );
49
+
50
+ if ( $data && ! is_wp_error( $data ) && ! empty( $data['groups'] ) ) {
51
+ // filter api response data?
52
+ $filtered_data = [];
53
+ foreach ( $data['groups'] as $collection ) {
54
+ if ( ! empty( $collection['photos'] ) ) {
55
+ $filtered_templates = [];
56
+ foreach ( $collection['photos'] as $template ) {
57
+ $filtered_templates[] = $this->filter_template( $template, $collection );
58
+ }
59
+ if ( $filtered_templates ) {
60
+ $filtered_collection = $this->filter_collection( $collection );
61
+ $filtered_collection['templates'] = $filtered_templates;
62
+ $filtered_data[] = $filtered_collection;
63
+ }
64
+ }
65
+ }
66
+ $data = [
67
+ 'data' => [
68
+ 'feedback' => Feedback::get_instance()->generate_form( 'photos' ),
69
+ 'collections' => $filtered_data,
70
+ ],
71
+ ];
72
+
73
+ }
74
+
75
+ return $data;
76
+
77
+ }
78
+
79
+
80
+ /**
81
+ * Filter our list of installed template data.
82
+ *
83
+ * @param array $api_data Raw API data.
84
+ * @param array $catagory_data Parent category API data.
85
+ *
86
+ * @return array
87
+ */
88
+ private function filter_template( $api_data, $catagory_data ) {
89
+
90
+ $filtered_data = [
91
+ 'templateId' => $api_data['id'],
92
+ 'previewThumb' => $api_data['thumb'],
93
+ 'previewThumbAspect' => '100%',
94
+ 'templateName' => $api_data['name'],
95
+ 'templateUrl' => add_query_arg(
96
+ [
97
+ 'category' => $this->category,
98
+ 'collection_id' => $catagory_data['slug'],
99
+ 'photo_id' => $api_data['id'],
100
+ ], Collection::get_instance()->get_url()
101
+ ),
102
+ 'templateError' => false,
103
+ 'templateInstalled' => false,
104
+ 'templateInstalledURL' => '#',
105
+ 'templateInstalledText' => 'Open Image',
106
+ 'largeThumb' => [
107
+ 'src' => $api_data['thumb'],
108
+ 'width' => 'auto',
109
+ 'height' => 'auto',
110
+ ],
111
+ ];
112
+
113
+ return $filtered_data;
114
+ }
115
+
116
+ /**
117
+ * Filter a list of installed collection data.
118
+ *
119
+ * @param array $api_data Raw API data.
120
+ *
121
+ * @return array
122
+ */
123
+ private function filter_collection( $api_data ) {
124
+ $filtered_data = [
125
+ 'collectionId' => $api_data['slug'],
126
+ 'categorySlug' => $this->category,
127
+ 'collectionName' => $api_data['name'],
128
+ 'collectionUrl' => add_query_arg(
129
+ [
130
+ 'category' => $this->category,
131
+ 'collection_id' => $api_data['slug'],
132
+ ], Collection::get_instance()->get_url()
133
+ ),
134
+ 'templates' => [],
135
+ ];
136
+
137
+ return $filtered_data;
138
+ }
139
+
140
+ }
inc/class-collection.php ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Collection registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Collection extends Base {
24
+
25
+ const PAGE_SLUG = 'envato-elements-collection';
26
+
27
+ public $category = 'beaver-builder';
28
+
29
+ /**
30
+ * Collection constructor.
31
+ */
32
+ public function __construct() {
33
+ parent::__construct();
34
+ add_action( 'trashed_post', [ $this, 'trashed_post' ] );
35
+ }
36
+
37
+ public function get_url() {
38
+ return admin_url( 'admin.php?page=' . ENVATO_ELEMENTS_SLUG );
39
+ }
40
+
41
+ /**
42
+ * Called when the user navigates to the admin menu page.
43
+ *
44
+ * @since 0.0.2
45
+ * @access public
46
+ */
47
+ public function admin_menu_open() {
48
+
49
+ $this->content = $this->render_template(
50
+ 'collections/js-holder.php', [
51
+ 'all_collections' => [],
52
+ ]
53
+ );
54
+ $this->header = $this->render_template( 'collections/header.php' );
55
+ echo $this->render_template( 'wrapper.php' );
56
+
57
+ }
58
+
59
+
60
+ public function get_remote_collection( $collection_id ) {
61
+
62
+ $api_data = [
63
+ 'category' => $this->category,
64
+ 'collection_id' => $collection_id,
65
+ ];
66
+
67
+ $data = API::get_instance()->api_call( 'collection', $api_data );
68
+
69
+ if ( $data && ! is_wp_error( $data ) && ! empty( $data['data'] ) && ! empty( $data['data']['collection_id'] ) ) {
70
+ $data['data'] = $this->filter_collection( $data['data'] );
71
+ }
72
+
73
+ return $data;
74
+
75
+ }
76
+
77
+ public function get_remote_collections( $search = [] ) {
78
+
79
+ $api_data = [
80
+ 'category' => $this->category,
81
+ // 'search' => $search,
82
+ ];
83
+ $page_number = empty( $search['page'] ) || (int) $search['page'] < 1 || (int) $search['page'] > 100 ? 1 : (int) $search['page'];
84
+ $per_page = 10;
85
+ $show_coming_soon = false;
86
+
87
+ $data = API::get_instance()->api_call( 'collections', $api_data );
88
+
89
+ if ( $data && ! is_wp_error( $data ) && ! empty( $data['data'] ) ) {
90
+ // filter api response data?
91
+ $filtered_data = [];
92
+ $show_coming_soon = count( $data['data'] ) < $per_page || count( $data['data'] ) <= $page_number * $per_page;
93
+ $paged_data = array_slice( $data['data'], ( $page_number - 1 ) * $per_page, $per_page );
94
+ if ( $paged_data ) {
95
+ foreach ( $paged_data as $collection ) {
96
+ if ( ! empty( $collection['templates'] ) ) {
97
+ $filtered_collection = $this->filter_collection( $collection );
98
+ if ( $filtered_collection ) {
99
+ $filtered_data[] = $filtered_collection;
100
+ }
101
+ }
102
+ }
103
+ }
104
+ $data['data'] = [
105
+ 'page_number' => $page_number,
106
+ 'per_page' => $per_page,
107
+ 'total_results' => count( $data['data'] ),
108
+ 'collections' => $filtered_data,
109
+ 'show_coming_soon' => $show_coming_soon,
110
+ ];
111
+
112
+ }
113
+
114
+ return $data;
115
+
116
+ }
117
+
118
+ public function schedule_remote_template_install( $collection_id, $template_id, $import_type = false ) {
119
+
120
+ $local_template_id = false;
121
+ $api_data = [
122
+ 'collection_id' => $collection_id,
123
+ 'template_id' => $template_id,
124
+ ];
125
+ $template_data = API::get_instance()->api_call( 'import', $api_data );
126
+
127
+ if ( is_wp_error( $template_data ) ) {
128
+ return $template_data;
129
+ } elseif ( $template_data && ! empty( $template_data['data'] ) && ! empty( $template_data['data']['templates'] ) ) {
130
+
131
+ // First step is creating a CPT_Kit entry to group our imported templates by this category etc..
132
+ $local_collection = new CPT_Kits();
133
+ $local_collection_id = $local_collection->seed_local_cache( $template_data );
134
+ if ( $local_collection_id ) {
135
+ foreach ( $template_data['data']['templates'] as $template ) {
136
+ if ( $template && $template['template_id'] === $template_id && ! empty( $template['import'] ) ) {
137
+ // We store a cached copy of this template and set it to 'draft' post type.
138
+ // This is our flag to say this template is queued to be imported.
139
+ $local_template_id = $local_collection->schedule_local_install( $template, $import_type );
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ return $local_template_id;
146
+ }
147
+
148
+
149
+ /**
150
+ * Check if a given request has access to update a setting
151
+ *
152
+ * @param\ WP_REST_Request $request Full data about the request.
153
+ *
154
+ * @return \WP_Error|bool
155
+ */
156
+ public function rest_permission_check( $request ) {
157
+ return current_user_can( 'edit_posts' );
158
+ }
159
+
160
+ /**
161
+ * This registers all our WP REST API endpoints for the react front end
162
+ *
163
+ * @param $namespace
164
+ */
165
+
166
+ public function init_rest_endpoints( $namespace ) {
167
+
168
+ $endpoints = [
169
+ '/collections/' . $this->category . '/' => [
170
+ \WP_REST_Server::CREATABLE => 'rest_list',
171
+ ],
172
+ '/collection/' . $this->category . '/' => [
173
+ \WP_REST_Server::READABLE => 'rest_single',
174
+ ],
175
+ // Importing a template to library.
176
+ '/import/' . $this->category . '/process' => [
177
+ \WP_REST_Server::CREATABLE => 'rest_process_import',
178
+ ],
179
+ // Inserting content onto a page.
180
+ '/insert/' . $this->category . '/process' => [
181
+ \WP_REST_Server::CREATABLE => 'rest_process_insert',
182
+ ],
183
+ ];
184
+
185
+ foreach ( $endpoints as $endpoint => $details ) {
186
+ foreach ( $details as $method => $callback ) {
187
+ register_rest_route(
188
+ $namespace, $endpoint, [
189
+ [
190
+ 'methods' => $method,
191
+ 'callback' => [ $this, $callback ],
192
+ 'permission_callback' => [ $this, 'rest_permission_check' ],
193
+ 'args' => [],
194
+ ],
195
+ ]
196
+ );
197
+ }
198
+ }
199
+
200
+ }
201
+
202
+ /**
203
+ * Create a page from a template via the REST API
204
+ *
205
+ * @param \WP_REST_Request $request Full data about the request.
206
+ *
207
+ * @return \WP_Error|\WP_REST_Response
208
+ */
209
+ public function rest_process_insert( $request ) {
210
+
211
+ $collection_id = $request->get_param( 'collectionId' );
212
+ $template_id = $request->get_param( 'templateId' );
213
+ $insert_type = $request->get_param( 'insertType' ); // create-page or
214
+
215
+ $options = [
216
+ 'page_name' => $request->get_param( 'pageName' ),
217
+ 'page_id' => $request->get_param( 'pageId' ),
218
+ ];
219
+ $result = [];
220
+
221
+ if ( $collection_id && $template_id ) {
222
+
223
+ // We add this insert request to the meta data of the imported template in our CPT
224
+ // When the template is finally imported (or if it's already imported) we fire off the actual insert request.
225
+ // This lets us schedule an insert while the template is still importing in the background.
226
+ $cpt_kits = new CPT_Kits();
227
+ $this->schedule_remote_template_install( $collection_id, $template_id );
228
+ $install_result = $this->install_remote_template( $collection_id, $template_id );
229
+ $local_template_id = $cpt_kits->schedule_insert_template( $collection_id, $template_id, $insert_type, $options );
230
+ if ( $local_template_id ) {
231
+ $created_page_id = $this->process_scheduled_page_inserts( $local_template_id );
232
+ }
233
+
234
+ $result['install_debug'] = $install_result;
235
+ $result['source_template'] = $local_template_id;
236
+ $result['page_id'] = $created_page_id;
237
+ $result['page_url'] = get_permalink( $created_page_id );
238
+ $result['page_name'] = $created_page_id ? get_the_title( $created_page_id ) : '';
239
+
240
+ return new \WP_REST_Response( $result, 200 );
241
+ }
242
+
243
+ return new \WP_REST_Response(
244
+ [
245
+ 'error' => 'Unknown error',
246
+ ], 500
247
+ );
248
+
249
+ }
250
+
251
+ /**
252
+ * Import a template via the REST api
253
+ *
254
+ * @param \WP_REST_Request $request Full data about the request.
255
+ *
256
+ * @return \WP_Error|\WP_REST_Response
257
+ */
258
+ public function rest_process_import( $request ) {
259
+
260
+ $collection_id = $request->get_param( 'collectionId' );
261
+ $template_id = $request->get_param( 'templateId' );
262
+ $import_type = $request->get_param( 'importType' ); // = library
263
+
264
+ $result = [
265
+ 'status' => false,
266
+ 'category' => $this->category,
267
+ 'collectionId' => $collection_id,
268
+ 'templateId' => $template_id,
269
+ 'url' => add_query_arg(
270
+ [
271
+ 'category' => $this->category,
272
+ 'collection_id' => $collection_id,
273
+ 'template_id' => $template_id,
274
+ ], Collection::get_instance()->get_url()
275
+ ),
276
+ ];
277
+
278
+ if ( $collection_id && $template_id ) {
279
+
280
+ $this->schedule_remote_template_install( $collection_id, $template_id, $import_type );
281
+ $install_result = $this->install_remote_template( $collection_id, $template_id );
282
+ if ( $install_result && $install_result['post_id'] ) {
283
+ $result['install_debug'] = $install_result;
284
+ $result['status'] = true;
285
+ $result['post_id'] = $install_result['post_id'];
286
+ $result['post_url'] = get_permalink( $install_result['post_id'] );
287
+ }
288
+ }
289
+
290
+ return new \WP_REST_Response( $result, 200 );
291
+
292
+ }
293
+
294
+ /**
295
+ * Get a list of all templates via the rest api
296
+ *
297
+ * @param \WP_REST_Request $request Full data about the request.
298
+ *
299
+ * @return \WP_Error|\WP_REST_Response
300
+ */
301
+ public function rest_list( $request ) {
302
+
303
+ $search = $request->get_param( 'search' );
304
+
305
+ $all_collections = $this->get_remote_collections( $search );
306
+ // todo: show the users chosen collection at the top (or sort by most recently used collections)
307
+ if ( $all_collections && ! is_wp_error( $all_collections ) && ! empty( $all_collections['data'] ) ) {
308
+ return new \WP_REST_Response( $all_collections, 200 );
309
+ } else {
310
+ $message = 'Unknown API error with REST LIST. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.';
311
+ if ( is_wp_error( $all_collections ) ) {
312
+ $data = $all_collections->get_error_message();
313
+ if ( ! empty( $data['message'] ) ) {
314
+ $message = $data['message'];
315
+ }
316
+ }
317
+
318
+ return new \WP_REST_Response(
319
+ [
320
+ 'error' => $message,
321
+ ], 500
322
+ );
323
+ }
324
+
325
+ }
326
+
327
+ /**
328
+ * Get a list of all templates via the rest api.
329
+ *
330
+ * @param \WP_REST_Request $request Full data about the request.
331
+ *
332
+ * @return \WP_Error|\WP_REST_Response
333
+ */
334
+ public function rest_single( $request ) {
335
+
336
+ $collection_id = $request->get_param( 'collection_id' );
337
+
338
+ $collection_data = $this->get_remote_collection( $collection_id );
339
+ // todo: show the users chosen collection at the top (or sort by most recently used collections)
340
+ if ( $collection_data && ! is_wp_error( $collection_data ) && ! empty( $collection_data['data'] ) ) {
341
+ return new \WP_REST_Response( $collection_data, 200 );
342
+ } else {
343
+ $message = 'Unknown API error with REST SINGLE. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.';
344
+ if ( is_wp_error( $collection_data ) ) {
345
+ $data = $collection_data->get_error_message();
346
+ if ( ! empty( $data['message'] ) ) {
347
+ $message = $data['message'];
348
+ }
349
+ }
350
+
351
+ return new \WP_REST_Response(
352
+ [
353
+ 'error' => $message,
354
+ ], 500
355
+ );
356
+ }
357
+
358
+ }
359
+
360
+
361
+ private function filter_template( $api_data, $catagory_data ) {
362
+ $thumb = ! empty( $api_data['preview_thumbs']['w200']['url'] ) ? $api_data['preview_thumbs']['w200']['url'] : $api_data['preview_thumb'];
363
+ $aspect = '100%';
364
+ if ( ! empty( $api_data['preview_thumbs']['w200']['width'] ) ) {
365
+ $aspect = ( ( intval( $api_data['preview_thumbs']['w200']['height'] ) / intval( $api_data['preview_thumbs']['w200']['width'] ) ) * 100 ) . '%';
366
+ }
367
+
368
+ $large_thumb = [
369
+ 'src' => $api_data['preview_image'],
370
+ 'width' => 'auto',
371
+ 'height' => 'auto',
372
+ ];
373
+ if ( ! empty( $api_data['preview_thumbs']['w1360'] ) ) {
374
+ $large_thumb = [
375
+ 'src' => $api_data['preview_thumbs']['w1360']['url'],
376
+ 'width' => $api_data['preview_thumbs']['w1360']['width'],
377
+ 'height' => $api_data['preview_thumbs']['w1360']['height'],
378
+ ];
379
+ }
380
+
381
+ $filtered_data = [
382
+ 'templateId' => $api_data['template_id'],
383
+ 'previewThumb' => $thumb,
384
+ 'previewThumbAspect' => $aspect,
385
+ 'templateName' => $api_data['name'],
386
+ 'templateUrl' => add_query_arg(
387
+ [
388
+ 'category' => $this->category,
389
+ 'collection_id' => $catagory_data['collectionId'],
390
+ 'template_id' => $api_data['template_id'],
391
+ ], Collection::get_instance()->get_url()
392
+ ),
393
+ // detail view data:
394
+ 'templateInstalled' => false, // todo
395
+ // if already installed.
396
+ 'templateInstalledURL' => '#',
397
+ // url to edit template,
398
+ 'templateInstalledText' => 'Edit Template',
399
+ // customize based on template type.
400
+ 'largeThumb' => $large_thumb,
401
+ // which pages the template is inserted (or pending insert) on
402
+ 'templateInserted' => [],
403
+ 'templateError' => false,
404
+ 'templateMissingPlugins' => [],
405
+ ];
406
+
407
+ $missing_plugins = Required_Plugin::get_instance()->get_missing_plugins( ! empty( $api_data['plugins'] ) ? $api_data['plugins'] : [], $this->category );
408
+ if ( $missing_plugins ) {
409
+ $filtered_data['templateError'] = true;
410
+ $filtered_data['templateMissingPlugins'] = $missing_plugins;
411
+ }
412
+
413
+ return $filtered_data;
414
+ }
415
+
416
+ private function filter_collection( $api_data ) {
417
+
418
+ $filtered_data = [
419
+ 'collectionId' => $api_data['collection_id'],
420
+ 'categorySlug' => $this->category,
421
+ 'collectionName' => $api_data['name'],
422
+ 'collectionUrl' => add_query_arg(
423
+ [
424
+ 'category' => $this->category,
425
+ 'collection_id' => $api_data['collection_id'],
426
+ ], Collection::get_instance()->get_url()
427
+ ),
428
+ 'templates' => [],
429
+ ];
430
+
431
+ if ( ! empty( $api_data['templates'] ) && is_array( $api_data['templates'] ) ) {
432
+ $filtered_templates = [];
433
+ foreach ( $api_data['templates'] as $template ) {
434
+ $filtered_templates[] = $this->filter_template( $template, $filtered_data );
435
+ }
436
+ if ( $filtered_templates ) {
437
+ $filtered_data['templates'] = $filtered_templates;
438
+ $filtered_data = $this->filter_installed_status( $filtered_data );
439
+ }
440
+ }
441
+
442
+ return $filtered_data;
443
+ }
444
+
445
+ public function trashed_post( $post_id = false ) {
446
+
447
+ }
448
+
449
+ public function filter_installed_status( $collection ) {
450
+
451
+ return $collection;
452
+ }
453
+
454
+ }
inc/class-cpt-kits.php ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Collection registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class CPT_Kits extends CPT {
24
+
25
+ /**
26
+ * Core custom post name for these templates.
27
+ *
28
+ * @var string
29
+ */
30
+ public $cpt_name = 'Imported Kit';
31
+
32
+ /**
33
+ * Core custom post name for these templates.
34
+ *
35
+ * @var string
36
+ */
37
+ public $cpt_slug = 'envato_kits';
38
+
39
+ private $_collection_id = false;
40
+
41
+ public function __construct() {
42
+ parent::__construct();
43
+
44
+ add_filter( 'wp_get_custom_css', [ $this, 'wp_get_custom_css' ], 10, 2 );
45
+
46
+ }
47
+
48
+
49
+ public function init() {
50
+
51
+ $this->menu_name = 'Imported';
52
+
53
+ }
54
+
55
+ public function clear_transients() {
56
+ delete_transient( $this->cpt_slug . '-css' );
57
+ }
58
+
59
+
60
+ public function wp_get_custom_css( $css, $stylesheet = '' ) {
61
+ // Hook into custom CSS to output any locally cached css.
62
+ $transient = $this->cpt_slug . '-css';
63
+ $kit_css = get_transient( $transient );
64
+ if ( ! $kit_css ) {
65
+ // loop up local css.
66
+ $existing_cache = get_posts(
67
+ [
68
+ 'post_type' => $this->cpt_slug,
69
+ 'post_status' => 'publish',
70
+ 'post_parent' => 0,
71
+ 'numberposts' => - 1,
72
+ ]
73
+ );
74
+ $kit_css = '';
75
+ foreach ( $existing_cache as $post ) {
76
+ $template_data = get_post_meta( $post->ID, 'template_data', true );
77
+ if ( $template_data && ! empty( $template_data['data']['options']['custom_css'] ) ) {
78
+ $kit_css .= "\n\n/** Start Envato Elements CSS: " . esc_html( $post->post_title ) . " */\n\n";
79
+ $kit_css .= $template_data['data']['options']['custom_css'];
80
+ $kit_css .= "\n\n/** End Envato Elements CSS: " . esc_html( $post->post_title ) . " */\n\n\n";
81
+ }
82
+ }
83
+ set_transient( $transient, $kit_css, 60 * 60 );
84
+ }
85
+ if ( $kit_css ) {
86
+ $css = $kit_css . $css;
87
+ }
88
+
89
+ return $css;
90
+ }
91
+
92
+ public function seed_local_cache( $template_data ) {
93
+ $this->_collection_id = false;
94
+ if ( $template_data && ! empty( $template_data['data'] ) && ! empty( $template_data['data']['collection_id'] ) ) {
95
+ $existing_cache = get_posts(
96
+ [
97
+ 'post_type' => $this->cpt_slug,
98
+ 'post_status' => 'publish',
99
+ 'numberposts' => - 1,
100
+ 'meta_query' => [
101
+ [
102
+ 'key' => 'collection_id',
103
+ 'value' => $template_data['data']['collection_id'],
104
+ ],
105
+ ],
106
+ ]
107
+ );
108
+ if ( ! $existing_cache ) {
109
+ $this->_collection_id = wp_insert_post(
110
+ [
111
+ 'post_type' => $this->cpt_slug,
112
+ 'post_title' => $template_data['data']['name'],
113
+ 'post_status' => 'publish',
114
+ ]
115
+ );
116
+ if ( $this->_collection_id ) {
117
+ add_post_meta( $this->_collection_id, 'collection_id', $template_data['data']['collection_id'] );
118
+ }
119
+ } else {
120
+ $collection = current( $existing_cache );
121
+ if ( $collection ) {
122
+ $this->_collection_id = $collection->ID;
123
+ }
124
+ }
125
+
126
+ if ( $this->_collection_id ) {
127
+ update_post_meta( $this->_collection_id, 'page_builder', $template_data['data']['builder'] );
128
+ update_post_meta( $this->_collection_id, 'template_data', wp_slash( $template_data ) );
129
+ }
130
+ $this->clear_transients();
131
+ }
132
+
133
+ return $this->_collection_id;
134
+ }
135
+
136
+ public function get_pending_import( $collection_id, $template_id ) {
137
+ $existing_cache = get_posts(
138
+ [
139
+ 'post_type' => $this->cpt_slug,
140
+ 'post_status' => 'draft',
141
+ 'numberposts' => - 1,
142
+ 'meta_query' => [
143
+ [
144
+ 'key' => 'template_id',
145
+ 'value' => $template_id,
146
+ ],
147
+ ],
148
+ ]
149
+ );
150
+ if ( $existing_cache ) {
151
+ return current( $existing_cache );
152
+ }
153
+
154
+ return false;
155
+ }
156
+
157
+ public function get_local_template( $collection_id, $template_id ) {
158
+ $existing_cache = get_posts(
159
+ [
160
+ 'post_type' => $this->cpt_slug,
161
+ 'post_status' => 'any',
162
+ 'numberposts' => - 1,
163
+ 'meta_query' => [
164
+ [
165
+ 'key' => 'template_id',
166
+ 'value' => $template_id,
167
+ ],
168
+ ],
169
+ ]
170
+ );
171
+ if ( $existing_cache ) {
172
+ return current( $existing_cache );
173
+ }
174
+
175
+ return false;
176
+ }
177
+
178
+
179
+ public function schedule_insert_template( $collection_id, $template_id, $insert_type, $options ) {
180
+ $existing_template = $this->get_local_template( $collection_id, $template_id );
181
+ if ( $existing_template && $existing_template->ID ) {
182
+
183
+ $insert_history = get_post_meta( $existing_template->ID, 'insert_history', true );
184
+ if ( ! is_array( $insert_history ) || ! $insert_history ) {
185
+ $insert_history = [];
186
+ }
187
+ $destination_post_id = 0;
188
+ switch ( $insert_type ) {
189
+ case 'create-page':
190
+ $page_name = ! empty( $options['page_name'] ) ? $options['page_name'] : $existing_template->post_title;
191
+ $id = wp_insert_post(
192
+ [
193
+ 'post_type' => 'page',
194
+ 'post_title' => $page_name,
195
+ 'post_status' => 'draft',
196
+ 'post_content' => '',
197
+ ]
198
+ );
199
+ if ( $id && ! is_wp_error( $id ) ) {
200
+ $destination_post_id = $id;
201
+ add_post_meta( $id, 'source_template_id', $existing_template->ID );
202
+ }
203
+ break;
204
+ case 'existing-page':
205
+ $destination_post_id = ! empty( $options['page_id'] ) ? (int) $options['page_id'] : 0;
206
+ break;
207
+ }
208
+
209
+ if ( $destination_post_id ) {
210
+ $check_post = get_post( $destination_post_id );
211
+ if ( $check_post && $check_post->ID ) {
212
+ $insert_history[] = [
213
+ 'completed' => false,
214
+ 'destination_post_id' => $check_post->ID,
215
+ 'insert_type' => $insert_type,
216
+ 'options' => $options,
217
+ ];
218
+ update_post_meta( $existing_template->ID, 'insert_history', $insert_history );
219
+
220
+ return $existing_template->ID;
221
+ }
222
+ }
223
+ }
224
+
225
+ return false;
226
+ }
227
+
228
+ public function get_imported_templates( $force = false ) {
229
+
230
+ $cache_key = 'envato_elements_imported';
231
+ $templates = get_transient( $cache_key );
232
+ if ( $templates && is_array( $templates ) ) {
233
+ // todo: transient. but make sure transient is cleared every time we publish/delete a $this->cpt_slug before enabling this.
234
+ // return $templates;
235
+ }
236
+ $templates = [];
237
+
238
+ foreach (
239
+ get_posts(
240
+ [
241
+ 'post_type' => $this->cpt_slug,
242
+ 'post_status' => 'draft,publish',
243
+ 'numberposts' => - 1,
244
+ ]
245
+ ) as $post
246
+ ) {
247
+
248
+ $template_data = get_post_meta( $post->ID, 'template_data', true );
249
+ if ( $template_data && $post->post_parent ) {
250
+ $collection_id = get_post_meta( $post->post_parent, 'collection_id', true );
251
+ $page_builder_category = get_post_meta( $post->post_parent, 'page_builder', true );
252
+ if ( $collection_id && $page_builder_category ) {
253
+
254
+ $insert_history = get_post_meta( $post->ID, 'insert_history', true );
255
+ if ( ! is_array( $insert_history ) || ! $insert_history ) {
256
+ $insert_history = [];
257
+ }
258
+ $currently_inserting = false;
259
+ foreach ( $insert_history as $key => $val ) {
260
+ if ( empty( $val['destination_post_id'] ) ) {
261
+ unset( $insert_history[ $key ] );
262
+ } else {
263
+ $inserted_post = get_post( $val['destination_post_id'] );
264
+ if ( ! $inserted_post || 'trash' === $inserted_post->post_status ) {
265
+ unset( $insert_history[ $key ] );
266
+ // todo: save this better, update this on post save maybe?
267
+ } else {
268
+ if ( ! $val['completed'] ) {
269
+ $currently_inserting = true;
270
+ }
271
+ $insert_history[ $key ]['pageName'] = $inserted_post->post_title;
272
+ $insert_history[ $key ]['pageUrl'] = get_edit_post_link( $inserted_post, 'edit' );
273
+ }
274
+ }
275
+ }
276
+
277
+ $templates[] = [
278
+ 'ID' => $post->ID,
279
+ 'name' => $post->post_title,
280
+ 'templateId' => $template_data['template_id'],
281
+ 'collectionId' => $collection_id,
282
+ 'categorySlug' => $page_builder_category,
283
+ 'imported' => 'publish' === $post->post_status,
284
+ 'inserting' => $currently_inserting,
285
+ 'inserted' => array_values( $insert_history ),
286
+ ];
287
+ }
288
+ }
289
+ }
290
+
291
+ set_transient( $cache_key, $templates, 60 * 5 );
292
+
293
+ return $templates;
294
+ }
295
+
296
+ public function schedule_local_install( $template, $import_type = false ) {
297
+
298
+ $template_id = false;
299
+ // See if it already exists..
300
+ if ( $this->_collection_id && $template && ! empty( $template['template_id'] ) ) {
301
+ $existing_cache = get_posts(
302
+ [
303
+ 'post_type' => $this->cpt_slug,
304
+ 'post_parent' => $this->_collection_id,
305
+ 'post_status' => 'draft,publish',
306
+ 'numberposts' => - 1,
307
+ 'meta_query' => [
308
+ [
309
+ 'key' => 'template_id',
310
+ 'value' => $template['template_id'],
311
+ ],
312
+ ],
313
+ ]
314
+ );
315
+ if ( ! $existing_cache ) {
316
+ $template_id = wp_insert_post(
317
+ [
318
+ 'post_type' => $this->cpt_slug,
319
+ 'post_parent' => $this->_collection_id,
320
+ 'post_title' => $template['name'],
321
+ 'post_status' => 'draft',
322
+ ]
323
+ );
324
+ if ( $template_id ) {
325
+ add_post_meta( $template_id, 'template_id', $template['template_id'] );
326
+ }
327
+ } else {
328
+ $local_template = current( $existing_cache );
329
+ if ( $local_template ) {
330
+ $template_id = $local_template->ID;
331
+ }
332
+ }
333
+
334
+ if ( $template_id ) {
335
+ update_post_meta( $template_id, 'template_data', wp_slash( $template ) );
336
+ update_post_meta( $template_id, 'import_type', $import_type );
337
+ // change the post status to draft so our template is reimported again
338
+ wp_update_post(
339
+ [
340
+ 'ID' => $template_id,
341
+ 'post_status' => 'draft',
342
+ ]
343
+ );
344
+ }
345
+ }
346
+
347
+ return $template_id;
348
+
349
+ }
350
+
351
+ public function perform_import( $local_cache_post_id, $import_settings ) {
352
+ $importer = Import::get_instance();
353
+ $template = get_post_meta( $local_cache_post_id, 'template_data', true );
354
+ if ( $template && ! empty( $template['import'] ) ) {
355
+
356
+ $template['import']['Update_Existing_ID'] = $local_cache_post_id;
357
+ $import_settings['post_type'] = $this->cpt_slug;
358
+ $post = get_post( $local_cache_post_id );
359
+ $import_settings['transient_namespace'] = get_post_meta( $post->post_parent, 'collection_id', true );
360
+
361
+ return $importer->import_data( $template['import'], $import_settings );
362
+ }
363
+
364
+ }
365
+
366
+ }
inc/class-cpt.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * CPT.
20
+ *
21
+ * Class to handle everything Custom Post Type related.
22
+ *
23
+ * @since 0.0.2
24
+ */
25
+ abstract class CPT extends Base {
26
+
27
+
28
+ /**
29
+ * Core custom post name for these templates.
30
+ *
31
+ * @var string
32
+ */
33
+ public $cpt_name = '';
34
+
35
+
36
+ /**
37
+ * Core custom post name for these templates.
38
+ *
39
+ * @var string
40
+ */
41
+ public $cpt_slug = '';
42
+
43
+
44
+ /**
45
+ * Core custom post name for these templates.
46
+ *
47
+ * @var string
48
+ */
49
+ public $menu_name = '';
50
+
51
+
52
+ /**
53
+ * Core custom post name for these templates.
54
+ *
55
+ * @var string
56
+ */
57
+ public $menu_parent = ENVATO_ELEMENTS_SLUG;
58
+
59
+
60
+ /**
61
+ * Do we allow editing
62
+ *
63
+ * @var array
64
+ */
65
+ public $supports = [ 'title', 'author', 'thumbnail', 'elementor', 'page-attributes' ];
66
+
67
+
68
+
69
+ /**
70
+ * Initializing Elements Content App plugin.
71
+ *
72
+ * @since 0.0.2
73
+ * @access private
74
+ */
75
+ public function __construct() {
76
+
77
+ parent::__construct();
78
+
79
+ add_action( 'init', [ $this, 'register_custom_post_type' ] );
80
+ add_filter( 'parent_file', [ $this, 'override_wordpress_submenu' ] );
81
+ }
82
+
83
+ /**
84
+ * We override the "submenu_file" WordPress global so that the correct submenu is highlighted when on our custom admin page.
85
+ *
86
+ * @param string $this_parent_file Current parent file for menu rendering.
87
+ *
88
+ * @return string
89
+ */
90
+ public function override_wordpress_submenu( $this_parent_file ) {
91
+ global $post, $submenu_file;
92
+ if ( is_admin() && $post && $post->ID && $this->cpt_slug === $post->post_type ) {
93
+ $submenu_file = 'edit.php?post_type=' . $this->cpt_slug; // WPCS: override ok.
94
+ $this_parent_file = $this->menu_parent;
95
+ }
96
+
97
+ return $this_parent_file;
98
+ }
99
+
100
+
101
+ /**
102
+ * Adds our custom submenu page.
103
+ */
104
+ public function admin_menu() {
105
+
106
+ add_submenu_page(
107
+ $this->menu_parent,
108
+ $this->menu_name,
109
+ $this->menu_name,
110
+ 'manage_options',
111
+ 'edit.php?post_type=' . $this->cpt_slug
112
+ );
113
+
114
+ }
115
+
116
+ /**
117
+ * Here is our magical custom post type that stores all our Elementor site wide styles.
118
+ *
119
+ * @since 0.0.2
120
+ */
121
+ public function register_custom_post_type() {
122
+
123
+ register_post_type( $this->cpt_slug, $this->get_cpt_args() );
124
+
125
+ }
126
+
127
+ /**
128
+ * These are the args used to register our CPT.
129
+ *
130
+ * @return array args
131
+ */
132
+ public function get_cpt_args() {
133
+
134
+ $labels = [
135
+ 'name' => $this->cpt_name . 's',
136
+ 'singular_name' => $this->cpt_name,
137
+ 'menu_name' => $this->cpt_name . 's',
138
+ 'parent_item_colon' => 'Parent ' . $this->cpt_name . ':',
139
+ 'all_items' => 'All ' . $this->cpt_name . 's',
140
+ 'view_item' => 'View ' . $this->cpt_name,
141
+ 'add_new_item' => 'Add New ' . $this->cpt_name,
142
+ 'add_new' => 'New ' . $this->cpt_name,
143
+ 'edit_item' => 'Edit ' . $this->cpt_name,
144
+ 'update_item' => 'Update ' . $this->cpt_name,
145
+ 'search_items' => 'Search ' . $this->cpt_name . 's',
146
+ 'not_found' => 'No ' . $this->cpt_name . 's found',
147
+ 'not_found_in_trash' => 'No ' . $this->cpt_name . 's found in Trash',
148
+ ];
149
+
150
+ return [
151
+ 'description' => $this->cpt_name . 's',
152
+ 'labels' => $labels,
153
+ 'supports' => $this->supports,
154
+ 'taxonomies' => [],
155
+ 'hierarchical' => true,
156
+ 'public' => true,
157
+ 'show_in_menu' => false,
158
+ 'show_in_nav_menus' => false,
159
+ 'exclude_from_search' => true,
160
+ 'menu_position' => 36,
161
+ 'menu_icon' => 'dashicons-download',
162
+ 'can_export' => false,
163
+ 'has_archive' => false,
164
+ 'publicly_queryable' => true,
165
+ 'rewrite' => false,
166
+ 'capability_type' => 'post',
167
+ 'capabilities' => [
168
+ 'create_posts' => 'do_not_allow',
169
+ ],
170
+ 'map_meta_cap' => true,
171
+ ];
172
+ }
173
+
174
+
175
+ }
inc/class-elementor.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * Elementor core integration here.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Elementor registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Elementor extends Base {
24
+
25
+ /**
26
+ * Elementor constructor.
27
+ */
28
+ public function __construct() {
29
+
30
+ }
31
+
32
+ }
33
+
inc/class-feedback.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Feedback registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Feedback extends Base {
24
+
25
+ /**
26
+ * Feedback constructor.
27
+ */
28
+ public function __construct() {
29
+ parent::__construct();
30
+ add_action( 'admin_action_envato_elements_feedback', [ $this, 'envato_elements_feedback' ] );
31
+ }
32
+
33
+
34
+ public function page_view( $page, $data = '' ) {
35
+ API::get_instance()->api_call(
36
+ 'statistics/page_view', [
37
+ 'page' => $page,
38
+ 'data' => $data,
39
+ ]
40
+ );
41
+ }
42
+
43
+
44
+ public function envato_elements_feedback() {
45
+ check_admin_referer( 'feedback' );
46
+
47
+ switch ( $_GET['answer'] ) {
48
+ case 'yes':
49
+ update_option( 'envato_elements_feedback_photos', 'yes' );
50
+ API::get_instance()->api_call(
51
+ 'statistics/feedback', [
52
+ 'feedback' => 'photos',
53
+ 'answer' => 'yes',
54
+ ]
55
+ );
56
+ break;
57
+ case 'no':
58
+ update_option( 'envato_elements_feedback_photos', 'no' );
59
+ API::get_instance()->api_call(
60
+ 'statistics/feedback', [
61
+ 'feedback' => 'photos',
62
+ 'answer' => 'no',
63
+ ]
64
+ );
65
+ break;
66
+ }
67
+ wp_safe_redirect( admin_url( 'admin.php?page=envato-elements&category=photos' ) );
68
+
69
+ }
70
+
71
+ public function generate_form( $type = '' ) {
72
+
73
+ $url_yes = wp_nonce_url(
74
+ add_query_arg(
75
+ [
76
+ 'action' => 'envato_elements_feedback',
77
+ 'feedback' => 'photos',
78
+ 'answer' => 'yes',
79
+ ], admin_url( 'admin.php' )
80
+ ), 'feedback'
81
+ );
82
+
83
+ $url_no = wp_nonce_url(
84
+ add_query_arg(
85
+ [
86
+ 'action' => 'envato_elements_feedback',
87
+ 'feedback' => 'photos',
88
+ 'answer' => 'no',
89
+ ], admin_url( 'admin.php' )
90
+ ), 'feedback'
91
+ );
92
+
93
+ ob_start();
94
+ ?>
95
+ <section class="envato-elements__modal">
96
+ <div class="envato-elements__modal-inner">
97
+ <div class="envato-elements__modal-inner-bg">
98
+ <?php if ( get_option( 'envato_elements_feedback_photos' ) ) { ?>
99
+ <h3 class="envato-elements__feedback-question">Thank you for your feedback.</h3>
100
+ <h3 class="envato-elements__feedback-question">We will let you know when Photos become available.</h3>
101
+ <?php } else { ?>
102
+ <h3
103
+ class="envato-elements__feedback-question">Would having access to 500,000 Envato Elements Photos from within
104
+ WordPress be useful to you?</h3>
105
+ <div class="envato-elements__feedback-answers-wrap">
106
+ <a href="<?php echo esc_url( $url_yes ); ?>"><span><img
107
+ src="<?php echo ENVATO_ELEMENTS_URI . 'assets/images/thumbs-up.svg'; ?>"> </span><br>Yes</a>
108
+ <a href="<?php echo esc_url( $url_no ); ?>"><span><img
109
+ src="<?php echo ENVATO_ELEMENTS_URI . 'assets/images/thumbs-down.svg'; ?>"></span><br>No</a>
110
+ </div>
111
+ <?php } ?>
112
+ </div>
113
+ </div>
114
+ </section>
115
+ <?php
116
+ return ob_get_clean();
117
+ }
118
+
119
+ }
inc/class-import.php ADDED
@@ -0,0 +1,902 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+ /**
18
+ * Handles importing our custom designs.
19
+ *
20
+ * Class Import
21
+ */
22
+ class Import extends Base {
23
+
24
+ public $logs = [];
25
+ public $errors = [];
26
+ private $_import_ids = false; // todo: move these to options table.
27
+ private $_import_id_namespace = 'all';
28
+ private $local_image_files = [];
29
+
30
+ public function import_data( $template, $import_settings ) {
31
+
32
+ $imported_data = [
33
+ 'post_id' => false,
34
+ 'media' => [],
35
+ ];
36
+
37
+ set_time_limit( 600 );
38
+
39
+ $this->_import_id_namespace = ! empty( $import_settings['transient_namespace'] ) ? $import_settings['transient_namespace'] : 'all';
40
+ $this->log("Setting transient namespace: " . $this->_import_id_namespace);
41
+
42
+ if ( $template && ! empty( $template['post_content'] ) ) {
43
+
44
+ if ( ! empty( $template['media'] ) ) {
45
+
46
+ // see if we can download the zip with all our thumbs first.
47
+ $temporary_zip_file = false;
48
+ $temporary_zip_folder = false;
49
+ $this->local_image_files = [];
50
+ if ( ! empty( $template['media_zip'] ) ) {
51
+
52
+ $this->log("Downloading ZIP ".$template['media_zip']);
53
+
54
+ if ( class_exists( '\ZipArchive' ) ) {
55
+ $wp_upload_dir = wp_upload_dir();
56
+ $temp_path = $wp_upload_dir['basedir'] . '/elements';
57
+ wp_mkdir_p( $temp_path );
58
+ $this->log(" extracting to ".$temp_path);
59
+ $temporary_name = 'template-' . (int) $template['post_id'] . '-' . time() . '';
60
+
61
+ require_once( ABSPATH . '/wp-admin/includes/file.php' );
62
+ require_once( ABSPATH . '/wp-admin/includes/media.php' );
63
+ require_once( ABSPATH . '/wp-admin/includes/image.php' );
64
+
65
+ $temporary_zip_file = download_url( $template['media_zip'], 30 );
66
+ if ( ! is_wp_error( $temporary_zip_file ) ) {
67
+
68
+ // Download and save worked, see if we can extract these images ready for import.
69
+ $temporary_zip_folder = $temp_path . '/' . $temporary_name . '/';
70
+ wp_mkdir_p( $temporary_zip_folder );
71
+ $this->log(" extracting to ".$temporary_zip_folder);
72
+
73
+ $zip = new \ZipArchive();
74
+ $zip->open( $temporary_zip_file );
75
+ $zip->extractTo( $temporary_zip_folder );
76
+ $zip->close();
77
+ $this->log(" removing temp zip ".$temporary_zip_file);
78
+ unlink( $temporary_zip_file );
79
+
80
+ $file_names = array_diff( scandir( $temporary_zip_folder ), [ '.', '..' ] );
81
+ $this->log(" got these files: ".implode(', ',$file_names));
82
+
83
+ foreach ( $file_names as $file_name ) {
84
+ $this->local_image_files[ $file_name ] = $temporary_zip_folder . $file_name;
85
+ }
86
+
87
+
88
+ } else {
89
+ $this->error("Failed to download zip file: " . $temporary_zip_file->get_error_message() );
90
+ // bad response
91
+ }
92
+
93
+ } else {
94
+ // no zip source
95
+ $this->error("No zip found");
96
+ }
97
+
98
+ }
99
+
100
+ // import attachments first before the actual content that will use them.
101
+ foreach ( $template['media'] as $data ) {
102
+ // See if we have a local file for this
103
+ if ( ! empty( $data['url'] ) ) {
104
+ $result = $this->_process_post_data( 'attachment', $data );
105
+ if ( $result && ! is_wp_error( $result ) ) {
106
+ $imported_data['media'][] = $result;
107
+ }
108
+ }
109
+ }
110
+
111
+ if ( $temporary_zip_folder ) {
112
+ // todo: remove entire folder.
113
+ $temporary_zip_folder = false;
114
+ }
115
+ unset( $template['media'] );
116
+ }
117
+ if ( ! isset( $template['meta'] ) ) {
118
+ $template['meta'] = [];
119
+ }
120
+ if ( ! empty( $import_settings['post_meta'] ) ) {
121
+ $template['meta'] = array_merge( $template['meta'], $import_settings['post_meta'] );
122
+ }
123
+ $result = $this->_process_post_data( ! empty( $import_settings['post_type'] ) ? $import_settings['post_type'] : 'page', $template );
124
+ if ( $result && ! is_wp_error( $result ) ) {
125
+ // this should be a post ID of the imported template ID.
126
+ $imported_data['post_id'] = $result;
127
+ }
128
+
129
+ $this->_handle_post_orphans();
130
+
131
+ }
132
+
133
+ $imported_data['log'] = $this->logs;
134
+ $imported_data['error'] = $this->errors;
135
+
136
+ return $imported_data;
137
+
138
+ }
139
+
140
+ public function _wp_slash_objects( $value ) {
141
+ return is_string( $value ) ? addslashes( $value ) : $value;
142
+ }
143
+
144
+ private $registered_image_sizes;
145
+
146
+ public function stop_thumb_resizing( $sizes ) {
147
+ $this->registered_image_sizes = $sizes;
148
+
149
+ return [];
150
+ }
151
+
152
+ private function _process_post_data( $post_type, $post_data, $delayed = 0, $debug = false ) {
153
+
154
+ $post_id = false;
155
+ if ( ! is_array( $post_data ) ) {
156
+ return false;
157
+ }
158
+ if ( ! isset( $post_data['post_id'] ) ) {
159
+ $post_data['post_id'] = 0;
160
+ }
161
+
162
+ require_once ABSPATH . 'wp-admin/includes/image.php';
163
+
164
+ $this->log( " Processing $post_type " . $post_data['post_id'] );
165
+ $original_post_data = $post_data;
166
+
167
+ if ( $debug ) {
168
+ echo "HERE\n";
169
+ }
170
+ if ( ! post_type_exists( $post_type ) ) {
171
+ return false;
172
+ }
173
+
174
+ if ( ! isset( $post_data['post_status'] ) ) {
175
+ $post_data['post_status'] = 'publish';
176
+ }
177
+ if ( empty( $post_data['post_title'] ) && empty( $post_data['post_name'] ) ) {
178
+ // this is menu items
179
+ $post_data['post_name'] = $post_data['post_id'];
180
+ }
181
+
182
+ $post_data['post_type'] = $post_type;
183
+
184
+ $post_parent = isset( $post_data['post_parent'] ) ? (int) $post_data['post_parent'] : 0;
185
+ if ( $post_data['post_id'] && $post_parent ) {
186
+ // if we already know the parent, map it to the new local ID
187
+ if ( $this->_imported_post_id( $post_parent ) ) {
188
+ $post_data['post_parent'] = $this->_imported_post_id( $post_parent );
189
+ // otherwise record the parent for later
190
+ } else {
191
+ $this->_post_orphans( intval( $post_data['post_id'] ), $post_parent );
192
+ $post_data['post_parent'] = 0;
193
+ }
194
+ }
195
+
196
+ // give them all todays post date
197
+ $post_data['post_date_gmt'] = current_time( 'mysql', 1 );
198
+ $post_data['post_date'] = current_time( 'mysql', 0 );
199
+
200
+ switch ( $post_type ) {
201
+ case 'attachment':
202
+ // import media via url
203
+ if ( ! empty( $post_data['guid'] ) ) {
204
+
205
+ // check if this has already been imported.
206
+ $remote_url = ! empty( $post_data['url'] ) ? $post_data['url'] : $post_data['guid'];
207
+
208
+ global $wpdb;
209
+ $existing_image = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE meta_key = '_envato_image_source' AND meta_value = %s LIMIT 1", $remote_url ), ARRAY_A );
210
+ if ( $existing_image && ! empty( $existing_image[0]['post_id'] ) ) {
211
+
212
+ $this->log("Found existing image " . $existing_image[0]['post_id'] . " for a search on $remote_url ");
213
+ $post_id = $existing_image[0]['post_id'];
214
+
215
+ } else {
216
+
217
+ $this->log("No existing image found for $remote_url ");
218
+
219
+ $post_data['upload_date'] = date( 'Y/m', strtotime( $post_data['post_date_gmt'] ) );
220
+ $upload = $this->_fetch_remote_file( $remote_url, $post_data );
221
+
222
+ if ( ! is_array( $upload ) || is_wp_error( $upload ) ) {
223
+ $this->error("Failed to get $remote_url for some reason ");
224
+ return $upload;
225
+ }
226
+
227
+ $info = wp_check_filetype( $upload['file'] );
228
+ if ( $info ) {
229
+ $post_data['post_mime_type'] = $info['type'];
230
+ } else {
231
+ $this->error("Failed to get image data for " . $upload['file']);
232
+ return false;
233
+ }
234
+
235
+ $post_data['guid'] = $upload['url'];
236
+
237
+ // as per wp-admin/includes/upload.php
238
+ $post_id = wp_insert_attachment( $post_data, $upload['file'] );
239
+ if ( $post_id ) {
240
+
241
+ $this->log("Converted image into attachment $post_id ");
242
+
243
+ // Disable thumbnail generation if we have some local thumbnails provided.
244
+ if ( ! empty( $upload['possible_thumbnails'] ) ) {
245
+ add_filter( 'intermediate_image_sizes_advanced', [ $this, 'stop_thumb_resizing' ], 99, 1 );
246
+ $attachment_meta = wp_generate_attachment_metadata( $post_id, $upload['file'] );
247
+
248
+ $regenerate_certain_sizes = [];
249
+
250
+ $editor = wp_get_image_editor( $upload['file'] );
251
+ if ( ! is_wp_error( $editor ) ) {
252
+
253
+ $current_thumb_size = $editor->get_size();
254
+ if ( $current_thumb_size && $current_thumb_size['width'] > 0 && $current_thumb_size['height'] > 0 ) {
255
+
256
+ $current_thumb_extension = strtolower( pathinfo( $upload['file'], PATHINFO_EXTENSION ) );
257
+ $current_thumb_basename = wp_basename( $upload['file'], ".$current_thumb_extension" );
258
+
259
+ if ( empty( $attachment_meta['sizes'] ) ) {
260
+ $attachment_meta['sizes'] = [];
261
+ }
262
+ foreach ( $this->registered_image_sizes as $size_name => $size_details ) {
263
+ $found_image_size = false;
264
+ $dims = image_resize_dimensions( $current_thumb_size['width'], $current_thumb_size['height'], $size_details['width'], $size_details['height'], false );
265
+ if ( $dims ) {
266
+ list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ) = $dims;
267
+ if ( $dst_w && $dst_h ) {
268
+ foreach ( $upload['possible_thumbnails'] as $possible_thumbnail ) {
269
+ if ( $possible_thumbnail['width'] === $dst_w && $possible_thumbnail['height'] === $dst_h ) {
270
+ // move the file across into the right location:
271
+ $thumb_folder = dirname( $upload['file'] );
272
+ $new_thumb_file_name = $current_thumb_basename . '-' . $dst_w . 'x' . $dst_h . '.jpg';
273
+ if ( copy( $possible_thumbnail['path'], $thumb_folder . '/' . $new_thumb_file_name ) ) {
274
+
275
+ $this->log("Used ZIP asset for ${dst_w}x${dst_h} thumbnail ");
276
+
277
+ $attachment_meta['sizes'][ $size_name ] = [
278
+ 'file' => $new_thumb_file_name,
279
+ 'width' => $dst_w,
280
+ 'height' => $dst_h,
281
+ 'mime-type' => 'image/jpeg',
282
+ ];
283
+ $found_image_size = true;
284
+ }
285
+
286
+ }
287
+ }
288
+ }
289
+ }
290
+ if ( ! $found_image_size ) {
291
+ $this->log("No ZIP asset found for size $size_name, generating manually ");
292
+ $regenerate_certain_sizes[ $size_name ] = $size_details;
293
+ }
294
+ }
295
+ }
296
+
297
+ }
298
+
299
+ // This generates any missing thumb sizes from the provided zip.
300
+ if ( $regenerate_certain_sizes ) {
301
+ $generated_meta_sizes = $editor->multi_resize( $regenerate_certain_sizes );
302
+ if ( $generated_meta_sizes ) {
303
+ $attachment_meta['sizes'] = array_merge( $attachment_meta['sizes'], $generated_meta_sizes );
304
+ }
305
+ }
306
+
307
+ wp_update_attachment_metadata( $post_id, $attachment_meta );
308
+ remove_filter( 'intermediate_image_sizes_advanced', [ $this, 'stop_thumb_resizing' ], 99 );
309
+
310
+ } else {
311
+ // otherwise we generate all the things normally.
312
+ $this->log("No ZIP assets found at all, generating them all.");
313
+ $attachment_meta = wp_generate_attachment_metadata( $post_id, $upload['file'] );
314
+ wp_update_attachment_metadata( $post_id, $attachment_meta );
315
+
316
+ }
317
+
318
+
319
+ // remap resized image URLs, works by stripping the extension and remapping the URL stub.
320
+ if ( preg_match( '!^image/!', $info['type'] ) ) {
321
+ $parts = pathinfo( $remote_url );
322
+ $name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2
323
+
324
+ $parts_new = pathinfo( $upload['url'] );
325
+ $name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" );
326
+
327
+ $this->_imported_post_id( $parts['dirname'] . '/' . $name, $parts_new['dirname'] . '/' . $name_new );
328
+ }
329
+ }
330
+ }
331
+
332
+ if ( $post_id ) {
333
+
334
+ $this->_imported_post_id( $remote_url, wp_get_attachment_url( $post_id ) );
335
+ $this->_imported_post_id( $post_data['guid'], wp_get_attachment_url( $post_id ) );
336
+
337
+ if ( ! empty( $post_data['meta'] ) ) {
338
+ foreach ( $post_data['meta'] as $meta_key => $meta_val ) {
339
+ if ( '_wp_attached_file' !== $meta_key && ! empty( $meta_val ) ) {
340
+ update_post_meta( $post_id, $meta_key, map_deep( $meta_val, [ $this, '_wp_slash_objects' ] ) );
341
+ }
342
+ }
343
+ }
344
+
345
+ $this->_imported_post_id( $post_data['post_id'], $post_id );
346
+ }
347
+ }
348
+ break;
349
+ default:
350
+ // work out if we have to delay this post insertion
351
+ if ( ! empty( $post_data['meta'] ) && is_array( $post_data['meta'] ) ) {
352
+
353
+ foreach ( [ '_fl_builder_data', '_fl_builder_data_settings' ] as $serialize_key ) {
354
+ if ( ! empty( $post_data['meta'][ $serialize_key ] ) ) {
355
+ $post_data['meta'][ $serialize_key ] = maybe_unserialize( $post_data['meta'][ $serialize_key ] );
356
+ }
357
+ }
358
+
359
+ // fix for double json encoded stuff:
360
+ foreach ( $post_data['meta'] as $meta_key => $meta_val ) {
361
+ if ( is_string( $meta_val ) && strlen( $meta_val ) && '[' === $meta_val[0] ) {
362
+ $test_json = json_decode( $meta_val, true );
363
+ if ( is_array( $test_json ) ) {
364
+ $post_data['meta'][ $meta_key ] = $test_json;
365
+ }
366
+ }
367
+ }
368
+
369
+ array_walk_recursive( $post_data['meta'], [ $this, '_elementor_id_import' ] );
370
+ }
371
+
372
+ $post_data['post_content'] = $this->_parse_gallery_shortcode_content( $post_data['post_content'] );
373
+
374
+ // we have to fix up all the visual composer inserted image ids
375
+ $replace_post_id_keys = [
376
+ 'parallax_image',
377
+ 'dtbwp_row_image_top',
378
+ 'dtbwp_row_image_bottom',
379
+ 'image',
380
+ 'item', // vc grid
381
+ 'post_id',
382
+ ];
383
+ foreach ( $replace_post_id_keys as $replace_key ) {
384
+ if ( preg_match_all( '# ' . $replace_key . '="(\d+)"#', $post_data['post_content'], $matches ) ) {
385
+ foreach ( $matches[0] as $match_id => $string ) {
386
+ $new_id = $this->_imported_post_id( $matches[1][ $match_id ] );
387
+ if ( $new_id ) {
388
+ $post_data['post_content'] = str_replace( $string, ' ' . $replace_key . '="' . $new_id . '"', $post_data['post_content'] );
389
+ } else {
390
+ $this->error( 'Unable to find POST replacement for ' . $replace_key . '="' . $matches[1][ $match_id ] . '" in content.' );
391
+ if ( $delayed ) {
392
+ // already delayed, unable to find this meta value, insert it anyway.
393
+ } else {
394
+
395
+ $this->error( 'Adding ' . $post_data['post_id'] . ' to delay listing.' );
396
+
397
+ return false;
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+
404
+ if ( ! empty( $post_data['Update_Existing_ID'] ) ) {
405
+ $existing = get_post( $post_data['Update_Existing_ID'] );
406
+ if ( $existing && $existing->post_type === $post_type ) {
407
+ $post_data['ID'] = $post_data['Update_Existing_ID'];
408
+ unset( $post_data['Update_Existing_ID'] );
409
+ $post_id = wp_update_post( $post_data, true );
410
+ } else {
411
+ die( 'Missmatch in post type' );
412
+ }
413
+ } else {
414
+ $post_id = wp_insert_post( $post_data, true );
415
+ }
416
+ if ( ! is_wp_error( $post_id ) && $post_id > 0 ) {
417
+ $this->_imported_post_id( $post_data['post_id'], $post_id );
418
+ // add/update post meta
419
+ if ( ! empty( $post_data['meta'] ) ) {
420
+ foreach ( $post_data['meta'] as $meta_key => $meta_val ) {
421
+ // if the post has a featured image, take note of this in case of remap
422
+ if ( '_thumbnail_id' === $meta_key ) {
423
+ // find this inserted id and use that instead.
424
+ $inserted_id = $this->_imported_post_id( intval( $meta_val ) );
425
+ if ( $inserted_id ) {
426
+ $meta_val = $inserted_id;
427
+ }
428
+ }
429
+ update_post_meta( $post_id, $meta_key, map_deep( $meta_val, [ $this, '_wp_slash_objects' ] ) );
430
+ }
431
+ }
432
+
433
+ if ( ! empty( $post_data['meta']['_elementor_data'] ) || ! empty( $post_data['meta']['_elementor_css'] ) ) {
434
+ $this->elementor_post( $post_id );
435
+ }
436
+
437
+ // Trigger post save so any plugins etc..that hook in can do their thing.
438
+ // We might not need the elementor css thing above
439
+ wp_update_post(
440
+ [
441
+ 'ID' => $post_id,
442
+ ]
443
+ );
444
+ }
445
+
446
+ break;
447
+ }
448
+
449
+ return $post_id;
450
+ }
451
+
452
+ public function log( $message ) {
453
+ $this->logs[] = $message;
454
+ if(ENVATO_ELEMENTS_DEBUG){
455
+ file_put_contents('/tmp/elements-import-debug.txt', implode("\n",$this->logs));
456
+ }
457
+ }
458
+ public function error( $message ) {
459
+ $this->log( 'Error: ' . $message );
460
+ }
461
+
462
+ private function _imported_post_id( $original_id = false, $new_id = false ) {
463
+ if ( is_array( $original_id ) || is_object( $original_id ) ) {
464
+ return false;
465
+ }
466
+ $this->_import_ids = get_transient( 'envatoelementspostids' );
467
+ if ( ! is_array( $this->_import_ids ) ) {
468
+ $this->_import_ids = [];
469
+ }
470
+ if ( ! isset( $this->_import_ids[ $this->_import_id_namespace ] ) ) {
471
+ $this->_import_ids[ $this->_import_id_namespace ] = [];
472
+ }
473
+ if ( $original_id && $new_id ) {
474
+ if ( ! isset( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] ) ) {
475
+ $this->log( 'Insert old ID ' . $original_id . ' as new ID: ' . $new_id );
476
+ } elseif ( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] !== $new_id ) {
477
+ $this->error( 'Replacement OLD ID ' . $original_id . ' changed from ' . $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] .' to new ID: ' . $new_id );
478
+ }
479
+ $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] = $new_id;
480
+ set_transient( 'envatoelementspostids', $this->_import_ids, 60 * 60 * 24 ); // todo: save to options in a collection namespace.
481
+ } elseif ( $original_id && isset( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] ) ) {
482
+ if ( is_numeric( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] ) && intval( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] ) === $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] ) {
483
+ // we're doing a post ID, make sure it still exists before returning it
484
+ // ie if someone deleted it.
485
+ $existing = get_post( $this->_import_ids[ $this->_import_id_namespace ][ $original_id ] );
486
+ if ( ! $existing || ( 'inherit' !== $existing->post_status && 'publish' !== $existing->post_status && 'draft' !== $existing->post_status ) ) {
487
+ return false;
488
+ }
489
+ } else {
490
+ // ensure the media file still exists based on guid.
491
+ }
492
+
493
+ return $this->_import_ids[ $this->_import_id_namespace ][ $original_id ];
494
+ } elseif ( false === $original_id ) {
495
+ return $this->_import_ids[ $this->_import_id_namespace ];
496
+ }
497
+
498
+ return false;
499
+ }
500
+
501
+ private function _post_orphans( $original_id = false, $missing_parent_id = false ) {
502
+ $post_ids = get_transient( 'envatoelementspostorphans' );
503
+ if ( ! is_array( $post_ids ) ) {
504
+ $post_ids = [];
505
+ }
506
+ if ( $missing_parent_id ) {
507
+ $post_ids[ $original_id ] = $missing_parent_id;
508
+ set_transient( 'envatoelementspostorphans', $post_ids, 60 * 60 );
509
+ } elseif ( $original_id && isset( $post_ids[ $original_id ] ) ) {
510
+ return $post_ids[ $original_id ];
511
+ } elseif ( false === $original_id ) {
512
+ return $post_ids;
513
+ }
514
+
515
+ return false;
516
+ }
517
+
518
+ private function _fetch_remote_file( $url, $post ) {
519
+ // extract the file name and extension from the url
520
+ $file_name = basename( $url );
521
+ $upload = false;
522
+
523
+ $this->log("Importing $file_name ");
524
+ if ( $file_name && ! empty( $this->local_image_files[ $file_name ] ) && file_exists( $this->local_image_files[ $file_name ] ) && filesize( $this->local_image_files[ $file_name ] ) > 10 ) {
525
+ $this->log("Found $file_name in ZIP cache");
526
+
527
+ $file_data = file_get_contents( $this->local_image_files[ $file_name ] );
528
+ $upload = wp_upload_bits( $file_name, 0, $file_data, $post['upload_date'] );
529
+ if ( ! $upload || $upload['error'] ) {
530
+ return new \WP_Error( 'upload_dir_error', $upload['error'] );
531
+ }
532
+
533
+ $file_ext = strtolower( pathinfo( $this->local_image_files[ $file_name ], PATHINFO_EXTENSION ) );
534
+ $file_name_no_extension = wp_basename( $file_name, ".$file_ext" );
535
+
536
+ $upload['possible_thumbnails'] = [];
537
+ foreach ( $this->local_image_files as $possible_thumb_name => $possible_thumb_path ) {
538
+
539
+ if ( preg_match( '#' . preg_quote( $file_name_no_extension, '#' ) . '-(\d+)x(\d+)\.\w{3}#', $possible_thumb_name, $matches ) ) {
540
+ $upload['possible_thumbnails'][] = [
541
+ 'name' => $possible_thumb_name,
542
+ 'path' => $possible_thumb_path,
543
+ 'width' => (int) $matches[1],
544
+ 'height' => (int) $matches[2],
545
+ ];
546
+ }
547
+ }
548
+
549
+ return $upload;
550
+ }
551
+
552
+ $this->log(" $file_name NOT found in ZIP cache, downloading separately. ");
553
+
554
+ if ( ! $upload || $upload['error'] ) {
555
+ // get placeholder file in the upload dir with a unique, sanitized filename
556
+ $upload = wp_upload_bits( $file_name, 0, '', $post['upload_date'] );
557
+ if ( $upload['error'] ) {
558
+ $this->error("Failed to create temp file " . $upload['error']);
559
+ return new \WP_Error( 'upload_dir_error', $upload['error'] );
560
+ }
561
+
562
+ // fetch the remote url and write it to the placeholder file
563
+ // $headers = wp_get_http( $url, $upload['file'] );
564
+ $max_size = (int) apply_filters( 'import_attachment_size_limit', 0 );
565
+
566
+ // we check if this file is uploaded locally in the source folder.
567
+ $this->log("Downloading $url ");
568
+ $response = wp_safe_remote_get(
569
+ $url, [
570
+ 'timeout' => 6,
571
+ 'sslverify' => false, // Some hosts require this unfortunately :(
572
+ 'user-agent' => 'Mozilla/5.0 (Envato Elements ' . ENVATO_ELEMENTS_VER . ';) ' . home_url(),
573
+ ]
574
+ );
575
+ if ( is_array( $response ) && ! empty( $response['body'] ) && 200 === intval( $response['response']['code'] ) ) {
576
+ require_once ABSPATH . 'wp-admin/includes/file.php';
577
+ $headers = $response['headers'];
578
+ WP_Filesystem();
579
+ global $wp_filesystem;
580
+ $wp_filesystem->put_contents( $upload['file'], $response['body'] );
581
+ } else {
582
+ // required to download file failed.
583
+ unlink( $upload['file'] );
584
+
585
+ return new \WP_Error( 'import_file_error', esc_html__( 'Remote server did not respond', 'envato-elements' ) );
586
+ }
587
+
588
+ $filesize = filesize( $upload['file'] );
589
+
590
+ if ( isset( $headers['content-length'] ) && intval( $filesize ) !== intval( $headers['content-length'] ) ) {
591
+ unlink( $upload['file'] );
592
+
593
+ return new \WP_Error( 'import_file_error', esc_html__( 'Remote file is incorrect size', 'envato-elements' ) );
594
+ }
595
+
596
+ if ( 0 === $filesize ) {
597
+ unlink( $upload['file'] );
598
+
599
+ return new \WP_Error( 'import_file_error', esc_html__( 'Zero size file downloaded', 'envato-elements' ) );
600
+ }
601
+
602
+ if ( ! empty( $max_size ) && $filesize > $max_size ) {
603
+ unlink( $upload['file'] );
604
+
605
+ // translators: %s is file size limit (e.g. 100MB)
606
+ return new \WP_Error( 'import_file_error', sprintf( esc_html__( 'Remote file is too large, limit is %s', 'envato-elements' ), size_format( $max_size ) ) );
607
+ }
608
+ }
609
+
610
+ return $upload;
611
+ }
612
+
613
+ private function _parse_gallery_shortcode_content( $content ) {
614
+ // we have to format the post content. rewriting images and gallery stuff
615
+ $replace = $this->_imported_post_id();
616
+ $urls_replace = [];
617
+ foreach ( $replace as $key => $val ) {
618
+ if ( $key && $val && ! is_numeric( $key ) && ! is_numeric( $val ) ) {
619
+ $urls_replace[ $key ] = $val;
620
+ }
621
+ }
622
+ if ( $urls_replace ) {
623
+ uksort( $urls_replace, [ &$this, 'cmpr_strlen' ] );
624
+ foreach ( $urls_replace as $from_url => $to_url ) {
625
+ $content = str_replace( $from_url, $to_url, $content );
626
+ }
627
+ }
628
+ if ( preg_match_all( '#\[gallery[^\]]*\]#', $content, $matches ) ) {
629
+ foreach ( $matches[0] as $match_id => $string ) {
630
+ if ( preg_match( '#ids="([^"]+)"#', $string, $ids_matches ) ) {
631
+ $ids = explode( ',', $ids_matches[1] );
632
+ foreach ( $ids as $key => $val ) {
633
+ $new_id = $val ? $this->_imported_post_id( $val ) : false;
634
+ if ( ! $new_id ) {
635
+ unset( $ids[ $key ] );
636
+ } else {
637
+ $ids[ $key ] = $new_id;
638
+ }
639
+ }
640
+ $new_ids = implode( ',', $ids );
641
+ $content = str_replace( $ids_matches[0], 'ids="' . $new_ids . '"', $content );
642
+ }
643
+ }
644
+ }
645
+ // contact form 7 id fixes.
646
+ if ( preg_match_all( '#\[contact-form-7[^\]]*\]#', $content, $matches ) ) {
647
+ foreach ( $matches[0] as $match_id => $string ) {
648
+ if ( preg_match( '#id="(\d+)"#', $string, $id_match ) ) {
649
+ $new_id = $this->_imported_post_id( $id_match[1] );
650
+ if ( $new_id ) {
651
+ $content = str_replace( $id_match[0], 'id="' . $new_id . '"', $content );
652
+ } else {
653
+ // no imported ID found. remove this entry.
654
+ $content = str_replace( $matches[0], '(insert contact form here)', $content );
655
+ }
656
+ }
657
+ }
658
+ }
659
+
660
+ return $content;
661
+ }
662
+
663
+ public function elementor_post( $post_id = false ) {
664
+
665
+ // regenrate the CSS for this Elementor post
666
+ if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
667
+ $post_css = new \Elementor\Core\Files\CSS\Post( $post_id );
668
+ $post_css->update();
669
+ }
670
+
671
+ }
672
+
673
+
674
+ // return the difference in length between two strings
675
+ private function _handle_post_orphans() {
676
+ $orphans = $this->_post_orphans();
677
+ foreach ( $orphans as $original_post_id => $original_post_parent_id ) {
678
+ if ( $original_post_parent_id ) {
679
+ if ( $this->_imported_post_id( $original_post_id ) && $this->_imported_post_id( $original_post_parent_id ) ) {
680
+ $post_data = [];
681
+ $post_data['ID'] = $this->_imported_post_id( $original_post_id );
682
+ $post_data['post_parent'] = $this->_imported_post_id( $original_post_parent_id );
683
+ wp_update_post( $post_data );
684
+ $this->_post_orphans( $original_post_id, 0 ); // ignore future
685
+ }
686
+ }
687
+ }
688
+ }
689
+
690
+ public function cmpr_strlen( $a, $b ) {
691
+ return strlen( $b ) - strlen( $a );
692
+ }
693
+
694
+ private function _elementor_id_import( &$item, $key ) {
695
+ if ( 'id' === $key && ! empty( $item ) && is_numeric( $item ) ) {
696
+ // check if this has been imported before
697
+ $this->log(" - mapping ID $item ");
698
+ $new_meta_val = $this->_imported_post_id( $item );
699
+ if ( $new_meta_val ) {
700
+ $this->log(" --- mapped to $new_meta_val ");
701
+ $item = $new_meta_val;
702
+ }else{
703
+ $this->log(" --- Failed to map ID :( ");
704
+ }
705
+ }
706
+ if ( ( 'page' === $key || 'page_id' === $key ) && ! empty( $item ) ) {
707
+
708
+ if ( false !== strpos( $item, 'p.' ) ) {
709
+ $new_id = str_replace( 'p.', '', $item );
710
+ // check if this has been imported before
711
+ $new_meta_val = $this->_imported_post_id( $new_id );
712
+ if ( $new_meta_val ) {
713
+ $item = 'p.' . $new_meta_val;
714
+ }
715
+ } elseif ( is_numeric( $item ) ) {
716
+ // check if this has been imported before
717
+ $new_meta_val = $this->_imported_post_id( $item );
718
+ if ( $new_meta_val ) {
719
+ $item = $new_meta_val;
720
+ }
721
+ }
722
+ }
723
+ if ( 'post_id' === $key && ! empty( $item ) && is_numeric( $item ) ) {
724
+ // check if this has been imported before
725
+ $new_meta_val = $this->_imported_post_id( $item );
726
+ if ( $new_meta_val ) {
727
+ $item = $new_meta_val;
728
+ }
729
+ }
730
+ if ( 'url' === $key && ! empty( $item ) ) {
731
+ // check if this has been imported before
732
+ $new_meta_val = $this->_imported_post_id( $item );
733
+ if ( $new_meta_val ) {
734
+ $item = $new_meta_val;
735
+ }
736
+ }
737
+ if ( ( 'shortcode' === $key || 'editor' === $key ) && ! empty( $item ) ) {
738
+ // we have to fix the [contact-form-7 id=133] shortcode issue.
739
+ $item = $this->_parse_gallery_shortcode_content( $item );
740
+
741
+ }
742
+ }
743
+
744
+
745
+ /**
746
+ * Check if a given request has access to update a setting
747
+ *
748
+ * @param\ WP_REST_Request $request Full data about the request.
749
+ *
750
+ * @return \WP_Error|bool
751
+ */
752
+ public function rest_permission_check( $request ) {
753
+ return current_user_can( 'edit_posts' );
754
+ }
755
+
756
+ /**
757
+ * This registers all our WP REST API endpoints for the react front end
758
+ *
759
+ * @param $namespace
760
+ */
761
+
762
+ public function init_rest_endpoints( $namespace ) {
763
+
764
+ $endpoints = [
765
+ '/import/status' => [
766
+ \WP_REST_Server::READABLE => 'rest_get_imports',
767
+ ],
768
+ '/import/get_pages' => [
769
+ \WP_REST_Server::READABLE => 'rest_get_pages',
770
+ ],
771
+ ];
772
+
773
+ foreach ( $endpoints as $endpoint => $details ) {
774
+ foreach ( $details as $method => $callback ) {
775
+ register_rest_route(
776
+ $namespace, $endpoint, [
777
+ [
778
+ 'methods' => $method,
779
+ 'callback' => [ $this, $callback ],
780
+ 'permission_callback' => [ $this, 'rest_permission_check' ],
781
+ 'args' => [],
782
+ ],
783
+ ]
784
+ );
785
+ }
786
+ }
787
+
788
+ }
789
+
790
+ /**
791
+ * Import a template via the REST api
792
+ *
793
+ * @param \WP_REST_Request $request Full data about the request.
794
+ *
795
+ * @return \WP_Error|\WP_REST_Response
796
+ */
797
+ public function rest_get_imports( $request ) {
798
+
799
+ $result = [
800
+ 'data' => [
801
+ 'count' => 0,
802
+ 'pending_import_count' => 0,
803
+ 'pending_insert_count' => 0,
804
+ 'importing' => false,
805
+ 'inserting' => false,
806
+ 'imports' => [],
807
+ ],
808
+ ];
809
+
810
+ // For now we just process 1 template per request. We apply a lock on a template using a post meta field to help reduce double ups if two tabs are open.
811
+ $all_templates = CPT_Kits::get_instance()->get_imported_templates();
812
+ if ( $all_templates ) {
813
+ $pending_import_count = 0;
814
+ $pending_insert_count = 0;
815
+
816
+ // Only process one template at a time.
817
+ $next_to_process = false;
818
+ $processing_already = 0;
819
+ $processing_items = [];
820
+ $meta_lock_key = 'elements_import_lock';
821
+ $meta_lock_timeout = '2 minutes';
822
+
823
+ foreach ( $all_templates as $template_id => $template ) {
824
+ if ( ! $template['imported'] ) {
825
+ $pending_import_count ++;
826
+ $lock_status = get_post_meta( $template['ID'], $meta_lock_key, true );
827
+ if ( $lock_status && $lock_status >= strtotime( '-' . $meta_lock_timeout ) ) {
828
+ $processing_already ++;
829
+ $template['time'] = $lock_status - strtotime( '-' . $meta_lock_timeout );
830
+ $processing_items[] = $template;
831
+ } elseif ( ! $next_to_process ) {
832
+ $next_to_process = $template;
833
+ }
834
+ }
835
+ if ( ! empty( $template['inserted'] ) ) {
836
+ // array of insert requests (pending or completed)
837
+ foreach ( $template['inserted'] as $insert ) {
838
+ if ( ! $insert['completed'] ) {
839
+ $pending_insert_count ++;
840
+ }
841
+ }
842
+ }
843
+ }
844
+
845
+ if ( $next_to_process && ! $processing_already ) {
846
+ update_post_meta( $next_to_process['ID'], $meta_lock_key, time() );
847
+ }
848
+
849
+ $result['data']['count'] = count( $all_templates );
850
+ $result['data']['processing_import_count'] = $processing_already;
851
+ $result['data']['processing_imports'] = $processing_items;
852
+ $result['data']['pending_import_count'] = $pending_import_count;
853
+ $result['data']['pending_insert_count'] = $pending_insert_count;
854
+ $result['data']['importing'] = ! ! $processing_already;
855
+ $result['data']['inserting'] = ! ! $pending_insert_count;
856
+ $result['data']['imports'] = $all_templates;
857
+ $result['data']['next_to_process'] = $next_to_process;
858
+ }
859
+
860
+ return new \WP_REST_Response( $result, 200 );
861
+
862
+ }
863
+
864
+ private function _get_nested_pages( $parent = 0, $pages, $nested = 0 ) {
865
+ $return = [];
866
+ foreach ( $pages as $page ) {
867
+ if ( $parent === $page->post_parent ) {
868
+ $return[] = [
869
+ 'ID' => $page->ID,
870
+ 'post_title' => str_repeat( '- ', $nested ) . $page->post_title,
871
+ ];
872
+ // find nested children.
873
+ $return = array_merge( $return, $this->_get_nested_pages( $page->ID, $pages, $nested + 1 ) );
874
+ }
875
+ }
876
+
877
+ return $return;
878
+ }
879
+
880
+ /**
881
+ * Get a list of pages for inserting content on.
882
+ *
883
+ * @param \WP_REST_Request $request Template ID we wish to insert on
884
+ *
885
+ * @return \WP_Error|\WP_REST_Response
886
+ */
887
+ public function rest_get_pages( $request ) {
888
+
889
+ $result = [
890
+ 'pageList' => [],
891
+ ];
892
+
893
+ $pages = get_pages();
894
+ $result['pageList'] = $this->_get_nested_pages( 0, $pages );
895
+
896
+ return new \WP_REST_Response( $result, 200 );
897
+
898
+ }
899
+
900
+
901
+ }
902
+
inc/class-insert.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+ /**
18
+ * Handles inserting our custom designs.
19
+ *
20
+ * Class Insert
21
+ */
22
+ class Insert extends Base {
23
+
24
+
25
+ }
26
+
inc/class-license.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * License registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class License extends Base {
24
+
25
+ const PAGE_SLUG = 'envato-elements-activation';
26
+
27
+ /**
28
+ * License constructor.
29
+ */
30
+ public function __construct() {
31
+ add_action( 'admin_action_envato_elements_registration', [ $this, 'envato_elements_registration' ] );
32
+ add_action( 'admin_action_envato_elements_deactivate', [ $this, 'envato_elements_deactivate' ] );
33
+
34
+ // Add the license key to all API requests.
35
+ add_filter( 'envato_elements_api_body_args', [ $this, 'filter_api_body_args' ] );
36
+
37
+ }
38
+
39
+ /**
40
+ * Called when the user visits our menu item without registering.
41
+ * Displays the welcome screen.
42
+ */
43
+ public function admin_menu_open() {
44
+ $this->content = $this->render_template( 'license/welcome.php' );
45
+ $this->header = $this->render_template( 'header.php' );
46
+ echo $this->render_template( 'wrapper.php' ); // WPCS: XSS ok.
47
+ }
48
+
49
+ /**
50
+ * Gets the current license code.
51
+ *
52
+ * @return string Code
53
+ */
54
+ public function get_license_code() {
55
+ $codes = get_option( 'envato_elements_license_code' );
56
+ // Edit: we want a code per user.
57
+ if ( ! is_array( $codes ) ) {
58
+ $codes = [];
59
+ }
60
+ if ( ! empty( $codes[ get_current_user_id() ] ) ) {
61
+ return $codes[ get_current_user_id() ];
62
+ }
63
+
64
+ return false;
65
+ }
66
+
67
+ /**
68
+ * Sets current license code.
69
+ *
70
+ * @param string $license_code Code to save.
71
+ */
72
+ public function set_license_code( $license_code ) {
73
+ $codes = get_option( 'envato_elements_license_code' );
74
+ // Edit: we want a code per user.
75
+ if ( ! is_array( $codes ) ) {
76
+ $codes = [];
77
+ }
78
+ $codes[ get_current_user_id() ] = $license_code;
79
+ return update_option( 'envato_elements_license_code', $codes );
80
+ }
81
+
82
+ /**
83
+ * Works out if user has registered.
84
+ *
85
+ * @return bool
86
+ */
87
+ public function is_activated() {
88
+ return ! ! $this->get_license_code();
89
+ }
90
+
91
+ /**
92
+ * Filter API body arguments on every outbound request to Envato server.
93
+ * Allows us to add the users API key to all API requests so we can verify clients.
94
+ *
95
+ * @param array $body_args API args.
96
+ *
97
+ * @return array
98
+ */
99
+ public function filter_api_body_args( $body_args ) {
100
+ $license_code = $this->get_license_code();
101
+
102
+ if ( ! empty( $license_code ) ) {
103
+ $body_args['license_code'] = $license_code;
104
+ }
105
+
106
+ return $body_args;
107
+ }
108
+
109
+ /**
110
+ * Handles the form registration from the Welcome screen.
111
+ */
112
+ public function envato_elements_registration() {
113
+ check_admin_referer( 'envato_elements_signup' );
114
+
115
+ $email = ! empty( $_POST['email_address'] ) ? filter_var( wp_unslash( $_POST['email_address'] ), FILTER_SANITIZE_EMAIL ) : false; // WPCS: input var ok.
116
+ if ( empty( $_POST['condition_terms'] ) ) { // WPCS: input var ok.
117
+ wp_safe_redirect( add_query_arg( 'registration', 'terms', Plugin::get_instance()->get_url() ) );
118
+ } elseif ( $email ) {
119
+ // Activate email against this install.
120
+ $activation_result = API::get_instance()->api_call(
121
+ 'activate', [
122
+ 'email' => $email,
123
+ 'condition_terms' => ! empty( $_POST['condition_terms'] ) ? 1 : 0, // WPCS: input var ok.
124
+ 'condition_emails' => ! empty( $_POST['condition_emails'] ) ? 1 : 0, // WPCS: input var ok.
125
+ ], true
126
+ );
127
+ if ( $activation_result && ! is_wp_error( $activation_result ) && ! empty( $activation_result['license_code'] ) ) {
128
+ $this->set_license_code( $activation_result['license_code'] );
129
+ wp_safe_redirect( add_query_arg( 'registration', 'success', Plugin::get_instance()->get_url() ) );
130
+ } else {
131
+ wp_safe_redirect( add_query_arg( 'registration', 'error', Plugin::get_instance()->get_url() ) );
132
+ }
133
+ } else {
134
+ wp_safe_redirect( add_query_arg( 'registration', 'failure', Plugin::get_instance()->get_url() ) );
135
+ }
136
+
137
+ }
138
+
139
+ /**
140
+ * Deactivate their local license.
141
+ */
142
+ public function envato_elements_deactivate() {
143
+ // check_admin_referer( 'deactivate' ); // todo: uncomment this when we go live, it's currently good for easy testing. /wp-admin/admin.php?action=envato_elements_deactivate.
144
+ $this->set_license_code( '' );
145
+ wp_safe_redirect( add_query_arg( 'registration', 'reset', Plugin::get_instance()->get_url() ) );
146
+
147
+ }
148
+
149
+
150
+ }
inc/class-notices.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Notices registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Notices extends Base {
24
+
25
+ const NOTICE_TRANSIENT = 'envato-elements-notices';
26
+
27
+ /**
28
+ * Notices constructor.
29
+ */
30
+ public function __construct() {
31
+
32
+ }
33
+
34
+ /**
35
+ *
36
+ * We look for any messages or notifications from our API response.
37
+ * These messages are stored in a global transient and then displayed to the user on next page load.
38
+ * Messages must be dismissed by the user.
39
+ *
40
+ * @param $api_response array
41
+ * @param $api_endpoint string
42
+ */
43
+ public function sniff_api_response_for_messages( $api_response, $api_endpoint ) {
44
+
45
+ if ( $api_response && ! empty( $api_response['global_message'] ) ) {
46
+ $messages = get_transient( self::NOTICE_TRANSIENT );
47
+ if ( ! is_array( $messages ) ) {
48
+ $messages = [];
49
+ }
50
+ $messages[ md5( $api_response['global_message'] ) ] = $api_response['global_message'];
51
+ set_transient( self::NOTICE_TRANSIENT, $messages, 3600 );
52
+ }
53
+
54
+ }
55
+
56
+ public function print_global_notices() {
57
+
58
+ $messages = get_transient( self::NOTICE_TRANSIENT );
59
+ if ( ! is_array( $messages ) ) {
60
+ $messages = [];
61
+ }
62
+ if ( count( $messages ) ) {
63
+ echo $this->render_template(
64
+ 'notices/global.php', [
65
+ 'messages' => $messages,
66
+ ]
67
+ );
68
+ }
69
+
70
+ }
71
+
72
+ }
inc/class-plugin.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Envato Elements plugin.
20
+ *
21
+ * The main plugin handler class is responsible for initializing Envato Elements. The
22
+ * class registers and all the components required to run the plugin.
23
+ *
24
+ * @since 0.0.2
25
+ */
26
+ class Plugin extends Base {
27
+
28
+
29
+ /**
30
+ * Initializing Envato Elements plugin.
31
+ *
32
+ * @since 0.0.2
33
+ * @access private
34
+ */
35
+ public function __construct() {
36
+ parent::__construct();
37
+
38
+ add_action( 'admin_init', [ $this, 'admin_init' ] );
39
+ add_action( 'admin_menu', [ $this, 'admin_menu' ] );
40
+ add_action( 'admin_head', [ $this, 'admin_menu_icon' ] );
41
+ add_action( 'plugins_loaded', [ $this, 'db_upgrade_check' ] );
42
+
43
+ }
44
+
45
+
46
+ /**
47
+ * Runs in the admin init WordPress hook and sets everything up.
48
+ *
49
+ * @since 0.0.2
50
+ * @access public
51
+ */
52
+ public function admin_init() {
53
+
54
+ }
55
+
56
+ /**
57
+ * Sets up the admin menu options.
58
+ *
59
+ * @since 0.0.2
60
+ * @access public
61
+ */
62
+ public function admin_menu() {
63
+
64
+ if ( License::get_instance()->is_activated() ) {
65
+ $page = add_menu_page(
66
+ __( 'Envato Elements', 'envato-elements' ),
67
+ 'Elements',
68
+ 'edit_posts',
69
+ ENVATO_ELEMENTS_SLUG,
70
+ [ Collection::get_instance(), 'admin_menu_open' ],
71
+ '',
72
+ 99
73
+ );
74
+ } else {
75
+ $page = add_menu_page(
76
+ __( 'Envato Elements', 'envato-elements' ),
77
+ 'Elements',
78
+ 'edit_posts',
79
+ ENVATO_ELEMENTS_SLUG,
80
+ [ License::get_instance(), 'admin_menu_open' ],
81
+ '',
82
+ 99
83
+ );
84
+ }
85
+
86
+ add_action( 'admin_print_scripts-' . $page, [ $this, 'admin_page_assets' ] );
87
+
88
+ }
89
+
90
+
91
+ /**
92
+ * Add a font based menu icon.
93
+ * We have to do it this way because our plugin stylesheet only runs when the admin page is active.
94
+ *
95
+ * @since 1.0.0
96
+ */
97
+ public function admin_menu_icon() {
98
+ // Fonts directory URL.
99
+ $fonts_dir_url = ENVATO_ELEMENTS_URI . 'assets/fonts/';
100
+
101
+ // Create font styles.
102
+ $style = '<style type="text/css">
103
+ /*<![CDATA[*/
104
+ @font-face {
105
+ font-family: "' . ENVATO_ELEMENTS_SLUG . '";
106
+ src:url("' . $fonts_dir_url . 'envato.eot?20180730");
107
+ src:url("' . $fonts_dir_url . 'envato.eot?#iefix20180730") format("embedded-opentype"),
108
+ url("' . $fonts_dir_url . 'envato.woff?20180730") format("woff"),
109
+ url("' . $fonts_dir_url . 'envato.ttf?20180730") format("truetype"),
110
+ url("' . $fonts_dir_url . 'envato.svg?20180730#envato") format("svg");
111
+ font-weight: normal;
112
+ font-style: normal;
113
+ }
114
+ #adminmenu .toplevel_page_' . ENVATO_ELEMENTS_SLUG . ' .menu-icon-generic div.wp-menu-image:before {
115
+ font: normal 20px/1 "' . ENVATO_ELEMENTS_SLUG . '" !important;
116
+ content: "\e600";
117
+ speak: none;
118
+ padding: 6px 0;
119
+ height: 34px;
120
+ width: 20px;
121
+ display: inline-block;
122
+ -webkit-font-smoothing: antialiased;
123
+ -moz-osx-font-smoothing: grayscale;
124
+ -webkit-transition: all .1s ease-in-out;
125
+ -moz-transition: all .1s ease-in-out;
126
+ transition: all .1s ease-in-out;
127
+ }
128
+ /*]]>*/
129
+ </style>';
130
+
131
+ // Remove space after colons.
132
+ $style = str_replace( ': ', ':', $style );
133
+
134
+ // Remove whitespace.
135
+ echo str_replace( array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ', ' ', ' ' ), '', $style );
136
+ }
137
+
138
+
139
+ public function admin_page_assets() {
140
+
141
+ wp_enqueue_style( 'envato-elements-admin', ENVATO_ELEMENTS_URI . 'assets/css/main.min.css', [], filemtime( ENVATO_ELEMENTS_DIR . 'assets/css/main.min.css' ) );
142
+ wp_register_script( 'envato-elements-admin', ENVATO_ELEMENTS_URI . 'assets/js/app.min.js', [], filemtime( ENVATO_ELEMENTS_DIR . 'assets/js/app.min.js' ) );
143
+ $collections_url = Collection::get_instance()->get_url();
144
+ $bits = wp_parse_url( $collections_url );
145
+ wp_localize_script(
146
+ 'envato-elements-admin', 'envato_elements_admin', [
147
+ 'api_nonce' => wp_create_nonce( 'wp_rest' ),
148
+ 'api_url' => rest_url( ENVATO_ELEMENTS_SLUG . '/v1/' ),
149
+ 'license_activated' => License::get_instance()->is_activated(),
150
+ 'admin_base' => trailingslashit( dirname( $bits['path'] ) ),
151
+ 'admin_slug' => $bits['query'],
152
+ 'collections_base' => $bits['path'] . '?' . $bits['query'],
153
+ 'categories' => Category::get_instance()->categories,
154
+ ]
155
+ );
156
+ wp_enqueue_script( 'envato-elements-admin' );
157
+
158
+ wp_enqueue_style( 'envato-elements-google-font', 'https://fonts.googleapis.com/css?family=Rubik', 'envato-elements-admin' );
159
+
160
+ $this->load_admin_templates();
161
+ }
162
+
163
+ public function load_admin_templates() {
164
+ require_once ENVATO_ELEMENTS_DIR . 'views/templates/collections.php';
165
+ require_once ENVATO_ELEMENTS_DIR . 'views/templates/collection.php';
166
+ require_once ENVATO_ELEMENTS_DIR . 'views/templates/imports.php';
167
+ require_once ENVATO_ELEMENTS_DIR . 'views/templates/general.php';
168
+ require_once ENVATO_ELEMENTS_DIR . 'views/templates/terms.php';
169
+ }
170
+
171
+
172
+ public function db_upgrade_check() {
173
+ if ( get_option( 'envato_elements_version' ) !== ENVATO_ELEMENTS_VER ) {
174
+ $this->activation();
175
+ }
176
+ }
177
+
178
+ public function activation() {
179
+ update_option( 'envato_elements_version', ENVATO_ELEMENTS_VER );
180
+ if ( ! get_option( 'envato_elements_install_time' ) ) {
181
+ update_option( 'envato_elements_install_time', time() );
182
+ }
183
+ }
184
+
185
+ }
inc/class-required-plugin.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Collection registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Required_Plugin extends Base {
24
+
25
+ public function __construct() {
26
+ }
27
+
28
+ private $_current_plugins = [];
29
+
30
+ public $category_plugins = [
31
+ 'elementor' => [
32
+ 'file' => 'elementor/elementor.php',
33
+ 'slug' => 'elementor',
34
+ 'min_version' => '2.0.12',
35
+ 'name' => 'Elementor',
36
+ ],
37
+ 'beaver-builder' => [
38
+ 'file' => 'beaver-builder-lite-version/fl-builder.php',
39
+ 'slug' => 'beaver-builder-lite-version',
40
+ 'min_version' => '2.1.1.3',
41
+ 'name' => 'Beaver Builder',
42
+ ],
43
+ ];
44
+
45
+ public function get_plugin_status( $plugin_slug, $plugin_details ) {
46
+
47
+ if ( empty( $plugin_details['file'] ) ) {
48
+ return 'error';
49
+ }
50
+
51
+ if ( ! $this->_current_plugins ) {
52
+ $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
53
+ $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
54
+ if ( ! is_array( $active_plugins ) ) {
55
+ $active_plugins = [];
56
+ }
57
+ if ( ! is_array( $active_sitewide_plugins ) ) {
58
+ $active_sitewide_plugins = [];
59
+ }
60
+ if ( ! function_exists( 'get_plugins' ) ) {
61
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
62
+ }
63
+ $active_plugins = array_merge( $active_plugins, array_keys( $active_sitewide_plugins ) );
64
+ $this->_current_plugins['active'] = $active_plugins;
65
+ $this->_current_plugins['all'] = get_plugins();
66
+ }
67
+ if ( in_array( $plugin_details['file'], $this->_current_plugins['active'], true ) ) {
68
+ $state = 'activated';
69
+ // check it's the required min version.
70
+ if ( ! empty( $plugin_details['min_version'] ) ) {
71
+ if (
72
+ isset( $this->_current_plugins['all'][ $plugin_details['file'] ] ) &&
73
+ ! empty( $this->_current_plugins['all'][ $plugin_details['file'] ]['Version'] ) &&
74
+ version_compare( $this->_current_plugins['all'][ $plugin_details['file'] ]['Version'], $plugin_details['min_version'], '<' )
75
+ ) {
76
+ $state = 'update';
77
+ }
78
+ }
79
+ } else {
80
+ $state = 'install';
81
+ foreach ( array_keys( $this->_current_plugins['all'] ) as $plugin ) {
82
+ if ( strpos( $plugin, basename( $plugin_details['file'] ) ) !== false ) {
83
+ $state = 'deactivated';
84
+ }
85
+ }
86
+ }
87
+
88
+ return $state;
89
+ }
90
+
91
+ /**
92
+ *
93
+ * This checks if the requested plugins are available locally.
94
+ * We check plugin slug and minimum version number.
95
+ * This method is called against every single template
96
+ *
97
+ * @param $api_required_plugins
98
+ * @param $category_slug
99
+ *
100
+ * @return array
101
+ */
102
+ public function get_missing_plugins( $api_required_plugins, $category_slug ) {
103
+
104
+ // Calculate our required plugins based on the category and any specific API requirements.
105
+ $required_plugins = [];
106
+ if ( $category_slug && isset( $this->category_plugins[ $category_slug ] ) ) {
107
+ $required_plugins[ $this->category_plugins[ $category_slug ]['slug'] ] = $this->category_plugins[ $category_slug ];
108
+ }
109
+ if ( $api_required_plugins ) {
110
+ foreach ( $api_required_plugins as $plugin_slug => $plugin_details ) {
111
+ $required_plugins[ $plugin_slug ] = $plugin_details;
112
+ }
113
+ }
114
+
115
+ $missing_plugins = [];
116
+ foreach ( $required_plugins as $plugin_slug => $plugin_details ) {
117
+ $plugin_status = $this->get_plugin_status( $plugin_slug, $plugin_details );
118
+ // todo: network mode URLs below.
119
+ switch ( $plugin_status ) {
120
+ case 'deactivated':
121
+ $notice = [];
122
+ $notice['name'] = $plugin_details['name'];
123
+ $notice['url'] = ! empty( $plugin_details['url'] ) ? $plugin_details['url'] : wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $plugin_details['file'] ), 'activate-plugin_' . $plugin_details['file'] );
124
+ $notice['text'] = 'Activate ' . $plugin_details['name'] . ' Plugin';
125
+ $missing_plugins[] = $notice;
126
+ break;
127
+ case 'update':
128
+ $notice = [];
129
+ $notice['name'] = $plugin_details['name'];
130
+ $notice['url'] = ! empty( $plugin_details['url'] ) ? $plugin_details['url'] : admin_url( 'plugins.php' );
131
+ $notice['text'] = 'Update ' . $plugin_details['name'] . ' Plugin';
132
+ $missing_plugins[] = $notice;
133
+ break;
134
+ case 'install':
135
+ $notice = [];
136
+ $notice['name'] = $plugin_details['name'];
137
+ $notice['url'] = ! empty( $plugin_details['url'] ) ? $plugin_details['url'] : wp_nonce_url( admin_url( 'update.php?action=install-plugin&plugin=' . $plugin_slug ), 'install-plugin_' . $plugin_slug );
138
+ $notice['text'] = 'Install ' . $plugin_details['name'] . ' Plugin';
139
+ $missing_plugins[] = $notice;
140
+ break;
141
+ case 'activated':
142
+ break;
143
+ }
144
+ }
145
+
146
+ return $missing_plugins;
147
+
148
+ }
149
+
150
+
151
+ }
inc/class-rest.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * REST API controller.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class REST extends Base {
24
+
25
+
26
+ /**
27
+ * Initialize the plugin by setting localization and loading public scripts
28
+ * and styles.
29
+ *
30
+ * @since 0.0.2
31
+ */
32
+ public function __construct() {
33
+ add_action( 'rest_api_init', [ $this, 'register_routes' ] );
34
+ }
35
+
36
+
37
+ public function get_rest_namespace() {
38
+ return ENVATO_ELEMENTS_SLUG . '/v1';
39
+ }
40
+
41
+ /**
42
+ * Register the routes for the objects of the controller.
43
+ */
44
+ public function register_routes() {
45
+ $namespace = $this->get_rest_namespace();
46
+
47
+ Collection_Elementor::get_instance()->init_rest_endpoints( $namespace );
48
+ Collection_Beaver_Builder::get_instance()->init_rest_endpoints( $namespace );
49
+ Import::get_instance()->init_rest_endpoints( $namespace );
50
+
51
+ }
52
+
53
+
54
+ }
55
+
inc/class-statistics.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Statistics registration and management.
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Statistics extends Base {
24
+
25
+ /**
26
+ * Statistics constructor.
27
+ */
28
+ public function __construct() {
29
+ parent::__construct();
30
+ add_filter( 'envato_elements_api_body_args', [ $this, 'filter_api_body_args' ] );
31
+ }
32
+
33
+ /**
34
+ * We track if a user has installed a new plugin since using this plugin.
35
+ */
36
+ public function get_newly_installed_plugins( $current_plugin_list ) {
37
+
38
+ // First we ensure the "snapshot" of installed plugins exists.
39
+ $options = get_option( 'envato_elements_options', [] );
40
+ if ( ! $options ) {
41
+ $options = [
42
+ 'initial_plugins' => $current_plugin_list,
43
+ ];
44
+ update_option( 'envato_elements_options', $options );
45
+ // todo: move :point-up: into an options class for easy read/write based on keys.
46
+ }
47
+
48
+ // Work out a diff.
49
+ $newly_installed_plugins = [];
50
+ // Remove any from $newly_installed_plugins that were already here at the start.
51
+ if ( ! empty( $options['initial_plugins'] ) ) {
52
+ foreach ( $current_plugin_list as $id => $plugin_details ) {
53
+ $existed_initially = false;
54
+ foreach ( $options['initial_plugins'] as $initial_plugin ) {
55
+ if ( $initial_plugin['name'] === $plugin_details['name'] ) {
56
+ $existed_initially = true;
57
+ }
58
+ }
59
+ if ( ! $existed_initially ) {
60
+ $newly_installed_plugins[] = $plugin_details;
61
+ }
62
+ }
63
+ }
64
+ return $newly_installed_plugins;
65
+
66
+ }
67
+
68
+
69
+ /**
70
+ * Filter API body arguments on every outbound request to Envato server.
71
+ * Allows us to add the users API key to all API requests so we can verify clients.
72
+ *
73
+ * @param array $body_args API args.
74
+ *
75
+ * @return array
76
+ */
77
+ public function filter_api_body_args( $body_args ) {
78
+
79
+ $body_args['statistics'] = get_transient( 'envato_elements_api_statistics' );
80
+ if ( ! $body_args['statistics'] || ! is_array( $body_args['statistics'] ) ) {
81
+ $body_args['statistics'] = [];
82
+ $body_args['statistics']['version'] = ENVATO_ELEMENTS_VER;
83
+ $body_args['statistics']['site_lang'] = get_bloginfo( 'language' );
84
+ $body_args['statistics']['site_url'] = home_url();
85
+ $body_args['statistics']['multisite'] = is_multisite();
86
+ // WordPress Version.
87
+ global $wp_version;
88
+ $body_args['statistics']['wp'] = $wp_version;
89
+ // Installed Plugins.
90
+ $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
91
+ $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
92
+ if ( ! is_array( $active_plugins ) ) {
93
+ $active_plugins = [];
94
+ }
95
+ if ( ! is_array( $active_sitewide_plugins ) ) {
96
+ $active_sitewide_plugins = [];
97
+ }
98
+ if ( ! function_exists( 'get_plugins' ) ) {
99
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
100
+ }
101
+ $active_plugins = array_merge( $active_plugins, array_keys( $active_sitewide_plugins ) );
102
+ $plugin_stats = [];
103
+ foreach ( get_plugins() as $plugin_file => $plugin_data ) {
104
+ $plugin_stats[] = [
105
+ 'name' => $plugin_data['Name'],
106
+ 'version' => $plugin_data['Version'],
107
+ 'active' => in_array( $plugin_file, $active_plugins, true ),
108
+ ];
109
+ }
110
+ $body_args['statistics']['plugins'] = $plugin_stats;
111
+
112
+ // These are the plugins the user has installed since activation.
113
+ $body_args['statistics']['new_plugins'] = $this->get_newly_installed_plugins( $plugin_stats );
114
+
115
+ // Installed Themes.
116
+ $theme_stats = [];
117
+ $all_themes = wp_get_themes();
118
+ $current_theme = wp_get_theme();
119
+ foreach ( $all_themes as $theme_slug => $theme ) {
120
+ $theme_stats[] = [
121
+ 'name' => $theme->Name,
122
+ 'version' => $theme->Version,
123
+ 'active' => $theme_slug === $current_theme->stylesheet,
124
+ ];
125
+ }
126
+ $body_args['statistics']['themes'] = $theme_stats;
127
+
128
+ // Number of Pages and Post Types.
129
+ $post_types = [ 'page', 'post', 'elementor_library' ];
130
+ $body_args['statistics']['post_count'] = [];
131
+ foreach ( $post_types as $post_type ) {
132
+ $all = new \WP_Query(
133
+ [
134
+ 'post_type' => $post_type,
135
+ 'post_status' => 'publish',
136
+ 'numberposts' => - 1,
137
+ ]
138
+ );
139
+ $body_args['statistics']['post_count'][ $post_type ] = $all->post_count;
140
+ }
141
+
142
+ // Usage stats.
143
+ $body_args['statistics']['usage'] = [];
144
+ $body_args['statistics']['usage']['collections'] = 0;
145
+ $body_args['statistics']['usage']['templates'] = 0;
146
+ $body_args['statistics']['usage']['insert_page'] = 0;
147
+ $imported_templates = CPT_Kits::get_instance()->get_imported_templates();
148
+ $collections = [];
149
+ $templates = [];
150
+ foreach ( $imported_templates as $imported_template ) {
151
+ $body_args['statistics']['usage']['insert_page'] += count( $imported_template['inserted'] );
152
+ $collections[ $imported_template['collectionId'] ] = true;
153
+ $templates[ $imported_template['templateId'] ] = true;
154
+ }
155
+ $body_args['statistics']['usage']['collections'] = count( $collections );
156
+ $body_args['statistics']['usage']['templates'] = count( $templates );
157
+ set_transient( 'envato_elements_api_statistics', 60 * 60 );
158
+ }
159
+
160
+ return $body_args;
161
+ }
162
+
163
+
164
+ }
inc/class-template.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Envato Elements:
4
+ *
5
+ * This starts things up. Registers the SPL and starts up some classes.
6
+ *
7
+ * @package Envato/Envato_Elements
8
+ * @since 0.0.2
9
+ */
10
+
11
+ namespace Envato_Elements;
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit; // Exit if accessed directly.
15
+ }
16
+
17
+
18
+ /**
19
+ * Template class for our CPT to store imported data separate to Elementor or Beaver Builder etc..
20
+ *
21
+ * @since 0.0.2
22
+ */
23
+ class Template extends Base {
24
+
25
+ /**
26
+ * Template constructor.
27
+ */
28
+ public function __construct() {
29
+ parent::__construct();
30
+ }
31
+
32
+ public function init() {
33
+
34
+ }
35
+
36
+ }
languages/envato-elements.pot ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2018 envato-elements
2
+ # This file is distributed under the same license as the envato-elements package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: envato-elements\n"
6
+ "Report-Msgid-Bugs-To: https://envato.com//\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
11
+ "Last-Translator: Dave Baker <dave.baker@envato.com>\n"
12
+ "Language-Team: Envato <dave.baker@envato.com>\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+
20
+ #: envato-elements.php:74, wordpress-svn/trunk/envato-elements.php:74
21
+ msgid "Envato Elements requires PHP version %s+, plugin is currently NOT ACTIVE."
22
+ msgstr ""
23
+
24
+ #: envato-elements.php:90, wordpress-svn/trunk/envato-elements.php:90
25
+ msgid "Envato Elements requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT ACTIVE."
26
+ msgstr ""
27
+
28
+ #: inc/class-api.php:86, wordpress-svn/trunk/inc/class-api.php:87
29
+ msgid "HTTP Error"
30
+ msgstr ""
31
+
32
+ #: inc/class-api.php:90, wordpress-svn/trunk/inc/class-api.php:91
33
+ msgid "An error occurred, please try again"
34
+ msgstr ""
35
+
36
+ #: inc/class-base.php:51, inc/class-base.php:62, wordpress-svn/trunk/inc/class-base.php:51, wordpress-svn/trunk/inc/class-base.php:62
37
+ msgid "Something went wrong."
38
+ msgstr ""
39
+
40
+ #: inc/class-import.php:585, wordpress-svn/trunk/inc/class-import.php:585
41
+ msgid "Remote server did not respond"
42
+ msgstr ""
43
+
44
+ #: inc/class-import.php:593, wordpress-svn/trunk/inc/class-import.php:593
45
+ msgid "Remote file is incorrect size"
46
+ msgstr ""
47
+
48
+ #: inc/class-import.php:599, wordpress-svn/trunk/inc/class-import.php:599
49
+ msgid "Zero size file downloaded"
50
+ msgstr ""
51
+
52
+ #: inc/class-import.php:606, wordpress-svn/trunk/inc/class-import.php:606
53
+ msgid "Remote file is too large, limit is %s"
54
+ msgstr ""
55
+
56
+ #: inc/class-plugin.php:66, inc/class-plugin.php:76, wordpress-svn/trunk/inc/class-plugin.php:65, wordpress-svn/trunk/inc/class-plugin.php:75
57
+ msgid "Envato Elements"
58
+ msgstr ""
59
+
60
+ #: views/license/welcome.php:19, wordpress-svn/trunk/views/license/welcome.php:19
61
+ msgid "Successfully reset, please register again below."
62
+ msgstr ""
63
+
64
+ #: views/license/welcome.php:22, wordpress-svn/trunk/views/license/welcome.php:22
65
+ msgid "Successfully registered"
66
+ msgstr ""
67
+
68
+ #: views/license/welcome.php:25, wordpress-svn/trunk/views/license/welcome.php:25
69
+ msgid "There was an error with the request, please try again."
70
+ msgstr ""
71
+
72
+ #: views/license/welcome.php:28, wordpress-svn/trunk/views/license/welcome.php:28
73
+ msgid "Please agree to the Terms & Conditions in order to continue."
74
+ msgstr ""
75
+
76
+ #: views/license/welcome.php:31, wordpress-svn/trunk/views/license/welcome.php:31
77
+ msgid "Activation failed, please ensure a valid email address is entered."
78
+ msgstr ""
79
+
80
+ #: views/license/welcome.php:69, wordpress-svn/trunk/views/license/welcome.php:69
81
+ msgid "Continue"
82
+ msgstr ""
readme.txt ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Envato Elements - Template Kits (Beta) ===
2
+ Contributors: envato
3
+ Tags: elementor, beaver builder, elements, templates
4
+ Requires at least: 4.6
5
+ Tested up to: 4.9
6
+ Requires PHP: 5.4
7
+ Stable tag: 0.0.6
8
+ License: GPLv3
9
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
+
11
+ Beautifully designed, Free templates, Handcrafted for popular WordPress page builders.
12
+
13
+ == Description ==
14
+
15
+ = Beautiful, handcrafted, and free. =
16
+
17
+ Our relevant, on-trend templates are specially designed for popular WordPress page builders, Elementor & Beaver Builder.
18
+
19
+ Install our plugin to browse the growing library of Template Kits. Each Kit is made up of multiple templates that work together visually, and are beautifully tailored for a specific niche. Once you find a template that you like, you can directly import it into your library, or use it to create a new page.
20
+
21
+ Combine templates to create inspiring, quality websites in less time, with less effort.
22
+
23
+ == Frequently Asked Questions ==
24
+
25
+ **What is a Template Kit?**
26
+
27
+ A Template Kit is a collection of templates that have been designed to help you create a website for a specific niche industry, with the help of a page builder.
28
+
29
+ **What is the connection with Envato Elements?**
30
+
31
+ Our plugin is built with professional website creators in mind. Over time, we will be enabling direct access to valuable parts of the Elements content library.
32
+
33
+ **Will Template Kits work with my theme?**
34
+
35
+ Yes! The Template Kits plugin & our Templates are intended to work with your favourite WordPress themes.
36
+
37
+ ** Will it work with my favourite page builder plugin? **
38
+
39
+ Template Kits currently work with either the free versions of Elementor or the free version of Beaver Builder. We are in the process of adding support for more popular page builders, so watch this space!
40
+
41
+ **What about Gutenberg?**
42
+
43
+ We hope to provide Template Kits for Gutenberg in the future - if it is possible!
44
+
45
+ **How are the templates licenced?**
46
+
47
+ We grant you a limited license to make use of any of the templates you have imported. Please see our Terms and Conditions (https://wp.envatoextensions.com/terms-conditions/) for more information.
48
+
49
+ **Does the plugin use an External Service for Content or Tracking? **
50
+
51
+ Our plugin uses an external service that we created to provide the templates, assets and related content to the WordPress Plugin. The service is hosted on https://wp.envatoextensions.com/, you can read our Terms & Conditions here: https://wp.envatoextensions.com/terms-conditions/ You can read our Privacy Policy here https://envato.com/privacy/
52
+
53
+ If you have accepted our terms and conditions, we record your email address, your acceptance of the terms, and if you have decided to opt into receiving marketing emails from us.
54
+
55
+ To help us improve the content displayed within our plugin, we may record the pages you’ve viewed and the templates you’ve imported while using the plugin.
56
+ To help us develop the plugin we may record information about your WordPress installation including: WordPress version, PHP Version, Site Language, Site URL, Multisite Status as well as Page/Post Template Counts.
57
+
58
+ To help us test for conflicts we record information about all of the themes and plugins installed on your WordPress site, including the name, version and it’s activation status.
59
+
60
+ ** How do I get support, report issues or provide feedback? **
61
+
62
+ If you have any questions or feedback for the team, please send an email to extensions@envato.com
63
+
64
+
65
+
66
+ == Screenshots ==
67
+
68
+ 1. **Kit Summary View.**
69
+ 2. **Kit Detail View.**
70
+
71
+
72
+ == Changelog ==
73
+
74
+ = 0.0.5 - 2018-07-17 =
75
+ * Initial release.
src/js/app/index.js ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global window, document */
2
+ if ( !window._babelPolyfill ) {
3
+ require( 'babel-polyfill' );
4
+ }
5
+ import createHistory from 'history/createBrowserHistory';
6
+ import $ from 'jquery';
7
+ // pages:
8
+ import { header } from './pages/header';
9
+ import { kitCollections } from './pages/collections';
10
+ import { template } from './utils/template';
11
+ import { importer } from './utils/importer';
12
+ import { helper } from './utils/helper';
13
+ import { modal } from './utils/modal';
14
+
15
+ class Admin {
16
+ constructor() {
17
+ this.items = [];
18
+ this.history = null;
19
+ this.unlisten = null;
20
+ };
21
+
22
+ pageLoaded = () => {
23
+ this.items.push( modal );
24
+ this.items.push( header );
25
+ this.items.push( template );
26
+ this.items.push( helper );
27
+ if( envato_elements_admin.license_activated ) {
28
+ this.items.push( kitCollections );
29
+ this.items.push( importer );
30
+ }
31
+ for ( var item of this.items ) {
32
+ item.pageLoaded && item.pageLoaded();
33
+ }
34
+ this.navigationListen();
35
+ this.clickListen();
36
+ };
37
+
38
+ clickListen = () => {
39
+ const t = this;
40
+ $( 'body' ).on( 'click', '.envato-elements--action', function ( event ) {
41
+ return false;
42
+ } ).on( 'mousedown', '.envato-elements--action', function ( event ) {
43
+
44
+ //if (event && event.target && !($(event.target).is('a') || $(event.target).parents('a').length || $(event.target).parents('.os-scrollbar').length)) {
45
+ if ( event && event.target && !$( event.target ).parents( '.os-scrollbar' ).length ) {
46
+
47
+ switch ( event.which ) {
48
+ case 1:
49
+ // left mouse button
50
+
51
+ event.preventDefault();
52
+
53
+ var $butt = $( event.target );
54
+
55
+ if ( $butt.data( 'nav-top' ) ) {
56
+ window.scrollTo( 0, 0 );
57
+ }
58
+
59
+ const navVars = {
60
+ navType: $butt.data( 'nav-type' ),
61
+ categorySlug: $butt.data( 'category-slug' ),
62
+ collectionId: $butt.data( 'collection-id' ),
63
+ templateId: $butt.data( 'template-id' ),
64
+ searchParams: $butt.data( 'search' ) || {
65
+ page: 1,
66
+ },
67
+ };
68
+ t.navigationEvent( navVars, 'click' );
69
+ return false;
70
+
71
+ break;
72
+ }
73
+
74
+ }
75
+ } );
76
+ };
77
+
78
+ navigationListen = () => {
79
+
80
+ this.history = createHistory( {
81
+ //basename: get('admin_base') // not required if we're just chaing the `?` query args.
82
+ } );
83
+
84
+ const location = this.history.location;
85
+ this.navigationChange( location, 'init' );
86
+
87
+ this.unlisten = this.history.listen( ( location, action ) => {
88
+ this.navigationChange( location, action );
89
+ } );
90
+
91
+ // this.unlisten()
92
+
93
+ };
94
+
95
+ navigationChange = ( location, action ) => {
96
+ modal.closeModal();
97
+
98
+ const query = location.search.substring( 1 );
99
+ const navVars = {
100
+ location: location,
101
+ page: this.getQueryVariable( query, 'page' ),
102
+ navType: 'category', // template
103
+ categorySlug: this.getQueryVariable( query, 'category' ),
104
+ collectionId: this.getQueryVariable( query, 'collection_id' ),
105
+ templateId: this.getQueryVariable( query, 'template_id' ),
106
+ searchParams: {
107
+ page: this.getQueryVariable( query, 'pg', 1 ),
108
+ },
109
+ };
110
+ if ( navVars.templateId ) {
111
+ navVars.navType = 'template';
112
+ } else if ( navVars.collectionId ) {
113
+ navVars.navType = 'collection';
114
+ } else if ( !navVars.categorySlug ) {
115
+ navVars.categorySlug = 'elementor'; // default to elementor if none defined.
116
+ }
117
+
118
+ this.navigationEvent( navVars, action );
119
+ };
120
+
121
+ navigationEvent = ( navVars, action ) => {
122
+ for ( var item of this.items ) {
123
+ item.navigationChange && item.navigationChange( this, navVars, action );
124
+ }
125
+ };
126
+
127
+ getQueryVariable = ( query, variable, defaultValue ) => {
128
+ const vars = query.split( '&' );
129
+ for ( var i = 0; i < vars.length; i++ ) {
130
+ var pair = vars[ i ].split( '=' );
131
+ if ( decodeURIComponent( pair[ 0 ] ) === variable ) {
132
+ return decodeURIComponent( pair[ 1 ] );
133
+ }
134
+ }
135
+ return defaultValue;
136
+ };
137
+ }
138
+
139
+ $( () => {
140
+ let admin = new Admin();
141
+ admin.pageLoaded();
142
+ } );
src/js/app/objects/collection.js ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { config } from '../utils/config';
2
+ import $ from 'jquery';
3
+ import { template } from '../utils/template';
4
+ import { api } from '../utils/api';
5
+ import { templateCache } from './template';
6
+
7
+ import ObjectCache from '../utils/objectCache';
8
+ import { error } from '../utils/error';
9
+ import OverlayScrollbars from 'overlayscrollbars';
10
+ import { lazyLoader } from '../utils/lazyLoader';
11
+
12
+ export let collectionCache = new ObjectCache( ( cache, settings, parent ) => {
13
+ const key = settings && settings.collectionId ? settings.collectionId : 'loading';
14
+ if ( typeof cache[ key ] === 'undefined' ) {
15
+ cache[ key ] = new Collection();
16
+ }
17
+ if ( parent ) {
18
+ cache[ key ].setParent( parent );
19
+ }
20
+ cache[ key ].updateData( settings );
21
+ return cache[ key ];
22
+ } );
23
+
24
+ class Collection {
25
+ constructor( { collectionId = false } = {} ) {
26
+ // We define `this.data` variables so that handlebars can read this object out and loop over them.
27
+ this.data = {
28
+ collectionId: collectionId,
29
+ categorySlug: '',
30
+ pageTitle: 'Items',
31
+ collectionName: 'loading',
32
+ collectionUrl: '#',
33
+ templates: [], // json data from summary view display.
34
+ templateObjects: [],
35
+ };
36
+
37
+ this.$dom = null;
38
+ this.$container = null;
39
+ this.scroller = null;
40
+ }
41
+
42
+ setParent = ( parent ) => {
43
+ this.parent = parent;
44
+ };
45
+
46
+ getReplaceData = () => {
47
+ let data = this.data;
48
+ if ( this.parent ) {
49
+ data = Object.assign( {}, this.parent.getReplaceData(), data );
50
+ }
51
+ return data;
52
+ };
53
+
54
+ updateData = ( apiData ) => {
55
+ Object.assign( this.data, this.data, apiData );
56
+ };
57
+
58
+ getDataFromAPI = () => {
59
+ return new Promise( ( resolve, reject ) => {
60
+ api.get( 'collection/' + this.data.categorySlug + '/?collection_id=' + this.data.collectionId, false )
61
+ .then(
62
+ ( json ) => {
63
+ if ( json && json.data ) {
64
+ this.updateData( json.data );
65
+ resolve();
66
+ } else {
67
+ error.displayError( 'Collection API Error', typeof err.error !== 'undefined' ? err.error : 'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.' );
68
+ reject();
69
+ }
70
+ },
71
+ ( err ) => {
72
+ if ( err && typeof err.code !== 'undefined' && err.code === 'rest_cookie_invalid_nonce' ) {
73
+ error.displayError( 'API Token Expired', 'Refreshing please wait...' );
74
+ setTimeout( function(){ window.location.reload(); }, 500 );
75
+ } else {
76
+ error.displayError( 'Collection API Error', typeof err.error !== 'undefined' ? err.error : 'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.' );
77
+ }
78
+ reject();
79
+ }
80
+ );
81
+ } );
82
+ };
83
+
84
+ renderCollectionFromAPI = () => {
85
+ return new Promise( ( resolve, reject ) => {
86
+ template.pageLoading();
87
+ if ( config.state( 'requestedCollectionId' ) !== this.data.collectionId ) {
88
+ this.getDataFromAPI()
89
+ .then( () => {
90
+ this.$dom = template.renderMainDom( 'tmpl-envato-elements__collections-single', this.getReplaceData() );
91
+ let $templatesSummary = this.$dom.find( '.envato-elements__collections-templates' );
92
+ for ( var c of this.data.templates ) {
93
+ const collectionTemplate = templateCache.getItem( c, this );
94
+ collectionTemplate.renderTemplateDom( $templatesSummary );
95
+ }
96
+
97
+ this.horizontalScrollInit();
98
+ template.mainRenderFinished();
99
+ resolve();
100
+ },
101
+ () => {
102
+ reject();
103
+ } );
104
+ } else {
105
+ template.mainRenderFinished();
106
+ resolve();
107
+ }
108
+ } );
109
+
110
+ };
111
+
112
+ // Summary page.
113
+ renderSummaryDom = ( $container ) => {
114
+ this.$container = $container;
115
+ this.$dom = template.getDom( 'tmpl-envato-elements__collections-single', this.getReplaceData() );
116
+ this.$container.append( this.$dom );
117
+ let $templatesSummary = this.$dom.find( '.envato-elements__collections-templates' );
118
+ for ( var c of this.data.templates ) {
119
+ const collectionTemplate = templateCache.getItem( c, this );
120
+ collectionTemplate.renderTemplateDom( $templatesSummary );
121
+ }
122
+
123
+ this.horizontalScrollInit();
124
+ };
125
+
126
+ // use the Overlay Scrollbars tool to show nice scrollbars.
127
+ horizontalScrollInit = () => {
128
+ if ( this.scroller ) {
129
+ this.scroller.destroy();
130
+ this.scroller = null;
131
+ }
132
+ this.scroller = OverlayScrollbars( this.$dom.find( '.envato-elements__collections-scroller' ), {
133
+ className: 'os-theme-round-dark',
134
+ overflowBehavior: {
135
+ y: 'hidden'
136
+ },
137
+ scrollbars: {
138
+ autoHide: 'never'
139
+ },
140
+ callbacks: {
141
+ onScroll: () => {
142
+ lazyLoader.checkVisible();
143
+ }
144
+ }
145
+ } );
146
+ };
147
+
148
+ openDetailView = ( templateId ) => {
149
+ let currentTemplate = null;
150
+ for ( var c of this.data.templates ) {
151
+ const collectionTemplate = templateCache.getItem( c, this );
152
+ if ( !templateId || templateId === collectionTemplate.data.templateId ) {
153
+ currentTemplate = collectionTemplate;
154
+ }
155
+ }
156
+ if ( currentTemplate ) {
157
+ this.$dom.addClass( 'envato-elements__collections-single--open' );
158
+ window.scrollTo( 0, this.$dom.offset().top - 130 );
159
+ setTimeout( () => {
160
+ // set the min-height after css animation stops.
161
+ this.$dom.addClass( 'envato-elements__collections-single--opened' );
162
+ }, 500 );
163
+ const $detailContainer = this.$dom.find( '.envato-elements__collections-single-detail' );
164
+ currentTemplate.renderHighlightedDom( $detailContainer );
165
+ // Auto scroll to the position of this item.
166
+ if ( this.scroller ) {
167
+ this.scroller.scroll( currentTemplate.$dom, 500 );
168
+ }
169
+ }
170
+
171
+ };
172
+
173
+ closeDetailView = () => {
174
+ if ( this.scroller ) {
175
+ this.scroller.scroll( { x: 0 }, 500 );
176
+ }
177
+ $( '.envato-elements__collection-template-cell--active' ).removeClass( 'envato-elements__collection-template-cell--active' );
178
+ this.$dom.removeClass( 'envato-elements__collections-single--open' )
179
+ .removeClass( 'envato-elements__collections-single--opened' );
180
+ };
181
+
182
+ }
src/js/app/objects/collections.js ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { config } from '../utils/config';
2
+ import { template } from '../utils/template';
3
+ import { api } from '../utils/api';
4
+ import { error } from '../utils/error';
5
+ import { collectionCache } from './collection';
6
+
7
+ import ObjectCache from '../utils/objectCache';
8
+
9
+ export let collectionsCache = new ObjectCache( ( cache, settings ) => {
10
+ const key = settings && settings.categorySlug ? settings.categorySlug : 'loading';
11
+ if ( 'undefined' === typeof cache[ key ] ) {
12
+ cache[ key ] = new Collections();
13
+ }
14
+ cache[ key ].updateData( settings );
15
+ return cache[ key ];
16
+ } );
17
+
18
+ class Collections {
19
+ constructor( { categorySlug } = {} ) {
20
+
21
+ this.data = {
22
+ categorySlug: categorySlug,
23
+ pageTitle: 'Items',
24
+ collections: [],
25
+ searchParams: {},
26
+ };
27
+
28
+ this.currentlyOpen = null;
29
+ }
30
+
31
+ updateData = ( apiData ) => {
32
+ Object.assign( this.data, this.data, apiData );
33
+ };
34
+
35
+ renderPageFromAPI = () => {
36
+ return new Promise( ( resolve, reject ) => {
37
+ template.pageLoading();
38
+ api.post( 'collections/' + this.data.categorySlug, {
39
+ search: this.data.searchParams
40
+ } )
41
+ .then(
42
+ ( json ) => {
43
+ if ( json && json.data ) {
44
+
45
+ // Reset available collections each time we do a search.
46
+ this.data.collections = [];
47
+ this.updateData( json.data );
48
+
49
+ if ( config.state( 'requestedCategorySlug' ) !== this.data.categorySlug ) {
50
+ return reject();
51
+ }
52
+
53
+ this.$dom = template.renderMainDom( 'tmpl-envato-elements__collections', this.getReplaceData() );
54
+ this.$collectionsHolder = this.$dom.find( '.envato-elements__collections-content' );
55
+ if ( this.$collectionsHolder && this.data.collections && this.data.collections.length ) {
56
+ for ( var c of this.data.collections ) {
57
+ const collection = collectionCache.getItem( c, this );
58
+ collection.renderSummaryDom( this.$collectionsHolder );
59
+ }
60
+ }
61
+
62
+ config.state( 'currentCategorySlug', this.data.categorySlug );
63
+ template.mainRenderFinished();
64
+ resolve();
65
+ } else {
66
+ error.displayError( 'Collections Data Error', typeof err.error !== 'undefined' ? err.error : 'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.' );
67
+ reject();
68
+ }
69
+ },
70
+ ( err ) => {
71
+ if ( err && typeof err.code !== 'undefined' && err.code === 'rest_cookie_invalid_nonce' ) {
72
+ error.displayError( 'API Token Expired', 'Refreshing please wait...' );
73
+ setTimeout( function(){ window.location.reload(); }, 500 );
74
+ }else{
75
+ error.displayError( 'Collections Data Error', typeof err.error !== 'undefined' ? err.error : 'Sorry something went wrong. If this continues to happen please <a href="mailto:extensions@envato.com">report the bug to us</a>.' );
76
+ }
77
+ reject();
78
+ }
79
+ );
80
+ } );
81
+ };
82
+
83
+ closeCollections = () => {
84
+ if ( this.currentlyOpen ) {
85
+ this.currentlyOpen.closeDetailView();
86
+ this.currentlyOpen = null;
87
+ }
88
+ };
89
+
90
+ openCollection = ( collectionId, templateId ) => {
91
+ const collection = collectionCache.getItem( { collectionId: collectionId } );
92
+ if ( collection ) {
93
+ if ( this.currentlyOpen && (!templateId || this.currentlyOpen !== collection) ) {
94
+ this.closeCollections();
95
+ }
96
+ this.currentlyOpen = collection;
97
+ if ( templateId ) {
98
+ collection.openDetailView( templateId );
99
+ }
100
+ }
101
+ };
102
+
103
+ getReplaceData = () => {
104
+ this.data.pagination = [];
105
+ if( this.data.page_number && this.data.total_results && this.data.per_page ){
106
+ if( this.data.total_results > this.data.per_page ){
107
+ for(let pg = 0; pg < this.data.total_results / this.data.per_page; pg++ ){
108
+ this.data.pagination.push({
109
+ 'pageNumber': pg,
110
+ 'pageLabel': pg + 1,
111
+ 'pageCurrent': parseInt( this.data.page_number ) === pg + 1,
112
+ });
113
+ }
114
+ }
115
+ }
116
+ return this.data;
117
+ };
118
+
119
+ }
src/js/app/objects/template.js ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+ import { template } from '../utils/template';
3
+ import { lazyLoader } from '../utils/lazyLoader';
4
+
5
+ import ObjectCache from '../utils/objectCache';
6
+ import OverlayScrollbars from 'overlayscrollbars';
7
+
8
+ export let templateCache = new ObjectCache( ( cache, settings, parent ) => {
9
+ const key = settings && settings.templateId ? settings.templateId : 'loading';
10
+ if ( 'undefined' === typeof cache[ key ] ) {
11
+ cache[ key ] = new Template( settings );
12
+ }
13
+ if ( parent ) {
14
+ cache[ key ].setParent( parent );
15
+ }
16
+ cache[ key ].updateData( settings );
17
+ return cache[ key ];
18
+ } );
19
+
20
+ export default class Template {
21
+ constructor( { templateId = false } = {} ) {
22
+
23
+ this.data = {
24
+ templateId: templateId,
25
+ templateName: 'loading',
26
+ templateUrl: '#',
27
+ previewThumb: '#',
28
+ previewThumbAspect: '100%'
29
+ };
30
+
31
+ this.$dom = null;
32
+ this.lastScrollPos = 0;
33
+ this.lastImageMarginTop = 0;
34
+ this.verticalScroll = null;
35
+ }
36
+
37
+ setParent = ( parent ) => {
38
+ if ( parent ) {
39
+ this.parent = parent;
40
+ }
41
+ };
42
+
43
+ updateData = ( apiData ) => {
44
+ Object.assign( this.data, this.data, apiData );
45
+ };
46
+
47
+ getReplaceData = () => {
48
+ let data = this.data;
49
+ if ( this.parent ) {
50
+ data = Object.assign( {}, this.parent.getReplaceData(), data );
51
+ }
52
+ return data;
53
+ };
54
+
55
+ renderTemplateDom = ( $container ) => {
56
+ this.$dom = template.getDom( 'tmpl-envato-elements__collection-template-cell', this.getReplaceData() );
57
+ $container.append( this.$dom );
58
+ lazyLoader.addLazy( this.$dom );
59
+ };
60
+
61
+ renderHighlightedDom = ( $detailContainer ) => {
62
+ $( '.envato-elements__collection-template-cell--active' ).removeClass( 'envato-elements__collection-template-cell--active' );
63
+ this.$dom.addClass( 'envato-elements__collection-template-cell--active' );
64
+ let $preview = template.getDom( 'tmpl-envato-elements__collection-preview', this.getReplaceData() );
65
+ $detailContainer.empty().append( $preview );
66
+ if ( this.verticalScroll ) {
67
+ this.verticalScroll.destroy();
68
+ this.verticalScroll = null;
69
+ }
70
+ this.verticalScroll = OverlayScrollbars( $detailContainer.find( '.envato-elements__collection-detail-thumbnail' ), {
71
+ className: 'os-theme-round-dark',
72
+ overflowBehavior: {
73
+ x: 'hidden'
74
+ },
75
+ scrollbars: {
76
+ autoHide: 'never'
77
+ }
78
+ } );
79
+ };
80
+
81
+
82
+ }
src/js/app/pages/collections.js ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { config } from '../utils/config';
2
+ import { collectionsCache } from '../objects/collections';
3
+ import { collectionCache } from '../objects/collection';
4
+ import { template } from '../utils/template';
5
+
6
+ class KitCollections {
7
+ constructor() {
8
+ this.categories = config.get( 'categories' );
9
+ }
10
+
11
+ pageLoaded = () => {
12
+ };
13
+
14
+ loadCategoryItems = ( navType, categorySlug, searchParams ) => {
15
+
16
+ const category = this.categories[ categorySlug ];
17
+ const collections = collectionsCache.getItem( {
18
+ category: category,
19
+ pageTitle: category.page_title,
20
+ categorySlug: categorySlug,
21
+ searchParams: searchParams,
22
+ } );
23
+
24
+ if( config.state( 'requestedCategorySlug' ) === categorySlug && 'collection-close' === navType ) {
25
+ collections.closeCollections();
26
+ }else {
27
+ config.state( 'requestedCategorySlug', categorySlug );
28
+ collections.renderPageFromAPI()
29
+ .then( () => {
30
+ collections.closeCollections();
31
+ } )
32
+ .catch( () => {
33
+
34
+ } );
35
+ }
36
+
37
+ };
38
+
39
+ loadCollectionItems = ( navType, categorySlug, searchParams, collectionId, templateId ) => {
40
+
41
+ const category = this.categories[ categorySlug ];
42
+
43
+ if ( config.state( 'requestedCategorySlug' ) === categorySlug ) {
44
+ // We already have the loaded category DOM on page from above.
45
+ const collections = collectionsCache.getItem( {
46
+ category: category,
47
+ pageTitle: category.page_title,
48
+ categorySlug: categorySlug,
49
+ searchParams: searchParams,
50
+ } );
51
+ config.state( 'requestedCollectionId', collectionId );
52
+ config.state( 'requestedTemplateId', templateId );
53
+ switch( navType ){
54
+ case 'collection':
55
+ collections.openCollection( collectionId );
56
+ break;
57
+ case 'template':
58
+ // Highlight individual template.
59
+ collections.openCollection( collectionId, templateId );
60
+ break;
61
+ }
62
+ }else{
63
+ // user is refreshing the page or direct navigation to a template.
64
+ // Load it individually outside of the parent collections store.
65
+ const collection = collectionCache.getItem( {
66
+ category: category,
67
+ pageTitle: category.page_title,
68
+ categorySlug: categorySlug,
69
+ searchParams: searchParams,
70
+ collectionId: collectionId,
71
+ } );
72
+ collection.renderCollectionFromAPI()
73
+ .then( () => {
74
+ config.state( 'requestedCollectionId', collectionId );
75
+ if ( templateId ) {
76
+ config.state( 'requestedTemplateId', templateId );
77
+ collection.openDetailView( templateId );
78
+ }
79
+ } )
80
+ .catch( () => {
81
+
82
+ } );
83
+ }
84
+
85
+ };
86
+
87
+ navigationChange = ( admin, query, action ) => {
88
+
89
+ if ( query && query.categorySlug && action && query.navType && 'PUSH' !== action ) {
90
+ if ( 'undefined' !== typeof this.categories[ query.categorySlug ] ) {
91
+
92
+ switch( query.navType ){
93
+ case 'category':
94
+ case 'collection-close':
95
+ // Loading the main category page with all the small thumbs.
96
+ 'POP' !== action && admin.history.push( '?' + config.get( 'admin_slug' ) + '&category=' + query.categorySlug + '&pg=' + query.searchParams.page, 'history' );
97
+ this.loadCategoryItems( query.navType, query.categorySlug, query.searchParams );
98
+ break;
99
+ case 'collection':
100
+ // Clicked into a collection (default showing the first thumb).
101
+ 'POP' !== action && admin.history.push( '?' + config.get( 'admin_slug' ) + '&category=' + query.categorySlug + '&collection_id=' + query.collectionId, 'history' );
102
+ this.loadCollectionItems( query.navType, query.categorySlug, query.searchParams, query.collectionId );
103
+ break;
104
+ case 'template':
105
+ // Choosing a specific item within a collection.
106
+ 'POP' !== action && admin.history.push( '?' + config.get( 'admin_slug' ) + '&category=' + query.categorySlug + '&collection_id=' + query.collectionId + '&template_id=' + query.templateId, 'history' );
107
+ this.loadCollectionItems( query.navType, query.categorySlug, query.searchParams, query.collectionId, query.templateId );
108
+ break;
109
+ }
110
+
111
+ }
112
+ }
113
+
114
+ };
115
+
116
+ }
117
+
118
+ export let kitCollections = new KitCollections();
src/js/app/pages/header.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+ import { config } from '../utils/config';
3
+
4
+ class Header {
5
+ constructor() {
6
+ this.$fixedHeader = null;
7
+ };
8
+
9
+ pageLoaded = () => {
10
+ this.$fixedHeader = $( '.envato-elements__wrapper--fixed' );
11
+ this.setFixedHeader();
12
+ $( window ).resize( () => {
13
+ this.setFixedHeader();
14
+ } );
15
+ };
16
+
17
+ setFixedHeader = () => {
18
+ if ( this.$fixedHeader && this.$fixedHeader.length ) {
19
+ this.$fixedHeader.find( '.envato-elements__header' )
20
+ .width( this.$fixedHeader.width() )
21
+ .addClass( 'envato-elements__header--set' );
22
+ }
23
+ };
24
+
25
+ navigationChange = ( admin, query, action ) => {
26
+ if ( query && query.categorySlug ) {
27
+ $( '.envato-elements__header-menuitem' ).removeClass( 'envato-elements__header-menuitem--current' );
28
+ $( '.envato-elements__header-menuitem[data-category-slug="' + query.categorySlug + '"]' ).addClass( 'envato-elements__header-menuitem--current' );
29
+ }
30
+ };
31
+ }
32
+
33
+ export let header = new Header();
src/js/app/utils/api.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import fetchWP from './fetchWP';
2
+ import { config } from './config';
3
+
4
+ class API {
5
+ constructor() {
6
+ this.localCache = {};
7
+ this.fetchWP = new fetchWP( {
8
+ restURL: config.get( 'api_url' ),
9
+ restNonce: config.get( 'api_nonce' )
10
+ } );
11
+ }
12
+
13
+ fetch = () => {
14
+ return this.fetchWP;
15
+ };
16
+
17
+ get = ( endpoint, cache ) => {
18
+
19
+ // Implement some local caching for these endpoints.
20
+ return new Promise( ( resolve, reject ) => {
21
+ this.fetchWP.get( endpoint )
22
+ .then(
23
+ ( json ) => {
24
+ if ( cache && json && 'undefined' !== typeof json.data ) {
25
+ this.localCache[ endpoint ] = json;
26
+ }
27
+ resolve( json );
28
+ },
29
+ ( error ) => reject( error )
30
+ );
31
+
32
+ if ( cache && 'undefined' !== typeof this.localCache[ endpoint ] ) {
33
+ resolve( this.localCache[ endpoint ] );
34
+ }
35
+
36
+ } );
37
+ };
38
+
39
+ post = ( endpoint, args ) => {
40
+ return this.fetchWP.post( endpoint, args );
41
+ };
42
+
43
+ }
44
+
45
+ export let api = new API();
src/js/app/utils/config.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Config {
2
+ constructor() {
3
+
4
+ this.config = envato_elements_admin;
5
+ this.stateData = {};
6
+
7
+ }
8
+
9
+ get = ( key ) => {
10
+ return 'undefined' !== typeof this.config[ key ] ? this.config[ key ] : false;
11
+ };
12
+
13
+ state = ( key, value ) => {
14
+ if ( 'undefined' !== typeof value ) {
15
+ this.stateData[ key ] = value;
16
+ return value;
17
+ } else {
18
+ return 'undefined' !== typeof this.stateData[ key ] ? this.stateData[ key ] : false;
19
+ }
20
+ };
21
+ }
22
+
23
+ export let config = new Config();
src/js/app/utils/error.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { modal } from './modal';
2
+ import { template } from './template';
3
+
4
+ class Error {
5
+ constructor() {
6
+ }
7
+
8
+ pageLoaded = () => {
9
+ };
10
+
11
+ displayError = ( title, message, reactivate ) => {
12
+ if( reactivate !== false ){
13
+ reactivate = true;
14
+ }
15
+ template.pageFinishedLoading();
16
+ modal.closeModal();
17
+ modal.openModal( 'tmpl-envato-elements__error-modal', {
18
+ title: title,
19
+ message: message,
20
+ reactivate: reactivate,
21
+ } );
22
+
23
+ };
24
+
25
+
26
+ }
27
+
28
+ export let error = new Error();
src/js/app/utils/fetchWP.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import fetch from 'isomorphic-fetch';
2
+
3
+ const methods = [
4
+ 'get',
5
+ 'post',
6
+ 'put',
7
+ 'delete',
8
+ ];
9
+
10
+ export default class fetchWP {
11
+ constructor( options = {} ) {
12
+ this.options = options;
13
+
14
+ if ( !options.restURL )
15
+ throw new Error( 'restURL option is required' );
16
+
17
+ if ( !options.restNonce )
18
+ throw new Error( 'restNonce option is required' );
19
+
20
+ methods.forEach( method => {
21
+ this[ method ] = this._setup( method );
22
+ } );
23
+ }
24
+
25
+ _setup( method ) {
26
+ return ( endpoint = '/', data = false ) => {
27
+ let fetchObject = {
28
+ credentials: 'same-origin',
29
+ method: method,
30
+ headers: {
31
+ 'Accept': 'application/json',
32
+ 'Content-Type': 'application/json',
33
+ 'X-WP-Nonce': this.options.restNonce,
34
+ }
35
+ };
36
+
37
+ if ( data ) {
38
+ fetchObject.body = JSON.stringify( data );
39
+ }
40
+
41
+ return fetch( this.options.restURL + endpoint, fetchObject )
42
+ .then( response => {
43
+ return response.json().then( json => {
44
+ if ( response.ok ) {
45
+ json.loading = false;
46
+ if ( 'undefined' !== typeof json.success && 'undefined' === typeof json.error && !json.success ) {
47
+ json.error = true;
48
+ }
49
+ }
50
+ return response.ok ? json : Promise.reject( json );
51
+ } );
52
+ } );
53
+ };
54
+ }
55
+ }
src/js/app/utils/helper.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { modal } from './modal';
2
+
3
+ class Helper {
4
+ constructor() {
5
+ }
6
+
7
+ pageLoaded = () => {
8
+ };
9
+
10
+ navigationChange = ( admin, query, action ) => {
11
+ if ( query && query.navType && 'help-modal' === query.navType ) {
12
+ this.loadHelpModal();
13
+ }else if ( query && query.navType && 'terms-modal' === query.navType ) {
14
+ this.loadTermsModal();
15
+ }
16
+ };
17
+
18
+ loadHelpModal = () => {
19
+ modal.openModal( 'tmpl-envato-elements__help-modal', {} );
20
+ };
21
+
22
+ loadTermsModal = () => {
23
+ modal.openModal( 'tmpl-envato-elements__terms-modal', {} );
24
+ };
25
+
26
+ }
27
+
28
+ export let helper = new Helper();
src/js/app/utils/importer.js ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+ import { api } from './api';
3
+ import { template } from './template';
4
+ import { collectionCache } from '../objects/collection';
5
+ import { config } from './config';
6
+ import { error } from './error';
7
+ import { templateCache } from '../objects/template';
8
+
9
+ class Importer {
10
+ constructor() {
11
+ this.$holder = null;
12
+ this.pendingImports = {};
13
+ this.pendingCreates = {};
14
+ }
15
+
16
+ pageLoaded = () => {
17
+
18
+ // Throw it up in the header nav menu area.
19
+ this.$holder = $( '.envato-elements__importer-wrapper' );
20
+ this.$holder.append( template.getDom( 'tmpl-envato-elements__importer', {} ) );
21
+
22
+ // This is the data we display in the UI. Number of current imports etc..
23
+ this.importData = {
24
+ imports: []
25
+ };
26
+ this.loadImportHistory();
27
+ };
28
+
29
+ navigationChange = ( admin, query, action ) => {
30
+ if ( query && query.templateId && query.collectionId && query.navType && 'import-template' === query.navType ) {
31
+ this.startBackgroundImport( query.categorySlug, query.collectionId, query.templateId );
32
+ } else if ( query && query.templateId && query.collectionId && query.navType && 'insert-template-create-page' === query.navType ) {
33
+ this.startBackgroundInsertCreate( query.categorySlug, query.collectionId, query.templateId );
34
+ }
35
+ };
36
+
37
+ startBackgroundInsertCreate = ( categorySlug, collectionId, templateId ) => {
38
+
39
+ const $input = $( '.envato-elements__create-page-name[data-template-id="' + templateId + '"]' );
40
+ const pageName = $input.val();
41
+ if ( !pageName.length ) {
42
+ error.displayError( 'Create Page', 'Please enter a valid Page Name and try again ', false );
43
+ return;
44
+ }
45
+
46
+ if ( typeof this.pendingCreates[ templateId ] !== 'undefined' ) {
47
+ return;
48
+ }
49
+ this.pendingCreates[ templateId ] = true;
50
+
51
+ $( '.envato-elements-template-status[data-template-id="' + templateId + '"]' )
52
+ .removeClass( 'envato-elements-template-status--imported' )
53
+ .addClass( 'envato-elements-template-status--importing' );
54
+
55
+ const $butt = $( '.envato-elements-insert-button[data-template-id="' + templateId + '"]' );
56
+ $butt
57
+ .html( 'Creating <span></span>' )
58
+ .addClass( 'envato-elements-insert-button--inserting' );
59
+ $butt
60
+ .parents( '.envato-elements__collection-template-option' )
61
+ .addClass( '..envato-elements__collection-template-option--inserting' );
62
+
63
+ this.setImportStatus( 'Creating Page:', pageName );
64
+
65
+ api.post( 'insert/' + categorySlug + '/process', {
66
+ collectionId: collectionId,
67
+ templateId: templateId,
68
+ insertType: 'create-page',
69
+ pageName: pageName,
70
+ } )
71
+ .then(
72
+ ( json ) => {
73
+ this.setImportStatus( 'Page Created:', json.page_name, json.page_url );
74
+ $butt
75
+ .html( 'Page Created <span></span>' )
76
+ .removeClass( 'envato-elements-insert-button--inserting' )
77
+ .addClass( 'envato-elements-insert-button--inserted' );
78
+ this.refreshAfterImportOrInsert( collectionId, templateId );
79
+ },
80
+ ( err ) => {
81
+ // todo, display error.
82
+ }
83
+ )
84
+ .finally( () => {
85
+ delete this.pendingCreates[ templateId ];
86
+ } );
87
+ };
88
+
89
+ startBackgroundImport = ( categorySlug, collectionId, templateId ) => {
90
+ // Check this template doesn't already exist in the pending list.
91
+ if ( typeof this.pendingImports[ templateId ] !== 'undefined' ) {
92
+ return;
93
+ }
94
+ this.pendingImports[ templateId ] = true;
95
+
96
+ $( '.envato-elements-import-button[data-template-id="' + templateId + '"]' )
97
+ .html( 'Importing <span></span>' )
98
+ .removeClass( 'envato-elements-import-button--imported' )
99
+ .addClass( 'envato-elements-import-button--importing' );
100
+
101
+ $( '.envato-elements-template-status[data-template-id="' + templateId + '"]' )
102
+ .removeClass( 'envato-elements-template-status--imported' )
103
+ .addClass( 'envato-elements-template-status--importing' );
104
+
105
+ const collectionTemplate = templateCache.getItem( { templateId: templateId }, this );
106
+ this.setImportStatus( 'Importing:', collectionTemplate.data.templateName );
107
+ api.post( 'import/' + categorySlug + '/process', {
108
+ collectionId: collectionId,
109
+ templateId: templateId,
110
+ importType: 'library',
111
+ } )
112
+ .then(
113
+ ( json ) => {
114
+ this.setImportStatus( 'Imported:', collectionTemplate.data.templateName, json.url );
115
+ this.refreshAfterImportOrInsert( collectionId, json.templateId );
116
+ },
117
+ ( err ) => {
118
+
119
+ }
120
+ )
121
+ .finally( () => {
122
+ delete this.pendingImports[ templateId ];
123
+ } );
124
+
125
+ };
126
+
127
+ getReplaceData = () => {
128
+ return this.importData;
129
+ };
130
+
131
+ refreshImportList = () => {
132
+ const $dom = template.getDom( 'tmpl-envato-elements__importer-list', this.getReplaceData() );
133
+ const $importer = this.$holder.find( '.envato-elements__importer' );
134
+ $importer.find( '.envato-elements__importer-list' ).remove();
135
+ $importer.append( $dom );
136
+ };
137
+
138
+ setThumbStates = () => {
139
+ // apply import status to any buttons we find on the page.
140
+ if ( 0 < this.importData.imports.length ) {
141
+ for ( let i of this.importData.imports ) {
142
+ if ( i.imported || typeof i.inserted !== 'undefined' && i.inserted.length > 0 ) {
143
+ $( '.envato-elements-template-status[data-template-id="' + i.templateId + '"]' )
144
+ .removeClass( 'envato-elements-template-status--inserting' )
145
+ .removeClass( 'envato-elements-template-status--importing' )
146
+ .addClass( 'envato-elements-template-status--imported' );
147
+ }
148
+ }
149
+ }
150
+ };
151
+
152
+ loadImportHistory = () => {
153
+
154
+ // We query the rest API to find a list of any imports that are currently underway.
155
+ api.get( 'import/status', false )
156
+ .then(
157
+ ( json ) => {
158
+ if ( json && json.data ) {
159
+ Object.assign( this.importData, this.importData, json.data );
160
+ this.refreshImportList();
161
+ this.setThumbStates();
162
+ }
163
+ },
164
+ ( err ) => {
165
+ }
166
+ );
167
+ };
168
+
169
+ setImportStatus = ( title, message, link ) => {
170
+ $( '.envato-elements__importer-status' )
171
+ .html( '<strong>' + title + '</strong> ' + (link ? '<a href="' + link + '" target="_blank">' + message + '</a>' : message) )
172
+ .addClass( '--active' );
173
+ };
174
+
175
+ refreshAfterImportOrInsert = ( collectionId, templateId ) => {
176
+ this.loadImportHistory();
177
+ // Import succeeded. We should refresh our object cache for the collection so the 'This template installed' message appears correctly.
178
+ const collection = collectionCache.getItem( {
179
+ collectionId: collectionId,
180
+ } );
181
+ collection.getDataFromAPI()
182
+ .then( () => {
183
+ if ( config.state( 'requestedTemplateId' ) === templateId ) {
184
+ // Still looking at the same page. Refresh the template so the updated handlebars "imported" buttons appear.
185
+ collection.openDetailView( templateId );
186
+ }
187
+ } );
188
+ };
189
+
190
+ }
191
+
192
+ export let importer = new Importer();
src/js/app/utils/lazyLoader.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+
3
+ class LazyLoader {
4
+ constructor() {
5
+ this.lazyObjects = [];
6
+ window.addEventListener( 'resize', this.checkVisible );
7
+ window.addEventListener( 'scroll', this.checkVisible );
8
+ };
9
+
10
+ throttle = ( callback, limit ) => {
11
+ var wait = false; // Initially, we're not waiting
12
+ return function () { // We return a throttled function
13
+ if ( !wait ) { // If we're not waiting
14
+ callback.call(); // Execute users function
15
+ wait = true; // Prevent future invocations
16
+ setTimeout( function () { // After a period of time
17
+ wait = false; // And allow future invocations
18
+ callback.call(); // Execute users function
19
+ }, limit );
20
+ }
21
+ };
22
+ };
23
+
24
+ addLazy = ( object ) => {
25
+ this.lazyObjects.push( object );
26
+ };
27
+
28
+ checkVisibleCallback = () => {
29
+
30
+ const pageTop = $( window ).scrollTop();
31
+ const pageBottom = pageTop + $( window ).height();
32
+ const pageWidth = $( window ).width();
33
+
34
+ for ( var i in this.lazyObjects ) {
35
+ if ( this.lazyObjects.hasOwnProperty( i ) ) {
36
+ if ( !this.lazyObjects[ i ] || !document.body.contains( this.lazyObjects[ i ].get( 0 ) ) ) {
37
+ delete(this.lazyObjects[ i ]);
38
+ } else if ( this.lazyObjects[ i ].hasClass( '--lazyloaded' ) ) {
39
+ delete(this.lazyObjects[ i ]);
40
+ } else if ( this.lazyObjects[ i ] ) {
41
+ const elementTop = this.lazyObjects[ i ].offset().top;
42
+ const elementLeft = this.lazyObjects[ i ].offset().left;
43
+ const elementRight = elementLeft + this.lazyObjects[ i ].width();
44
+ const elementBottom = elementTop + this.lazyObjects[ i ].height();
45
+ if (
46
+ elementTop <= pageBottom &&
47
+ elementBottom >= pageTop &&
48
+ elementRight > 0 &&
49
+ elementLeft < pageWidth
50
+ ) {
51
+ this.lazyObjects[ i ].find( '[data-src]' ).each( function () {
52
+ $( this ).css( 'background-image', 'url("' + $( this ).data( 'src' ) + '")' ).addClass( '--lazyloaded' );
53
+ } );
54
+ delete(this.lazyObjects[ i ]);
55
+ }
56
+ }
57
+ }
58
+ }
59
+ };
60
+
61
+ checkVisible = this.throttle( this.checkVisibleCallback, 150 );
62
+
63
+ }
64
+
65
+ export let lazyLoader = new LazyLoader();
src/js/app/utils/modal.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+ import { template } from './template';
3
+
4
+ class Modal {
5
+ constructor() {
6
+ this.$modalHolder = null;
7
+ this.$modalDom = null;
8
+ this.modalOpen = false;
9
+ }
10
+
11
+ pageLoaded = () => {
12
+ $( 'body' ).on( 'click', ( event ) => {
13
+ if ( this.modalOpen && !$( event.target ).parents( '.envato-elements__modal-inner-bg' ).length ) {
14
+ this.closeModal();
15
+ }
16
+ } )
17
+ .on( 'click', '.envato-elements__modal-close', ( event ) => {
18
+ event.preventDefault();
19
+ this.closeModal();
20
+ return false;
21
+ } );
22
+ };
23
+
24
+ closeModal = () => {
25
+ this.modalOpen = false;
26
+ this.$modalHolder && this.$modalHolder.empty();
27
+ $( 'body' ).removeClass( 'envato-elements--modal-open' );
28
+ };
29
+
30
+ openModal = (templateName, templateData) => {
31
+ this.$modalHolder = $( '.envato-elements__modal-holder' );
32
+ this.$modalDom = template.getDom( templateName, templateData );
33
+ this.$modalHolder.empty();
34
+ this.$modalHolder.append( this.$modalDom );
35
+ this.modalOpen = true;
36
+ $( 'body' ).addClass( 'envato-elements--modal-open' );
37
+ };
38
+
39
+ }
40
+
41
+ export let modal = new Modal();
src/js/app/utils/objectCache.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export default class ObjectCache {
2
+ constructor( cacheLookup ) {
3
+ this.items = {};
4
+ this.lookup = cacheLookup;
5
+ }
6
+
7
+ getItem = ( settings, parent ) => {
8
+ return this.lookup( this.items, settings, parent );
9
+ };
10
+
11
+ }
src/js/app/utils/template.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import $ from 'jquery';
2
+ import Handlebars from 'handlebars';
3
+ import { header } from '../pages/header';
4
+ import { importer } from './importer';
5
+ import { lazyLoader } from './lazyLoader';
6
+
7
+ class Template {
8
+ constructor() {
9
+ this.$holder = null;
10
+ this.templates = {};
11
+ Handlebars.registerHelper( 'if_eq', function ( a, b, opts ) {
12
+ if ( a === b )
13
+ return opts.fn( this );
14
+ else
15
+ return opts.inverse( this );
16
+ } );
17
+ };
18
+
19
+ pageLoaded = () => {
20
+ this.$holder = $( '.envato-elements__content-dynamic' );
21
+ };
22
+
23
+ getDom = ( templateID, templateData ) => {
24
+ if ( typeof this.templates[ templateID ] === 'undefined' ) {
25
+
26
+ this.templates[ templateID ] = Handlebars.compile( document.getElementById( templateID ).innerHTML );
27
+ }
28
+ templateData.contentTypeName = 'Template Kit';
29
+ return $( this.templates[ templateID ]( templateData ) );
30
+ };
31
+
32
+ renderMainDom = ( templateID, templateData ) => {
33
+ let $dom = this.getDom( templateID, templateData );
34
+ this.setMainDom( $dom );
35
+ return $dom;
36
+ };
37
+
38
+ setMainDom = ( $dom ) => {
39
+ this.$holder.empty();
40
+ this.$holder.append( $dom );
41
+ setTimeout( header.setFixedHeader, 100 );
42
+ return $dom;
43
+ };
44
+
45
+ pageLoading = () => {
46
+ this.$holder.addClass( 'envato-elements__content-dynamic--loading' );
47
+ };
48
+
49
+ pageFinishedLoading = () => {
50
+ this.$holder.removeClass( 'envato-elements__content-dynamic--loading' );
51
+ };
52
+
53
+ mainRenderFinished = () => {
54
+ this.pageFinishedLoading();
55
+ // to stop scroll up.
56
+ // this.$holder.css('min-height',this.$holder.height());
57
+ importer.refreshImportList();
58
+ lazyLoader.checkVisibleCallback();
59
+ // setTimeout( header.setFixedHeader, 200 );
60
+ };
61
+ }
62
+
63
+ export let template = new Template();
src/scss/admin/_collection.scss ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .envato-elements__collections-single-detail{
3
+ height: 0;
4
+ transition: height 0.5s;
5
+ display:flex;
6
+ flex-direction: row;
7
+ margin-bottom: 20px;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .envato-elements__collections-single {
12
+ display: flex;
13
+ flex-direction: column;
14
+ width: 100%;
15
+ &--open{
16
+ .envato-elements__collections-single-detail{
17
+ height: calc( 100vh - 400px );
18
+ }
19
+ }
20
+ &--opened{
21
+ .envato-elements__collections-single-detail{
22
+ min-height: 300px;
23
+ }
24
+ }
25
+ }
26
+
27
+ .envato-elements__collection-detail-thumbnail{
28
+ width: 70%;
29
+ max-width: 1360px;
30
+ padding-right: 30px;
31
+ height: 100%;
32
+ overflow: hidden;
33
+ overflow-y: auto;
34
+ }
35
+ .envato-elements__collection-detail-actions{
36
+ width: 30%;
37
+ padding: 0 0 0 20px;
38
+ }
39
+ .envato-elements__collection-preview-placeholder{
40
+ min-height:90%;
41
+ position:relative;
42
+ overflow:hidden;
43
+ > div{
44
+ z-index: 3;
45
+ position: relative;
46
+ }
47
+ .envato-elements__collection-preview-placeholder-img-wrap{
48
+ position: relative;
49
+ overflow: hidden;
50
+ z-index: 1;
51
+ &:before{
52
+ position:absolute;
53
+ top:0;
54
+ left:0;
55
+ right:0;
56
+ bottom:0;
57
+ display:block;
58
+ content:'';
59
+ //background: rgba(255, 255, 255, 0.77);
60
+ z-index: 2;
61
+ }
62
+ }
63
+ .envato-elements__collection-preview-placeholder-img{
64
+ position: relative;
65
+ filter: blur(4px);
66
+ max-width: 100%;
67
+ height: auto;
68
+ transition: opacity 0.2s linear;
69
+ }
70
+ .envato-elements__collection-preview-large-img{
71
+ position: absolute;
72
+ left:0;
73
+ right:0;
74
+ max-width: 100%;
75
+ height: auto;
76
+ box-sizing: border-box;
77
+ z-index: 3;
78
+ opacity:0;
79
+ transition: opacity 0.2s linear;
80
+ }
81
+ &.--loaded{
82
+ .envato-elements__collection-preview-large-img {
83
+ opacity: 1;
84
+ }
85
+ .envato-elements__collection-preview-placeholder-img{
86
+ opacity: 0;
87
+ }
88
+ }
89
+ }
90
+ .envato-elements__collection-template-options {
91
+ padding-top:10px;
92
+ }
93
+ .envato-elements__collection-template-option{
94
+ text-align: center;
95
+ padding: 5px 0;
96
+ &--create-page{
97
+ input{
98
+ padding: 7px;
99
+ margin: 0 0 10px;
100
+ min-width: 240px;
101
+ }
102
+ }
103
+ &--help-text{
104
+ padding: 10px 20px;
105
+ color: #979797;
106
+ a {
107
+ color: #979797;
108
+ }
109
+ }
110
+ &--divider{
111
+ display: flex;
112
+ flex-basis: 100%;
113
+ align-items: center;
114
+ color: rgba(0, 0, 0, 0.35);
115
+ margin: 8px 0px;
116
+ &:before,
117
+ &:after {
118
+ content: "";
119
+ flex-grow: 1;
120
+ background: rgba(0, 0, 0, 0.10);
121
+ height: 1px;
122
+ font-size: 0px;
123
+ line-height: 0px;
124
+ }
125
+ &:before{
126
+ margin: 0px 8px 0 0;
127
+ }
128
+ &:after{
129
+ margin: 0px 0 0 8px;
130
+ }
131
+ }
132
+ }
133
+
134
+ .envato-elements__collection-template-label{
135
+ display:block;
136
+ width:100%;
137
+ text-align: center;
138
+ padding: 6px 0 0 0;
139
+ opacity: 0;
140
+ transition: opacity 0.4s;
141
+ color: #888;
142
+ }
143
+ .envato-elements__collections-single--opened{
144
+ .envato-elements__collection-template-label{
145
+ opacity: 1;
146
+ }
147
+ }
148
+ .envato-elements__collection-preview-close{
149
+ float:right;
150
+ background: transparent;
151
+ border: 0;
152
+ box-shadow: none;
153
+ padding: 5px;
154
+ right: 9999px;
155
+ position: relative;
156
+ width: 20px;
157
+ &:before{
158
+ right: -9999px;
159
+ content: "\f335";
160
+ padding-right: 2px;
161
+ font-family: dashicons;
162
+ position: absolute;
163
+ top: 2px;
164
+ width: 100%;
165
+ text-align: center;
166
+ height: 100%;
167
+ font-size: 20px;
168
+ line-height: 30.8px;
169
+ }
170
+ }
171
+
172
+ .envato-elements__collection-preview-label {
173
+ margin:0;
174
+ }
175
+
176
+ .envato-elements__collection-preview-title {
177
+ margin:0.5em 0;
178
+ }
src/scss/admin/_collections.scss ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__collections {
2
+ width: 100%;
3
+ position: relative; // for modal overlay.
4
+ &--loading {
5
+ .envato-elements__collections-single-title,
6
+ .envato-elements__collections-single-count,
7
+ .envato-elements__link--next,
8
+ .envato-elements__collections-template {
9
+ @include loading-animation
10
+ }
11
+ .envato-elements__link--next,
12
+ .envato-elements__collections-single-title,
13
+ .envato-elements__collections-single-count {
14
+ border-radius: 3px;
15
+ text-indent: -9999px;
16
+ overflow: hidden;
17
+ min-width: 180px;
18
+ }
19
+ .envato-elements__collections-scroller {
20
+ border-bottom: 2px solid #e0e5e9;
21
+ overflow: hidden;
22
+ }
23
+ }
24
+
25
+ }
26
+
27
+ @keyframes placeHolderShimmer {
28
+ 0% {
29
+ opacity: 1
30
+ }
31
+
32
+ 50% {
33
+ opacity: 0
34
+ }
35
+
36
+ to {
37
+ opacity: 1
38
+ }
39
+ }
40
+
41
+ .envato-elements__collections-header {
42
+ border-bottom: 1px solid #E0E5E9;
43
+ display: flex;
44
+ flex-direction: row;
45
+ align-items: center;
46
+ h2 {
47
+ flex: 1;
48
+ font-weight: normal;
49
+ font-size: 18px;
50
+ }
51
+ span {
52
+ text-align: right;
53
+ }
54
+ }
55
+
56
+ .envato-elements__collections-content {
57
+ //overflow-y: scroll;
58
+ padding-top: 20px;
59
+ }
60
+
61
+ .envato-elements__collections-single {
62
+ margin-bottom: 20px;
63
+ padding-bottom: 20px;
64
+ cursor: default;
65
+ &:last-child {
66
+ border-bottom: 0;
67
+ }
68
+ }
69
+
70
+ .envato-elements__collections-single-summary{
71
+ header {
72
+ display: flex;
73
+ flex-direction: row;
74
+ align-items: center;
75
+ margin-bottom: 25px;
76
+ justify-content: space-between;
77
+ h3 {
78
+ border-right: 1px solid #E0E5E9;
79
+ padding-right: 20px;
80
+ font-weight: normal;
81
+ font-size: 16px;
82
+ }
83
+ span {
84
+ flex: 1;
85
+ max-width: 235px;
86
+ margin-left: 20px;
87
+ margin-right: auto;
88
+ }
89
+ a {
90
+ text-decoration: none;
91
+ color: #555d66;
92
+ &:hover {
93
+ text-decoration: underline;
94
+ }
95
+
96
+ }
97
+ * {
98
+ margin: 0;
99
+ padding: 0;
100
+ height: 30px;
101
+ line-height: 30px;
102
+ }
103
+ }
104
+ }
105
+
106
+ .envato-elements__collections-scroller {
107
+ padding: 6px 6px 36px;
108
+ margin: 0 -6px;
109
+ }
110
+ .envato-elements__collections-single--opened{
111
+ .envato-elements__collections-scroller{
112
+ padding-bottom: 48px;
113
+ }
114
+ }
115
+
116
+ .envato-elements__collections-templates {
117
+ height: 106px;
118
+ display: flex;
119
+ flex-wrap: nowrap;
120
+ flex-direction: row;
121
+ }
122
+ .envato-elements__collection-template-cell {
123
+ margin: 0;
124
+ padding: 1px;
125
+ flex: 0 0 auto;
126
+ margin-right: 24px;
127
+ border: 2px solid #FFF;
128
+ background: #FFF;
129
+ &--active{
130
+ border: 2px solid #0079b4;
131
+ }
132
+ }
133
+ .envato-elements__collection-template {
134
+ overflow: hidden;
135
+ }
136
+ .envato-elements__collection-template-thumb {
137
+ padding-bottom: 0 !important;
138
+ text-decoration: none;
139
+ display: block;
140
+ position: relative;
141
+ width: 200px;
142
+ height: 100px;
143
+ border:0 !important;
144
+ overflow: hidden;
145
+ background-position: center top;
146
+ background-size: cover; // This fixes up small thumbs that were bouncing around.
147
+ background-repeat: no-repeat;
148
+ transition: background-position 2.8s ease-in-out;
149
+ &:hover {
150
+ background-position: center bottom;
151
+ }
152
+ }
153
+
154
+
155
+ .envato-elements__pagination {
156
+ display: flex;
157
+ justify-content: center;
158
+ }
159
+ .envato-elements__pagination a {
160
+ display: inline-block;
161
+ border: 1px solid #e0e5e9;
162
+ padding:10px 20px;
163
+ color:#444;
164
+ text-decoration: none;
165
+ font-size: 16px;
166
+ margin:0 2px;
167
+ }
168
+ .envato-elements__pagination a:hover {
169
+ background: #e0e5e9;
170
+ }
171
+
172
+ .envato-elements__pagination-item--current {
173
+ display: inline-block;
174
+ border: 1px solid #e0e5e9;
175
+ padding:10px 20px;
176
+ color:#444;
177
+ text-decoration: none;
178
+ font-size: 16px;
179
+ margin:0 2px;
180
+ background: #f1f1f1;
181
+ }
182
+
183
+ .envato-elements__coming-soon{
184
+ background: #FFF;
185
+ border: 1px dotted #e0e5e9;
186
+ border-left: 5px solid #e0e5e9;
187
+ text-align: left;
188
+ margin-bottom: 20px;
189
+ padding: 20px 10px;
190
+ }
src/scss/admin/_global.scss ADDED
@@ -0,0 +1,487 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__wrapper {
2
+ display: flex;
3
+ margin: 0;
4
+ min-height: 85vh;
5
+ flex-direction: column;
6
+ color: #555d66;
7
+ }
8
+
9
+ .envato-elements__header {
10
+ background-color: #FFFFFF;
11
+ box-shadow: inset 0 -1px 0 0 #E0E5E9;
12
+ display: flex;
13
+ }
14
+
15
+ .envato-elements__header-logo {
16
+ padding: 15px 30px 15px 20px;
17
+ img {
18
+ height: 22px;
19
+ }
20
+ a {
21
+ &:active,
22
+ &:focus {
23
+ outline: 0;
24
+ border: none;
25
+ -moz-outline-style: none;
26
+ box-shadow: none;
27
+ }
28
+ }
29
+ @media screen and (max-width: 782px) {
30
+ max-width: 61px;
31
+ overflow: hidden;
32
+ margin-right: 20px;
33
+ }
34
+ }
35
+
36
+ .envato-elements__header-menu {
37
+ display: flex;
38
+ flex-direction: row;
39
+ align-items: center;
40
+ justify-content: center;
41
+ }
42
+
43
+ .envato-elements__header-menuitem {
44
+ height: 55px;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ font-size: 13px;
49
+ text-decoration: none;
50
+ color: #555d66;
51
+ padding: 0 30px;
52
+ font-weight: 500;
53
+ &--current {
54
+ background-color: #F0F2F4;
55
+ box-shadow: inset -1px 0 0 0 #E0E5E9, inset 1px 0 0 0 #E0E5E9, inset 0 -3px 0 0 #82B541;
56
+ }
57
+ &:hover {
58
+ color: #555d66;
59
+ background-color: #f5f7f9;
60
+ }
61
+ &:active,
62
+ &:focus {
63
+ outline: 0;
64
+ border: none;
65
+ -moz-outline-style: none;
66
+ //box-shadow: inset -1px 0 0 0 #E0E5E9, inset 1px 0 0 0 #E0E5E9, inset 0 -3px 0 0 #b4b4b4;
67
+ box-shadow: inset -1px 0 0 0 #E0E5E9, inset 1px 0 0 0 #E0E5E9, inset 0 -3px 0 0 #82B541;
68
+ }
69
+ }
70
+
71
+ .envato-elements__content {
72
+ display: flex;
73
+ flex: 1;
74
+ flex-direction: column;
75
+ padding: 20px;
76
+ background: #f8f9f9;
77
+ }
78
+
79
+ .envato-elements__content-dynamic {
80
+ display: flex;
81
+ flex: 1;
82
+ &--loading {
83
+ background-image: url("../images/loader.svg");
84
+ background-position: center;
85
+ background-repeat: no-repeat;
86
+ > * {
87
+ display: none !important;
88
+ }
89
+ }
90
+ > .envato-elements__collections-single {
91
+ margin-top: 20px;
92
+ }
93
+ }
94
+
95
+ @media screen and (min-width: 783px) {
96
+ .envato-elements__wrapper--fixed {
97
+
98
+ .envato-elements__header {
99
+ opacity: 0;
100
+ position: fixed;
101
+ top: 32px;
102
+ z-index: 10;
103
+ transition: opacity 0.2s;
104
+ &:before {
105
+ content: "";
106
+ position: absolute;
107
+ background-color: #f1f1f1;
108
+ left: -1px;
109
+ right: -1px;
110
+ top: -21px;
111
+ height: 20px;
112
+ }
113
+ &--set {
114
+ opacity: 1;
115
+ }
116
+ }
117
+ .envato-elements__content {
118
+ padding: 60px 20px 20px;
119
+ }
120
+ }
121
+
122
+ }
123
+
124
+ .envato-elements-notice {
125
+ border: 1px solid #e0e5e9;
126
+ padding: 15px;
127
+ background: #FFF;
128
+ margin: 0 0 15px;
129
+ &--error {
130
+ border-color: #9e4848;
131
+ color: #9e4848;
132
+ }
133
+ &--warning {
134
+ border-color: #eaeaea;
135
+ color: #6d6d6d;
136
+ }
137
+ &--success {
138
+ border-color: #1f6824;
139
+ color: #6d6d6d;
140
+ }
141
+ &--global {
142
+ border-color: #eaeaea;
143
+ color: #6d6d6d;
144
+ margin-top: 20px;
145
+ }
146
+ }
147
+
148
+ .envato-elements--action {
149
+ cursor: pointer;
150
+ }
151
+
152
+ .envato-elements__link--back {
153
+ &:before {
154
+ content: "\f341";
155
+ padding-right: 2px;
156
+ font-family: dashicons;
157
+ font-size: 0.7em;
158
+ }
159
+ }
160
+
161
+ .envato-elements__link--next {
162
+ &:after {
163
+ content: "\f345";
164
+ padding-left: 2px;
165
+ font-family: dashicons;
166
+ font-size: 0.7em;
167
+ }
168
+ }
169
+
170
+ .elements_page_envato-elements-activation,
171
+ .toplevel_page_envato-elements {
172
+
173
+ // hide all nag notices on our pages so they look clean.
174
+ .update-nag, .updated, .error, .is-dismissible, #dolly {
175
+ display: none;
176
+ }
177
+
178
+ #wpcontent {
179
+ padding-left: 0;
180
+ }
181
+ #wpbody-content {
182
+ padding-bottom: 0;
183
+ }
184
+ #wpfooter {
185
+ display: none;
186
+ }
187
+ }
188
+
189
+ .envato-elements__error {
190
+ width: 100%;
191
+ }
192
+
193
+ // This is the main blue input button that appears on the right of each detail view.
194
+ // We animate the SPAN tag within this.
195
+ .envato-elements-import-button {
196
+ position: relative;
197
+ span {
198
+ display: block;
199
+ position: absolute;
200
+ top: 3px;
201
+ right: 5px;
202
+ font: 400 20px/1 dashicons;
203
+ -webkit-font-smoothing: antialiased;
204
+ -moz-osx-font-smoothing: grayscale;
205
+ vertical-align: top;
206
+ }
207
+ &--importing {
208
+ padding-right: 30px !important;
209
+ span {
210
+ animation: import-rotation 2s infinite linear;
211
+ width: 20px;
212
+ height: 20px;
213
+ &:before {
214
+ displaY: block;
215
+ position: absolute;
216
+ color: #f56e28;
217
+ content: "\f463";
218
+ }
219
+ }
220
+ &.button-primary {
221
+ span:before {
222
+ color: #FFFFFF;
223
+ }
224
+ }
225
+ }
226
+ &--imported {
227
+ //padding-right: 30px !important;
228
+ span {
229
+ width: 20px;
230
+ height: 20px;
231
+ &:before {
232
+ color: #79ba49;
233
+ content: '\f147';
234
+ margin: 3px 5px 0 -2px;
235
+ }
236
+ }
237
+ }
238
+ }
239
+
240
+ .envato-elements-insert-button {
241
+ position: relative;
242
+ span {
243
+ display: block;
244
+ position: absolute;
245
+ top: 3px;
246
+ right: 5px;
247
+ font: 400 20px/1 dashicons;
248
+ -webkit-font-smoothing: antialiased;
249
+ -moz-osx-font-smoothing: grayscale;
250
+ vertical-align: top;
251
+ }
252
+ &--inserting {
253
+ padding-right: 30px !important;
254
+ span {
255
+ animation: import-rotation 2s infinite linear;
256
+ width: 20px;
257
+ height: 20px;
258
+ &:before {
259
+ displaY: block;
260
+ position: absolute;
261
+ color: #f56e28;
262
+ content: "\f463";
263
+ }
264
+ }
265
+ &.button-primary {
266
+ span:before {
267
+ color: #FFFFFF;
268
+ }
269
+ }
270
+ }
271
+ &--inserted {
272
+ padding-right: 30px !important;
273
+ span {
274
+ width: 20px;
275
+ height: 20px;
276
+ &:before {
277
+ color: #79ba49;
278
+ content: '\f147';
279
+ margin: 3px 5px 0 -2px;
280
+ }
281
+ }
282
+ }
283
+ }
284
+
285
+ // This is the little icon that appears on every thumb.
286
+ .envato-elements__collection-template,
287
+ .envato-elements__collections-template {
288
+ position: relative;
289
+ .envato-elements-template-status {
290
+ position: absolute;
291
+ right: 0;
292
+ top: 0;
293
+ z-index: 8;
294
+ width: 30px;
295
+ height: 30px;
296
+ overflow: hidden;
297
+ display: block;
298
+ display: none; // hide for now.
299
+ pointer-events: none;
300
+ font-size: 0;
301
+ padding: 0;
302
+ border: 0;
303
+ box-shadow: none;
304
+ cursor: pointer;
305
+ background: transparent;
306
+ border-bottom-left-radius: 3px;
307
+ opacity: 0.5;
308
+ transition: all 0.2s linear;
309
+ &:before {
310
+ left: 5px;
311
+ top: 5px;
312
+ display: block;
313
+ width: 20px;
314
+ height: 20px;
315
+ position: absolute;
316
+ z-index: 4;
317
+ content: "\f316";
318
+ color: #f56e28;
319
+ background: transparent;
320
+ font: 400 20px/1 dashicons;
321
+ -webkit-font-smoothing: antialiased;
322
+ -moz-osx-font-smoothing: grayscale;
323
+ vertical-align: top;
324
+ }
325
+ span {
326
+ display: none;
327
+ }
328
+ &--importing {
329
+ display: block; // only show the importing button for now.
330
+ animation: import-rotation 2s infinite linear;
331
+ &:before {
332
+ content: "\f463";
333
+ }
334
+ }
335
+ &--imported {
336
+ display: block; // only show the importing button for now.
337
+ &:before {
338
+ content: "\f147";
339
+ color: #46ad24;
340
+ }
341
+ }
342
+ }
343
+ &:hover {
344
+ .envato-elements-import-button {
345
+ opacity: 1;
346
+ &:before {
347
+ //background: rgba(255, 255, 255, 0.45);
348
+ }
349
+ }
350
+ }
351
+ }
352
+
353
+ .envato-elements__collection--loading,
354
+ .envato-elements__collections--loading {
355
+ .envato-elements-import-button {
356
+ &:before {
357
+ display: none !important;
358
+ }
359
+ }
360
+ }
361
+
362
+ .envato-elements--modal-open {
363
+ .envato-elements__collection-header,
364
+ .envato-elements__collection-content,
365
+ .envato-elements__collections-header,
366
+ .envato-elements__collections-content {
367
+ filter: blur(2px);
368
+ }
369
+ }
370
+
371
+ .envato-elements__modal {
372
+ background: rgba(255, 255, 255, 0.79);
373
+ position: absolute;
374
+ top: 0;
375
+ left: 0;
376
+ right: 0;
377
+ bottom: 0;
378
+ z-index: 6;
379
+ &-inner {
380
+ position: fixed;
381
+ left: 400px;
382
+ right: 200px;
383
+ @media screen and (max-width: 782px) {
384
+ left: 10px;
385
+ right: 10px;
386
+ }
387
+ margin-top: 20vh;
388
+ display: flex;
389
+ align-items: center;
390
+ justify-content: center;
391
+ text-align: center
392
+ }
393
+ &-header {
394
+ display: flex;
395
+ margin-top: -30px;
396
+ width: 100%;
397
+ align-content: space-between;
398
+ }
399
+ &-close {
400
+ margin-left: auto;
401
+ margin-right: 0;
402
+ width: 40px;
403
+ border: 0;
404
+ box-shadow: none;
405
+ background: transparent;
406
+ position: relative;
407
+ cursor: pointer;
408
+ &:before {
409
+ font-family: dashicons;
410
+ font-size: 20px;
411
+ content: "\f335";
412
+ }
413
+ }
414
+ }
415
+
416
+ .envato-elements__modal-inner-bg {
417
+ border: 1px solid #cccccc;
418
+ width: 600px;
419
+ background: #FFF;
420
+ padding: 40px 20px;
421
+ }
422
+
423
+ .envato-elements__feedback-question {
424
+ text-align: center;
425
+ width: 100%;
426
+ }
427
+
428
+ .envato-elements__feedback-answers-wrap {
429
+ width: 344px;
430
+ margin: 0 auto;
431
+ display: flex;
432
+ }
433
+
434
+ .envato-elements__feedback-answer {
435
+ margin: 5px;
436
+ display: inline-block;
437
+ width: 150px;
438
+ height: 150px;
439
+ border: 1px solid #ccc;
440
+ text-align: center;
441
+ text-decoration: none;
442
+ font-size: 20px;
443
+ color: #777;
444
+ border-radius: 5px;
445
+ }
446
+
447
+ .envato-elements__feedback-answer span {
448
+ font-size: 80px;
449
+ display: block;
450
+ margin-top: 38px;
451
+ margin-bottom: 4px;
452
+ img {
453
+ width: 45px;
454
+ height: 45px;
455
+ }
456
+ }
457
+
458
+ .envato-elements__feedback-answer--yes:hover {
459
+ background: #6ca12b;
460
+ color: #FFF;
461
+ }
462
+
463
+ .envato-elements__feedback-answer--no:hover {
464
+ background: #b42f2c;
465
+ color: #FFF;
466
+ }
467
+
468
+ @keyframes import-rotation {
469
+ 100% {
470
+ transform: rotate(360deg);
471
+ }
472
+ }
473
+
474
+ .envato-elements__modal--terms-conditions {
475
+ .envato-elements__modal-content {
476
+ text-align: left;
477
+ max-height: 400px;
478
+ overflow-y: scroll;
479
+ padding: 10px 20px 10px 0;
480
+ }
481
+ }
482
+
483
+ .envato-elements__content{
484
+ h1, h2, h3{
485
+ font-family: 'Rubik', sans-serif;
486
+ }
487
+ }
src/scss/admin/_helper.scss ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__support {
2
+ height: 40px;
3
+ border-top: 1px solid #e0e5e9;
4
+ width: 100%;
5
+ clear: both;
6
+ line-height: 40px;
7
+ }
8
+ .envato-elements__support p {
9
+ text-align: center;
10
+ }
src/scss/admin/_importer.scss ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__importer-wrapper{
2
+ margin-left: auto;
3
+ margin-right: 15px;
4
+ display:flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+
8
+ @media screen and (max-width: 782px) {
9
+ display:none;
10
+ }
11
+ }
12
+ .envato-elements__importer{
13
+ margin-left: auto;
14
+ margin-right: 0;
15
+ position: relative;
16
+ display:flex;
17
+ [type="checkbox"]{
18
+ display:none;
19
+ &:checked ~ .envato-elements__importer-list{
20
+ display:block;
21
+ }
22
+ &:checked ~ .envato-elements__importer-trigger:before{
23
+ content: "\f142";
24
+ }
25
+ }
26
+ }
27
+
28
+ .envato-elements__importer-status {
29
+ border-left:1px solid #f1f1f1;
30
+ border-right:1px solid #f1f1f1;
31
+ height: 55px;
32
+ line-height: 55px;
33
+ padding:0 20px;
34
+ opacity: 0;
35
+ transition: opacity 0.2s linear;
36
+ &.--active{
37
+ opacity: 0.8;
38
+ }
39
+ }
40
+
41
+ .envato-elements__importer-trigger {
42
+ border:none;
43
+ background:none;
44
+ width: 55px;
45
+ text-align: center;
46
+ position: relative;
47
+ &:before{
48
+ content: "\f140";
49
+ padding-right: 2px;
50
+ font-size: 20px;
51
+ width: 20px;
52
+ height: 20px;
53
+ top: 50%;
54
+ margin-top: -10px;
55
+ font-family: dashicons;
56
+ position: absolute;
57
+ left: 50%;
58
+ margin-left: -10px;
59
+ }
60
+ }
61
+
62
+ .envato-elements__importer-list{
63
+ position: absolute;
64
+ display:none;
65
+ background:#FFF;
66
+ padding: 10px;
67
+ z-index: 2;
68
+ width: 320px;
69
+ top:54px;
70
+ right:-14px;
71
+ border-left:1px solid #e0e5e9;
72
+ border-bottom:1px solid #e0e5e9;
73
+ border-right: 0;
74
+ border-top: 0;
75
+ max-height: 400px;
76
+ overflow-y: auto;
77
+ ul{
78
+ margin:0;
79
+ padding:0;
80
+ }
81
+ }
src/scss/admin/_photos.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__collections--photos{
2
+ .envato-elements__collections-header,
3
+ .envato-elements__collections-content{
4
+ filter: blur(2px);
5
+ }
6
+ .envato-elements__collections-thumb{
7
+ background-size:cover;
8
+ }
9
+ }
src/scss/admin/_welcome.scss ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .envato-elements__welcome {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: stretch;
5
+ margin:auto;
6
+ }
7
+
8
+ .envato-elements__welcome-inner {
9
+ align-items: center;
10
+ width: 410px;
11
+ border: 1px solid #E0E5E9;
12
+ background-color: #FFFFFF;
13
+ text-align: center;
14
+ padding:30px;
15
+ h2{
16
+ font-weight: 300;
17
+ font-size: 20px;
18
+ color:#777;
19
+ margin: 0;
20
+ padding: 0;
21
+ line-height: 1.1;
22
+ }
23
+ p:first-of-type {
24
+ margin-bottom: 0.5em;
25
+ }
26
+ input[type="email"]{
27
+ padding: 9px;
28
+ width:100%;
29
+ border-radius: 5px;
30
+ }
31
+ div{
32
+ padding:2px;
33
+ }
34
+ .button-primary{
35
+ padding: 2px 40px;
36
+ font-size: 1.1em;
37
+ height: auto;
38
+ margin-top: 15px;
39
+ }
40
+ }
41
+
42
+
43
+ .envato-elements__welcome-checkboxes{
44
+ text-align: left;
45
+ margin-top: 10px;
46
+ label{
47
+ display:flex;
48
+ padding: 5px;
49
+ input{
50
+ margin: auto 10px auto 0;
51
+ }
52
+ }
53
+ }
uninstall.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If uninstall not called from WordPress exit
3
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
4
+ exit();
5
+ }
6
+
7
+ // Clean up options.
8
+ delete_option( 'envato_elements_tracker_notice' );
9
+ delete_option( '_envato_elements_installed_time' );
10
+ delete_option( 'envato_elements_license_code' );
11
+ // todo: move everything into the single options array below.
12
+ delete_option( 'envato_elements_options' );
views/collections/header.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ require __DIR__ . '/../header.php';
8
+
9
+ Envato_Elements\Category::get_instance()->header_nav();
10
+
11
+ ?>
12
+
13
+ <div class="envato-elements__importer-wrapper">
14
+ </div>
15
+
views/collections/js-holder.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
views/header.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+
10
+ <div class="envato-elements__header-logo">
11
+ <a href="<?php echo esc_url( Envato_Elements\Plugin::get_instance()->get_url() ); ?>"><img src="<?php echo esc_url( ENVATO_ELEMENTS_URI . 'assets/images/envato-elements-template-kits.svg' ); ?>" alt="Envato Elements"></a>
12
+ </div>
views/license/settings.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <div>
10
+
11
+ <p>
12
+ Thank you for registering this product.
13
+ </p>
14
+
15
+ <p>
16
+ <a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?action=envato_elements_deactivate' ), 'deactivate' ) ); ?>">Deactivate Website</a>
17
+ </p>
18
+
19
+ </div>
views/license/welcome.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+
10
+ <div class="envato-elements__welcome">
11
+ <div class="envato-elements__welcome-inner">
12
+ <form action="<?php echo esc_url( admin_url( 'admin.php?action=envato_elements_registration' ) ); ?>" method="POST">
13
+ <?php wp_nonce_field( 'envato_elements_signup' ); ?>
14
+ <?php
15
+ if ( ! empty( $_GET['registration'] ) ) {
16
+ echo '<div class="envato-elements-notice envato-elements-notice--signup">';
17
+ switch ( $_GET['registration'] ) {
18
+ case 'reset':
19
+ echo '<p>' . esc_html__( 'Successfully reset, please register again below.', 'envato-elements' ) . ' </p>';
20
+ break;
21
+ case 'success':
22
+ echo '<p>' . esc_html__( 'Successfully registered', 'envato-elements' ) . ' </p>';
23
+ break;
24
+ case 'error':
25
+ echo '<p>' . esc_html__( 'There was an error with the request, please try again.', 'envato-elements' ) . ' </p>';
26
+ break;
27
+ case 'terms':
28
+ echo '<p>' . esc_html__( 'Please agree to the Terms & Conditions in order to continue.', 'envato-elements' ) . ' </p>';
29
+ break;
30
+ case 'failure':
31
+ echo '<p>' . esc_html__( 'Activation failed, please ensure a valid email address is entered.', 'envato-elements' ) . ' </p>';
32
+ break;
33
+ }
34
+ echo '</div>';
35
+ }
36
+ ?>
37
+ <img src="<?php echo esc_url( ENVATO_ELEMENTS_URI . 'assets/images/welcome-2.svg' ); ?>" alt="Welcome"
38
+ width="200"/>
39
+ <p>Welcome. Thanks for trying our new plugin,</p>
40
+ <h2>Envato Elements - Template Kits (Beta).</h2>
41
+
42
+ <p>Enter your email address &amp; accept our terms to continue</p>
43
+ <div>
44
+ <?php
45
+ $current_user = wp_get_current_user();
46
+ ?>
47
+ <input type="email" name="email_address" value="<?php echo esc_attr( $current_user->user_email ); ?>"
48
+ placeholder="you@example.com">
49
+ </div>
50
+ <div class="envato-elements__welcome-checkboxes">
51
+ <label>
52
+ <input type="checkbox" name="condition_terms" value="1" required>
53
+ <span>
54
+ I agree to the
55
+ <a href="https://wp.envatoextensions.com/terms-conditions/" target="_blank"
56
+ data-nav-type="terms-modal" class="envato-elements--action">Envato Elements - Template Kits BETA Terms</a>
57
+ </span>
58
+ </label>
59
+ <label>
60
+ <input type="checkbox" name="condition_emails" value="1">
61
+ <span>
62
+ Yes, I want to receive marketing emails about the <br/>
63
+ Envato Elements for WordPress Plugin
64
+ </span>
65
+ </label>
66
+ </div>
67
+ <div>
68
+ <input type="submit" name="submit" id="submit" class="button-primary"
69
+ value="<?php esc_attr_e( 'Continue', 'envato-elements' ); ?>"/>
70
+ </div>
71
+ </form>
72
+ </div>
73
+ </div>
views/notices/global.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+
10
+ <div class="envato-elements-notice envato-elements-notice--global">
11
+ <?php if ( $messages && is_array( $messages ) ) { ?>
12
+ <ul>
13
+ <?php
14
+ foreach ( $messages as $message ) {
15
+ ?>
16
+ <li><?php echo wp_kses_post( $message ); ?></li>
17
+ <?php
18
+ }
19
+ ?>
20
+ </ul>
21
+ <?php } ?>
22
+ </div>
views/templates/collection.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <script id="tmpl-envato-elements__collection-template-cell" type="text/x-handlebars-template">
10
+ <div class="envato-elements__collection-template-cell">
11
+ <div class="envato-elements__collection-template">
12
+ <button
13
+ data-nav-type="import-template"
14
+ data-category-slug="{{categorySlug}}"
15
+ data-collection-id="{{collectionId}}"
16
+ data-template-id="{{templateId}}"
17
+ class="envato-elements--action envato-elements-template-status
18
+ {{#if templateInstalled}} envato-elements-template-status--imported{{/if}}
19
+ {{#if templateInserted.length}} envato-elements-template-status--imported{{/if}}
20
+ "
21
+ >Status
22
+ </button>
23
+ <a href="{{templateUrl}}"
24
+ data-nav-type="template"
25
+ data-category-slug="{{categorySlug}}"
26
+ data-collection-id="{{collectionId}}"
27
+ data-template-id="{{templateId}}"
28
+ class="envato-elements__collection-template-thumb envato-elements--action"
29
+ data-src="{{previewThumb}}"
30
+ style="padding-bottom: {{previewThumbAspect}};"
31
+ >&nbsp;</a>
32
+ <span class="envato-elements__collection-template-label">{{templateName}}</span>
33
+ </div>
34
+ </div>
35
+ </script>
36
+
37
+
38
+ <script id="tmpl-envato-elements__collection-preview" type="text/x-handlebars-template">
39
+ <section class="envato-elements__collection-detail-thumbnail">
40
+ {{#if largeThumb.src}}
41
+ <div class="envato-elements__collection-preview-placeholder">
42
+ <img
43
+ src="{{largeThumb.src}}"
44
+ width="{{largeThumb.width}}"
45
+ height="{{largeThumb.height}}"
46
+ class="envato-elements__collection-preview-large-img"
47
+ onload="this.parentNode.className = this.parentNode.className + ' --loaded';"
48
+ />
49
+ <div class="envato-elements__collection-preview-placeholder-img-wrap">
50
+ <img
51
+ src="{{previewThumb}}"
52
+ width="{{largeThumb.width}}"
53
+ height="{{largeThumb.height}}"
54
+ class="envato-elements__collection-preview-placeholder-img"
55
+ />
56
+ </div>
57
+ </div>
58
+ {{else}}
59
+ <div class="envato-elements__collection-preview-placeholder"></div>
60
+ {{/if}}
61
+ </section>
62
+ <section class="envato-elements__collection-detail-actions">
63
+ <button type="button"
64
+ data-nav-type="collection-close"
65
+ data-category-slug="{{categorySlug}}"
66
+ class="envato-elements__collection-preview-close envato-elements--action">Close</button>
67
+
68
+ <p class="envato-elements__collection-preview-label">Page Template:</p>
69
+ <h3 class="envato-elements__collection-preview-title">{{templateName}}</h3>
70
+ <hr>
71
+ {{#if templateError}}
72
+ <div class="envato-elements-notice envato-elements-notice--warning">
73
+ If you'd like to use this template please ensure all required plugins are installed and up to date: <br/>
74
+ <ul>
75
+ {{#each templateMissingPlugins}}
76
+ <li><a href="{{{url}}}">{{text}}</a></li>
77
+ {{/each}}
78
+ </ul>
79
+ </div>
80
+ {{else}}
81
+
82
+
83
+ {{#if_eq categorySlug "elementor"}}
84
+ <div class="envato-elements__collection-template-options">
85
+
86
+ {{#if templateInstalled}}
87
+ <div class="envato-elements__collection-template-option envato-elements__collection-template-option--edit-template">
88
+
89
+ <a href="{{templateInstalledURL}}" class="button button-primary" target="_blank">{{templateInstalledText}}</a>
90
+ <div class="envato-elements__collection-template-option--help-text">
91
+ This template has been imported, it is also available in your Elementor <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=elementor_library' ) ); ?>">My Templates</a> area for future use.
92
+ </div>
93
+
94
+ </div>
95
+
96
+ {{else}}
97
+ <div class="envato-elements__collection-template-option envato-elements__collection-template-option--edit-template">
98
+
99
+ <button
100
+ data-nav-type="import-template"
101
+ data-category-slug="{{categorySlug}}"
102
+ data-collection-id="{{collectionId}}"
103
+ data-template-id="{{templateId}}"
104
+ class="button envato-elements-import-button envato-elements--action button-primary"
105
+ >Import Template <span></span></button>
106
+
107
+ <div class="envato-elements__collection-template-option--help-text">
108
+ Importing this template will make it available in your Elementor <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=elementor_library' ) ); ?>">My Templates</a> area for future use.
109
+ </div>
110
+
111
+ </div>
112
+ {{/if}}
113
+
114
+ <div class="envato-elements__collection-template-option envato-elements__collection-template-option--divider">
115
+ OR
116
+ </div>
117
+
118
+ {{/if_eq}}
119
+
120
+ <div class="envato-elements__collection-template-option envato-elements__collection-template-option--create-page">
121
+
122
+ <input type="text" name="insert-template-page-name"
123
+ class="envato-elements__create-page-name"
124
+ data-category-slug="{{categorySlug}}"
125
+ data-collection-id="{{collectionId}}"
126
+ data-template-id="{{templateId}}"
127
+ placeholder="Choose Your Page Name">
128
+ <br />
129
+ <button type="button"
130
+ data-nav-type="insert-template-create-page"
131
+ data-category-slug="{{categorySlug}}"
132
+ data-collection-id="{{collectionId}}"
133
+ data-template-id="{{templateId}}"
134
+ class="button envato-elements-insert-button envato-elements--action">
135
+ {{#if templateInserted}}
136
+ Create Another Page
137
+ {{else}}
138
+ Create New Page
139
+ {{/if}}
140
+ <span></span>
141
+ </button>
142
+
143
+ {{#if templateInserted}}
144
+ <div class="envato-elements__collection-template-option--help-text">
145
+ Pages created with this Template:
146
+ {{#each templateInserted}}
147
+ <a href="{{pageUrl}}" target="_blank">{{pageName}}</a>
148
+ {{/each}}
149
+ </div>
150
+ {{else}}
151
+ <div class="envato-elements__collection-template-option--help-text">
152
+ Creating a page from this template will make a new page and it will be set to 'draft'.
153
+ </div>
154
+ {{/if}}
155
+
156
+ </div>
157
+
158
+ </div>
159
+ {{/if}}
160
+
161
+ </section>
162
+ </script>
163
+
views/templates/collections.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <script id="tmpl-envato-elements__collections" type="text/x-handlebars-template">
10
+
11
+ <div class="envato-elements__collections envato-elements__collections--{{categorySlug}}">
12
+
13
+ {{#if feedback}}
14
+ {{{feedback}}}
15
+ {{/if}}
16
+ <header class="envato-elements__collections-header">
17
+ <h2>{{pageTitle}}</h2>
18
+ <span>
19
+ </span>
20
+ </header>
21
+ <section class="envato-elements__collections-content">
22
+ </section>
23
+ {{#if show_coming_soon}}
24
+ <div class="envato-elements__coming-soon">
25
+ We'll be adding more Template Kits soon, watch this space!
26
+ </div>
27
+ {{/if}}
28
+ {{#if pagination}}
29
+ <div class="envato-elements__pagination">
30
+ {{#each pagination}}
31
+ <div class="envato-elements__pagination-item{{#if pageCurrent}} envato-elements__pagination-item--current{{/if}}">
32
+ {{#if pageCurrent}}
33
+ {{pageLabel}}
34
+ {{else}}
35
+ <a href="#"
36
+ data-nav-type="category"
37
+ data-category-slug="{{../categorySlug}}"
38
+ data-search='{ "page": {{pageLabel}} }'
39
+ class="envato-elements--action"
40
+ >{{pageLabel}}</a>
41
+ {{/if}}
42
+ </div>
43
+ {{/each}}
44
+ </div>
45
+ {{/if}}
46
+ </div>
47
+
48
+ </script>
49
+ <script id="tmpl-envato-elements__collections-single" type="text/x-handlebars-template">
50
+
51
+ <article class="envato-elements__collections-single">
52
+ <section class="envato-elements__collections-single-detail">
53
+ </section>
54
+ <section class="envato-elements__collections-single-summary">
55
+ <header>
56
+ <h3 class="envato-elements__collections-single-title">{{collectionName}}</h3>
57
+ <span class="envato-elements__collections-single-count">{{templates.length}} templates in this {{contentTypeName}}</span>
58
+ </header>
59
+ <section class="envato-elements__collections-scroller">
60
+ <div class="envato-elements__collections-templates">
61
+
62
+ </div>
63
+ </section>
64
+ </section>
65
+ </article>
66
+
67
+ </script>
views/templates/general.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+
10
+ <script id="tmpl-envato-elements__error-modal" type="text/x-handlebars-template">
11
+ <section class="envato-elements__modal envato-elements__modal--error">
12
+ <div class="envato-elements__modal-inner">
13
+ <div class="envato-elements__modal-inner-bg">
14
+ <header class="envato-elements__modal-header">
15
+ <h3>Error: {{title}} </h3>
16
+ <button class="envato-elements__modal-close"></button>
17
+ </header>
18
+ <section class="envato-elements__modal-content">
19
+ <div class="envato-elements-notice envato-elements-notice--error">
20
+ <p>{{{message}}} </p>
21
+ </div>
22
+ {{#if reactivate}}
23
+ <p>Please try to <a href="" onclick="window.location.reload();return false;">refresh the page</a> or <a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin.php?action=envato_elements_deactivate' ), 'deactivate' ) ); ?>">re-activate</a> the plugin.</p>
24
+ {{/if}}
25
+ </div>
26
+ </div>
27
+ </section>
28
+ </script>
views/templates/imports.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <script id="tmpl-envato-elements__importer" type="text/x-handlebars-template">
10
+
11
+ <div class="envato-elements__importer">
12
+
13
+ <input type="checkbox" name="envato-elements__import-toggle" id="envato-elements__import-toggle" value="1">
14
+ <div class="envato-elements__importer-status">
15
+
16
+ </div>
17
+ <label for="envato-elements__import-toggle" class="envato-elements__importer-trigger">
18
+ </label>
19
+
20
+
21
+ </div>
22
+ </script>
23
+ <script id="tmpl-envato-elements__importer-list" type="text/x-handlebars-template">
24
+
25
+ {{#if imports}}
26
+ <div class="envato-elements__importer-list">
27
+ <ul>
28
+ {{#each imports}}
29
+ <li>
30
+ {{#if imported}}
31
+ Imported:
32
+ {{else}}
33
+ Importing...
34
+ {{/if}}
35
+ <a href="#"
36
+ data-nav-type="template"
37
+ data-category-slug="{{categorySlug}}"
38
+ data-collection-id="{{collectionId}}"
39
+ data-template-id="{{templateId}}"
40
+ class="envato-elements--action"
41
+ >{{name}}</a>
42
+ </li>
43
+ {{/each}}
44
+ </ul>
45
+ </div>
46
+ {{/if}}
47
+ </script>
views/templates/terms.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <script id="tmpl-envato-elements__terms-modal" type="text/x-handlebars-template">
10
+ <section class="envato-elements__modal envato-elements__modal--terms-conditions">
11
+ <div class="envato-elements__modal-inner">
12
+ <div class="envato-elements__modal-inner-bg">
13
+ <header class="envato-elements__modal-header">
14
+ <h3>Terms &amp; Conditions</h3>
15
+ <button class="envato-elements__modal-close"></button>
16
+ </header>
17
+ <section class="envato-elements__modal-content">
18
+
19
+ <p>Hi, we’re Envato Pty Ltd (<strong>we, our</strong>) and thanks for beta testing our new Envato Elements&#8211; Template Kits WordPress Plugin. This plugin enables you to access ‘template kits’ and other content. A template kit is a collection of tailored templates designed for use with a specific WordPress page/site builder. Together, our plugin, template kits and other content are called our
20
+ <strong>Service</strong>.</p>
21
+
22
+ <p>By accessing or using our Service, you agree to these terms and to our Privacy Policy: <a
23
+ href="https://envato.com/privacy/" target="_blank">https://envato.com/privacy/</a>.</p>
24
+ <h3>Beta trial</h3>
25
+ <p>Our Service is still in a beta trial. While our intention is to transition to an active product at the end of the trial period, we cannot guarantee the Service will continue in any form after the trial is over.</p>
26
+
27
+ <p>You acknowledge that we’re still developing and building the Service so we’ll be changing it from time to time (or may even cancel your use and recall the service completely), and errors and faults are possible. You also agree to follow our guidance on use of our products from time to time.</p>
28
+ <p>You agree to answer our questions as best you can, and to let us record you and your participation. We may keep and use those records for our own internal purposes. If you want to know more about how we treat your identifying information, see our
29
+ <a href="https://envato.com/privacy/" target="_blank">Privacy Policy</a>.</p>
30
+ <p>Your ideas and feedback can be used in our products and marketing.</p>
31
+ <h3>License Terms</h3>
32
+ <p>We grant you a limited license to make use of any of the templates you have imported. This license includes the right to import, customise and use the templates. You can combine the templates with other works to form a derivative work. The resultant works are subject to the terms of this license.</p>
33
+
34
+ <p>You can use the templates to create one or more websites, and those websites can even be used for commercial purposes. You can can also use the templates in a project created on behalf of a client. Remember, that client will be bound by the terms of this license.</p>
35
+
36
+ <p>However, you’re <strong>not permitted</strong> to:</p>
37
+ <ul>
38
+ <li>re-distribute any of the templates or template kits ‘as is’ (even if free of charge);</li>
39
+ <li>re-distribute any modified versions or derivatives of the templates or template kits as stock;</li>
40
+ <li>use any of the templates in any automated ‘website builder’ type of tool or any other application allowing an end user to create a website as part of an ‘on demand’, ‘made to order’ or ‘build it yourself’ service; or</li>
41
+ <li>register or claim copyright ownership in any material created using the template kits.</li>
42
+ </ul>
43
+ <p>We may terminate your license immediately if you do any of these things.</p>
44
+ <h3>Disclaimers and liability</h3>
45
+ <p>The template kits and templates on our site have been created by third parties. As we didn’t create the template kits (or templates) ourselves (and aren’t charging you to download and use them!), we’re making them available to you on an
46
+ <strong>as is</strong> basis and without warranties of any kind. Without limitation, we do not warrant that the template kits or templates (or anything created by you using the template kits or templates) are (or will be) original or that they will not infringe the intellectual property rights, including trademark rights, of third parties.
47
+ </p>
48
+
49
+ <p>To the maximum extent permitted by applicable laws, we exclude liability to you (whether in contract, tort (including negligence) or otherwise) arising from or in connection with your use of the Service, including any customised use of or any template or content made available via the Service. If we cannot exclude liability, then our total liability to you is limited to $10 USD.</p>
50
+
51
+ </section>
52
+ </div>
53
+ </div>
54
+ </section>
55
+ </script>
views/wrapper.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit; // Exit if accessed directly.
5
+ }
6
+
7
+ ?>
8
+
9
+ <div class="envato-elements__wrapper envato-elements__wrapper--fixed">
10
+ <div class="envato-elements__header">
11
+ <?php echo $this->header; ?>
12
+ </div>
13
+
14
+ <div class="envato-elements__content">
15
+ <?php Envato_Elements\Notices::get_instance()->print_global_notices(); ?>
16
+ <div class="envato-elements__modal-holder"></div>
17
+ <div class="envato-elements__content-dynamic">
18
+ <?php echo $this->content; ?>
19
+ </div>
20
+ </div>
21
+
22
+ <div class="envato-elements__support">
23
+ <p><strong>Feedback &amp; Support: </strong> If you have any questions or feedback for the team please send an email to <a href="mailto:extensions@envato.com">extensions@envato.com</a>.</p>
24
+ </div>
25
+
26
+
27
+ </div>