PluginProbe ʕ •ᴥ•ʔ
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid / 7.0.2
The Post Grid – Shortcode, Gutenberg Blocks and Elementor Addon for Post Grid v7.0.2
7.9.3 7.9.2 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.2.0 4.2.1 4.2.2 4.2.3 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 6.0.0 7.0.0 7.0.1 7.0.2 7.1.0 7.2.0 7.2.1 7.2.10 7.2.11 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7 7.2.8 7.2.9 7.3.0 7.3.1 7.4.0 7.4.1 7.4.2 7.4.3 7.5.0 7.6.0 7.6.1 7.7.0 7.7.1 7.7.10 7.7.11 7.7.12 7.7.13 7.7.14 7.7.15 7.7.16 7.7.17 7.7.18 7.7.19 7.7.2 7.7.20 7.7.21 7.7.22 7.7.3 7.7.4 7.7.5 7.7.6 7.7.7 7.7.8 7.7.9 7.8.0 7.8.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.9.0 7.9.1
the-post-grid / assets / elementor / main.js
the-post-grid / assets / elementor Last commit date
main.asset.php 3 years ago main.css 3 years ago main.css.map 3 years ago main.js 3 years ago main.js.map 3 years ago
main.js
2061 lines
1 /******/ (function() { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./src/elementor/ImportLayoutModal.js":
5 /*!********************************************!*\
6 !*** ./src/elementor/ImportLayoutModal.js ***!
7 \********************************************/
8 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
13 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
14 /* harmony import */ var react_responsive_masonry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-responsive-masonry */ "./node_modules/react-responsive-masonry/es/index.js");
15 /* harmony import */ var _components_CardItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/CardItem */ "./src/elementor/components/CardItem.js");
16 /* harmony import */ var _ImportLayoutModal_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ImportLayoutModal.scss */ "./src/elementor/ImportLayoutModal.scss");
17
18 const {
19 useEffect,
20 useState,
21 useRef
22 } = wp.element;
23 const {
24 Spinner
25 } = wp.components;
26 const {
27 apiFetch
28 } = wp;
29 const {
30 __
31 } = wp.i18n;
32
33
34
35 const CHECK_ICON = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
36 width: "9",
37 height: "6",
38 viewBox: "0 0 9 6",
39 fill: "none",
40 xmlns: "http://www.w3.org/2000/svg"
41 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
42 d: "M3.18778 6C3.03869 5.99939 2.89575 5.94399 2.78943 5.84561L0.165003 3.3754C0.0593532 3.27596 0 3.14109 0 3.00046C0 2.85983 0.0593532 2.72496 0.165003 2.62552C0.270652 2.52608 0.413943 2.47021 0.563354 2.47021C0.712764 2.47021 0.856055 2.52608 0.961705 2.62552L3.18778 4.72078L8.0383 0.155306C8.09061 0.106068 8.15271 0.0670104 8.22106 0.0403629C8.28941 0.0137154 8.36267 0 8.43665 0C8.51063 0 8.58388 0.0137154 8.65223 0.0403629C8.72058 0.0670104 8.78269 0.106068 8.835 0.155306C8.88731 0.204545 8.92881 0.262999 8.95712 0.327332C8.98543 0.391664 9 0.460616 9 0.530249C9 0.599882 8.98543 0.668834 8.95712 0.733167C8.92881 0.797499 8.88731 0.855954 8.835 0.905192L3.58614 5.84561C3.47982 5.94399 3.33688 5.99939 3.18778 6Z",
43 fill: "white"
44 }));
45
46 const ImportLayoutModal = props => {
47 const searchRef = useRef();
48 const [loading, setLoading] = useState(true);
49 const [allData, setAllData] = useState([]); //Layout
50
51 const [layoutCategories, setLayoutCategories] = useState([]);
52 const [layoutCards, setLayoutCards] = useState([]);
53 const [allLayoutCount, setAllLayoutCount] = useState('');
54 const [allSectionCount, setAllSectionCount] = useState('');
55 const [catID, setCatID] = useState('all');
56 const [searchTerm, setSearchTerm] = useState('');
57 const [notFoundMessage, setNotFoundMessage] = useState('');
58 const selectCatObj = {
59 cat: 'all',
60 name: 'Layout',
61 count: allLayoutCount
62 };
63 const [selectedCategory, setSelectedCategory] = useState(selectCatObj); //Section
64
65 const [sectionCategories, setSectionCategories] = useState([]); //Others
66
67 const [category, setCategory] = useState('layout');
68 const [cards, setCards] = useState([]);
69 const [sidebarCategory, setSidebarCategory] = useState([]);
70 const [status, setStatus] = useState('all');
71 const [totalCount, setTotalCount] = useState('');
72
73 const fetch_all_layouts = () => {
74 let currentUserId = rttpgParams.current_user_id;
75 const options = {
76 method: "POST",
77 url: `${rttpgParams.ajaxurl}?action=rttpg_get_el_layouts&nonce=${rttpgParams.nonce}&user_id=${currentUserId}&status=1`,
78 headers: {
79 "Content-Type": "application/json"
80 }
81 };
82 apiFetch(options).then(response => {
83 if (response.success) {
84 setAllData(response.data);
85 setLayoutCategories(response.data.layouts.category);
86 setSectionCategories(response.data.sections.category);
87 setAllLayoutCount(response.data.layouts.all_terms);
88 setAllSectionCount(response.data.sections.all_terms);
89 setLoading(false);
90 } else {
91 setLoading(false);
92 }
93 }).catch(error => {
94 console.log(error);
95 setLoading(false);
96 });
97 };
98
99 useEffect(() => {
100 fetch_all_layouts();
101 }, []);
102 useEffect(() => {
103 var _allData$layouts, _allData$sections;
104
105 if (layoutCategories && category === 'layout') {
106 setSidebarCategory(layoutCategories);
107 }
108
109 if (sectionCategories && category === 'section') {
110 setSidebarCategory(sectionCategories);
111 }
112
113 const allLayouts = allData === null || allData === void 0 ? void 0 : (_allData$layouts = allData.layouts) === null || _allData$layouts === void 0 ? void 0 : _allData$layouts.posts;
114 const allSections = allData === null || allData === void 0 ? void 0 : (_allData$sections = allData.sections) === null || _allData$sections === void 0 ? void 0 : _allData$sections.posts;
115
116 if (allLayouts && category === 'layout') {
117 setLayoutCards(allLayouts);
118 setCards(allLayouts);
119 }
120
121 if (allSections && category === 'section') {
122 setLayoutCards(allSections);
123 setCards(allSections);
124 }
125 }, [layoutCategories, sectionCategories, category]); //Filter post and category
126
127 const loadCards = () => {
128 let newCards = [...cards];
129
130 if (status === 'pro') {
131 newCards = newCards.filter(item => item.status !== 'free');
132 setTotalCount(newCards.length);
133 }
134
135 if (status === 'free') {
136 newCards = newCards.filter(item => item.status === 'free');
137 setTotalCount(newCards.length);
138 }
139
140 if (searchTerm) {
141 newCards = newCards.filter(item => item.title.toLowerCase().includes(searchTerm));
142
143 if (newCards.length === 0) {
144 setNotFoundMessage("Sorry, we couldn't find the match.");
145 } else {
146 setNotFoundMessage('');
147 setTotalCount(newCards.length);
148 }
149 } else {
150 setNotFoundMessage('');
151 }
152
153 if (selectedCategory.cat != 'all') {
154 let newLayout = newCards.filter(item => item.category === selectedCategory.cat);
155 setLayoutCards(newLayout);
156 setTotalCount(newLayout.length);
157 } else {
158 setLayoutCards(newCards);
159 }
160
161 setCatID(selectedCategory.cat);
162 };
163
164 const layoutClickHandle = layout => {
165 setCategory(layout);
166 setCatID('all');
167 setSearchTerm('');
168 setStatus('all');
169 setTotalCount('');
170 setTimeout(function () {
171 setCatID('all');
172 setSelectedCategory({
173 cat: 'all',
174 name: layout === 'layout' ? 'Layout' : 'Sections',
175 count: layout === 'layout' ? allLayoutCount : allSectionCount
176 });
177 }, 100);
178 };
179
180 useEffect(() => {
181 setLayoutCards([]);
182 loadCards();
183 }, ['', status, selectedCategory, searchTerm]);
184 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
185 className: `rttpg-layout-modal-inner`
186 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
187 className: `rttpg-modal-inner`
188 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
189 className: `rttpg-modal-inner modal-${category}`
190 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
191 className: "rttpg-layout-modal-header"
192 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
193 className: "rttpg-layout-header-inner"
194 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
195 className: category === 'layout' ? 'active' : 'button',
196 onClick: () => layoutClickHandle('layout')
197 }, __("Starter Layouts")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
198 className: category === 'section' ? 'active' : 'button',
199 onClick: () => layoutClickHandle('section')
200 }, __("Premade Section"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
201 className: "layout-search-wrapper"
202 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
203 ref: searchRef,
204 type: "text",
205 onChange: e => setSearchTerm(e.target.value),
206 value: searchTerm,
207 placeholder: __("Search Here..."),
208 className: "form-control"
209 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
210 className: `tpg-search-empty`,
211 onClick: () => {
212 setSearchTerm('');
213 searchRef.current.focus();
214 }
215 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
216 width: "27",
217 height: "27",
218 viewBox: "0 0 27 27",
219 fill: "none",
220 xmlns: "http://www.w3.org/2000/svg"
221 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
222 d: "M26.77 25.6596L20.6351 19.5248C22.518 17.3777 23.5569 14.6608 23.5569 11.7785C23.5569 8.63218 22.3316 5.67452 20.107 3.44996C17.8824 1.22539 14.9248 0 11.7785 0C8.63218 0 5.67452 1.22539 3.44996 3.44996C1.22539 5.67452 0 8.63218 0 11.7785C0 14.9248 1.22539 17.8824 3.44996 20.107C5.67452 22.3316 8.63218 23.5569 11.7785 23.5569C14.6608 23.5569 17.3777 22.518 19.5248 20.6351L25.6596 26.77C25.813 26.9233 26.0139 27 26.2148 27C26.4157 27 26.6166 26.9233 26.77 26.77C27.0767 26.4632 27.0767 25.9663 26.77 25.6596ZM4.56032 18.9966C2.63252 17.0684 1.57046 14.5049 1.57046 11.7785C1.57046 9.05202 2.63252 6.48851 4.56032 4.56032C6.48851 2.63252 9.05202 1.57046 11.7785 1.57046C14.5049 1.57046 17.0684 2.63252 18.9966 4.56032C20.9244 6.48851 21.9865 9.05202 21.9865 11.7785C21.9865 14.5049 20.9244 17.0684 18.9966 18.9966C17.0684 20.9244 14.5049 21.9865 11.7785 21.9865C9.05202 21.9865 6.48851 20.9244 4.56032 18.9966Z",
223 fill: "white"
224 }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
225 className: "rttpg-modal-close-wrapper",
226 onClick: e => {
227 window.tmPromo.destroy();
228 }
229 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
230 width: "14",
231 height: "14",
232 viewBox: "0 0 14 14",
233 fill: "none",
234 xmlns: "http://www.w3.org/2000/svg"
235 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
236 d: "M7 8.49049L1.78327 13.7072C1.58809 13.9024 1.33967 14 1.03802 14C0.736375 14 0.487959 13.9024 0.292775 13.7072C0.0975915 13.512 0 13.2636 0 12.962C0 12.6603 0.0975915 12.4119 0.292775 12.2167L5.50951 7L0.292775 1.78327C0.0975915 1.58809 0 1.33967 0 1.03802C0 0.736375 0.0975915 0.487959 0.292775 0.292775C0.487959 0.0975915 0.736375 0 1.03802 0C1.33967 0 1.58809 0.0975915 1.78327 0.292775L7 5.50951L12.2167 0.292775C12.4119 0.0975915 12.6603 0 12.962 0C13.2636 0 13.512 0.0975915 13.7072 0.292775C13.9024 0.487959 14 0.736375 14 1.03802C14 1.33967 13.9024 1.58809 13.7072 1.78327L8.49049 7L13.7072 12.2167C13.9024 12.4119 14 12.6603 14 12.962C14 13.2636 13.9024 13.512 13.7072 13.7072C13.512 13.9024 13.2636 14 12.962 14C12.6603 14 12.4119 13.9024 12.2167 13.7072L7 8.49049Z",
237 fill: "white"
238 })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
239 className: "rttpg-layout-modal-sidebar"
240 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
241 className: "rttpg-modal-sidebar-content"
242 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, __('Categories')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
243 className: "rttpg-template-categories"
244 }, category === 'layout' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
245 className: catID === 'all' ? 'block active' : 'block',
246 onClick: () => {
247 setTotalCount('');
248 setStatus('all');
249 setSelectedCategory({
250 cat: 'all',
251 name: 'Layout',
252 count: allLayoutCount
253 });
254 }
255 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
256 className: `list-checkbox`
257 }, CHECK_ICON), __("All Starter Layouts"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
258 className: `item-count`
259 }, allLayoutCount)), category === 'section' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
260 className: catID === 'all' ? 'block active' : 'block',
261 onClick: () => {
262 setTotalCount('');
263 setStatus('all');
264 setSelectedCategory({
265 cat: 'all',
266 name: 'Section',
267 count: allSectionCount
268 });
269 }
270 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
271 className: `list-checkbox`
272 }, CHECK_ICON), __("All Premade Sections"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
273 className: `item-count`
274 }, allSectionCount)), sidebarCategory && sidebarCategory.map(item => {
275 let is_active = catID === item.term_id ? 'active' : '';
276 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
277 className: `block ${is_active}`,
278 key: item.term_id,
279 onClick: () => setSelectedCategory({
280 cat: item.term_id,
281 name: item.name,
282 count: item.count
283 })
284 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
285 className: `list-checkbox`
286 }, CHECK_ICON), __(item.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
287 className: `item-count`
288 }, item.count));
289 })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
290 className: "rttpg-modal-content-wrapper"
291 }, category != "saved_blocks" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
292 className: "rttpg-template-sub-header"
293 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", null, category === 'layout' ? allLayoutCount + " Layouts " : allSectionCount + " Sections ", totalCount && "( " + totalCount + " )"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
294 className: "rttpg-template-filter-button-group"
295 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
296 className: status === 'all' ? "active" : '',
297 onClick: () => {
298 setStatus('all');
299 setTotalCount('');
300 }
301 }, __("All")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
302 className: status === 'free' ? "active" : '',
303 onClick: () => {
304 setStatus('free');
305 }
306 }, __("Free")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
307 className: status === 'pro' ? "active" : '',
308 onClick: () => {
309 setStatus('pro');
310 }
311 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
312 src: rttpgParams.plugin_url + "/assets/images/crown.svg",
313 alt: ""
314 }), __("Premium")))), !loading ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
315 id: "modalContainer",
316 className: "rttpg-template-list"
317 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
318 className: "rttpg-modal-template-container"
319 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
320 id: "layouts-blocks-list",
321 className: "rttpg-builder-page-templates"
322 }, notFoundMessage && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
323 className: `rttpg-not-fount`
324 }, notFoundMessage), layoutCards && category === 'layout' && layoutCards.map(item => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_CardItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
325 key: item.id,
326 data: item,
327 importLayout: props.importLayout,
328 insertIndex: props.insertIndex
329 })), layoutCards && category === 'section' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_responsive_masonry__WEBPACK_IMPORTED_MODULE_1__.ResponsiveMasonry, {
330 columnsCountBreakPoints: {
331 300: 1,
332 768: 2,
333 1200: 3
334 }
335 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_responsive_masonry__WEBPACK_IMPORTED_MODULE_1__["default"], {
336 gutter: "20px"
337 }, layoutCards.map(item => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_CardItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
338 key: item.id,
339 data: item,
340 importLayout: props.importLayout,
341 insertIndex: props.insertIndex
342 }))))))) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
343 className: "tpg-loader"
344 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Spinner, null)))))));
345 };
346
347 /* harmony default export */ __webpack_exports__["default"] = (ImportLayoutModal);
348
349 /***/ }),
350
351 /***/ "./src/elementor/components/CardItem.js":
352 /*!**********************************************!*\
353 !*** ./src/elementor/components/CardItem.js ***!
354 \**********************************************/
355 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
356
357 "use strict";
358 __webpack_require__.r(__webpack_exports__);
359 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
360 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
361
362 const {
363 __
364 } = wp.i18n;
365 const {
366 Fragment
367 } = wp.element;
368 const {
369 Spinner
370 } = wp.components;
371 const {
372 apiFetch
373 } = wp;
374
375 function countLyout(layout_id) {
376 let currentUserId = rttpgParams.current_user_id;
377 const options = {
378 method: "POST",
379 url: `${rttpgParams.ajaxurl}?action=rttpg_el_layout_count&nonce=${rttpgParams.nonce}&user_id=${currentUserId}&layout_id=${layout_id}`,
380 headers: {
381 "Content-Type": "application/json"
382 }
383 };
384 apiFetch(options);
385 }
386
387 const CardItem = _ref => {
388 let {
389 data,
390 importLayout,
391 insertIndex
392 } = _ref;
393 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
394 className: "rttpg-layout-column"
395 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
396 className: "rttpg-single-block-item "
397 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
398 className: "rttpg-single-item-inner"
399 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
400 className: "rttpg-layout-image-wrap"
401 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
402 className: "lazy-image",
403 alt: data.title,
404 src: data.image_url
405 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
406 className: "tpg-spinner"
407 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Spinner, null)), data.status !== 'free' ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
408 className: "rttpg-pro"
409 }, __("Pro")) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
410 className: "rttpg-free"
411 }, __("Free"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
412 className: "rttpg-tmpl-info"
413 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
414 className: "rttpg-import-button-group"
415 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
416 className: "rttpg-button",
417 target: "_blank",
418 href: data.preview_link
419 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
420 width: "20",
421 height: "20",
422 viewBox: "0 0 20 20",
423 fill: "none",
424 xmlns: "http://www.w3.org/2000/svg"
425 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
426 d: "M19 0H13C12.7348 0 12.4804 0.105357 12.2929 0.292893C12.1054 0.48043 12 0.734783 12 1C12 1.26522 12.1054 1.51957 12.2929 1.70711C12.4804 1.89464 12.7348 2 13 2H16.586L8.293 10.293C8.19749 10.3852 8.12131 10.4956 8.0689 10.6176C8.01649 10.7396 7.9889 10.8708 7.98775 11.0036C7.9866 11.1364 8.0119 11.2681 8.06218 11.391C8.11246 11.5138 8.18671 11.6255 8.28061 11.7194C8.3745 11.8133 8.48615 11.8875 8.60905 11.9378C8.73194 11.9881 8.86362 12.0134 8.9964 12.0122C9.12918 12.0111 9.2604 11.9835 9.38241 11.9311C9.50441 11.8787 9.61475 11.8025 9.707 11.707L18 3.414V7C18 7.26522 18.1054 7.51957 18.2929 7.70711C18.4804 7.89464 18.7348 8 19 8C19.2652 8 19.5196 7.89464 19.7071 7.70711C19.8946 7.51957 20 7.26522 20 7V1C20 0.734783 19.8946 0.48043 19.7071 0.292893C19.5196 0.105357 19.2652 0 19 0Z",
427 fill: "black"
428 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
429 d: "M17 8.588C16.7348 8.588 16.4804 8.69336 16.2929 8.88089C16.1054 9.06843 16 9.32278 16 9.588V16.751C15.9997 17.0822 15.8681 17.3997 15.6339 17.6339C15.3997 17.8681 15.0822 17.9997 14.751 18H3.249C2.91783 17.9997 2.60029 17.8681 2.36612 17.6339C2.13194 17.3997 2.00026 17.0822 2 16.751V5.249C2.00026 4.91783 2.13194 4.60029 2.36612 4.36612C2.60029 4.13194 2.91783 4.00026 3.249 4H9.471C9.73621 4 9.99057 3.89464 10.1781 3.70711C10.3656 3.51957 10.471 3.26522 10.471 3C10.471 2.73478 10.3656 2.48043 10.1781 2.29289C9.99057 2.10536 9.73621 2 9.471 2H3.249C2.38764 2.00106 1.56186 2.3437 0.952779 2.95278C0.343703 3.56186 0.00105851 4.38764 0 5.249V16.749C0.000529143 17.6107 0.34294 18.437 0.952073 19.0465C1.56121 19.656 2.38729 19.9989 3.249 20H14.749C15.6107 19.9995 16.437 19.6571 17.0465 19.0479C17.656 18.4388 17.9989 17.6127 18 16.751V9.588C18 9.32278 17.8946 9.06843 17.7071 8.88089C17.5196 8.69336 17.2652 8.588 17 8.588Z",
430 fill: "black"
431 })), __("Preview"), " "), data.status !== "free" && !rttpgParams.hasPro ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
432 className: "rttpg-button-download",
433 target: "_blank",
434 href: "//www.radiustheme.com/downloads/the-post-grid-pro-for-wordpress/"
435 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
436 width: "22",
437 height: "20",
438 viewBox: "0 0 22 20",
439 fill: "none",
440 xmlns: "http://www.w3.org/2000/svg"
441 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
442 d: "M10.9917 0.522392C11.0869 0.522318 11.1811 0.540613 11.2691 0.576231C11.3571 0.611849 11.437 0.664092 11.5043 0.72997C11.5716 0.795848 11.6249 0.874068 11.6613 0.960155C11.6977 1.04624 11.7164 1.13851 11.7163 1.23167L11.7163 11.8391C11.7163 12.0272 11.64 12.2076 11.5041 12.3407C11.3682 12.4737 11.1839 12.5484 10.9917 12.5484C10.7995 12.5484 10.6152 12.4737 10.4793 12.3407C10.3434 12.2076 10.2671 12.0272 10.2671 11.8391L10.2671 1.23167C10.2671 1.04356 10.3434 0.863153 10.4793 0.730137C10.6152 0.597121 10.7995 0.522392 10.9917 0.522392Z",
443 fill: "white"
444 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
445 "fill-rule": "evenodd",
446 "clip-rule": "evenodd",
447 d: "M10.9916 0.322405C11.1124 0.32231 11.2323 0.345541 11.3442 0.390868C11.4561 0.436199 11.5581 0.502796 11.6442 0.587055C11.7303 0.671322 11.7988 0.77161 11.8456 0.882298C11.8923 0.992971 11.9164 1.11174 11.9163 1.23177C11.9163 1.2318 11.9163 1.23182 11.9163 1.23185L11.7169 1.23169L11.9163 1.23169L11.9163 1.23177L11.9163 11.8391C11.9163 12.0817 11.8179 12.3134 11.644 12.4836C11.4703 12.6536 11.2356 12.7484 10.9917 12.7484C10.7478 12.7484 10.5131 12.6536 10.3394 12.4836C10.1655 12.3134 10.0671 12.0817 10.0671 11.8391L10.0671 1.23169C10.0671 0.989131 10.1655 0.757398 10.3394 0.587221C10.5131 0.417222 10.7477 0.322444 10.9916 0.322405ZM11.2691 0.576243C11.1812 0.540626 11.0869 0.52233 10.9917 0.522405C10.7995 0.522405 10.6152 0.597133 10.4793 0.730149C10.3434 0.863165 10.2671 1.04357 10.2671 1.23169L10.2671 11.8391C10.2671 12.0272 10.3434 12.2077 10.4793 12.3407C10.6152 12.4737 10.7995 12.5484 10.9917 12.5484C11.1839 12.5484 11.3682 12.4737 11.5041 12.3407C11.64 12.2077 11.7163 12.0272 11.7163 11.8391L11.7163 1.23169C11.7164 1.13852 11.6977 1.04626 11.6613 0.960168C11.625 0.87408 11.5716 0.79586 11.5043 0.729982C11.437 0.664104 11.3571 0.611862 11.2691 0.576243Z",
448 fill: "white"
449 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
450 d: "M10.9917 0.203482C11.2352 0.203103 11.4765 0.249829 11.7015 0.340973C11.9265 0.432118 12.1309 0.565886 12.303 0.734592L16.2166 4.56528C16.3525 4.69824 16.4288 4.87857 16.4288 5.0666C16.4288 5.25463 16.3525 5.43496 16.2166 5.56792C16.0808 5.70088 15.8966 5.77557 15.7045 5.77557C15.5124 5.77557 15.3281 5.70088 15.1923 5.56792L11.2787 1.73723C11.241 1.70034 11.1962 1.67108 11.147 1.65112C11.0978 1.63116 11.045 1.62088 10.9917 1.62088C10.9384 1.62088 10.8856 1.63116 10.8364 1.65112C10.7872 1.67108 10.7424 1.70034 10.7047 1.73723L6.79112 5.56792C6.65449 5.69716 6.47147 5.7687 6.28147 5.76714C6.09147 5.76557 5.9097 5.69103 5.77531 5.55956C5.64092 5.42809 5.56466 5.25022 5.56295 5.06424C5.56125 4.87827 5.63424 4.69909 5.7662 4.56528L9.6804 0.734592C9.8525 0.565936 10.0569 0.432201 10.2819 0.341059C10.507 0.249918 10.7482 0.203165 10.9917 0.203482Z",
451 fill: "white"
452 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
453 "fill-rule": "evenodd",
454 "clip-rule": "evenodd",
455 d: "M10.7047 1.73724L6.79112 5.56793C6.65449 5.69717 6.47147 5.76871 6.28147 5.76715C6.09147 5.76559 5.9097 5.69104 5.77531 5.55957C5.64091 5.4281 5.56465 5.25023 5.56295 5.06426C5.56125 4.87829 5.63423 4.6991 5.76619 4.56529L9.6804 0.734604C9.85249 0.565948 10.0569 0.432213 10.2819 0.341072C10.507 0.24993 10.7482 0.203177 10.9917 0.203494C11.2352 0.203115 11.4765 0.24984 11.7015 0.340985C11.9265 0.43213 12.1309 0.565898 12.303 0.734604L16.2166 4.56529C16.3525 4.69825 16.4288 4.87858 16.4288 5.06661C16.4288 5.25464 16.3525 5.43497 16.2166 5.56793C16.0808 5.70089 15.8966 5.77559 15.7045 5.77559C15.5124 5.77559 15.3281 5.70089 15.1923 5.56793L11.2787 1.73724C11.241 1.70036 11.1962 1.6711 11.147 1.65113C11.0978 1.63117 11.045 1.62089 10.9917 1.62089C10.9384 1.62089 10.8856 1.63117 10.8364 1.65113C10.7872 1.6711 10.7424 1.70036 10.7047 1.73724ZM9.54041 0.591762L5.6263 4.42235L5.62379 4.42486C5.45492 4.59609 5.36076 4.8263 5.36296 5.06609C5.36516 5.30588 5.46351 5.53435 5.63545 5.70254C5.80724 5.8706 6.03873 5.96516 6.27982 5.96714C6.52091 5.96913 6.75395 5.87839 6.92856 5.71323L10.8446 1.88017C10.8636 1.86165 10.8863 1.84673 10.9115 1.83648C10.9368 1.82622 10.9641 1.82089 10.9917 1.82089C11.0193 1.82089 11.0466 1.82622 11.0719 1.83648C11.0971 1.84673 11.1198 1.86164 11.1388 1.88017L15.0524 5.71086C15.226 5.88084 15.4607 5.97559 15.7045 5.97559C15.9482 5.97559 16.1829 5.88084 16.3565 5.71086C16.5303 5.54074 16.6288 5.30909 16.6288 5.06661C16.6288 4.82414 16.5303 4.59248 16.3565 4.42236L12.443 0.591798C12.2522 0.404655 12.0256 0.256491 11.7766 0.155613C11.5276 0.0547734 11.2609 0.00311138 10.9917 0.0034933",
456 fill: "white"
457 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
458 d: "M19.0788 19H2.92116C2.41182 18.9994 1.92353 18.8011 1.56337 18.4486C1.20322 18.0961 1.00061 17.6181 1 17.1196V12.1614C1 11.9733 1.07635 11.7929 1.21224 11.6599C1.34814 11.5269 1.53245 11.4521 1.72464 11.4521C1.91682 11.4521 2.10114 11.5269 2.23703 11.6599C2.37293 11.7929 2.44928 11.9733 2.44928 12.1614V17.1196C2.44943 17.242 2.49919 17.3594 2.58766 17.446C2.67612 17.5326 2.79605 17.5813 2.92116 17.5815H19.0788C19.2039 17.5813 19.3239 17.5326 19.4123 17.446C19.5008 17.3594 19.5506 17.242 19.5507 17.1196V12.1614C19.5507 11.9733 19.6271 11.7929 19.763 11.6599C19.8989 11.5269 20.0832 11.4521 20.2754 11.4521C20.4675 11.4521 20.6519 11.5269 20.7878 11.6599C20.9237 11.7929 21 11.9733 21 12.1614V17.1196C20.9994 17.6181 20.7968 18.0961 20.4366 18.4486C20.0765 18.8011 19.5882 18.9994 19.0788 19Z",
459 fill: "white"
460 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
461 "fill-rule": "evenodd",
462 "clip-rule": "evenodd",
463 d: "M19.0788 19.2H2.92116C2.36023 19.1994 1.82139 18.981 1.42347 18.5915C1.02541 18.2019 0.80068 17.6727 0.799999 17.1198L0.799999 12.1614C0.799999 11.9189 0.89848 11.6871 1.07234 11.517C1.24606 11.3469 1.48077 11.2521 1.72464 11.2521C1.9685 11.2521 2.20322 11.3469 2.37693 11.517C2.55079 11.6871 2.64927 11.9189 2.64927 12.1614L2.64927 17.1193C2.64927 17.1194 2.64927 17.1193 2.64927 17.1193C2.64938 17.1874 2.67702 17.2536 2.72755 17.3031C2.77826 17.3527 2.84789 17.3814 2.9214 17.3815H19.0786C19.1521 17.3814 19.2217 17.3527 19.2724 17.3031C19.323 17.2536 19.3506 17.1874 19.3507 17.1193V12.1614C19.3507 11.9189 19.4492 11.6871 19.6231 11.517C19.7968 11.3469 20.0315 11.2521 20.2754 11.2521C20.5192 11.2521 20.7539 11.3469 20.9277 11.517C21.1015 11.6871 21.2 11.9189 21.2 12.1614V17.1196C21.1993 17.6725 20.9746 18.2019 20.5765 18.5915C20.1786 18.981 19.6398 19.1994 19.0788 19.2ZM19.0788 17.5815H2.92116C2.79605 17.5813 2.67612 17.5326 2.58766 17.446C2.49919 17.3594 2.44943 17.242 2.44927 17.1196V12.1614C2.44927 11.9733 2.37293 11.7929 2.23703 11.6599C2.10114 11.5269 1.91682 11.4521 1.72464 11.4521C1.53245 11.4521 1.34814 11.5269 1.21224 11.6599C1.07634 11.7929 0.999999 11.9733 0.999999 12.1614V17.1196C1.00061 17.6181 1.20322 18.0961 1.56337 18.4486C1.92353 18.8011 2.41182 18.9994 2.92116 19H19.0788C19.5882 18.9994 20.0765 18.8011 20.4366 18.4486C20.7968 18.0961 20.9994 17.6181 21 17.1196V12.1614C21 11.9733 20.9237 11.7929 20.7878 11.6599C20.6519 11.5269 20.4675 11.4521 20.2754 11.4521C20.0832 11.4521 19.8989 11.5269 19.763 11.6599C19.6271 11.7929 19.5507 11.9733 19.5507 12.1614V17.1196C19.5506 17.242 19.5008 17.3594 19.4123 17.446C19.3239 17.5326 19.2039 17.5813 19.0788 17.5815Z",
464 fill: "white"
465 })), __("Upgrade to Pro")) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", {
466 className: "rttpg-button rttpg-button-download",
467 onClick: e => {
468 importLayout(data.content, insertIndex);
469 countLyout(data.id);
470 console.log(data.id);
471 }
472 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
473 width: "22",
474 height: "20",
475 viewBox: "0 0 22 20",
476 fill: "none",
477 xmlns: "http://www.w3.org/2000/svg"
478 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
479 d: "M11 12.2295C10.9048 12.2296 10.8106 12.2113 10.7226 12.1757C10.6347 12.14 10.5547 12.0878 10.4874 12.0219C10.4201 11.956 10.3668 11.8778 10.3304 11.7917C10.294 11.7056 10.2753 11.6134 10.2754 11.5202L10.2754 0.912773C10.2754 0.72466 10.3517 0.544251 10.4876 0.411235C10.6235 0.278219 10.8078 0.203491 11 0.203491C11.1922 0.203491 11.3765 0.278219 11.5124 0.411235C11.6483 0.544251 11.7246 0.72466 11.7246 0.912773L11.7246 11.5202C11.7246 11.7083 11.6483 11.8887 11.5124 12.0218C11.3765 12.1548 11.1922 12.2295 11 12.2295Z",
480 fill: "white"
481 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
482 "fill-rule": "evenodd",
483 "clip-rule": "evenodd",
484 d: "M11.0002 12.4295C10.8793 12.4296 10.7595 12.4064 10.6475 12.361C10.5356 12.3157 10.4336 12.2491 10.3475 12.1648C10.2614 12.0806 10.1929 11.9803 10.1461 11.8696C10.0994 11.7589 10.0753 11.6402 10.0754 11.5201C10.0754 11.5201 10.0754 11.5201 10.0754 11.52L10.2748 11.5202H10.0754L10.0754 11.5201L10.0754 0.91276C10.0754 0.670205 10.1738 0.438473 10.3477 0.268295C10.5214 0.0982601 10.7561 0.003479 11 0.003479C11.2439 0.003479 11.4786 0.0982601 11.6523 0.268295C11.8262 0.438473 11.9246 0.670205 11.9246 0.91276L11.9246 11.5202C11.9246 11.7628 11.8262 11.9945 11.6523 12.1647C11.4786 12.3347 11.244 12.4294 11.0002 12.4295ZM10.7226 12.1756C10.8106 12.2113 10.9048 12.2296 11 12.2295C11.1922 12.2295 11.3765 12.1548 11.5124 12.0217C11.6483 11.8887 11.7246 11.7083 11.7246 11.5202L11.7246 0.91276C11.7246 0.724647 11.6483 0.544239 11.5124 0.411223C11.3765 0.278207 11.1922 0.203479 11 0.203479C10.8078 0.203479 10.6235 0.278207 10.4876 0.411223C10.3517 0.544239 10.2754 0.724647 10.2754 0.91276L10.2754 11.5202C10.2753 11.6134 10.294 11.7056 10.3304 11.7917C10.3668 11.8778 10.4201 11.956 10.4874 12.0219C10.5547 12.0878 10.6347 12.14 10.7226 12.1756Z",
485 fill: "white"
486 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
487 d: "M11 12.5484C10.7565 12.5488 10.5152 12.5021 10.2902 12.4109C10.0652 12.3198 9.86076 12.186 9.6887 12.0173L5.77508 8.18661C5.63924 8.05365 5.56293 7.87332 5.56293 7.68529C5.56293 7.49726 5.63924 7.31693 5.77508 7.18397C5.91091 7.05101 6.09515 6.97632 6.28725 6.97632C6.47935 6.97632 6.66359 7.05101 6.79942 7.18397L10.713 11.0147C10.7507 11.0515 10.7955 11.0808 10.8447 11.1008C10.8939 11.1207 10.9467 11.131 11 11.131C11.0533 11.131 11.1061 11.1207 11.1553 11.1008C11.2045 11.0808 11.2493 11.0515 11.287 11.0147L15.2006 7.18397C15.3372 7.05473 15.5202 6.98319 15.7102 6.98475C15.9002 6.98632 16.082 7.06086 16.2164 7.19233C16.3508 7.3238 16.427 7.50168 16.4288 7.68765C16.4305 7.87362 16.3575 8.0528 16.2255 8.18661L12.3113 12.0173C12.1392 12.186 11.9348 12.3197 11.7098 12.4108C11.4847 12.502 11.2435 12.5487 11 12.5484Z",
488 fill: "white"
489 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
490 "fill-rule": "evenodd",
491 "clip-rule": "evenodd",
492 d: "M11.287 11.0146L15.2006 7.18396C15.3372 7.05472 15.5202 6.98318 15.7102 6.98474C15.9002 6.9863 16.082 7.06085 16.2164 7.19232C16.3508 7.32379 16.4271 7.50166 16.4288 7.68763C16.4305 7.87361 16.3575 8.05279 16.2255 8.1866L12.3113 12.0173C12.1392 12.1859 11.9348 12.3197 11.7098 12.4108C11.4847 12.502 11.2435 12.5487 11 12.5484C10.7565 12.5488 10.5153 12.5021 10.2902 12.4109C10.0652 12.3198 9.86076 12.186 9.6887 12.0173L5.77508 8.1866C5.63924 8.05364 5.56293 7.87331 5.56293 7.68528C5.56293 7.49725 5.63924 7.31692 5.77508 7.18396C5.91092 7.051 6.09515 6.97631 6.28725 6.97631C6.47936 6.97631 6.66359 7.051 6.79943 7.18396L10.713 11.0146C10.7507 11.0515 10.7955 11.0808 10.8447 11.1008C10.8939 11.1207 10.9467 11.131 11 11.131C11.0533 11.131 11.1061 11.1207 11.1553 11.1008C11.2045 11.0808 11.2493 11.0515 11.287 11.0146ZM12.4513 12.1601L16.3654 8.32954L16.3679 8.32703C16.5368 8.1558 16.6309 7.92559 16.6287 7.6858C16.6266 7.44602 16.5282 7.21755 16.3563 7.04935C16.1845 6.88129 15.953 6.78673 15.7119 6.78475C15.4708 6.78276 15.2378 6.8735 15.0631 7.03866L11.1471 10.8717C11.1281 10.8902 11.1054 10.9052 11.0802 10.9154C11.0549 10.9257 11.0276 10.931 11 10.931C10.9724 10.931 10.9451 10.9257 10.9199 10.9154C10.8946 10.9052 10.8719 10.8902 10.853 10.8717L6.93933 7.04103C6.76567 6.87106 6.53103 6.77631 6.28725 6.77631C6.04347 6.77631 5.80884 6.87106 5.63518 7.04103C5.46138 7.21115 5.36293 7.44281 5.36293 7.68528C5.36293 7.92775 5.46138 8.15941 5.63518 8.32953L9.54868 12.1601C9.73954 12.3472 9.96607 12.4954 10.2151 12.5963C10.4641 12.6971 10.7308 12.7488 11 12.7484",
493 fill: "white"
494 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
495 d: "M19.0788 19H2.92116C2.41182 18.9994 1.92353 18.8011 1.56337 18.4486C1.20322 18.0961 1.00061 17.6181 1 17.1196V12.1614C1 11.9733 1.07635 11.7929 1.21224 11.6599C1.34814 11.5269 1.53245 11.4521 1.72464 11.4521C1.91682 11.4521 2.10114 11.5269 2.23703 11.6599C2.37293 11.7929 2.44928 11.9733 2.44928 12.1614V17.1196C2.44943 17.242 2.49919 17.3594 2.58766 17.446C2.67612 17.5326 2.79605 17.5813 2.92116 17.5815H19.0788C19.2039 17.5813 19.3239 17.5326 19.4123 17.446C19.5008 17.3594 19.5506 17.242 19.5507 17.1196V12.1614C19.5507 11.9733 19.6271 11.7929 19.763 11.6599C19.8989 11.5269 20.0832 11.4521 20.2754 11.4521C20.4675 11.4521 20.6519 11.5269 20.7878 11.6599C20.9237 11.7929 21 11.9733 21 12.1614V17.1196C20.9994 17.6181 20.7968 18.0961 20.4366 18.4486C20.0765 18.8011 19.5882 18.9994 19.0788 19Z",
496 fill: "white"
497 }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
498 "fill-rule": "evenodd",
499 "clip-rule": "evenodd",
500 d: "M19.0788 19.2H2.92116C2.36023 19.1994 1.82139 18.981 1.42348 18.5915C1.02542 18.2019 0.800684 17.6727 0.800003 17.1198L0.800003 12.1614C0.800003 11.9189 0.898484 11.6871 1.07235 11.517C1.24606 11.3469 1.48078 11.2521 1.72464 11.2521C1.9685 11.2521 2.20322 11.3469 2.37694 11.517C2.5508 11.6871 2.64928 11.9189 2.64928 12.1614L2.64928 17.1193C2.64928 17.1194 2.64928 17.1193 2.64928 17.1193C2.64939 17.1874 2.67702 17.2536 2.72756 17.3031C2.77826 17.3527 2.84789 17.3814 2.9214 17.3815H19.0786C19.1521 17.3814 19.2217 17.3527 19.2724 17.3031C19.323 17.2536 19.3506 17.1874 19.3507 17.1193V12.1614C19.3507 11.9189 19.4492 11.6871 19.6231 11.517C19.7968 11.3469 20.0315 11.2521 20.2754 11.2521C20.5192 11.2521 20.7539 11.3469 20.9277 11.517C21.1015 11.6871 21.2 11.9189 21.2 12.1614V17.1196C21.1993 17.6725 20.9746 18.2019 20.5765 18.5915C20.1786 18.981 19.6398 19.1994 19.0788 19.2ZM19.0788 17.5815H2.92116C2.79606 17.5813 2.67612 17.5326 2.58766 17.446C2.4992 17.3594 2.44943 17.242 2.44928 17.1196V12.1614C2.44928 11.9733 2.37293 11.7929 2.23704 11.6599C2.10114 11.5269 1.91683 11.4521 1.72464 11.4521C1.53245 11.4521 1.34814 11.5269 1.21224 11.6599C1.07635 11.7929 1 11.9733 1 12.1614V17.1196C1.00062 17.6181 1.20322 18.0961 1.56338 18.4486C1.92353 18.8011 2.41183 18.9994 2.92116 19H19.0788C19.5882 18.9994 20.0765 18.8011 20.4366 18.4486C20.7968 18.0961 20.9994 17.6181 21 17.1196V12.1614C21 11.9733 20.9237 11.7929 20.7878 11.6599C20.6519 11.5269 20.4676 11.4521 20.2754 11.4521C20.0832 11.4521 19.8989 11.5269 19.763 11.6599C19.6271 11.7929 19.5507 11.9733 19.5507 12.1614V17.1196C19.5506 17.242 19.5008 17.3594 19.4123 17.446C19.3239 17.5326 19.2039 17.5813 19.0788 17.5815Z",
501 fill: "white"
502 })), __("Import")))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
503 className: "rttpg-tmpl-title"
504 }, data.title)));
505 }; // export default CardItem;
506
507
508 /* harmony default export */ __webpack_exports__["default"] = (CardItem);
509
510 /***/ }),
511
512 /***/ "./src/elementor/ImportLayoutModal.scss":
513 /*!**********************************************!*\
514 !*** ./src/elementor/ImportLayoutModal.scss ***!
515 \**********************************************/
516 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
517
518 "use strict";
519 __webpack_require__.r(__webpack_exports__);
520 // extracted by mini-css-extract-plugin
521
522
523 /***/ }),
524
525 /***/ "./node_modules/object-assign/index.js":
526 /*!*********************************************!*\
527 !*** ./node_modules/object-assign/index.js ***!
528 \*********************************************/
529 /***/ (function(module) {
530
531 "use strict";
532 /*
533 object-assign
534 (c) Sindre Sorhus
535 @license MIT
536 */
537
538
539 /* eslint-disable no-unused-vars */
540 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
541 var hasOwnProperty = Object.prototype.hasOwnProperty;
542 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
543
544 function toObject(val) {
545 if (val === null || val === undefined) {
546 throw new TypeError('Object.assign cannot be called with null or undefined');
547 }
548
549 return Object(val);
550 }
551
552 function shouldUseNative() {
553 try {
554 if (!Object.assign) {
555 return false;
556 }
557
558 // Detect buggy property enumeration order in older V8 versions.
559
560 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
561 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
562 test1[5] = 'de';
563 if (Object.getOwnPropertyNames(test1)[0] === '5') {
564 return false;
565 }
566
567 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
568 var test2 = {};
569 for (var i = 0; i < 10; i++) {
570 test2['_' + String.fromCharCode(i)] = i;
571 }
572 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
573 return test2[n];
574 });
575 if (order2.join('') !== '0123456789') {
576 return false;
577 }
578
579 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
580 var test3 = {};
581 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
582 test3[letter] = letter;
583 });
584 if (Object.keys(Object.assign({}, test3)).join('') !==
585 'abcdefghijklmnopqrst') {
586 return false;
587 }
588
589 return true;
590 } catch (err) {
591 // We don't expect any of the above to throw, but better to be safe.
592 return false;
593 }
594 }
595
596 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
597 var from;
598 var to = toObject(target);
599 var symbols;
600
601 for (var s = 1; s < arguments.length; s++) {
602 from = Object(arguments[s]);
603
604 for (var key in from) {
605 if (hasOwnProperty.call(from, key)) {
606 to[key] = from[key];
607 }
608 }
609
610 if (getOwnPropertySymbols) {
611 symbols = getOwnPropertySymbols(from);
612 for (var i = 0; i < symbols.length; i++) {
613 if (propIsEnumerable.call(from, symbols[i])) {
614 to[symbols[i]] = from[symbols[i]];
615 }
616 }
617 }
618 }
619
620 return to;
621 };
622
623
624 /***/ }),
625
626 /***/ "./node_modules/prop-types/checkPropTypes.js":
627 /*!***************************************************!*\
628 !*** ./node_modules/prop-types/checkPropTypes.js ***!
629 \***************************************************/
630 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
631
632 "use strict";
633 /**
634 * Copyright (c) 2013-present, Facebook, Inc.
635 *
636 * This source code is licensed under the MIT license found in the
637 * LICENSE file in the root directory of this source tree.
638 */
639
640
641
642 var printWarning = function() {};
643
644 if (true) {
645 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
646 var loggedTypeFailures = {};
647 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
648
649 printWarning = function(text) {
650 var message = 'Warning: ' + text;
651 if (typeof console !== 'undefined') {
652 console.error(message);
653 }
654 try {
655 // --- Welcome to debugging React ---
656 // This error was thrown as a convenience so that you can use this stack
657 // to find the callsite that caused this warning to fire.
658 throw new Error(message);
659 } catch (x) { /**/ }
660 };
661 }
662
663 /**
664 * Assert that the values match with the type specs.
665 * Error messages are memorized and will only be shown once.
666 *
667 * @param {object} typeSpecs Map of name to a ReactPropType
668 * @param {object} values Runtime values that need to be type-checked
669 * @param {string} location e.g. "prop", "context", "child context"
670 * @param {string} componentName Name of the component for error messages.
671 * @param {?Function} getStack Returns the component stack.
672 * @private
673 */
674 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
675 if (true) {
676 for (var typeSpecName in typeSpecs) {
677 if (has(typeSpecs, typeSpecName)) {
678 var error;
679 // Prop type validation may throw. In case they do, we don't want to
680 // fail the render phase where it didn't fail before. So we log it.
681 // After these have been cleaned up, we'll let them throw.
682 try {
683 // This is intentionally an invariant that gets caught. It's the same
684 // behavior as without this statement except with a better message.
685 if (typeof typeSpecs[typeSpecName] !== 'function') {
686 var err = Error(
687 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
688 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
689 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
690 );
691 err.name = 'Invariant Violation';
692 throw err;
693 }
694 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
695 } catch (ex) {
696 error = ex;
697 }
698 if (error && !(error instanceof Error)) {
699 printWarning(
700 (componentName || 'React class') + ': type specification of ' +
701 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
702 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
703 'You may have forgotten to pass an argument to the type checker ' +
704 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
705 'shape all require an argument).'
706 );
707 }
708 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
709 // Only monitor this failure once because there tends to be a lot of the
710 // same error.
711 loggedTypeFailures[error.message] = true;
712
713 var stack = getStack ? getStack() : '';
714
715 printWarning(
716 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
717 );
718 }
719 }
720 }
721 }
722 }
723
724 /**
725 * Resets warning cache when testing.
726 *
727 * @private
728 */
729 checkPropTypes.resetWarningCache = function() {
730 if (true) {
731 loggedTypeFailures = {};
732 }
733 }
734
735 module.exports = checkPropTypes;
736
737
738 /***/ }),
739
740 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
741 /*!************************************************************!*\
742 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
743 \************************************************************/
744 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
745
746 "use strict";
747 /**
748 * Copyright (c) 2013-present, Facebook, Inc.
749 *
750 * This source code is licensed under the MIT license found in the
751 * LICENSE file in the root directory of this source tree.
752 */
753
754
755
756 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/prop-types/node_modules/react-is/index.js");
757 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
758
759 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
760 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
761 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
762
763 var printWarning = function() {};
764
765 if (true) {
766 printWarning = function(text) {
767 var message = 'Warning: ' + text;
768 if (typeof console !== 'undefined') {
769 console.error(message);
770 }
771 try {
772 // --- Welcome to debugging React ---
773 // This error was thrown as a convenience so that you can use this stack
774 // to find the callsite that caused this warning to fire.
775 throw new Error(message);
776 } catch (x) {}
777 };
778 }
779
780 function emptyFunctionThatReturnsNull() {
781 return null;
782 }
783
784 module.exports = function(isValidElement, throwOnDirectAccess) {
785 /* global Symbol */
786 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
787 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
788
789 /**
790 * Returns the iterator method function contained on the iterable object.
791 *
792 * Be sure to invoke the function with the iterable as context:
793 *
794 * var iteratorFn = getIteratorFn(myIterable);
795 * if (iteratorFn) {
796 * var iterator = iteratorFn.call(myIterable);
797 * ...
798 * }
799 *
800 * @param {?object} maybeIterable
801 * @return {?function}
802 */
803 function getIteratorFn(maybeIterable) {
804 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
805 if (typeof iteratorFn === 'function') {
806 return iteratorFn;
807 }
808 }
809
810 /**
811 * Collection of methods that allow declaration and validation of props that are
812 * supplied to React components. Example usage:
813 *
814 * var Props = require('ReactPropTypes');
815 * var MyArticle = React.createClass({
816 * propTypes: {
817 * // An optional string prop named "description".
818 * description: Props.string,
819 *
820 * // A required enum prop named "category".
821 * category: Props.oneOf(['News','Photos']).isRequired,
822 *
823 * // A prop named "dialog" that requires an instance of Dialog.
824 * dialog: Props.instanceOf(Dialog).isRequired
825 * },
826 * render: function() { ... }
827 * });
828 *
829 * A more formal specification of how these methods are used:
830 *
831 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
832 * decl := ReactPropTypes.{type}(.isRequired)?
833 *
834 * Each and every declaration produces a function with the same signature. This
835 * allows the creation of custom validation functions. For example:
836 *
837 * var MyLink = React.createClass({
838 * propTypes: {
839 * // An optional string or URI prop named "href".
840 * href: function(props, propName, componentName) {
841 * var propValue = props[propName];
842 * if (propValue != null && typeof propValue !== 'string' &&
843 * !(propValue instanceof URI)) {
844 * return new Error(
845 * 'Expected a string or an URI for ' + propName + ' in ' +
846 * componentName
847 * );
848 * }
849 * }
850 * },
851 * render: function() {...}
852 * });
853 *
854 * @internal
855 */
856
857 var ANONYMOUS = '<<anonymous>>';
858
859 // Important!
860 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
861 var ReactPropTypes = {
862 array: createPrimitiveTypeChecker('array'),
863 bigint: createPrimitiveTypeChecker('bigint'),
864 bool: createPrimitiveTypeChecker('boolean'),
865 func: createPrimitiveTypeChecker('function'),
866 number: createPrimitiveTypeChecker('number'),
867 object: createPrimitiveTypeChecker('object'),
868 string: createPrimitiveTypeChecker('string'),
869 symbol: createPrimitiveTypeChecker('symbol'),
870
871 any: createAnyTypeChecker(),
872 arrayOf: createArrayOfTypeChecker,
873 element: createElementTypeChecker(),
874 elementType: createElementTypeTypeChecker(),
875 instanceOf: createInstanceTypeChecker,
876 node: createNodeChecker(),
877 objectOf: createObjectOfTypeChecker,
878 oneOf: createEnumTypeChecker,
879 oneOfType: createUnionTypeChecker,
880 shape: createShapeTypeChecker,
881 exact: createStrictShapeTypeChecker,
882 };
883
884 /**
885 * inlined Object.is polyfill to avoid requiring consumers ship their own
886 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
887 */
888 /*eslint-disable no-self-compare*/
889 function is(x, y) {
890 // SameValue algorithm
891 if (x === y) {
892 // Steps 1-5, 7-10
893 // Steps 6.b-6.e: +0 != -0
894 return x !== 0 || 1 / x === 1 / y;
895 } else {
896 // Step 6.a: NaN == NaN
897 return x !== x && y !== y;
898 }
899 }
900 /*eslint-enable no-self-compare*/
901
902 /**
903 * We use an Error-like object for backward compatibility as people may call
904 * PropTypes directly and inspect their output. However, we don't use real
905 * Errors anymore. We don't inspect their stack anyway, and creating them
906 * is prohibitively expensive if they are created too often, such as what
907 * happens in oneOfType() for any type before the one that matched.
908 */
909 function PropTypeError(message, data) {
910 this.message = message;
911 this.data = data && typeof data === 'object' ? data: {};
912 this.stack = '';
913 }
914 // Make `instanceof Error` still work for returned errors.
915 PropTypeError.prototype = Error.prototype;
916
917 function createChainableTypeChecker(validate) {
918 if (true) {
919 var manualPropTypeCallCache = {};
920 var manualPropTypeWarningCount = 0;
921 }
922 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
923 componentName = componentName || ANONYMOUS;
924 propFullName = propFullName || propName;
925
926 if (secret !== ReactPropTypesSecret) {
927 if (throwOnDirectAccess) {
928 // New behavior only for users of `prop-types` package
929 var err = new Error(
930 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
931 'Use `PropTypes.checkPropTypes()` to call them. ' +
932 'Read more at http://fb.me/use-check-prop-types'
933 );
934 err.name = 'Invariant Violation';
935 throw err;
936 } else if ( true && typeof console !== 'undefined') {
937 // Old behavior for people using React.PropTypes
938 var cacheKey = componentName + ':' + propName;
939 if (
940 !manualPropTypeCallCache[cacheKey] &&
941 // Avoid spamming the console because they are often not actionable except for lib authors
942 manualPropTypeWarningCount < 3
943 ) {
944 printWarning(
945 'You are manually calling a React.PropTypes validation ' +
946 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
947 'and will throw in the standalone `prop-types` package. ' +
948 'You may be seeing this warning due to a third-party PropTypes ' +
949 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
950 );
951 manualPropTypeCallCache[cacheKey] = true;
952 manualPropTypeWarningCount++;
953 }
954 }
955 }
956 if (props[propName] == null) {
957 if (isRequired) {
958 if (props[propName] === null) {
959 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
960 }
961 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
962 }
963 return null;
964 } else {
965 return validate(props, propName, componentName, location, propFullName);
966 }
967 }
968
969 var chainedCheckType = checkType.bind(null, false);
970 chainedCheckType.isRequired = checkType.bind(null, true);
971
972 return chainedCheckType;
973 }
974
975 function createPrimitiveTypeChecker(expectedType) {
976 function validate(props, propName, componentName, location, propFullName, secret) {
977 var propValue = props[propName];
978 var propType = getPropType(propValue);
979 if (propType !== expectedType) {
980 // `propValue` being instance of, say, date/regexp, pass the 'object'
981 // check, but we can offer a more precise error message here rather than
982 // 'of type `object`'.
983 var preciseType = getPreciseType(propValue);
984
985 return new PropTypeError(
986 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
987 {expectedType: expectedType}
988 );
989 }
990 return null;
991 }
992 return createChainableTypeChecker(validate);
993 }
994
995 function createAnyTypeChecker() {
996 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
997 }
998
999 function createArrayOfTypeChecker(typeChecker) {
1000 function validate(props, propName, componentName, location, propFullName) {
1001 if (typeof typeChecker !== 'function') {
1002 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1003 }
1004 var propValue = props[propName];
1005 if (!Array.isArray(propValue)) {
1006 var propType = getPropType(propValue);
1007 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1008 }
1009 for (var i = 0; i < propValue.length; i++) {
1010 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1011 if (error instanceof Error) {
1012 return error;
1013 }
1014 }
1015 return null;
1016 }
1017 return createChainableTypeChecker(validate);
1018 }
1019
1020 function createElementTypeChecker() {
1021 function validate(props, propName, componentName, location, propFullName) {
1022 var propValue = props[propName];
1023 if (!isValidElement(propValue)) {
1024 var propType = getPropType(propValue);
1025 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1026 }
1027 return null;
1028 }
1029 return createChainableTypeChecker(validate);
1030 }
1031
1032 function createElementTypeTypeChecker() {
1033 function validate(props, propName, componentName, location, propFullName) {
1034 var propValue = props[propName];
1035 if (!ReactIs.isValidElementType(propValue)) {
1036 var propType = getPropType(propValue);
1037 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1038 }
1039 return null;
1040 }
1041 return createChainableTypeChecker(validate);
1042 }
1043
1044 function createInstanceTypeChecker(expectedClass) {
1045 function validate(props, propName, componentName, location, propFullName) {
1046 if (!(props[propName] instanceof expectedClass)) {
1047 var expectedClassName = expectedClass.name || ANONYMOUS;
1048 var actualClassName = getClassName(props[propName]);
1049 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1050 }
1051 return null;
1052 }
1053 return createChainableTypeChecker(validate);
1054 }
1055
1056 function createEnumTypeChecker(expectedValues) {
1057 if (!Array.isArray(expectedValues)) {
1058 if (true) {
1059 if (arguments.length > 1) {
1060 printWarning(
1061 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1062 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1063 );
1064 } else {
1065 printWarning('Invalid argument supplied to oneOf, expected an array.');
1066 }
1067 }
1068 return emptyFunctionThatReturnsNull;
1069 }
1070
1071 function validate(props, propName, componentName, location, propFullName) {
1072 var propValue = props[propName];
1073 for (var i = 0; i < expectedValues.length; i++) {
1074 if (is(propValue, expectedValues[i])) {
1075 return null;
1076 }
1077 }
1078
1079 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1080 var type = getPreciseType(value);
1081 if (type === 'symbol') {
1082 return String(value);
1083 }
1084 return value;
1085 });
1086 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1087 }
1088 return createChainableTypeChecker(validate);
1089 }
1090
1091 function createObjectOfTypeChecker(typeChecker) {
1092 function validate(props, propName, componentName, location, propFullName) {
1093 if (typeof typeChecker !== 'function') {
1094 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1095 }
1096 var propValue = props[propName];
1097 var propType = getPropType(propValue);
1098 if (propType !== 'object') {
1099 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1100 }
1101 for (var key in propValue) {
1102 if (has(propValue, key)) {
1103 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1104 if (error instanceof Error) {
1105 return error;
1106 }
1107 }
1108 }
1109 return null;
1110 }
1111 return createChainableTypeChecker(validate);
1112 }
1113
1114 function createUnionTypeChecker(arrayOfTypeCheckers) {
1115 if (!Array.isArray(arrayOfTypeCheckers)) {
1116 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1117 return emptyFunctionThatReturnsNull;
1118 }
1119
1120 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1121 var checker = arrayOfTypeCheckers[i];
1122 if (typeof checker !== 'function') {
1123 printWarning(
1124 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1125 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1126 );
1127 return emptyFunctionThatReturnsNull;
1128 }
1129 }
1130
1131 function validate(props, propName, componentName, location, propFullName) {
1132 var expectedTypes = [];
1133 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1134 var checker = arrayOfTypeCheckers[i];
1135 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1136 if (checkerResult == null) {
1137 return null;
1138 }
1139 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1140 expectedTypes.push(checkerResult.data.expectedType);
1141 }
1142 }
1143 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1144 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1145 }
1146 return createChainableTypeChecker(validate);
1147 }
1148
1149 function createNodeChecker() {
1150 function validate(props, propName, componentName, location, propFullName) {
1151 if (!isNode(props[propName])) {
1152 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1153 }
1154 return null;
1155 }
1156 return createChainableTypeChecker(validate);
1157 }
1158
1159 function invalidValidatorError(componentName, location, propFullName, key, type) {
1160 return new PropTypeError(
1161 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1162 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1163 );
1164 }
1165
1166 function createShapeTypeChecker(shapeTypes) {
1167 function validate(props, propName, componentName, location, propFullName) {
1168 var propValue = props[propName];
1169 var propType = getPropType(propValue);
1170 if (propType !== 'object') {
1171 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1172 }
1173 for (var key in shapeTypes) {
1174 var checker = shapeTypes[key];
1175 if (typeof checker !== 'function') {
1176 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1177 }
1178 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1179 if (error) {
1180 return error;
1181 }
1182 }
1183 return null;
1184 }
1185 return createChainableTypeChecker(validate);
1186 }
1187
1188 function createStrictShapeTypeChecker(shapeTypes) {
1189 function validate(props, propName, componentName, location, propFullName) {
1190 var propValue = props[propName];
1191 var propType = getPropType(propValue);
1192 if (propType !== 'object') {
1193 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1194 }
1195 // We need to check all keys in case some are required but missing from props.
1196 var allKeys = assign({}, props[propName], shapeTypes);
1197 for (var key in allKeys) {
1198 var checker = shapeTypes[key];
1199 if (has(shapeTypes, key) && typeof checker !== 'function') {
1200 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1201 }
1202 if (!checker) {
1203 return new PropTypeError(
1204 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1205 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1206 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1207 );
1208 }
1209 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1210 if (error) {
1211 return error;
1212 }
1213 }
1214 return null;
1215 }
1216
1217 return createChainableTypeChecker(validate);
1218 }
1219
1220 function isNode(propValue) {
1221 switch (typeof propValue) {
1222 case 'number':
1223 case 'string':
1224 case 'undefined':
1225 return true;
1226 case 'boolean':
1227 return !propValue;
1228 case 'object':
1229 if (Array.isArray(propValue)) {
1230 return propValue.every(isNode);
1231 }
1232 if (propValue === null || isValidElement(propValue)) {
1233 return true;
1234 }
1235
1236 var iteratorFn = getIteratorFn(propValue);
1237 if (iteratorFn) {
1238 var iterator = iteratorFn.call(propValue);
1239 var step;
1240 if (iteratorFn !== propValue.entries) {
1241 while (!(step = iterator.next()).done) {
1242 if (!isNode(step.value)) {
1243 return false;
1244 }
1245 }
1246 } else {
1247 // Iterator will provide entry [k,v] tuples rather than values.
1248 while (!(step = iterator.next()).done) {
1249 var entry = step.value;
1250 if (entry) {
1251 if (!isNode(entry[1])) {
1252 return false;
1253 }
1254 }
1255 }
1256 }
1257 } else {
1258 return false;
1259 }
1260
1261 return true;
1262 default:
1263 return false;
1264 }
1265 }
1266
1267 function isSymbol(propType, propValue) {
1268 // Native Symbol.
1269 if (propType === 'symbol') {
1270 return true;
1271 }
1272
1273 // falsy value can't be a Symbol
1274 if (!propValue) {
1275 return false;
1276 }
1277
1278 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1279 if (propValue['@@toStringTag'] === 'Symbol') {
1280 return true;
1281 }
1282
1283 // Fallback for non-spec compliant Symbols which are polyfilled.
1284 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1285 return true;
1286 }
1287
1288 return false;
1289 }
1290
1291 // Equivalent of `typeof` but with special handling for array and regexp.
1292 function getPropType(propValue) {
1293 var propType = typeof propValue;
1294 if (Array.isArray(propValue)) {
1295 return 'array';
1296 }
1297 if (propValue instanceof RegExp) {
1298 // Old webkits (at least until Android 4.0) return 'function' rather than
1299 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1300 // passes PropTypes.object.
1301 return 'object';
1302 }
1303 if (isSymbol(propType, propValue)) {
1304 return 'symbol';
1305 }
1306 return propType;
1307 }
1308
1309 // This handles more types than `getPropType`. Only used for error messages.
1310 // See `createPrimitiveTypeChecker`.
1311 function getPreciseType(propValue) {
1312 if (typeof propValue === 'undefined' || propValue === null) {
1313 return '' + propValue;
1314 }
1315 var propType = getPropType(propValue);
1316 if (propType === 'object') {
1317 if (propValue instanceof Date) {
1318 return 'date';
1319 } else if (propValue instanceof RegExp) {
1320 return 'regexp';
1321 }
1322 }
1323 return propType;
1324 }
1325
1326 // Returns a string that is postfixed to a warning about an invalid type.
1327 // For example, "undefined" or "of type array"
1328 function getPostfixForTypeWarning(value) {
1329 var type = getPreciseType(value);
1330 switch (type) {
1331 case 'array':
1332 case 'object':
1333 return 'an ' + type;
1334 case 'boolean':
1335 case 'date':
1336 case 'regexp':
1337 return 'a ' + type;
1338 default:
1339 return type;
1340 }
1341 }
1342
1343 // Returns class name of the object, if any.
1344 function getClassName(propValue) {
1345 if (!propValue.constructor || !propValue.constructor.name) {
1346 return ANONYMOUS;
1347 }
1348 return propValue.constructor.name;
1349 }
1350
1351 ReactPropTypes.checkPropTypes = checkPropTypes;
1352 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1353 ReactPropTypes.PropTypes = ReactPropTypes;
1354
1355 return ReactPropTypes;
1356 };
1357
1358
1359 /***/ }),
1360
1361 /***/ "./node_modules/prop-types/index.js":
1362 /*!******************************************!*\
1363 !*** ./node_modules/prop-types/index.js ***!
1364 \******************************************/
1365 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1366
1367 /**
1368 * Copyright (c) 2013-present, Facebook, Inc.
1369 *
1370 * This source code is licensed under the MIT license found in the
1371 * LICENSE file in the root directory of this source tree.
1372 */
1373
1374 if (true) {
1375 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/prop-types/node_modules/react-is/index.js");
1376
1377 // By explicitly using `prop-types` you are opting into new development behavior.
1378 // http://fb.me/prop-types-in-prod
1379 var throwOnDirectAccess = true;
1380 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1381 } else {}
1382
1383
1384 /***/ }),
1385
1386 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
1387 /*!*************************************************************!*\
1388 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1389 \*************************************************************/
1390 /***/ (function(module) {
1391
1392 "use strict";
1393 /**
1394 * Copyright (c) 2013-present, Facebook, Inc.
1395 *
1396 * This source code is licensed under the MIT license found in the
1397 * LICENSE file in the root directory of this source tree.
1398 */
1399
1400
1401
1402 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1403
1404 module.exports = ReactPropTypesSecret;
1405
1406
1407 /***/ }),
1408
1409 /***/ "./node_modules/prop-types/lib/has.js":
1410 /*!********************************************!*\
1411 !*** ./node_modules/prop-types/lib/has.js ***!
1412 \********************************************/
1413 /***/ (function(module) {
1414
1415 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1416
1417
1418 /***/ }),
1419
1420 /***/ "./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1421 /*!***********************************************************************************!*\
1422 !*** ./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1423 \***********************************************************************************/
1424 /***/ (function(__unused_webpack_module, exports) {
1425
1426 "use strict";
1427 /** @license React v16.13.1
1428 * react-is.development.js
1429 *
1430 * Copyright (c) Facebook, Inc. and its affiliates.
1431 *
1432 * This source code is licensed under the MIT license found in the
1433 * LICENSE file in the root directory of this source tree.
1434 */
1435
1436
1437
1438
1439
1440 if (true) {
1441 (function() {
1442 'use strict';
1443
1444 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1445 // nor polyfill, then a plain number is used for performance.
1446 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1447 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1448 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1449 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1450 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1451 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1452 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1453 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1454 // (unstable) APIs that have been removed. Can we remove the symbols?
1455
1456 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1457 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1458 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1459 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1460 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1461 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1462 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1463 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1464 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1465 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1466 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1467
1468 function isValidElementType(type) {
1469 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1470 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1471 }
1472
1473 function typeOf(object) {
1474 if (typeof object === 'object' && object !== null) {
1475 var $$typeof = object.$$typeof;
1476
1477 switch ($$typeof) {
1478 case REACT_ELEMENT_TYPE:
1479 var type = object.type;
1480
1481 switch (type) {
1482 case REACT_ASYNC_MODE_TYPE:
1483 case REACT_CONCURRENT_MODE_TYPE:
1484 case REACT_FRAGMENT_TYPE:
1485 case REACT_PROFILER_TYPE:
1486 case REACT_STRICT_MODE_TYPE:
1487 case REACT_SUSPENSE_TYPE:
1488 return type;
1489
1490 default:
1491 var $$typeofType = type && type.$$typeof;
1492
1493 switch ($$typeofType) {
1494 case REACT_CONTEXT_TYPE:
1495 case REACT_FORWARD_REF_TYPE:
1496 case REACT_LAZY_TYPE:
1497 case REACT_MEMO_TYPE:
1498 case REACT_PROVIDER_TYPE:
1499 return $$typeofType;
1500
1501 default:
1502 return $$typeof;
1503 }
1504
1505 }
1506
1507 case REACT_PORTAL_TYPE:
1508 return $$typeof;
1509 }
1510 }
1511
1512 return undefined;
1513 } // AsyncMode is deprecated along with isAsyncMode
1514
1515 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1516 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1517 var ContextConsumer = REACT_CONTEXT_TYPE;
1518 var ContextProvider = REACT_PROVIDER_TYPE;
1519 var Element = REACT_ELEMENT_TYPE;
1520 var ForwardRef = REACT_FORWARD_REF_TYPE;
1521 var Fragment = REACT_FRAGMENT_TYPE;
1522 var Lazy = REACT_LAZY_TYPE;
1523 var Memo = REACT_MEMO_TYPE;
1524 var Portal = REACT_PORTAL_TYPE;
1525 var Profiler = REACT_PROFILER_TYPE;
1526 var StrictMode = REACT_STRICT_MODE_TYPE;
1527 var Suspense = REACT_SUSPENSE_TYPE;
1528 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1529
1530 function isAsyncMode(object) {
1531 {
1532 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1533 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1534
1535 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1536 }
1537 }
1538
1539 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1540 }
1541 function isConcurrentMode(object) {
1542 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1543 }
1544 function isContextConsumer(object) {
1545 return typeOf(object) === REACT_CONTEXT_TYPE;
1546 }
1547 function isContextProvider(object) {
1548 return typeOf(object) === REACT_PROVIDER_TYPE;
1549 }
1550 function isElement(object) {
1551 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1552 }
1553 function isForwardRef(object) {
1554 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1555 }
1556 function isFragment(object) {
1557 return typeOf(object) === REACT_FRAGMENT_TYPE;
1558 }
1559 function isLazy(object) {
1560 return typeOf(object) === REACT_LAZY_TYPE;
1561 }
1562 function isMemo(object) {
1563 return typeOf(object) === REACT_MEMO_TYPE;
1564 }
1565 function isPortal(object) {
1566 return typeOf(object) === REACT_PORTAL_TYPE;
1567 }
1568 function isProfiler(object) {
1569 return typeOf(object) === REACT_PROFILER_TYPE;
1570 }
1571 function isStrictMode(object) {
1572 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1573 }
1574 function isSuspense(object) {
1575 return typeOf(object) === REACT_SUSPENSE_TYPE;
1576 }
1577
1578 exports.AsyncMode = AsyncMode;
1579 exports.ConcurrentMode = ConcurrentMode;
1580 exports.ContextConsumer = ContextConsumer;
1581 exports.ContextProvider = ContextProvider;
1582 exports.Element = Element;
1583 exports.ForwardRef = ForwardRef;
1584 exports.Fragment = Fragment;
1585 exports.Lazy = Lazy;
1586 exports.Memo = Memo;
1587 exports.Portal = Portal;
1588 exports.Profiler = Profiler;
1589 exports.StrictMode = StrictMode;
1590 exports.Suspense = Suspense;
1591 exports.isAsyncMode = isAsyncMode;
1592 exports.isConcurrentMode = isConcurrentMode;
1593 exports.isContextConsumer = isContextConsumer;
1594 exports.isContextProvider = isContextProvider;
1595 exports.isElement = isElement;
1596 exports.isForwardRef = isForwardRef;
1597 exports.isFragment = isFragment;
1598 exports.isLazy = isLazy;
1599 exports.isMemo = isMemo;
1600 exports.isPortal = isPortal;
1601 exports.isProfiler = isProfiler;
1602 exports.isStrictMode = isStrictMode;
1603 exports.isSuspense = isSuspense;
1604 exports.isValidElementType = isValidElementType;
1605 exports.typeOf = typeOf;
1606 })();
1607 }
1608
1609
1610 /***/ }),
1611
1612 /***/ "./node_modules/prop-types/node_modules/react-is/index.js":
1613 /*!****************************************************************!*\
1614 !*** ./node_modules/prop-types/node_modules/react-is/index.js ***!
1615 \****************************************************************/
1616 /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
1617
1618 "use strict";
1619
1620
1621 if (false) {} else {
1622 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1623 }
1624
1625
1626 /***/ }),
1627
1628 /***/ "./node_modules/react-responsive-masonry/es/Masonry/index.js":
1629 /*!*******************************************************************!*\
1630 !*** ./node_modules/react-responsive-masonry/es/Masonry/index.js ***!
1631 \*******************************************************************/
1632 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1633
1634 "use strict";
1635 __webpack_require__.r(__webpack_exports__);
1636 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
1637 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
1638 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1639 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1640 function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1641
1642 function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
1643
1644 function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
1645
1646
1647
1648
1649 var Masonry = /*#__PURE__*/function (_React$Component) {
1650 _inheritsLoose(Masonry, _React$Component);
1651
1652 function Masonry() {
1653 return _React$Component.apply(this, arguments) || this;
1654 }
1655
1656 var _proto = Masonry.prototype;
1657
1658 _proto.getColumns = function getColumns() {
1659 var _this$props = this.props,
1660 children = _this$props.children,
1661 columnsCount = _this$props.columnsCount;
1662 var columns = Array.from({
1663 length: columnsCount
1664 }, function () {
1665 return [];
1666 });
1667 react__WEBPACK_IMPORTED_MODULE_0___default().Children.forEach(children, function (child, index) {
1668 if (child && react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(child)) {
1669 columns[index % columnsCount].push(child);
1670 }
1671 });
1672 return columns;
1673 };
1674
1675 _proto.renderColumns = function renderColumns() {
1676 var gutter = this.props.gutter;
1677 return this.getColumns().map(function (column, i) {
1678 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1679 key: i,
1680 style: {
1681 display: "flex",
1682 flexDirection: "column",
1683 justifyContent: "flex-start",
1684 alignContent: "stretch",
1685 flex: 1,
1686 width: 0,
1687 gap: gutter
1688 }
1689 }, column.map(function (item) {
1690 return item;
1691 }));
1692 });
1693 };
1694
1695 _proto.render = function render() {
1696 var _this$props2 = this.props,
1697 gutter = _this$props2.gutter,
1698 className = _this$props2.className,
1699 style = _this$props2.style;
1700 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1701 style: _extends({
1702 display: "flex",
1703 flexDirection: "row",
1704 justifyContent: "center",
1705 alignContent: "stretch",
1706 boxSizing: "border-box",
1707 width: "100%",
1708 gap: gutter
1709 }, style),
1710 className: className
1711 }, this.renderColumns());
1712 };
1713
1714 return Masonry;
1715 }((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
1716
1717 Masonry.propTypes = true ? {
1718 children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)]).isRequired,
1719 columnsCount: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
1720 gutter: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
1721 className: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
1722 style: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object)
1723 } : 0;
1724 Masonry.defaultProps = {
1725 columnsCount: 3,
1726 gutter: "0",
1727 className: null,
1728 style: {}
1729 };
1730 /* harmony default export */ __webpack_exports__["default"] = (Masonry);
1731
1732 /***/ }),
1733
1734 /***/ "./node_modules/react-responsive-masonry/es/ResponsiveMasonry/index.js":
1735 /*!*****************************************************************************!*\
1736 !*** ./node_modules/react-responsive-masonry/es/ResponsiveMasonry/index.js ***!
1737 \*****************************************************************************/
1738 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1739
1740 "use strict";
1741 __webpack_require__.r(__webpack_exports__);
1742 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
1743 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
1744 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1745 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1746
1747
1748 var DEFAULT_COLUMNS_COUNT = 1;
1749 var useIsomorphicLayoutEffect = typeof window !== "undefined" ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
1750
1751 var useHasMounted = function useHasMounted() {
1752 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
1753 hasMounted = _useState[0],
1754 setHasMounted = _useState[1];
1755
1756 useIsomorphicLayoutEffect(function () {
1757 setHasMounted(true);
1758 }, []);
1759 return hasMounted;
1760 };
1761
1762 var useWindowWidth = function useWindowWidth() {
1763 var hasMounted = useHasMounted();
1764
1765 var _useState2 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
1766 width = _useState2[0],
1767 setWidth = _useState2[1];
1768
1769 var handleResize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
1770 if (!hasMounted) return;
1771 setWidth(window.innerWidth);
1772 }, [hasMounted]);
1773 useIsomorphicLayoutEffect(function () {
1774 if (hasMounted) {
1775 window.addEventListener("resize", handleResize);
1776 handleResize();
1777 return function () {
1778 return window.removeEventListener("resize", handleResize);
1779 };
1780 }
1781 }, [hasMounted, handleResize]);
1782 return width;
1783 };
1784
1785 var MasonryResponsive = function MasonryResponsive(_ref) {
1786 var _ref$columnsCountBrea = _ref.columnsCountBreakPoints,
1787 columnsCountBreakPoints = _ref$columnsCountBrea === void 0 ? {
1788 350: 1,
1789 750: 2,
1790 900: 3
1791 } : _ref$columnsCountBrea,
1792 children = _ref.children,
1793 _ref$className = _ref.className,
1794 className = _ref$className === void 0 ? null : _ref$className,
1795 _ref$style = _ref.style,
1796 style = _ref$style === void 0 ? null : _ref$style;
1797 var windowWidth = useWindowWidth();
1798 var columnsCount = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
1799 var breakPoints = Object.keys(columnsCountBreakPoints).sort(function (a, b) {
1800 return a - b;
1801 });
1802 var count = breakPoints.length > 0 ? columnsCountBreakPoints[breakPoints[0]] : DEFAULT_COLUMNS_COUNT;
1803 breakPoints.forEach(function (breakPoint) {
1804 if (breakPoint < windowWidth) {
1805 count = columnsCountBreakPoints[breakPoint];
1806 }
1807 });
1808 return count;
1809 }, [windowWidth, columnsCountBreakPoints]);
1810 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
1811 className: className,
1812 style: style
1813 }, react__WEBPACK_IMPORTED_MODULE_0___default().Children.map(children, function (child, index) {
1814 return react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, {
1815 key: index,
1816 columnsCount: columnsCount
1817 });
1818 }));
1819 };
1820
1821 MasonryResponsive.propTypes = true ? {
1822 children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)]).isRequired,
1823 columnsCountBreakPoints: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
1824 className: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
1825 style: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object)
1826 } : 0;
1827 /* harmony default export */ __webpack_exports__["default"] = (MasonryResponsive);
1828
1829 /***/ }),
1830
1831 /***/ "./node_modules/react-responsive-masonry/es/index.js":
1832 /*!***********************************************************!*\
1833 !*** ./node_modules/react-responsive-masonry/es/index.js ***!
1834 \***********************************************************/
1835 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1836
1837 "use strict";
1838 __webpack_require__.r(__webpack_exports__);
1839 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1840 /* harmony export */ "ResponsiveMasonry": function() { return /* reexport safe */ _ResponsiveMasonry__WEBPACK_IMPORTED_MODULE_1__["default"]; }
1841 /* harmony export */ });
1842 /* harmony import */ var _Masonry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Masonry */ "./node_modules/react-responsive-masonry/es/Masonry/index.js");
1843 /* harmony import */ var _ResponsiveMasonry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ResponsiveMasonry */ "./node_modules/react-responsive-masonry/es/ResponsiveMasonry/index.js");
1844
1845
1846 /* harmony default export */ __webpack_exports__["default"] = (_Masonry__WEBPACK_IMPORTED_MODULE_0__["default"]);
1847
1848
1849 /***/ }),
1850
1851 /***/ "react":
1852 /*!************************!*\
1853 !*** external "React" ***!
1854 \************************/
1855 /***/ (function(module) {
1856
1857 "use strict";
1858 module.exports = window["React"];
1859
1860 /***/ }),
1861
1862 /***/ "@wordpress/element":
1863 /*!*********************************!*\
1864 !*** external ["wp","element"] ***!
1865 \*********************************/
1866 /***/ (function(module) {
1867
1868 "use strict";
1869 module.exports = window["wp"]["element"];
1870
1871 /***/ })
1872
1873 /******/ });
1874 /************************************************************************/
1875 /******/ // The module cache
1876 /******/ var __webpack_module_cache__ = {};
1877 /******/
1878 /******/ // The require function
1879 /******/ function __webpack_require__(moduleId) {
1880 /******/ // Check if module is in cache
1881 /******/ var cachedModule = __webpack_module_cache__[moduleId];
1882 /******/ if (cachedModule !== undefined) {
1883 /******/ return cachedModule.exports;
1884 /******/ }
1885 /******/ // Create a new module (and put it into the cache)
1886 /******/ var module = __webpack_module_cache__[moduleId] = {
1887 /******/ // no module.id needed
1888 /******/ // no module.loaded needed
1889 /******/ exports: {}
1890 /******/ };
1891 /******/
1892 /******/ // Execute the module function
1893 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1894 /******/
1895 /******/ // Return the exports of the module
1896 /******/ return module.exports;
1897 /******/ }
1898 /******/
1899 /************************************************************************/
1900 /******/ /* webpack/runtime/compat get default export */
1901 /******/ !function() {
1902 /******/ // getDefaultExport function for compatibility with non-harmony modules
1903 /******/ __webpack_require__.n = function(module) {
1904 /******/ var getter = module && module.__esModule ?
1905 /******/ function() { return module['default']; } :
1906 /******/ function() { return module; };
1907 /******/ __webpack_require__.d(getter, { a: getter });
1908 /******/ return getter;
1909 /******/ };
1910 /******/ }();
1911 /******/
1912 /******/ /* webpack/runtime/define property getters */
1913 /******/ !function() {
1914 /******/ // define getter functions for harmony exports
1915 /******/ __webpack_require__.d = function(exports, definition) {
1916 /******/ for(var key in definition) {
1917 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1918 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1919 /******/ }
1920 /******/ }
1921 /******/ };
1922 /******/ }();
1923 /******/
1924 /******/ /* webpack/runtime/hasOwnProperty shorthand */
1925 /******/ !function() {
1926 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
1927 /******/ }();
1928 /******/
1929 /******/ /* webpack/runtime/make namespace object */
1930 /******/ !function() {
1931 /******/ // define __esModule on exports
1932 /******/ __webpack_require__.r = function(exports) {
1933 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1934 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1935 /******/ }
1936 /******/ Object.defineProperty(exports, '__esModule', { value: true });
1937 /******/ };
1938 /******/ }();
1939 /******/
1940 /************************************************************************/
1941 var __webpack_exports__ = {};
1942 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1943 !function() {
1944 "use strict";
1945 /*!********************************!*\
1946 !*** ./src/elementor/index.js ***!
1947 \********************************/
1948 __webpack_require__.r(__webpack_exports__);
1949 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1950 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
1951 /* harmony import */ var _ImportLayoutModal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ImportLayoutModal */ "./src/elementor/ImportLayoutModal.js");
1952
1953
1954 /* global wp */
1955 const {
1956 render
1957 } = wp.element;
1958
1959 var templateAddSection = jQuery("#tmpl-elementor-add-section");
1960
1961 if (0 < templateAddSection.length) {
1962 var oldTemplateButton = templateAddSection.html();
1963 var log_path = rttpgParams.plugin_url + '/assets/images/icon-40x40.svg';
1964 oldTemplateButton = oldTemplateButton.replace('<div class="elementor-add-section-drag-title', '<div class="elementor-add-section-area-button rttpg-import-button" style="vertical-align: bottom;margin-left: 5px;"><img src="' + log_path + '" alt="TPG"/></div><div class="elementor-add-section-drag-title');
1965 templateAddSection.html(oldTemplateButton);
1966
1967 function replaceKey(obj, targetKey, newKey) {
1968 for (let key in obj) {
1969 if (key === targetKey) {
1970 obj[newKey] = obj[key];
1971 delete obj[key];
1972 } else if (typeof obj[key] === "object") {
1973 replaceKey(obj[key], targetKey, newKey);
1974 }
1975 }
1976
1977 return obj;
1978 }
1979
1980 const importLayout = (content, insertIndex) => {
1981 let newContent = JSON.parse(content);
1982 let modifiedData = newContent.map(item => {
1983 return { ...item,
1984 id: Math.random().toString(16).slice(2)
1985 };
1986 });
1987 replaceKey(modifiedData, "category_ids", "cat_ids");
1988
1989 if (undefined != insertIndex && insertIndex != -1) {
1990 if (insertIndex > 1) {
1991 insertIndex -= 1;
1992 }
1993
1994 elementor.getPreviewView().addChildModel(modifiedData, {
1995 at: insertIndex,
1996 silent: 0
1997 });
1998 } else {
1999 elementor.getPreviewView().addChildModel(modifiedData, {
2000 silent: 0
2001 });
2002 }
2003
2004 elementor.channels.data.trigger('template:after:insert', {});
2005
2006 if (undefined != $e && 'undefined' != typeof $e.internal) {
2007 $e.internal('document/save/set-is-modified', {
2008 status: true
2009 });
2010 } else {
2011 elementor.saver.setFlagEditorChange(true);
2012 }
2013
2014 window.tmPromo.destroy(); // window.tmPromo.hide();
2015 };
2016
2017 wp.domReady(function () {
2018 elementor.on("preview:loaded", function () {
2019 jQuery(elementor.$previewContents[0].body).on("click", ".rttpg-import-button", function (event) {
2020 const insertIndex = 0 < jQuery(this).parents(".elementor-section-wrap").length ? jQuery(this).parents(".elementor-add-section").index() : -1;
2021 window.tmPromo = elementorCommon.dialogsManager.createWidget("lightbox", {
2022 id: "rttpg-import-template-wrapper",
2023 headerMessage: !1,
2024 message: "",
2025 hide: {
2026 auto: !1,
2027 onClick: !1,
2028 onOutsideClick: false,
2029 onOutsideContextMenu: !1,
2030 onBackgroundClick: !0
2031 },
2032 position: {
2033 my: "center",
2034 at: "center"
2035 },
2036 onShow: function () {
2037 var contentTemp = jQuery(".dialog-content-tempromo");
2038 const rttpgImportWrap = document.createElement("div");
2039 rttpgImportWrap.classList.add("rttpg-import-wrapper-inner");
2040 render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_ImportLayoutModal__WEBPACK_IMPORTED_MODULE_1__["default"], {
2041 importLayout: importLayout,
2042 insertIndex: insertIndex
2043 }), rttpgImportWrap);
2044 contentTemp.addClass('rttpg-import-main-wrapper');
2045 contentTemp.html(rttpgImportWrap);
2046 },
2047 onHide: function () {
2048 window.tmPromo.hide();
2049 }
2050 });
2051 window.tmPromo.getElements("header").remove();
2052 window.tmPromo.getElements("message").append(window.tmPromo.addElement("content-tempromo"));
2053 window.tmPromo.show();
2054 });
2055 });
2056 });
2057 }
2058 }();
2059 /******/ })()
2060 ;
2061 //# sourceMappingURL=main.js.map