PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.3.61
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.3.61
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / build / gutenberg.js

gutenberg.js in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.3.61, at build/gutenberg.js

13,628 lines 541.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
5 /*!*******************************************************************************!*\
6 !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
7 \*******************************************************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14 /* harmony export */ });
15 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
16
17
18 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
19
20 var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
21 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
22 /* o */
23 && prop.charCodeAt(1) === 110
24 /* n */
25 && prop.charCodeAt(2) < 91;
26 }
27 /* Z+1 */
28 );
29
30 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
31
32
33 /***/ }),
34
35 /***/ "./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
36 /*!*******************************************************************************************************!*\
37 !*** ./node_modules/@emotion/is-prop-valid/node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
38 \*******************************************************************************************************/
39 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40
41 "use strict";
42 __webpack_require__.r(__webpack_exports__);
43 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
44 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
45 /* harmony export */ });
46 function memoize(fn) {
47 var cache = {};
48 return function (arg) {
49 if (cache[arg] === undefined) cache[arg] = fn(arg);
50 return cache[arg];
51 };
52 }
53
54 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
55
56
57 /***/ }),
58
59 /***/ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js":
60 /*!*******************************************************************!*\
61 !*** ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js ***!
62 \*******************************************************************/
63 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
64
65 "use strict";
66 __webpack_require__.r(__webpack_exports__);
67 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
68 /* harmony export */ "default": () => (/* binding */ memoize)
69 /* harmony export */ });
70 function memoize(fn) {
71 var cache = Object.create(null);
72 return function (arg) {
73 if (cache[arg] === undefined) cache[arg] = fn(arg);
74 return cache[arg];
75 };
76 }
77
78
79
80
81 /***/ }),
82
83 /***/ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js":
84 /*!*********************************************************************!*\
85 !*** ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js ***!
86 \*********************************************************************/
87 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
88
89 "use strict";
90 __webpack_require__.r(__webpack_exports__);
91 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
92 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
93 /* harmony export */ });
94 var unitlessKeys = {
95 animationIterationCount: 1,
96 borderImageOutset: 1,
97 borderImageSlice: 1,
98 borderImageWidth: 1,
99 boxFlex: 1,
100 boxFlexGroup: 1,
101 boxOrdinalGroup: 1,
102 columnCount: 1,
103 columns: 1,
104 flex: 1,
105 flexGrow: 1,
106 flexPositive: 1,
107 flexShrink: 1,
108 flexNegative: 1,
109 flexOrder: 1,
110 gridRow: 1,
111 gridRowEnd: 1,
112 gridRowSpan: 1,
113 gridRowStart: 1,
114 gridColumn: 1,
115 gridColumnEnd: 1,
116 gridColumnSpan: 1,
117 gridColumnStart: 1,
118 msGridRow: 1,
119 msGridRowSpan: 1,
120 msGridColumn: 1,
121 msGridColumnSpan: 1,
122 fontWeight: 1,
123 lineHeight: 1,
124 opacity: 1,
125 order: 1,
126 orphans: 1,
127 tabSize: 1,
128 widows: 1,
129 zIndex: 1,
130 zoom: 1,
131 WebkitLineClamp: 1,
132 // SVG-related properties
133 fillOpacity: 1,
134 floodOpacity: 1,
135 stopOpacity: 1,
136 strokeDasharray: 1,
137 strokeDashoffset: 1,
138 strokeMiterlimit: 1,
139 strokeOpacity: 1,
140 strokeWidth: 1
141 };
142
143 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (unitlessKeys);
144
145
146 /***/ }),
147
148 /***/ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js":
149 /*!***********************************************************************************************************!*\
150 !*** ./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js ***!
151 \***********************************************************************************************************/
152 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
153
154 "use strict";
155 __webpack_require__.r(__webpack_exports__);
156 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
157 /* harmony export */ "default": () => (/* binding */ isPropValid)
158 /* harmony export */ });
159 /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js");
160
161
162 // eslint-disable-next-line no-undef
163 var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
164
165 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
166 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
167 /* o */
168 && prop.charCodeAt(1) === 110
169 /* n */
170 && prop.charCodeAt(2) < 91;
171 }
172 /* Z+1 */
173 );
174
175
176
177
178 /***/ }),
179
180 /***/ "./scripts/api/wordpressApiClient.ts":
181 /*!*******************************************!*\
182 !*** ./scripts/api/wordpressApiClient.ts ***!
183 \*******************************************/
184 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
185
186 "use strict";
187 __webpack_require__.r(__webpack_exports__);
188 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
189 /* harmony export */ "disableInternalTracking": () => (/* binding */ disableInternalTracking),
190 /* harmony export */ "fetchAccessToken": () => (/* binding */ fetchAccessToken),
191 /* harmony export */ "fetchDisableInternalTracking": () => (/* binding */ fetchDisableInternalTracking),
192 /* harmony export */ "fetchProxyMappingsEnabled": () => (/* binding */ fetchProxyMappingsEnabled),
193 /* harmony export */ "fetchRefreshToken": () => (/* binding */ fetchRefreshToken),
194 /* harmony export */ "getBusinessUnitId": () => (/* binding */ getBusinessUnitId),
195 /* harmony export */ "healthcheckRestApi": () => (/* binding */ healthcheckRestApi),
196 /* harmony export */ "refreshProxyMappingsCache": () => (/* binding */ refreshProxyMappingsCache),
197 /* harmony export */ "setBusinessUnitId": () => (/* binding */ setBusinessUnitId),
198 /* harmony export */ "skipReview": () => (/* binding */ skipReview),
199 /* harmony export */ "toggleProxyMappingsEnabled": () => (/* binding */ toggleProxyMappingsEnabled),
200 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
201 /* harmony export */ "updateHublet": () => (/* binding */ updateHublet)
202 /* harmony export */ });
203 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
204 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
205 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
206 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
207 /* harmony import */ var _utils_queryParams__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/queryParams */ "./scripts/utils/queryParams.ts");
208
209
210
211
212 function makeRequest(method, path) {
213 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
214 var queryParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
215 // eslint-disable-next-line compat/compat
216 var restApiUrl = new URL("".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.restUrl, "leadin/v1").concat(path));
217 (0,_utils_queryParams__WEBPACK_IMPORTED_MODULE_3__.addQueryObjectToUrl)(restApiUrl, queryParams);
218 return new Promise(function (resolve, reject) {
219 var payload = {
220 url: restApiUrl.toString(),
221 method: method,
222 contentType: 'application/json',
223 beforeSend: function beforeSend(xhr) {
224 return xhr.setRequestHeader('X-WP-Nonce', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.restNonce);
225 },
226 success: resolve,
227 error: function error(response) {
228 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].captureMessage("HTTP Request to ".concat(restApiUrl, " failed with error ").concat(response.status, ": ").concat(response.responseText), {
229 fingerprint: ['{{ default }}', path, response.status, response.responseText]
230 });
231 reject(response);
232 }
233 };
234 if (method !== 'get') {
235 payload.data = JSON.stringify(data);
236 }
237 jquery__WEBPACK_IMPORTED_MODULE_0___default().ajax(payload);
238 });
239 }
240 function healthcheckRestApi() {
241 return makeRequest('get', '/healthcheck');
242 }
243 function disableInternalTracking(value) {
244 return makeRequest('put', '/internal-tracking', value ? '1' : '0');
245 }
246 function fetchDisableInternalTracking() {
247 return makeRequest('get', '/internal-tracking').then(function (message) {
248 return {
249 message: message
250 };
251 });
252 }
253 function updateHublet(hublet) {
254 return makeRequest('put', '/hublet', {
255 hublet: hublet
256 });
257 }
258 function skipReview() {
259 return makeRequest('post', '/skip-review');
260 }
261 function trackConsent(canTrack) {
262 return makeRequest('post', '/track-consent', {
263 canTrack: canTrack
264 }).then(function (message) {
265 return {
266 message: message
267 };
268 });
269 }
270 function setBusinessUnitId(businessUnitId) {
271 return makeRequest('put', '/business-unit', {
272 businessUnitId: businessUnitId
273 });
274 }
275 function getBusinessUnitId() {
276 return makeRequest('get', '/business-unit');
277 }
278 function refreshProxyMappingsCache() {
279 return makeRequest('post', '/wp-mappings-cache-reset');
280 }
281 function fetchProxyMappingsEnabled() {
282 return makeRequest('get', '/wp-mappings-proxy-enabled');
283 }
284 function toggleProxyMappingsEnabled(value) {
285 return makeRequest('put', '/wp-mappings-proxy-enabled', value);
286 }
287 var refreshTokenRequest = null;
288 function fetchRefreshToken() {
289 if (!refreshTokenRequest) {
290 refreshTokenRequest = makeRequest('get', '/refresh-token')["catch"](function (err) {
291 refreshTokenRequest = null;
292 throw err;
293 });
294 }
295 return refreshTokenRequest;
296 }
297 var ACCESS_TOKEN_CACHE_KEY = 'leadin_access_token';
298 var ACCESS_TOKEN_MIN_TTL_SECONDS = 300;
299 var accessTokenRequest = null;
300 function fetchAccessToken() {
301 try {
302 var cached = sessionStorage.getItem(ACCESS_TOKEN_CACHE_KEY);
303 if (cached) {
304 var _JSON$parse = JSON.parse(cached),
305 accessToken = _JSON$parse.accessToken,
306 expiresAt = _JSON$parse.expiresAt;
307 if (accessToken && expiresAt > Math.floor(Date.now() / 1000) + ACCESS_TOKEN_MIN_TTL_SECONDS) {
308 return Promise.resolve({
309 accessToken: accessToken,
310 expiresIn: expiresAt - Math.floor(Date.now() / 1000)
311 });
312 }
313 }
314 } catch (_) {}
315 if (!accessTokenRequest) {
316 accessTokenRequest = makeRequest('get', '/access-token').then(function (response) {
317 try {
318 sessionStorage.setItem(ACCESS_TOKEN_CACHE_KEY, JSON.stringify({
319 accessToken: response.accessToken,
320 expiresAt: Math.floor(Date.now() / 1000) + response.expiresIn
321 }));
322 } catch (_) {}
323 return response;
324 })["finally"](function () {
325 accessTokenRequest = null;
326 });
327 }
328 return accessTokenRequest;
329 }
330
331 /***/ }),
332
333 /***/ "./scripts/constants/defaultFormOptions.ts":
334 /*!*************************************************!*\
335 !*** ./scripts/constants/defaultFormOptions.ts ***!
336 \*************************************************/
337 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
338
339 "use strict";
340 __webpack_require__.r(__webpack_exports__);
341 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
342 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
343 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
344 /* harmony export */ });
345 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
346 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
347
348 var BLANK_FORM = 'BLANK';
349 var NEWSLETTER_FORM = 'NEWSLETTER';
350 var CONTACT_US_FORM = 'CONTACT_US';
351 var EVENT_REGISTRATION_FORM = 'EVENT_REGISTRATION';
352 var TALK_TO_AN_EXPERT_FORM = 'TALK_TO_AN_EXPERT';
353 var BOOK_A_MEETING_FORM = 'BOOK_A_MEETING';
354 var GATED_CONTENT_FORM = 'GATED_CONTENT';
355 var DEFAULT_OPTIONS = {
356 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
357 options: [{
358 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Blank Form', 'leadin'),
359 value: BLANK_FORM
360 }, {
361 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter Form', 'leadin'),
362 value: NEWSLETTER_FORM
363 }, {
364 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact Us Form', 'leadin'),
365 value: CONTACT_US_FORM
366 }, {
367 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
368 value: EVENT_REGISTRATION_FORM
369 }, {
370 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Talk to an Expert Form', 'leadin'),
371 value: TALK_TO_AN_EXPERT_FORM
372 }, {
373 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Book a Meeting Form', 'leadin'),
374 value: BOOK_A_MEETING_FORM
375 }, {
376 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Gated Content Form', 'leadin'),
377 value: GATED_CONTENT_FORM
378 }]
379 };
380 function isDefaultForm(value) {
381 return value === BLANK_FORM || value === NEWSLETTER_FORM || value === CONTACT_US_FORM || value === EVENT_REGISTRATION_FORM || value === TALK_TO_AN_EXPERT_FORM || value === BOOK_A_MEETING_FORM || value === GATED_CONTENT_FORM;
382 }
383
384 /***/ }),
385
386 /***/ "./scripts/constants/leadinConfig.ts":
387 /*!*******************************************!*\
388 !*** ./scripts/constants/leadinConfig.ts ***!
389 \*******************************************/
390 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
391
392 "use strict";
393 __webpack_require__.r(__webpack_exports__);
394 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
395 /* harmony export */ "accountName": () => (/* binding */ accountName),
396 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
397 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
398 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
399 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
400 /* harmony export */ "decryptError": () => (/* binding */ decryptError),
401 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
402 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
403 /* harmony export */ "env": () => (/* binding */ env),
404 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
405 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
406 /* harmony export */ "hublet": () => (/* binding */ hublet),
407 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
408 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
409 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
410 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
411 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
412 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
413 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
414 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
415 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
416 /* harmony export */ "locale": () => (/* binding */ locale),
417 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
418 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
419 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
420 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
421 /* harmony export */ "plugins": () => (/* binding */ plugins),
422 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
423 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
424 /* harmony export */ "portalId": () => (/* binding */ portalId),
425 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
426 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
427 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
428 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
429 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
430 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
431 /* harmony export */ "theme": () => (/* binding */ theme),
432 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
433 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
434 /* harmony export */ });
435 var _window$leadinConfig = window.leadinConfig,
436 accountName = _window$leadinConfig.accountName,
437 adminUrl = _window$leadinConfig.adminUrl,
438 activationTime = _window$leadinConfig.activationTime,
439 connectionStatus = _window$leadinConfig.connectionStatus,
440 deviceId = _window$leadinConfig.deviceId,
441 didDisconnect = _window$leadinConfig.didDisconnect,
442 env = _window$leadinConfig.env,
443 formsScript = _window$leadinConfig.formsScript,
444 meetingsScript = _window$leadinConfig.meetingsScript,
445 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
446 hublet = _window$leadinConfig.hublet,
447 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
448 hubspotNonce = _window$leadinConfig.hubspotNonce,
449 iframeUrl = _window$leadinConfig.iframeUrl,
450 impactLink = _window$leadinConfig.impactLink,
451 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
452 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
453 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
454 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
455 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
456 locale = _window$leadinConfig.locale,
457 loginUrl = _window$leadinConfig.loginUrl,
458 phpVersion = _window$leadinConfig.phpVersion,
459 pluginPath = _window$leadinConfig.pluginPath,
460 plugins = _window$leadinConfig.plugins,
461 portalDomain = _window$leadinConfig.portalDomain,
462 portalEmail = _window$leadinConfig.portalEmail,
463 portalId = _window$leadinConfig.portalId,
464 redirectNonce = _window$leadinConfig.redirectNonce,
465 restNonce = _window$leadinConfig.restNonce,
466 restUrl = _window$leadinConfig.restUrl,
467 refreshToken = _window$leadinConfig.refreshToken,
468 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
469 theme = _window$leadinConfig.theme,
470 trackConsent = _window$leadinConfig.trackConsent,
471 wpVersion = _window$leadinConfig.wpVersion,
472 contentEmbed = _window$leadinConfig.contentEmbed,
473 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
474 decryptError = _window$leadinConfig.decryptError;
475
476
477 /***/ }),
478
479 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
480 /*!***************************************************!*\
481 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
482 \***************************************************/
483 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
484
485 "use strict";
486 __webpack_require__.r(__webpack_exports__);
487 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
488 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
489 /* harmony export */ });
490 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
491
492 function CalendarIcon() {
493 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
494 width: "18",
495 height: "18",
496 viewBox: "0 0 18 18",
497 fill: "none",
498 xmlns: "http://www.w3.org/2000/svg",
499 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
500 clipPath: "url(#clip0_903_1965)",
501 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
502 fillRule: "evenodd",
503 clipRule: "evenodd",
504 d: "M13.519 2.48009H15.069H15.0697C16.2619 2.48719 17.2262 3.45597 17.2262 4.65016V12.7434C17.223 12.9953 17.1203 13.2226 16.9549 13.3886L12.6148 17.7287C12.4488 17.8941 12.2214 17.9968 11.9689 18H3.29508C2.09637 18 1.125 17.0286 1.125 15.8299V4.65016C1.125 3.45404 2.09314 2.48396 3.28862 2.48009H4.83867V0.930032C4.83867 0.416577 5.25525 0 5.7687 0C6.28216 0 6.69874 0.416577 6.69874 0.930032V2.48009H11.6589V0.930032C11.6589 0.416577 12.0755 0 12.5889 0C13.1024 0 13.519 0.416577 13.519 0.930032V2.48009ZM2.98506 15.8312C2.99863 15.9882 3.12909 16.1115 3.28862 16.1141H11.5814L11.6589 16.0366V13.634C11.6589 12.9494 12.2143 12.394 12.899 12.394H15.2951L15.3726 12.3165V7.4338H2.98506V15.8312ZM4.83868 8.68029H6.07873H6.07937C6.42684 8.68029 6.71037 8.95478 6.72458 9.30032V14.2863C6.72458 14.6428 6.43524 14.9322 6.07873 14.9322H4.83868C4.48217 14.9322 4.19283 14.6428 4.19283 14.2863V9.32615C4.19283 8.96964 4.48217 8.68029 4.83868 8.68029ZM8.53298 8.68029H9.82469H9.82534C10.1728 8.68029 10.4563 8.95478 10.4705 9.30032V14.2863C10.4705 14.6428 10.1812 14.9322 9.82469 14.9322H8.53298C8.17647 14.9322 7.88712 14.6428 7.88712 14.2863V9.32615C7.88712 8.96964 8.17647 8.68029 8.53298 8.68029ZM13.519 8.68029H12.2789C11.9366 8.68029 11.6589 8.95801 11.6589 9.30032V10.5404C11.6589 10.8827 11.9366 11.1604 12.2789 11.1604H13.519C13.8613 11.1604 14.139 10.8827 14.139 10.5404V9.30032C14.139 8.95801 13.8613 8.68029 13.519 8.68029Z",
505 fill: "#FF7A59"
506 })
507 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
508 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
509 id: "clip0_903_1965",
510 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
511 width: "18",
512 height: "18",
513 fill: "white"
514 })
515 })
516 })]
517 });
518 }
519
520 /***/ }),
521
522 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
523 /*!**********************************************************!*\
524 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
525 \**********************************************************/
526 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
527
528 "use strict";
529 __webpack_require__.r(__webpack_exports__);
530 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
531 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
532 /* harmony export */ });
533 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
534
535 function SidebarSprocketIcon() {
536 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
537 width: "20px",
538 height: "20px",
539 version: "1.1",
540 viewBox: "0 0 40 42",
541 xmlns: "http://www.w3.org/2000/svg",
542 xmlnsXlink: "http://www.w3.org/1999/xlink",
543 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
544 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
545 id: "Fill-1",
546 fillRule: "evenodd"
547 })
548 });
549 }
550
551 /***/ }),
552
553 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
554 /*!***************************************************!*\
555 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
556 \***************************************************/
557 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
558
559 "use strict";
560 __webpack_require__.r(__webpack_exports__);
561 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
562 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
563 /* harmony export */ });
564 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
565
566 function SprocketIcon() {
567 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
568 width: "40px",
569 height: "42px",
570 viewBox: "0 0 40 42",
571 version: "1.1",
572 xmlns: "http://www.w3.org/2000/svg",
573 xmlnsXlink: "http://www.w3.org/1999/xlink",
574 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
575 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
576 id: "path-1",
577 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
578 })
579 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
580 id: "Page-1",
581 stroke: "none",
582 strokeWidth: "1",
583 fill: "none",
584 fillRule: "evenodd",
585 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
586 id: "HubSpot-Sprocket---Full-Color",
587 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
588 id: "mask-2",
589 fill: "white",
590 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
591 xlinkHref: "#path-1"
592 })
593 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
594 id: "path-1"
595 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
596 d: "M28.8989809,30.0402293 C25.817707,30.0402293 23.319363,27.5423949 23.319363,24.461121 C23.319363,21.3798471 25.817707,18.881758 28.8989809,18.881758 C31.98,18.881758 34.4780892,21.3798471 34.4780892,24.461121 C34.4780892,27.5423949 31.98,30.0402293 28.8989809,30.0402293 M30.5692994,13.7199745 L30.5692994,8.75717196 C31.864586,8.14519744 32.7723567,6.8346242 32.7723567,5.31360508 L32.7723567,5.1989554 C32.7723567,3.10010191 31.0546497,1.38264968 28.956051,1.38264968 L28.8414013,1.38264968 C26.7425478,1.38264968 25.0248408,3.10010191 25.0248408,5.1989554 L25.0248408,5.31360508 C25.0248408,6.8346242 25.9328662,8.14519744 27.2281529,8.75717196 L27.2281529,13.7202293 C25.2994904,14.0180637 23.5371974,14.8137325 22.0829299,15.9844331 L8.45643312,5.38417836 C8.54611464,5.0392102 8.6090446,4.6835414 8.60955416,4.310293 C8.61261148,1.93271338 6.68777072,0.00303184713 4.31019108,-2.5477707e-05 C1.93286624,-0.00308280255 0.0029299363,1.92175796 0.000127388535,4.29933756 C-0.0029299363,6.67666244 1.92191083,8.60634396 4.29949044,8.60940128 C5.07426752,8.6104204 5.7912102,8.390293 6.42,8.03284076 L19.8243312,18.4603567 C18.6842038,20.181121 18.0166879,22.2422675 18.0166879,24.461121 C18.0166879,26.7841784 18.7504458,28.9327134 19.9907006,30.7001019 L15.9142675,34.776535 C15.5919745,34.6799745 15.2574522,34.6122038 14.9033121,34.6122038 C12.9499363,34.6122038 11.3659873,36.1961529 11.3659873,38.1497834 C11.3659873,40.103414 12.9499363,41.6871084 14.9033121,41.6871084 C16.8571974,41.6871084 18.4408917,40.103414 18.4408917,38.1497834 C18.4408917,37.7958981 18.3733758,37.461121 18.2765605,37.1390828 L22.3089172,33.1067261 C24.1392357,34.5041784 26.4184713,35.3431592 28.8989809,35.3431592 C34.9089172,35.3431592 39.7810191,30.4710573 39.7810191,24.461121 C39.7810191,19.0203567 35.7840764,14.5255796 30.5692994,13.7199745",
597 id: "Fill-1",
598 fill: "#F3785B",
599 fillRule: "nonzero",
600 mask: "url(#mask-2)"
601 })]
602 })
603 })]
604 });
605 }
606
607 /***/ }),
608
609 /***/ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx":
610 /*!*************************************************************!*\
611 !*** ./scripts/gutenberg/Common/StylesheetErrorBondary.tsx ***!
612 \*************************************************************/
613 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
614
615 "use strict";
616 __webpack_require__.r(__webpack_exports__);
617 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
618 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
619 /* harmony export */ });
620 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
621 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
622 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
623 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__);
624
625
626
627 function StylesheetErrorBondary(_ref) {
628 var children = _ref.children;
629 var ref = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__.useRefEffect)(function (element) {
630 var ownerDocument = element.ownerDocument;
631 if (ownerDocument && !ownerDocument.getElementById('leadin-gutenberg-css')) {
632 var link = ownerDocument.createElement('link');
633 link.id = 'leadin-gutenberg-css';
634 link.rel = 'stylesheet';
635 link.href = "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.pluginPath, "/build/gutenberg.css?ver=").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion);
636 ownerDocument.head.appendChild(link);
637 }
638 }, []);
639 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
640 ref: ref,
641 children: children
642 });
643 }
644 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (StylesheetErrorBondary);
645
646 /***/ }),
647
648 /***/ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts":
649 /*!************************************************************!*\
650 !*** ./scripts/gutenberg/Common/useCustomCssBlockProps.ts ***!
651 \************************************************************/
652 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
653
654 "use strict";
655 __webpack_require__.r(__webpack_exports__);
656 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
657 /* harmony export */ "default": () => (/* binding */ useCustomCssBlockProps)
658 /* harmony export */ });
659 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
660 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__);
661
662 function useCustomCssBlockProps(defaultCssClasses) {
663 var blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save();
664 if (!blockProps.className || !blockProps.className.includes(defaultCssClasses)) {
665 blockProps.className = "".concat(blockProps.className, " ").concat(defaultCssClasses);
666 }
667 return blockProps;
668 }
669
670 /***/ }),
671
672 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
673 /*!*******************************************************!*\
674 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
675 \*******************************************************/
676 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
677
678 "use strict";
679 __webpack_require__.r(__webpack_exports__);
680 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
681 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
682 /* harmony export */ });
683 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
684 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
685 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
686 /* harmony import */ var _Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/useCustomCssBlockProps */ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts");
687 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
688 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
689 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
690 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
691 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
692 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
693
694
695
696 var DefaultCssClasses = 'wp-block-leadin-hubspot-form-block';
697 function FormSaveBlock(_ref) {
698 var attributes = _ref.attributes;
699 var portalId = attributes.portalId,
700 formId = attributes.formId,
701 embedVersion = attributes.embedVersion;
702 var blockProps = (0,_Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__["default"])(DefaultCssClasses);
703 if (portalId && formId) {
704 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, _objectSpread(_objectSpread({}, blockProps), {}, {
705 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" version=\"").concat(embedVersion, "\" type=\"form\"]")
706 }));
707 }
708 return null;
709 }
710
711 /***/ }),
712
713 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
714 /*!**************************************************************!*\
715 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
716 \**************************************************************/
717 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
718
719 "use strict";
720 __webpack_require__.r(__webpack_exports__);
721 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
722 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
723 /* harmony export */ });
724 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
725 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
726 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
727 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
728 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
729
730
731
732
733 function FormGutenbergPreview() {
734 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
735 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
736 alt: "Create a new Hubspot Form",
737 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
738 })
739 });
740 }
741
742 /***/ }),
743
744 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
745 /*!***********************************************************!*\
746 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
747 \***********************************************************/
748 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
749
750 "use strict";
751 __webpack_require__.r(__webpack_exports__);
752 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
753 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
754 /* harmony export */ });
755 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
756 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
757 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
758 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
759 /* harmony import */ var _Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/StylesheetErrorBondary */ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx");
760 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
761 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
762 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
763 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
764 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
765 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
766 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
767 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);
768 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
769 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
770 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
771 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
772 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
773 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
774 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
775
776
777
778
779
780
781
782
783
784
785
786
787 function registerFormBlock() {
788 var editComponent = function editComponent(props) {
789 var isPreview = props.attributes.preview;
790 var isConnected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_9__["default"].Connected;
791 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_3__["default"], {
792 children: isPreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_6__["default"], {}) : isConnected ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_8__["default"], _objectSpread(_objectSpread({}, props), {}, {
793 origin: "gutenberg",
794 preview: true,
795 fullSiteEditor: (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__.isFullSiteEditor)()
796 })) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
797 status: 401
798 })
799 });
800 };
801 // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
802 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__) {
803 return null;
804 }
805 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
806 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__.__)('HubSpot Form', 'leadin'),
807 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__.__)('Select and embed a HubSpot form', 'leadin'),
808 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
809 category: 'leadin-blocks',
810 attributes: {
811 portalId: {
812 type: 'string',
813 "default": ''
814 },
815 formId: {
816 type: 'string'
817 },
818 formName: {
819 type: 'string'
820 },
821 embedVersion: {
822 type: 'string'
823 },
824 preview: {
825 type: 'boolean',
826 "default": false
827 }
828 },
829 example: {
830 attributes: {
831 preview: true
832 }
833 },
834 edit: editComponent,
835 save: function save(props) {
836 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_4__["default"], _objectSpread({}, props));
837 }
838 });
839 }
840
841 /***/ }),
842
843 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
844 /*!*********************************************************************!*\
845 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
846 \*********************************************************************/
847 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
848
849 "use strict";
850 __webpack_require__.r(__webpack_exports__);
851 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
852 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
853 /* harmony export */ });
854 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
855 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
856 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
857 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
858 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
859
860
861
862
863 function MeetingGutenbergPreview() {
864 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
865 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
866 alt: "Create a new Hubspot Meeting",
867 width: "100%",
868 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
869 })
870 });
871 }
872
873 /***/ }),
874
875 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
876 /*!**************************************************************!*\
877 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
878 \**************************************************************/
879 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
880
881 "use strict";
882 __webpack_require__.r(__webpack_exports__);
883 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
884 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
885 /* harmony export */ });
886 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
887 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
888 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
889 /* harmony import */ var _Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/useCustomCssBlockProps */ "./scripts/gutenberg/Common/useCustomCssBlockProps.ts");
890 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
891 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
892 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
893 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
894 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
895 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
896
897
898
899 var DefaultCssClasses = 'wp-block-leadin-hubspot-meeting-block';
900 function MeetingSaveBlock(_ref) {
901 var attributes = _ref.attributes;
902 var url = attributes.url;
903 var blockProps = (0,_Common_useCustomCssBlockProps__WEBPACK_IMPORTED_MODULE_2__["default"])(DefaultCssClasses);
904 if (url) {
905 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, _objectSpread(_objectSpread({}, blockProps), {}, {
906 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
907 }));
908 }
909 return null;
910 }
911
912 /***/ }),
913
914 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
915 /*!******************************************************************!*\
916 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
917 \******************************************************************/
918 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
919
920 "use strict";
921 __webpack_require__.r(__webpack_exports__);
922 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
923 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
924 /* harmony export */ });
925 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
926 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
927 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
928 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
929 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
930 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
931 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
932 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
933 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
934 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
935 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
936 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
937 /* harmony import */ var _Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Common/StylesheetErrorBondary */ "./scripts/gutenberg/Common/StylesheetErrorBondary.tsx");
938 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
939 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
940 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
941 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
942 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
943 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
944
945
946
947
948
949
950
951
952
953
954
955 var ConnectionStatus = {
956 Connected: 'Connected',
957 NotConnected: 'NotConnected'
958 };
959 function registerMeetingBlock() {
960 var editComponent = function editComponent(props) {
961 var isPreview = props.attributes.preview;
962 var isConnected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected;
963 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_StylesheetErrorBondary__WEBPACK_IMPORTED_MODULE_10__["default"], {
964 children: isPreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {}) : isConnected ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
965 preview: true,
966 origin: "gutenberg",
967 fullSiteEditor: (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()
968 })) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
969 status: 401
970 })
971 });
972 };
973 // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
974 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__) {
975 return null;
976 }
977 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
978 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
979 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Schedule meetings faster and forget the back-and-forth emails Your calendar stays full, and you stay productive', 'leadin'),
980 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
981 category: 'leadin-blocks',
982 attributes: {
983 url: {
984 type: 'string',
985 "default": ''
986 },
987 preview: {
988 type: 'boolean',
989 "default": false
990 }
991 },
992 example: {
993 attributes: {
994 preview: true
995 }
996 },
997 edit: editComponent,
998 save: function save(props) {
999 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
1000 }
1001 });
1002 }
1003
1004 /***/ }),
1005
1006 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
1007 /*!***************************************************!*\
1008 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
1009 \***************************************************/
1010 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1011
1012 "use strict";
1013 __webpack_require__.r(__webpack_exports__);
1014 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1015 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
1016 /* harmony export */ });
1017 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1018 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1019 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1020 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
1021 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__);
1022 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
1023 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__);
1024 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1025 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
1026 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
1027 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);
1028 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
1029 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
1030 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
1031 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1032 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
1033 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1034 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1035 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
1036 /* harmony import */ var _utils_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/isRefreshTokenAvailable */ "./scripts/utils/isRefreshTokenAvailable.ts");
1037 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
1038 var _templateObject;
1039 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
1040 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1041 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
1042 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1043 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1044 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1045 function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061 function registerHubspotSidebar() {
1062 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_14__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
1063 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
1064 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
1065 });
1066 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
1067 var postType = _ref.postType;
1068 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null),
1069 _useState2 = _slicedToArray(_useState, 2),
1070 embedder = _useState2[0],
1071 setEmbedder = _useState2[1];
1072 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1073 if ((0,_utils_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_12__.isRefreshTokenAvailable)()) {
1074 (0,_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_13__.fetchAccessToken)().then(function (_ref2) {
1075 var accessToken = _ref2.accessToken,
1076 expiresIn = _ref2.expiresIn;
1077 setEmbedder((0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(accessToken, expiresIn));
1078 })["catch"](function () {});
1079 }
1080 }, []);
1081 return postType && !(0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_11__.isFullSiteEditor)() ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_3__.PluginSidebar, {
1082 name: "leadin",
1083 title: "HubSpot",
1084 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, {
1085 className: "hs-plugin-sidebar-sprocket",
1086 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__["default"])()
1087 }),
1088 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
1089 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('HubSpot Analytics', 'leadin'),
1090 initialOpen: true,
1091 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_9__.BackgroudAppContext.Provider, {
1092 value: embedder,
1093 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_6__["default"], {
1094 metaKey: "content-type",
1095 className: "select-content-type",
1096 label: ContentTypeLabel,
1097 options: [{
1098 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Detect Automatically', 'leadin'),
1099 value: ''
1100 }, {
1101 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Blog Post', 'leadin'),
1102 value: 'blog-post'
1103 }, {
1104 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Knowledge Article', 'leadin'),
1105 value: 'knowledge-article'
1106 }, {
1107 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Landing Page', 'leadin'),
1108 value: 'landing-page'
1109 }, {
1110 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Listing Page', 'leadin'),
1111 value: 'listing-page'
1112 }, {
1113 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Standard Page', 'leadin'),
1114 value: 'standard-page'
1115 }]
1116 })
1117 })
1118 })
1119 }) : null;
1120 };
1121 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.withSelect)(function (select) {
1122 var data = select('core/editor');
1123 return {
1124 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
1125 };
1126 })(LeadinPluginSidebar);
1127 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__) {
1128 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__.registerPlugin('leadin', {
1129 render: LeadinPluginSidebarWrapper,
1130 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_7__["default"]
1131 });
1132 }
1133 }
1134
1135 /***/ }),
1136
1137 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
1138 /*!***************************************************!*\
1139 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
1140 \***************************************************/
1141 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1142
1143 "use strict";
1144 __webpack_require__.r(__webpack_exports__);
1145 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1146 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1147 /* harmony export */ });
1148 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1149
1150 var _exp = /*#__PURE__*/function _exp() {
1151 return function (props) {
1152 return props.height ? props.height : 'auto';
1153 };
1154 };
1155 var _exp2 = /*#__PURE__*/function _exp2() {
1156 return function (props) {
1157 return props.width ? props.width : 'auto';
1158 };
1159 };
1160 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
1161 name: "UIImage0",
1162 "class": "ump7xqy",
1163 propsAsIs: false,
1164 vars: {
1165 "ump7xqy-0": [_exp()],
1166 "ump7xqy-1": [_exp2()]
1167 }
1168 }));
1169 __webpack_require__(/*! ./UIImage.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIImage.ts */ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts");
1170
1171 /***/ }),
1172
1173 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
1174 /*!*******************************************************************!*\
1175 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
1176 \*******************************************************************/
1177 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1178
1179 "use strict";
1180 __webpack_require__.r(__webpack_exports__);
1181 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1182 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1183 /* harmony export */ });
1184 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1185 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1186 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
1187 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
1188 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1189 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1190 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1191 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1192 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1193 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1194 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
1195 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1196
1197
1198
1199
1200
1201 var UISidebarSelectControl = function UISidebarSelectControl(props) {
1202 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
1203 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
1204 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
1205 value: props.metaValue,
1206 onChange: function onChange(content) {
1207 if (props.setMetaValue) {
1208 props.setMetaValue(content);
1209 }
1210 isBackgroundAppReady && monitorSidebarMetaChange({
1211 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
1212 payload: {
1213 metaKey: props.metaKey
1214 }
1215 });
1216 }
1217 }, props));
1218 };
1219 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
1220
1221 /***/ }),
1222
1223 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
1224 /*!****************************************************************!*\
1225 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
1226 \****************************************************************/
1227 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1228
1229 "use strict";
1230 __webpack_require__.r(__webpack_exports__);
1231 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1232 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
1233 /* harmony export */ });
1234 var CoreMessages = {
1235 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
1236 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
1237 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
1238 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
1239 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
1240 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID',
1241 SendIntegratedAppConfig: 'INTEGRATED_APP_EMBEDDER_CONFIG'
1242 };
1243
1244 /***/ }),
1245
1246 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
1247 /*!******************************************************************!*\
1248 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
1249 \******************************************************************/
1250 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1251
1252 "use strict";
1253 __webpack_require__.r(__webpack_exports__);
1254 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1255 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1256 /* harmony export */ });
1257 var FormMessages = {
1258 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1259 };
1260
1261 /***/ }),
1262
1263 /***/ "./scripts/iframe/integratedMessages/index.ts":
1264 /*!****************************************************!*\
1265 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1266 \****************************************************/
1267 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1268
1269 "use strict";
1270 __webpack_require__.r(__webpack_exports__);
1271 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1272 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1273 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1274 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1275 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1276 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1277 /* harmony export */ });
1278 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1279 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1280 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1281 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1282 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1283
1284
1285
1286
1287
1288
1289 /***/ }),
1290
1291 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1292 /*!************************************************************************!*\
1293 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1294 \************************************************************************/
1295 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1296
1297 "use strict";
1298 __webpack_require__.r(__webpack_exports__);
1299 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1300 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1301 /* harmony export */ });
1302 var LiveChatMessages = {
1303 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1304 };
1305
1306 /***/ }),
1307
1308 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1309 /*!********************************************************************!*\
1310 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1311 \********************************************************************/
1312 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1313
1314 "use strict";
1315 __webpack_require__.r(__webpack_exports__);
1316 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1317 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1318 /* harmony export */ });
1319 var PluginMessages = {
1320 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1321 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1322 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1323 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1324 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1325 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1326 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1327 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1328 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1329 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1330 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1331 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1332 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1333 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1334 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1335 SkipReviewError: 'SKIP_REVIEW_ERROR',
1336 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1337 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1338 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1339 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1340 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1341 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1342 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR',
1343 ProxyMappingsEnabledRequest: 'PROXY_MAPPINGS_ENABLED_REQUEST',
1344 ProxyMappingsEnabledResponse: 'PROXY_MAPPINGS_ENABLED_RESPONSE',
1345 ProxyMappingsEnabledError: 'PROXY_MAPPINGS_ENABLED_ERROR',
1346 ProxyMappingsEnabledChangeRequest: 'PROXY_MAPPINGS_ENABLED_CHANGE_REQUEST',
1347 ProxyMappingsEnabledChangeError: 'PROXY_MAPPINGS_ENABLED_CHANGE_ERROR',
1348 RefreshProxyMappingsRequest: 'REFRESH_PROXY_MAPPINGS_REQUEST',
1349 RefreshProxyMappingsResponse: 'REFRESH_PROXY_MAPPINGS_RESPONSE',
1350 RefreshProxyMappingsError: 'REFRESH_PROXY_MAPPINGS_ERROR'
1351 };
1352
1353 /***/ }),
1354
1355 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1356 /*!******************************************************************!*\
1357 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1358 \******************************************************************/
1359 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1360
1361 "use strict";
1362 __webpack_require__.r(__webpack_exports__);
1363 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1364 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1365 /* harmony export */ });
1366 var ProxyMessages = {
1367 FetchForms: 'FETCH_FORMS',
1368 FetchForm: 'FETCH_FORM',
1369 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1370 GetTemplateAvailability: 'GET_TEMPLATE_AVAILABILITY',
1371 FetchAuth: 'FETCH_AUTH',
1372 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1373 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1374 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1375 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1376 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1377 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1378 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1379 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1380 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1381 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1382 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1383 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1384 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1385 };
1386
1387 /***/ }),
1388
1389 /***/ "./scripts/iframe/useBackgroundApp.ts":
1390 /*!********************************************!*\
1391 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1392 \********************************************/
1393 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1394
1395 "use strict";
1396 __webpack_require__.r(__webpack_exports__);
1397 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1398 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1399 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1400 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1401 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1402 /* harmony export */ });
1403 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1404 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1405
1406 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1407 function useBackgroundAppContext() {
1408 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1409 }
1410 function usePostBackgroundMessage() {
1411 var app = useBackgroundAppContext();
1412 return function (message) {
1413 app.postMessage(message);
1414 };
1415 }
1416 function usePostAsyncBackgroundMessage() {
1417 var app = useBackgroundAppContext();
1418 return function (message) {
1419 return app.postAsyncMessage(message);
1420 };
1421 }
1422
1423 /***/ }),
1424
1425 /***/ "./scripts/lib/Raven.ts":
1426 /*!******************************!*\
1427 !*** ./scripts/lib/Raven.ts ***!
1428 \******************************/
1429 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1430
1431 "use strict";
1432 __webpack_require__.r(__webpack_exports__);
1433 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1434 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1435 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1436 /* harmony export */ });
1437 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1438 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1439 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1440
1441
1442 function configureRaven() {
1443 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('local') !== -1) {
1444 return;
1445 }
1446 var domain = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.replace(/https?:\/\/app/, '');
1447 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config("https://a9f08e536ef66abb0bf90becc905b09e@exceptions".concat(domain, "/v2/1"), {
1448 instrument: {
1449 tryCatch: false
1450 },
1451 shouldSendCallback: function shouldSendCallback(data) {
1452 return !!data && !!data.culprit && /plugins\/leadin\//.test(data.culprit);
1453 },
1454 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1455 }).install();
1456 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1457 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1458 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1459 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1460 });
1461 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1462 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1463 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1464 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1465 }).join(',')
1466 });
1467 }
1468 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1469
1470 /***/ }),
1471
1472 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1473 /*!***********************************************!*\
1474 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1475 \***********************************************/
1476 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1477
1478 "use strict";
1479 __webpack_require__.r(__webpack_exports__);
1480 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1481 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1482 /* harmony export */ });
1483 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1484 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1485 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1486 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1487 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1488 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1489 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1490 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
1491 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1492 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
1493 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1494 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1495 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1496
1497
1498
1499
1500
1501
1502 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1503 name: "Container",
1504 "class": "c1wxx7eu",
1505 propsAsIs: false
1506 });
1507 var _exp2 = /*#__PURE__*/function _exp2() {
1508 return function (props) {
1509 return props.focused ? '0' : '1px';
1510 };
1511 };
1512 var _exp3 = /*#__PURE__*/function _exp3() {
1513 return function (props) {
1514 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1515 };
1516 };
1517 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1518 name: "ControlContainer",
1519 "class": "c1rgwbep",
1520 propsAsIs: false,
1521 vars: {
1522 "c1rgwbep-0": [_exp2()],
1523 "c1rgwbep-1": [_exp3()]
1524 }
1525 });
1526 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1527 name: "ValueContainer",
1528 "class": "v1mdmbaj",
1529 propsAsIs: false
1530 });
1531 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1532 name: "Placeholder",
1533 "class": "p1gwkvxy",
1534 propsAsIs: false
1535 });
1536 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1537 name: "SingleValue",
1538 "class": "s1bwlafs",
1539 propsAsIs: false
1540 });
1541 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1542 name: "IndicatorContainer",
1543 "class": "i196z9y5",
1544 propsAsIs: false
1545 });
1546 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1547 name: "DropdownIndicator",
1548 "class": "d1dfo5ow",
1549 propsAsIs: false
1550 });
1551 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1552 name: "InputContainer",
1553 "class": "if3lze",
1554 propsAsIs: false
1555 });
1556 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1557 name: "Input",
1558 "class": "i9kxf50",
1559 propsAsIs: false
1560 });
1561 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1562 name: "InputShadow",
1563 "class": "igjr3uc",
1564 propsAsIs: false
1565 });
1566 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1567 name: "MenuContainer",
1568 "class": "mhb9if7",
1569 propsAsIs: false
1570 });
1571 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1572 name: "MenuList",
1573 "class": "mxaof7s",
1574 propsAsIs: false
1575 });
1576 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1577 name: "MenuGroup",
1578 "class": "mw50s5v",
1579 propsAsIs: false
1580 });
1581 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1582 name: "MenuGroupHeader",
1583 "class": "m11rzvjw",
1584 propsAsIs: false
1585 });
1586 var _exp5 = /*#__PURE__*/function _exp5() {
1587 return function (props) {
1588 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1589 };
1590 };
1591 var _exp6 = /*#__PURE__*/function _exp6() {
1592 return function (props) {
1593 return props.selected ? '#fff' : 'inherit';
1594 };
1595 };
1596 var _exp7 = /*#__PURE__*/function _exp7() {
1597 return function (props) {
1598 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1599 };
1600 };
1601 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1602 name: "MenuItem",
1603 "class": "m1jcdsjv",
1604 propsAsIs: false,
1605 vars: {
1606 "m1jcdsjv-0": [_exp5()],
1607 "m1jcdsjv-1": [_exp6()],
1608 "m1jcdsjv-2": [_exp7()]
1609 }
1610 });
1611 function AsyncSelect(_ref) {
1612 var placeholder = _ref.placeholder,
1613 value = _ref.value,
1614 loadOptions = _ref.loadOptions,
1615 onChange = _ref.onChange,
1616 defaultOptions = _ref.defaultOptions;
1617 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1618 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1619 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1620 _useState2 = _slicedToArray(_useState, 2),
1621 isFocused = _useState2[0],
1622 setFocus = _useState2[1];
1623 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1624 _useState4 = _slicedToArray(_useState3, 2),
1625 loadState = _useState4[0],
1626 setLoadState = _useState4[1];
1627 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1628 _useState6 = _slicedToArray(_useState5, 2),
1629 localValue = _useState6[0],
1630 setLocalValue = _useState6[1];
1631 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1632 _useState8 = _slicedToArray(_useState7, 2),
1633 options = _useState8[0],
1634 setOptions = _useState8[1];
1635 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1636 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1637 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1638 loadOptions('', function (result) {
1639 setOptions(result);
1640 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1641 });
1642 }
1643 }, [loadOptions, loadState]);
1644 var _renderItems = function renderItems() {
1645 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1646 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1647 return items.map(function (item, index) {
1648 if (item.options) {
1649 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1650 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1651 id: "".concat(index, "-heading"),
1652 children: item.label
1653 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1654 children: _renderItems(item.options, index)
1655 })]
1656 }, "async-select-item-".concat(index));
1657 } else {
1658 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1659 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1660 id: key,
1661 selected: value && item.value === value.value,
1662 onClick: function onClick() {
1663 onChange(item);
1664 setFocus(false);
1665 },
1666 children: item.label
1667 }, key);
1668 }
1669 });
1670 };
1671 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1672 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1673 id: "leadin-async-selector",
1674 focused: isFocused,
1675 onClick: function onClick() {
1676 if (isFocused) {
1677 if (inputEl.current) {
1678 inputEl.current.blur();
1679 }
1680 setFocus(false);
1681 setLocalValue('');
1682 } else {
1683 if (inputEl.current) {
1684 inputEl.current.focus();
1685 }
1686 setFocus(true);
1687 }
1688 },
1689 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1690 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1691 children: placeholder
1692 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1693 children: value.label
1694 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1695 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1696 ref: inputEl,
1697 onFocus: function onFocus() {
1698 setFocus(true);
1699 },
1700 onChange: function onChange(e) {
1701 setLocalValue(e.target.value);
1702 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1703 loadOptions && loadOptions(e.target.value, function (result) {
1704 setOptions(result);
1705 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1706 });
1707 },
1708 value: localValue,
1709 width: inputSize,
1710 id: "asycn-select-input"
1711 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1712 ref: inputShadowEl,
1713 children: localValue
1714 })]
1715 })]
1716 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1717 children: [loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__["default"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(DropdownIndicator, {})]
1718 })]
1719 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1720 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1721 children: _renderItems(options)
1722 })
1723 })]
1724 });
1725 }
1726 __webpack_require__(/*! ./AsyncSelect.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./AsyncSelect.tsx */ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx");
1727
1728 /***/ }),
1729
1730 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1731 /*!************************************************!*\
1732 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1733 \************************************************/
1734 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1735
1736 "use strict";
1737 __webpack_require__.r(__webpack_exports__);
1738 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1739 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1740 /* harmony export */ });
1741 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1742 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1743 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1744 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1745 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1746 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1747 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1748
1749
1750
1751
1752
1753
1754
1755 function redirectToPlugin() {
1756 window.location.href = "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.adminUrl, "admin.php?page=leadin&leadin_expired=").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.redirectNonce);
1757 }
1758 function ErrorHandler(_ref) {
1759 var status = _ref.status,
1760 resetErrorState = _ref.resetErrorState,
1761 _ref$errorInfo = _ref.errorInfo,
1762 errorInfo = _ref$errorInfo === void 0 ? {
1763 header: '',
1764 message: '',
1765 action: ''
1766 } : _ref$errorInfo;
1767 var isUnauthorized = status === 401 || status === 403;
1768 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1769 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1770 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1771 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1772 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1773 textAlign: "center",
1774 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1775 children: errorHeader
1776 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1777 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1778 children: errorMessage
1779 })
1780 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1781 "data-test-id": "authorize-button",
1782 onClick: redirectToPlugin,
1783 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1784 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1785 "data-test-id": "retry-button",
1786 onClick: resetErrorState,
1787 children: errorInfo.action
1788 })]
1789 })
1790 });
1791 }
1792
1793 /***/ }),
1794
1795 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1796 /*!*************************************************!*\
1797 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1798 \*************************************************/
1799 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1800
1801 "use strict";
1802 __webpack_require__.r(__webpack_exports__);
1803 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1804 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1805 /* harmony export */ });
1806 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1807
1808 var _exp = /*#__PURE__*/function _exp() {
1809 return function (props) {
1810 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1811 };
1812 };
1813 var _exp2 = /*#__PURE__*/function _exp2() {
1814 return function (props) {
1815 return props.padding || '90px 20% 25px';
1816 };
1817 };
1818 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1819 name: "HubspotWrapper0",
1820 "class": "h1q5v5ee",
1821 propsAsIs: false,
1822 vars: {
1823 "h1q5v5ee-0": [_exp()],
1824 "h1q5v5ee-1": [_exp2()]
1825 }
1826 }));
1827 __webpack_require__(/*! ./HubspotWrapper.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./HubspotWrapper.ts */ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts");
1828
1829 /***/ }),
1830
1831 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1832 /*!************************************************!*\
1833 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1834 \************************************************/
1835 /***/ ((__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 */ "default": () => (/* binding */ LoadingBlock)
1841 /* harmony export */ });
1842 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1843 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1844 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1845 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1846
1847
1848
1849
1850 function LoadingBlock() {
1851 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1852 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1853 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1854 size: 50
1855 })
1856 });
1857 }
1858
1859 /***/ }),
1860
1861 /***/ "./scripts/shared/Common/PreviewDisabled.tsx":
1862 /*!***************************************************!*\
1863 !*** ./scripts/shared/Common/PreviewDisabled.tsx ***!
1864 \***************************************************/
1865 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1866
1867 "use strict";
1868 __webpack_require__.r(__webpack_exports__);
1869 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1870 /* harmony export */ "default": () => (/* binding */ PreviewDisabled)
1871 /* harmony export */ });
1872 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1873 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1874 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1875 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1876 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1877 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1878
1879
1880
1881
1882
1883 function PreviewDisabled() {
1884 var errorHeader = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Preview Unavailable', 'leadin');
1885 var errorMessage = "".concat((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('This block cannot be previewed within the Full Site Editor', 'leadin'), " ").concat((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Switch to the Block Editor to view the content', 'leadin'));
1886 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_2__["default"], {
1887 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1888 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_1__["default"], {
1889 textAlign: "center",
1890 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1891 children: errorHeader
1892 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1893 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1894 children: errorMessage
1895 })
1896 })]
1897 })
1898 });
1899 }
1900
1901 /***/ }),
1902
1903 /***/ "./scripts/shared/Form/FormEdit.tsx":
1904 /*!******************************************!*\
1905 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1906 \******************************************/
1907 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1908
1909 "use strict";
1910 __webpack_require__.r(__webpack_exports__);
1911 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1912 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1913 /* harmony export */ });
1914 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1915 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1916 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1917 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1918 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1919 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1920 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1921 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1922 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1923 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1924 /* harmony import */ var _utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/useGetEmbedder */ "./scripts/utils/useGetEmbedder.ts");
1925 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1926 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1927 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1928 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
1929 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
1930 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941 function FormEdit(_ref) {
1942 var attributes = _ref.attributes,
1943 isSelected = _ref.isSelected,
1944 setAttributes = _ref.setAttributes,
1945 _ref$preview = _ref.preview,
1946 preview = _ref$preview === void 0 ? true : _ref$preview,
1947 _ref$origin = _ref.origin,
1948 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
1949 fullSiteEditor = _ref.fullSiteEditor;
1950 var formId = attributes.formId,
1951 formName = attributes.formName,
1952 embedVersion = attributes.embedVersion;
1953 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1954 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1955 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1956 var handleChange = function handleChange(selectedForm) {
1957 setAttributes({
1958 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1959 formId: selectedForm.value,
1960 formName: selectedForm.label,
1961 embedVersion: selectedForm.embedVersion
1962 });
1963 };
1964 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1965 monitorFormPreviewRender({
1966 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1967 payload: {
1968 origin: origin
1969 }
1970 });
1971 }, [origin]);
1972 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1973 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1974 formId: formId,
1975 formName: formName,
1976 handleChange: handleChange,
1977 origin: origin,
1978 embedVersion: embedVersion
1979 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1980 children: [isSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__["default"], {}), preview && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewForm__WEBPACK_IMPORTED_MODULE_4__["default"], {
1981 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1982 formId: formId,
1983 fullSiteEditor: fullSiteEditor,
1984 embedVersion: embedVersion
1985 })]
1986 })]
1987 });
1988 }
1989 function FormEditContainer(props) {
1990 var _useGetEmbedder = (0,_utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_9__.useGetEmbedder)(),
1991 embedder = _useGetEmbedder.embedder,
1992 errorElement = _useGetEmbedder.errorElement,
1993 isLoading = _useGetEmbedder.isLoading;
1994 if (errorElement) {
1995 return errorElement;
1996 }
1997 if (isLoading) {
1998 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__["default"], {});
1999 }
2000 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
2001 value: embedder,
2002 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
2003 });
2004 }
2005
2006 /***/ }),
2007
2008 /***/ "./scripts/shared/Form/FormSelect.tsx":
2009 /*!********************************************!*\
2010 !*** ./scripts/shared/Form/FormSelect.tsx ***!
2011 \********************************************/
2012 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2013
2014 "use strict";
2015 __webpack_require__.r(__webpack_exports__);
2016 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2017 /* harmony export */ "default": () => (/* binding */ FormSelect)
2018 /* harmony export */ });
2019 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2020 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
2021 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2022 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2023 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
2024 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
2025 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
2026 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2027 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2028
2029
2030
2031
2032
2033
2034
2035
2036 function FormSelect(_ref) {
2037 var formId = _ref.formId,
2038 formName = _ref.formName,
2039 handleChange = _ref.handleChange,
2040 _ref$origin = _ref.origin,
2041 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
2042 embedVersion = _ref.embedVersion;
2043 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2044 search = _useForms.search,
2045 formApiError = _useForms.formApiError,
2046 reset = _useForms.reset;
2047 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
2048 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
2049 createReset = _useCreateFormFromTem.reset,
2050 isCreating = _useCreateFormFromTem.isCreating,
2051 hasError = _useCreateFormFromTem.hasError,
2052 createApiError = _useCreateFormFromTem.formApiError;
2053 var value = formId && formName ? {
2054 label: formName,
2055 value: formId,
2056 embedVersion: embedVersion
2057 } : null;
2058 var handleLocalChange = function handleLocalChange(option) {
2059 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
2060 createFormByTemplate(option.value).then(function (_ref2) {
2061 var guid = _ref2.guid,
2062 name = _ref2.name;
2063 handleChange({
2064 value: guid,
2065 label: name,
2066 embedVersion: 'v4'
2067 });
2068 });
2069 } else {
2070 handleChange(option);
2071 }
2072 };
2073 return isCreating ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], {}) : formApiError || createApiError ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
2074 status: formApiError ? formApiError.status : createApiError.status,
2075 resetErrorState: function resetErrorState() {
2076 if (hasError) {
2077 createReset();
2078 } else {
2079 reset();
2080 }
2081 },
2082 errorInfo: {
2083 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
2084 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
2085 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
2086 }
2087 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
2088 loadOptions: search,
2089 onChange: function onChange(option) {
2090 return handleLocalChange(option);
2091 },
2092 value: value
2093 });
2094 }
2095
2096 /***/ }),
2097
2098 /***/ "./scripts/shared/Form/FormSelector.tsx":
2099 /*!**********************************************!*\
2100 !*** ./scripts/shared/Form/FormSelector.tsx ***!
2101 \**********************************************/
2102 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2103
2104 "use strict";
2105 __webpack_require__.r(__webpack_exports__);
2106 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2107 /* harmony export */ "default": () => (/* binding */ FormSelector)
2108 /* harmony export */ });
2109 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2110 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2111 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2112 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2113 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2114 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2115
2116
2117
2118
2119
2120 function FormSelector(_ref) {
2121 var loadOptions = _ref.loadOptions,
2122 onChange = _ref.onChange,
2123 value = _ref.value;
2124 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
2125 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
2126 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
2127 "data-test-id": "leadin-form-select",
2128 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2129 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
2130 })
2131 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
2132 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
2133 value: value,
2134 loadOptions: loadOptions,
2135 onChange: onChange
2136 })]
2137 });
2138 }
2139
2140 /***/ }),
2141
2142 /***/ "./scripts/shared/Form/PreviewForm.tsx":
2143 /*!*********************************************!*\
2144 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
2145 \*********************************************/
2146 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2147
2148 "use strict";
2149 __webpack_require__.r(__webpack_exports__);
2150 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2151 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2152 /* harmony export */ });
2153 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2154 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2155 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2156 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2157 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2158 /* harmony import */ var _Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Common/PreviewDisabled */ "./scripts/shared/Common/PreviewDisabled.tsx");
2159 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2160 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2161 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2162 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2163 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2164 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2165
2166
2167
2168
2169
2170 function PreviewForm(_ref) {
2171 var portalId = _ref.portalId,
2172 formId = _ref.formId,
2173 fullSiteEditor = _ref.fullSiteEditor,
2174 embedVersion = _ref.embedVersion;
2175 var isFormV4 = embedVersion === 'v4';
2176 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2177 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2178 if (inputEl.current) {
2179 //@ts-expect-error Hubspot global
2180 var hbspt = window.parent.hbspt || window.hbspt;
2181 inputEl.current.innerHTML = '';
2182 var isQa = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.formsScriptPayload.includes('qa');
2183 if (isFormV4) {
2184 var container = document.createElement('div');
2185 container.classList.add('hs-form-frame');
2186 container.dataset.region = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet;
2187 container.dataset.formId = formId;
2188 container.dataset.portalId = portalId.toString();
2189 container.dataset.env = isQa ? 'qa' : '';
2190 inputEl.current.appendChild(container);
2191 } else {
2192 var additionalParams = isQa ? {
2193 env: 'qa'
2194 } : {};
2195 hbspt.forms.create(_objectSpread({
2196 portalId: portalId,
2197 formId: formId,
2198 region: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet,
2199 target: "#".concat(inputEl.current.id)
2200 }, additionalParams));
2201 }
2202 }
2203 }, [formId, portalId, inputEl, isFormV4]);
2204 if (fullSiteEditor) {
2205 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_4__["default"], {});
2206 }
2207 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2208 ref: inputEl,
2209 id: "hbspt-previewform-".concat(formId)
2210 });
2211 }
2212
2213 /***/ }),
2214
2215 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
2216 /*!****************************************************************!*\
2217 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
2218 \****************************************************************/
2219 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2220
2221 "use strict";
2222 __webpack_require__.r(__webpack_exports__);
2223 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2224 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
2225 /* harmony export */ });
2226 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2227 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2228 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2229 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2230 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2231 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2232 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2233 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2234 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2235 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2236 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2237
2238
2239
2240
2241 function useCreateFormFromTemplate() {
2242 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
2243 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2244 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
2245 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
2246 _useState2 = _slicedToArray(_useState, 2),
2247 loadState = _useState2[0],
2248 setLoadState = _useState2[1];
2249 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2250 _useState4 = _slicedToArray(_useState3, 2),
2251 formApiError = _useState4[0],
2252 setFormApiError = _useState4[1];
2253 var createFormByTemplate = function createFormByTemplate(type) {
2254 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2255 track({
2256 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
2257 payload: {
2258 type: type,
2259 origin: origin
2260 }
2261 });
2262 return proxy({
2263 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
2264 payload: {
2265 type: type,
2266 embedVersion: 'v4'
2267 }
2268 }).then(function (form) {
2269 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2270 return form;
2271 })["catch"](function (err) {
2272 setFormApiError(err);
2273 track({
2274 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
2275 payload: {
2276 origin: origin
2277 }
2278 });
2279 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2280 });
2281 };
2282 return {
2283 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
2284 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
2285 formApiError: formApiError,
2286 createFormByTemplate: createFormByTemplate,
2287 reset: function reset() {
2288 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2289 }
2290 };
2291 }
2292
2293 /***/ }),
2294
2295 /***/ "./scripts/shared/Form/hooks/useForms.ts":
2296 /*!***********************************************!*\
2297 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
2298 \***********************************************/
2299 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2300
2301 "use strict";
2302 __webpack_require__.r(__webpack_exports__);
2303 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2304 /* harmony export */ "default": () => (/* binding */ useForms)
2305 /* harmony export */ });
2306 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2307 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2308 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
2309 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2310 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2311 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2312 /* harmony import */ var _useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useGetTemplateAvailability */ "./scripts/shared/Form/hooks/useGetTemplateAvailability.ts");
2313 function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
2314 function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2315 function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
2316 function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
2317 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2318 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2319 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2320 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2321 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2322 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2323
2324
2325
2326
2327
2328 function useForms() {
2329 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2330 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2331 _useState2 = _slicedToArray(_useState, 2),
2332 formApiError = _useState2[0],
2333 setFormApiError = _useState2[1];
2334 var _useGetTemplateAvaila = (0,_useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2335 availabilityPromise = _useGetTemplateAvaila.availabilityPromise;
2336 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2337 return Promise.all([availabilityPromise, proxy({
2338 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchForms,
2339 payload: {
2340 search: search
2341 }
2342 })]).then(function (_ref) {
2343 var _ref2 = _slicedToArray(_ref, 2),
2344 templateAvailabilityResponse = _ref2[0],
2345 forms = _ref2[1];
2346 var TEMPLATE_OPTIONS = (0,_useGetTemplateAvailability__WEBPACK_IMPORTED_MODULE_4__.getTemplateOptions)(templateAvailabilityResponse.templateAvailability);
2347 callback([].concat(_toConsumableArray(forms.map(function (form) {
2348 return {
2349 label: form.name,
2350 value: form.guid,
2351 embedVersion: form.embedVersion
2352 };
2353 })), [TEMPLATE_OPTIONS]));
2354 })["catch"](function (error) {
2355 setFormApiError(error);
2356 });
2357 }, 300, {
2358 trailing: true
2359 });
2360 return {
2361 search: search,
2362 formApiError: formApiError,
2363 reset: function reset() {
2364 return setFormApiError(null);
2365 }
2366 };
2367 }
2368
2369 /***/ }),
2370
2371 /***/ "./scripts/shared/Form/hooks/useGetTemplateAvailability.ts":
2372 /*!*****************************************************************!*\
2373 !*** ./scripts/shared/Form/hooks/useGetTemplateAvailability.ts ***!
2374 \*****************************************************************/
2375 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2376
2377 "use strict";
2378 __webpack_require__.r(__webpack_exports__);
2379 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2380 /* harmony export */ "default": () => (/* binding */ useGetTemplateAvailability),
2381 /* harmony export */ "getTemplateOptions": () => (/* binding */ getTemplateOptions),
2382 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
2383 /* harmony export */ });
2384 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2385 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2386 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2387 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2388 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2389 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2390 /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../types */ "./scripts/shared/types.ts");
2391 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2392 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2393 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2394 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2395 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2396 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2397
2398
2399
2400
2401
2402 function useGetTemplateAvailability() {
2403 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2404 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2405 _useState2 = _slicedToArray(_useState, 2),
2406 templateAvailability = _useState2[0],
2407 setTemplateAvailability = _useState2[1];
2408 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () {
2409 return new Promise(function (resolve) {
2410 proxy({
2411 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.GetTemplateAvailability,
2412 payload: {}
2413 }).then(function (data) {
2414 setTemplateAvailability(data.templateAvailability);
2415 resolve(data);
2416 });
2417 });
2418 }),
2419 _useState4 = _slicedToArray(_useState3, 1),
2420 availabilityPromise = _useState4[0];
2421 return {
2422 templateAvailability: templateAvailability,
2423 availabilityPromise: availabilityPromise
2424 };
2425 }
2426 var getTemplateOptions = function getTemplateOptions(templateAvailability) {
2427 if (!templateAvailability) {
2428 return {};
2429 }
2430 return {
2431 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Templates', 'leadin'),
2432 options: Object.keys(templateAvailability).filter(function (templateId) {
2433 var hubspotFormTemplateAvailability = templateAvailability[templateId];
2434 return (hubspotFormTemplateAvailability.canCreateWithMissingScopes || !hubspotFormTemplateAvailability.missingScopes.length) && !Object.values(_types__WEBPACK_IMPORTED_MODULE_4__.ExcludedTemplateAvailabilityKeys).includes(templateId);
2435 }).map(function (templateId) {
2436 return {
2437 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)(_types__WEBPACK_IMPORTED_MODULE_4__.TemplateLabels[templateId], 'leadin'),
2438 value: _types__WEBPACK_IMPORTED_MODULE_4__.TemplateValues[templateId]
2439 };
2440 })
2441 };
2442 };
2443 function isDefaultForm(value) {
2444 return Object.values(_types__WEBPACK_IMPORTED_MODULE_4__.TemplateValues).includes(value);
2445 }
2446
2447 /***/ }),
2448
2449 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2450 /*!******************************************************!*\
2451 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2452 \******************************************************/
2453 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2454
2455 "use strict";
2456 __webpack_require__.r(__webpack_exports__);
2457 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2458 /* harmony export */ "default": () => (/* binding */ MeetingController)
2459 /* harmony export */ });
2460 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2461 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2462 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2463 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2464 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2465 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2466 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2467 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2468 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2469 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2470 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2471 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2472 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2473 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485 function MeetingController(_ref) {
2486 var handleChange = _ref.handleChange,
2487 url = _ref.url;
2488 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2489 meetings = _useMeetings.mappedMeetings,
2490 loading = _useMeetings.loading,
2491 error = _useMeetings.error,
2492 reload = _useMeetings.reload,
2493 connectCalendar = _useMeetings.connectCalendar;
2494 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2495 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2496 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2497 if (!url && meetings.length > 0) {
2498 handleChange(meetings[0].value);
2499 }
2500 }, [meetings, url, handleChange]);
2501 var handleLocalChange = function handleLocalChange(option) {
2502 handleChange(option.value);
2503 };
2504 var handleConnectCalendar = function handleConnectCalendar() {
2505 return connectCalendar().then(function () {
2506 reload();
2507 })["catch"](function (error) {
2508 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2509 extra: {
2510 error: error
2511 }
2512 });
2513 });
2514 };
2515 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2516 children: loading ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], {}) : error ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
2517 status: error && error.status || error,
2518 resetErrorState: function resetErrorState() {
2519 return reload();
2520 },
2521 errorInfo: {
2522 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2523 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2524 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2525 }
2526 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2527 padding: "90px 32px 24px",
2528 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2529 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2530 status: selectedMeetingCalendar,
2531 onConnectCalendar: handleConnectCalendar
2532 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2533 onChange: handleLocalChange,
2534 options: meetings,
2535 value: selectedMeetingOption
2536 })]
2537 })
2538 });
2539 }
2540
2541 /***/ }),
2542
2543 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2544 /*!************************************************!*\
2545 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2546 \************************************************/
2547 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2548
2549 "use strict";
2550 __webpack_require__.r(__webpack_exports__);
2551 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2552 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2553 /* harmony export */ });
2554 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2555 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2556 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2557 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2558 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2559 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2560 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2561 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2562 /* harmony import */ var _utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/useGetEmbedder */ "./scripts/utils/useGetEmbedder.ts");
2563 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2564 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2565 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2566 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2567 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2568 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2569
2570
2571
2572
2573
2574
2575
2576
2577 function MeetingEdit(_ref) {
2578 var url = _ref.attributes.url,
2579 isSelected = _ref.isSelected,
2580 setAttributes = _ref.setAttributes,
2581 _ref$preview = _ref.preview,
2582 preview = _ref$preview === void 0 ? true : _ref$preview,
2583 _ref$origin = _ref.origin,
2584 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin,
2585 fullSiteEditor = _ref.fullSiteEditor;
2586 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2587 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2588 var handleChange = function handleChange(newUrl) {
2589 setAttributes({
2590 url: newUrl
2591 });
2592 };
2593 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2594 monitorFormPreviewRender({
2595 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_5__.ProxyMessages.TrackMeetingPreviewRender,
2596 payload: {
2597 origin: origin
2598 }
2599 });
2600 }, [origin]);
2601 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_6__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2602 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2603 url: url,
2604 handleChange: handleChange
2605 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2606 url: url,
2607 fullSiteEditor: fullSiteEditor
2608 })]
2609 });
2610 }
2611 function MeetingsEditContainer(props) {
2612 var _useGetEmbedder = (0,_utils_useGetEmbedder__WEBPACK_IMPORTED_MODULE_7__.useGetEmbedder)(),
2613 embedder = _useGetEmbedder.embedder,
2614 errorElement = _useGetEmbedder.errorElement,
2615 isLoading = _useGetEmbedder.isLoading;
2616 if (errorElement) {
2617 return errorElement;
2618 }
2619 if (isLoading) {
2620 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_6__["default"], {});
2621 }
2622 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2623 value: embedder,
2624 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2625 });
2626 }
2627
2628 /***/ }),
2629
2630 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2631 /*!****************************************************!*\
2632 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2633 \****************************************************/
2634 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2635
2636 "use strict";
2637 __webpack_require__.r(__webpack_exports__);
2638 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2639 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2640 /* harmony export */ });
2641 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2642 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2643 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2644 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2645 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2646 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2647 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2648
2649
2650
2651
2652
2653 function MeetingSelector(_ref) {
2654 var options = _ref.options,
2655 onChange = _ref.onChange,
2656 value = _ref.value;
2657 var optionsWrapper = [{
2658 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2659 options: options
2660 }];
2661 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2662 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__["default"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
2663 "data-test-id": "leadin-meeting-select",
2664 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2665 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2666 })
2667 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2668 defaultOptions: optionsWrapper,
2669 onChange: onChange,
2670 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2671 value: value
2672 })]
2673 });
2674 }
2675
2676 /***/ }),
2677
2678 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2679 /*!***************************************************!*\
2680 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2681 \***************************************************/
2682 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2683
2684 "use strict";
2685 __webpack_require__.r(__webpack_exports__);
2686 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2687 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2688 /* harmony export */ });
2689 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2690 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2691 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2692 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2693 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2694 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2695
2696
2697
2698
2699
2700 function MeetingWarning(_ref) {
2701 var status = _ref.status,
2702 onConnectCalendar = _ref.onConnectCalendar;
2703 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2704 var titleText = isMeetingOwner ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Your calendar is not connected', 'leadin') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Calendar is not connected', 'leadin');
2705 var titleMessage = isMeetingOwner ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Please connect your calendar to activate your scheduling pages', 'leadin') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Make sure that everybody in this meeting has connected their calendar from the Meetings page in HubSpot', 'leadin');
2706 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2707 titleText: titleText,
2708 titleMessage: titleMessage,
2709 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2710 use: "tertiary",
2711 id: "meetings-connect-calendar",
2712 onClick: onConnectCalendar,
2713 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2714 })
2715 });
2716 }
2717
2718 /***/ }),
2719
2720 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2721 /*!***************************************************!*\
2722 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2723 \***************************************************/
2724 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2725
2726 "use strict";
2727 __webpack_require__.r(__webpack_exports__);
2728 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2729 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2730 /* harmony export */ });
2731 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2732 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2733 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2734 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2735 /* harmony import */ var _Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/PreviewDisabled */ "./scripts/shared/Common/PreviewDisabled.tsx");
2736
2737
2738
2739
2740 function PreviewForm(_ref) {
2741 var url = _ref.url,
2742 fullSiteEditor = _ref.fullSiteEditor;
2743 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2744 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2745 if (inputEl.current) {
2746 //@ts-expect-error Hubspot global
2747 var hbspt = window.parent.hbspt || window.hbspt;
2748 hbspt.meetings.create('.meetings-iframe-container');
2749 }
2750 }, [url, inputEl]);
2751 if (fullSiteEditor) {
2752 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_PreviewDisabled__WEBPACK_IMPORTED_MODULE_3__["default"], {});
2753 }
2754 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2755 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2756 ref: inputEl,
2757 className: "meetings-iframe-container",
2758 "data-src": "".concat(url, "?embed=true")
2759 })
2760 });
2761 }
2762
2763 /***/ }),
2764
2765 /***/ "./scripts/shared/Meeting/constants.ts":
2766 /*!*********************************************!*\
2767 !*** ./scripts/shared/Meeting/constants.ts ***!
2768 \*********************************************/
2769 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2770
2771 "use strict";
2772 __webpack_require__.r(__webpack_exports__);
2773 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2774 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2775 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2776 /* harmony export */ });
2777 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2778 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2779
2780 /***/ }),
2781
2782 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2783 /*!*************************************************************!*\
2784 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2785 \*************************************************************/
2786 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2787
2788 "use strict";
2789 __webpack_require__.r(__webpack_exports__);
2790 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2791 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2792 /* harmony export */ });
2793 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2794 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2795 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2796 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2797 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2798 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2799 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2800 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2801 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2802 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2803 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2804
2805
2806
2807
2808 var user = null;
2809 function useCurrentUserFetch() {
2810 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2811 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2812 _useState2 = _slicedToArray(_useState, 2),
2813 loadState = _useState2[0],
2814 setLoadState = _useState2[1];
2815 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2816 _useState4 = _slicedToArray(_useState3, 2),
2817 error = _useState4[0],
2818 setError = _useState4[1];
2819 var createUser = function createUser() {
2820 if (!user) {
2821 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2822 }
2823 };
2824 var reload = function reload() {
2825 user = null;
2826 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2827 setError(null);
2828 };
2829 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2830 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2831 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2832 proxy({
2833 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2834 }).then(function (data) {
2835 user = data;
2836 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2837 })["catch"](function (err) {
2838 setError(err);
2839 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2840 });
2841 }
2842 }, [loadState]);
2843 return {
2844 user: user,
2845 loadUserState: loadState,
2846 error: error,
2847 createUser: createUser,
2848 reload: reload
2849 };
2850 }
2851
2852 /***/ }),
2853
2854 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2855 /*!*****************************************************!*\
2856 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2857 \*****************************************************/
2858 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2859
2860 "use strict";
2861 __webpack_require__.r(__webpack_exports__);
2862 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2863 /* harmony export */ "default": () => (/* binding */ useMeetings),
2864 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2865 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2866 /* harmony export */ });
2867 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2868 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2869 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2870 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2871 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2872 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2873 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2874 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2875 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2876 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2877 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2878 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2879 function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2880 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2881 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
2882 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2883 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2884 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2885 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
2886 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
2887 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2888 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2889
2890
2891
2892
2893
2894
2895
2896
2897 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2898 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2899 meetingOwnerId = _meeting$meetingsUser[0];
2900 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2901 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2902 var user = meetingUsers[meetingOwnerId];
2903 result += " (".concat(user.userProfile.fullName, ")");
2904 }
2905 return result;
2906 }
2907 function hasCalendarObject(user) {
2908 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2909 }
2910 function useMeetings() {
2911 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2912 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2913 meetings = _useMeetingsFetch.meetings,
2914 meetingUsers = _useMeetingsFetch.meetingUsers,
2915 meetingsError = _useMeetingsFetch.error,
2916 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2917 reloadMeetings = _useMeetingsFetch.reload;
2918 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2919 currentUser = _useCurrentUserFetch.user,
2920 userError = _useCurrentUserFetch.error,
2921 loadUserState = _useCurrentUserFetch.loadUserState,
2922 reloadUser = _useCurrentUserFetch.reload;
2923 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2924 reloadUser();
2925 reloadMeetings();
2926 }, [reloadUser, reloadMeetings]);
2927 var connectCalendar = function connectCalendar() {
2928 return proxy({
2929 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2930 });
2931 };
2932 return {
2933 mappedMeetings: meetings.map(function (meet) {
2934 return {
2935 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2936 value: meet.link
2937 };
2938 }),
2939 meetings: meetings,
2940 meetingUsers: meetingUsers,
2941 currentUser: currentUser,
2942 error: meetingsError || userError,
2943 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2944 reload: reload,
2945 connectCalendar: connectCalendar
2946 };
2947 }
2948 function useSelectedMeeting(url) {
2949 var _useMeetings = useMeetings(),
2950 meetings = _useMeetings.mappedMeetings;
2951 var option = meetings.find(function (_ref) {
2952 var value = _ref.value;
2953 return value === url;
2954 });
2955 return option;
2956 }
2957 function useSelectedMeetingCalendar(url) {
2958 var _useMeetings2 = useMeetings(),
2959 meetings = _useMeetings2.meetings,
2960 meetingUsers = _useMeetings2.meetingUsers,
2961 currentUser = _useMeetings2.currentUser;
2962 var meeting = meetings.find(function (meet) {
2963 return meet.link === url;
2964 });
2965 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2966 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2967 }, {});
2968 if (!meeting) {
2969 return null;
2970 } else {
2971 var meetingsUserIds = meeting.meetingsUserIds;
2972 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2973 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2974 } else if (meetingsUserIds.map(function (id) {
2975 return mappedMeetingUsersId[id];
2976 }).some(function (user) {
2977 return !hasCalendarObject(user);
2978 })) {
2979 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2980 } else {
2981 return null;
2982 }
2983 }
2984 }
2985
2986 /***/ }),
2987
2988 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2989 /*!**********************************************************!*\
2990 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2991 \**********************************************************/
2992 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2993
2994 "use strict";
2995 __webpack_require__.r(__webpack_exports__);
2996 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2997 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2998 /* harmony export */ });
2999 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3000 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3001 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
3002 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
3003 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
3004 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3005 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3006 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3007 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3008 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3009 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3010
3011
3012
3013
3014 var meetings = [];
3015 var meetingUsers = [];
3016 function useMeetingsFetch() {
3017 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
3018 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
3019 _useState2 = _slicedToArray(_useState, 2),
3020 loadState = _useState2[0],
3021 setLoadState = _useState2[1];
3022 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3023 _useState4 = _slicedToArray(_useState3, 2),
3024 error = _useState4[0],
3025 setError = _useState4[1];
3026 var reload = function reload() {
3027 meetings = [];
3028 setError(null);
3029 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
3030 };
3031 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3032 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
3033 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
3034 proxy({
3035 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
3036 }).then(function (data) {
3037 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
3038 meetings = data && data.meetingLinks;
3039 meetingUsers = data && data.meetingUsers;
3040 })["catch"](function (e) {
3041 setError(e);
3042 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
3043 });
3044 }
3045 }, [loadState]);
3046 return {
3047 meetings: meetings,
3048 meetingUsers: meetingUsers,
3049 loadMeetingsState: loadState,
3050 error: error,
3051 reload: reload
3052 };
3053 }
3054
3055 /***/ }),
3056
3057 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
3058 /*!*************************************************!*\
3059 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
3060 \*************************************************/
3061 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3062
3063 "use strict";
3064 __webpack_require__.r(__webpack_exports__);
3065 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3066 /* harmony export */ "default": () => (/* binding */ UIAlert)
3067 /* harmony export */ });
3068 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3069 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3070
3071
3072 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
3073 name: "AlertContainer",
3074 "class": "a1h8m4fo",
3075 propsAsIs: false
3076 });
3077 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
3078 name: "Title",
3079 "class": "tyndzxk",
3080 propsAsIs: false
3081 });
3082 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
3083 name: "Message",
3084 "class": "m1m9sbk4",
3085 propsAsIs: false
3086 });
3087 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
3088 name: "MessageContainer",
3089 "class": "mg5o421",
3090 propsAsIs: false
3091 });
3092 function UIAlert(_ref) {
3093 var titleText = _ref.titleText,
3094 titleMessage = _ref.titleMessage,
3095 children = _ref.children;
3096 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
3097 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
3098 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
3099 children: titleText
3100 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
3101 children: titleMessage
3102 })]
3103 }), children]
3104 });
3105 }
3106 __webpack_require__(/*! ./UIAlert.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIAlert.tsx */ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx");
3107
3108 /***/ }),
3109
3110 /***/ "./scripts/shared/UIComponents/UIButton.ts":
3111 /*!*************************************************!*\
3112 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
3113 \*************************************************/
3114 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3115
3116 "use strict";
3117 __webpack_require__.r(__webpack_exports__);
3118 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3119 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3120 /* harmony export */ });
3121 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3122 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3123
3124
3125 var _exp2 = /*#__PURE__*/function _exp2() {
3126 return function (props) {
3127 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
3128 };
3129 };
3130 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
3131 name: "UIButton0",
3132 "class": "ug152ch",
3133 propsAsIs: false,
3134 vars: {
3135 "ug152ch-0": [_exp2()]
3136 }
3137 }));
3138 __webpack_require__(/*! ./UIButton.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIButton.ts */ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts");
3139
3140 /***/ }),
3141
3142 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
3143 /*!****************************************************!*\
3144 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
3145 \****************************************************/
3146 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3147
3148 "use strict";
3149 __webpack_require__.r(__webpack_exports__);
3150 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3151 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3152 /* harmony export */ });
3153 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3154
3155 var _exp = /*#__PURE__*/function _exp() {
3156 return function (props) {
3157 return props.textAlign ? props.textAlign : 'inherit';
3158 };
3159 };
3160 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3161 name: "UIContainer0",
3162 "class": "ua13n1c",
3163 propsAsIs: false,
3164 vars: {
3165 "ua13n1c-0": [_exp()]
3166 }
3167 }));
3168 __webpack_require__(/*! ./UIContainer.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIContainer.ts */ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts");
3169
3170 /***/ }),
3171
3172 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
3173 /*!**************************************************!*\
3174 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
3175 \**************************************************/
3176 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3177
3178 "use strict";
3179 __webpack_require__.r(__webpack_exports__);
3180 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3181 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3182 /* harmony export */ });
3183 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3184
3185 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3186 name: "UIOverlay0",
3187 "class": "u1q7a48k",
3188 propsAsIs: false
3189 }));
3190 __webpack_require__(/*! ./UIOverlay.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UIOverlay.ts */ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts");
3191
3192 /***/ }),
3193
3194 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
3195 /*!*************************************************!*\
3196 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
3197 \*************************************************/
3198 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3199
3200 "use strict";
3201 __webpack_require__.r(__webpack_exports__);
3202 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3203 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3204 /* harmony export */ });
3205 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3206
3207 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3208 name: "UISpacer0",
3209 "class": "u3qxofx",
3210 propsAsIs: false
3211 }));
3212 __webpack_require__(/*! ./UISpacer.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UISpacer.ts */ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts");
3213
3214 /***/ }),
3215
3216 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3217 /*!***************************************************!*\
3218 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3219 \***************************************************/
3220 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3221
3222 "use strict";
3223 __webpack_require__.r(__webpack_exports__);
3224 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3225 /* harmony export */ "default": () => (/* binding */ UISpinner)
3226 /* harmony export */ });
3227 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3228 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3229 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3230
3231
3232
3233 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3234 name: "SpinnerOuter",
3235 "class": "sxa9zrc",
3236 propsAsIs: false
3237 });
3238 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3239 name: "SpinnerInner",
3240 "class": "s14430wa",
3241 propsAsIs: false
3242 });
3243 var _exp = /*#__PURE__*/function _exp() {
3244 return function (props) {
3245 return props.color;
3246 };
3247 };
3248 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3249 name: "Circle",
3250 "class": "ct87ghk",
3251 propsAsIs: true,
3252 vars: {
3253 "ct87ghk-0": [_exp()]
3254 }
3255 });
3256 var _exp2 = /*#__PURE__*/function _exp2() {
3257 return function (props) {
3258 return props.color;
3259 };
3260 };
3261 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3262 name: "AnimatedCircle",
3263 "class": "avili0h",
3264 propsAsIs: true,
3265 vars: {
3266 "avili0h-0": [_exp2()]
3267 }
3268 });
3269 function UISpinner(_ref) {
3270 var _ref$size = _ref.size,
3271 size = _ref$size === void 0 ? 20 : _ref$size;
3272 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3273 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3274 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3275 height: size,
3276 width: size,
3277 viewBox: "0 0 50 50",
3278 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3279 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3280 cx: "25",
3281 cy: "25",
3282 r: "22.5"
3283 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3284 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3285 cx: "25",
3286 cy: "25",
3287 r: "22.5"
3288 })]
3289 })
3290 })
3291 });
3292 }
3293 __webpack_require__(/*! ./UISpinner.linaria.css!=!../../../node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./UISpinner.tsx */ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx");
3294
3295 /***/ }),
3296
3297 /***/ "./scripts/shared/UIComponents/colors.ts":
3298 /*!***********************************************!*\
3299 !*** ./scripts/shared/UIComponents/colors.ts ***!
3300 \***********************************************/
3301 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3302
3303 "use strict";
3304 __webpack_require__.r(__webpack_exports__);
3305 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3306 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3307 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3308 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3309 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3310 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3311 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3312 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3313 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3314 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3315 /* harmony export */ });
3316 var CALYPSO = '#00a4bd';
3317 var CALYPSO_MEDIUM = '#7fd1de';
3318 var CALYPSO_LIGHT = '#e5f5f8';
3319 var LORAX = '#ff7a59';
3320 var OLAF = '#ffffff';
3321 var HEFFALUMP = '#425b76';
3322 var MARIGOLD_LIGHT = '#fef8f0';
3323 var MARIGOLD_MEDIUM = '#fae0b5';
3324 var OBSIDIAN = '#33475b';
3325
3326 /***/ }),
3327
3328 /***/ "./scripts/shared/enums/connectionStatus.ts":
3329 /*!**************************************************!*\
3330 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3331 \**************************************************/
3332 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3333
3334 "use strict";
3335 __webpack_require__.r(__webpack_exports__);
3336 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3337 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3338 /* harmony export */ });
3339 var ConnectionStatus = {
3340 Connected: 'Connected',
3341 NotConnected: 'NotConnected'
3342 };
3343 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3344
3345 /***/ }),
3346
3347 /***/ "./scripts/shared/enums/loadState.ts":
3348 /*!*******************************************!*\
3349 !*** ./scripts/shared/enums/loadState.ts ***!
3350 \*******************************************/
3351 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3352
3353 "use strict";
3354 __webpack_require__.r(__webpack_exports__);
3355 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3356 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3357 /* harmony export */ });
3358 var LoadState = {
3359 NotLoaded: 'NotLoaded',
3360 Loading: 'Loading',
3361 Loaded: 'Loaded',
3362 Idle: 'Idle',
3363 Failed: 'Failed'
3364 };
3365 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3366
3367 /***/ }),
3368
3369 /***/ "./scripts/shared/types.ts":
3370 /*!*********************************!*\
3371 !*** ./scripts/shared/types.ts ***!
3372 \*********************************/
3373 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3374
3375 "use strict";
3376 __webpack_require__.r(__webpack_exports__);
3377 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3378 /* harmony export */ "ExcludedTemplateAvailabilityKeys": () => (/* binding */ ExcludedTemplateAvailabilityKeys),
3379 /* harmony export */ "HubSpotFormTemplateAvailabilityKeys": () => (/* binding */ HubSpotFormTemplateAvailabilityKeys),
3380 /* harmony export */ "TemplateLabels": () => (/* binding */ TemplateLabels),
3381 /* harmony export */ "TemplateValues": () => (/* binding */ TemplateValues)
3382 /* harmony export */ });
3383 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3384 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3385 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
3386 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3387 var HubSpotFormTemplateAvailabilityKeys;
3388 (function (HubSpotFormTemplateAvailabilityKeys) {
3389 HubSpotFormTemplateAvailabilityKeys["AI_GENERATED"] = "ai-generated";
3390 HubSpotFormTemplateAvailabilityKeys["BLANK"] = "blank";
3391 HubSpotFormTemplateAvailabilityKeys["NEWSLETTER"] = "newsletter";
3392 HubSpotFormTemplateAvailabilityKeys["CONTACT_US"] = "contact-us";
3393 HubSpotFormTemplateAvailabilityKeys["EVENT_REGISTRATION"] = "event-registration";
3394 HubSpotFormTemplateAvailabilityKeys["TALK_TO_AN_EXPERT"] = "talk-to-an-expert";
3395 HubSpotFormTemplateAvailabilityKeys["BOOK_A_MEETING"] = "book-a-meeting";
3396 HubSpotFormTemplateAvailabilityKeys["GATED_CONTENT"] = "gated-content";
3397 HubSpotFormTemplateAvailabilityKeys["SUPPORT"] = "support";
3398 })(HubSpotFormTemplateAvailabilityKeys || (HubSpotFormTemplateAvailabilityKeys = {}));
3399 var ExcludedTemplateAvailabilityKeys;
3400 (function (ExcludedTemplateAvailabilityKeys) {
3401 ExcludedTemplateAvailabilityKeys["SUPPORT"] = "support";
3402 ExcludedTemplateAvailabilityKeys["AI_GENERATED"] = "ai-generated";
3403 })(ExcludedTemplateAvailabilityKeys || (ExcludedTemplateAvailabilityKeys = {}));
3404 var TemplateLabels = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, HubSpotFormTemplateAvailabilityKeys.BLANK, 'Blank Form'), HubSpotFormTemplateAvailabilityKeys.NEWSLETTER, 'Newsletter Form'), HubSpotFormTemplateAvailabilityKeys.CONTACT_US, 'Contact Us Form'), HubSpotFormTemplateAvailabilityKeys.EVENT_REGISTRATION, 'Event Registration Form'), HubSpotFormTemplateAvailabilityKeys.TALK_TO_AN_EXPERT, 'Talk to an Expert Form'), HubSpotFormTemplateAvailabilityKeys.BOOK_A_MEETING, 'Book a Meeting Form'), HubSpotFormTemplateAvailabilityKeys.GATED_CONTENT, 'Gated Content Form');
3405 var TemplateValues = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, HubSpotFormTemplateAvailabilityKeys.BLANK, 'BLANK'), HubSpotFormTemplateAvailabilityKeys.NEWSLETTER, 'NEWSLETTER'), HubSpotFormTemplateAvailabilityKeys.CONTACT_US, 'CONTACT_US'), HubSpotFormTemplateAvailabilityKeys.EVENT_REGISTRATION, 'EVENT_REGISTRATION'), HubSpotFormTemplateAvailabilityKeys.TALK_TO_AN_EXPERT, 'TALK_TO_AN_EXPERT'), HubSpotFormTemplateAvailabilityKeys.BOOK_A_MEETING, 'BOOK_A_MEETING'), HubSpotFormTemplateAvailabilityKeys.GATED_CONTENT, 'GATED_CONTENT');
3406
3407 /***/ }),
3408
3409 /***/ "./scripts/utils/appUtils.ts":
3410 /*!***********************************!*\
3411 !*** ./scripts/utils/appUtils.ts ***!
3412 \***********************************/
3413 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3414
3415 "use strict";
3416 __webpack_require__.r(__webpack_exports__);
3417 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3418 /* harmony export */ "initApp": () => (/* binding */ initApp),
3419 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3420 /* harmony export */ });
3421 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3422 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3423 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3424
3425
3426 function initApp(initFn) {
3427 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3428 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3429 }
3430 function initAppOnReady(initFn) {
3431 function main() {
3432 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3433 }
3434 initApp(main);
3435 }
3436
3437 /***/ }),
3438
3439 /***/ "./scripts/utils/backgroundAppUtils.ts":
3440 /*!*********************************************!*\
3441 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3442 \*********************************************/
3443 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3444
3445 "use strict";
3446 __webpack_require__.r(__webpack_exports__);
3447 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3448 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3449 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3450 /* harmony export */ });
3451 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3452 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3453 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
3454
3455
3456
3457 function initBackgroundApp(initFn) {
3458 function main() {
3459 if (Array.isArray(initFn)) {
3460 initFn.forEach(function (callback) {
3461 return callback();
3462 });
3463 } else {
3464 initFn();
3465 }
3466 }
3467 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3468 }
3469 var getLeadinConfig = function getLeadinConfig() {
3470 return {
3471 leadinPluginVersion: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.leadinPluginVersion
3472 };
3473 };
3474 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp() {
3475 var accessToken = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3476 var expiresIn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
3477 if (window.LeadinBackgroundApp) {
3478 return window.LeadinBackgroundApp;
3479 }
3480 var _window = window,
3481 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3482 IntegratedAppOptions = _window.IntegratedAppOptions;
3483 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setLeadinConfig(getLeadinConfig()).setAccessToken(accessToken, expiresIn);
3484 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3485 embedder.attachTo(document.body, false);
3486 embedder.setTokenRenewalCallback(_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__.fetchAccessToken);
3487 embedder.postStartAppMessage(); // lets the app know all data has been passed to it
3488 window.LeadinBackgroundApp = embedder;
3489 return window.LeadinBackgroundApp;
3490 };
3491
3492 /***/ }),
3493
3494 /***/ "./scripts/utils/isRefreshTokenAvailable.ts":
3495 /*!**************************************************!*\
3496 !*** ./scripts/utils/isRefreshTokenAvailable.ts ***!
3497 \**************************************************/
3498 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3499
3500 "use strict";
3501 __webpack_require__.r(__webpack_exports__);
3502 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3503 /* harmony export */ "isRefreshTokenAvailable": () => (/* binding */ isRefreshTokenAvailable)
3504 /* harmony export */ });
3505 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3506
3507 function isRefreshTokenAvailable() {
3508 return _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.connectionStatus === 'Connected';
3509 }
3510
3511 /***/ }),
3512
3513 /***/ "./scripts/utils/queryParams.ts":
3514 /*!**************************************!*\
3515 !*** ./scripts/utils/queryParams.ts ***!
3516 \**************************************/
3517 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3518
3519 "use strict";
3520 __webpack_require__.r(__webpack_exports__);
3521 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3522 /* harmony export */ "addQueryObjectToUrl": () => (/* binding */ addQueryObjectToUrl),
3523 /* harmony export */ "removeQueryParamFromLocation": () => (/* binding */ removeQueryParamFromLocation)
3524 /* harmony export */ });
3525 function addQueryObjectToUrl(urlObject, queryParams) {
3526 Object.keys(queryParams).forEach(function (key) {
3527 urlObject.searchParams.append(key, queryParams[key]);
3528 });
3529 }
3530 function removeQueryParamFromLocation(key) {
3531 var location = new URL(window.location.href);
3532 location.searchParams["delete"](key);
3533 window.history.replaceState(null, '', location.href);
3534 }
3535
3536 /***/ }),
3537
3538 /***/ "./scripts/utils/useGetEmbedder.ts":
3539 /*!*****************************************!*\
3540 !*** ./scripts/utils/useGetEmbedder.ts ***!
3541 \*****************************************/
3542 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3543
3544 "use strict";
3545 __webpack_require__.r(__webpack_exports__);
3546 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3547 /* harmony export */ "useGetEmbedder": () => (/* binding */ useGetEmbedder)
3548 /* harmony export */ });
3549 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
3550 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3551 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
3552 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
3553 /* harmony import */ var _api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../api/wordpressApiClient */ "./scripts/api/wordpressApiClient.ts");
3554 /* harmony import */ var _backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
3555 /* harmony import */ var _isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isRefreshTokenAvailable */ "./scripts/utils/isRefreshTokenAvailable.ts");
3556 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
3557 function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3558 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3559 function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
3560 function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3561 function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
3562 function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3563
3564
3565
3566
3567
3568
3569
3570 function useGetEmbedder() {
3571 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3572 _useState2 = _slicedToArray(_useState, 2),
3573 embedder = _useState2[0],
3574 setEmbedder = _useState2[1];
3575 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
3576 _useState4 = _slicedToArray(_useState3, 2),
3577 errorStatus = _useState4[0],
3578 setErrorStatus = _useState4[1];
3579 var loadEmbedder = function loadEmbedder() {
3580 (0,_api_wordpressApiClient__WEBPACK_IMPORTED_MODULE_2__.fetchAccessToken)().then(function (_ref) {
3581 var accessToken = _ref.accessToken,
3582 expiresIn = _ref.expiresIn;
3583 setEmbedder((0,_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__.getOrCreateBackgroundApp)(accessToken, expiresIn));
3584 })["catch"](function (err) {
3585 return setErrorStatus(err && err.status || 500);
3586 });
3587 };
3588 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
3589 if ((0,_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__.isRefreshTokenAvailable)()) {
3590 loadEmbedder();
3591 }
3592 }, []);
3593 var errorElement = errorStatus !== null ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_5__["default"], {
3594 status: errorStatus,
3595 resetErrorState: function resetErrorState() {
3596 setErrorStatus(null);
3597 loadEmbedder();
3598 },
3599 errorInfo: {
3600 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Unable to load HubSpot', 'leadin'),
3601 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('There was a problem connecting to HubSpot. Please try again.', 'leadin'),
3602 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Retry', 'leadin')
3603 }
3604 }) : null;
3605 return {
3606 embedder: embedder,
3607 errorElement: errorElement,
3608 isLoading: (0,_isRefreshTokenAvailable__WEBPACK_IMPORTED_MODULE_4__.isRefreshTokenAvailable)() && embedder === null && errorStatus === null
3609 };
3610 }
3611
3612 /***/ }),
3613
3614 /***/ "./scripts/utils/withMetaData.ts":
3615 /*!***************************************!*\
3616 !*** ./scripts/utils/withMetaData.ts ***!
3617 \***************************************/
3618 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3619
3620 "use strict";
3621 __webpack_require__.r(__webpack_exports__);
3622 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3623 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3624 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3625 /* harmony export */ });
3626 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3627 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3628 function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3629 function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3630 function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
3631 function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
3632
3633 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3634 var isFullSiteEditor = function isFullSiteEditor() {
3635 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3636 };
3637 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3638 return {
3639 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3640 };
3641 });
3642 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3643 return {
3644 setMetaValue: function setMetaValue(value) {
3645 dispatch('core/editor').editPost({
3646 meta: _defineProperty({}, props.metaKey, value)
3647 });
3648 }
3649 };
3650 });
3651 function apply(el) {
3652 return applyWithSelect(applyWithDispatch(el));
3653 }
3654 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3655
3656 /***/ }),
3657
3658 /***/ "./node_modules/is-what/dist/index.esm.js":
3659 /*!************************************************!*\
3660 !*** ./node_modules/is-what/dist/index.esm.js ***!
3661 \************************************************/
3662 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3663
3664 "use strict";
3665 __webpack_require__.r(__webpack_exports__);
3666 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3667 /* harmony export */ "getType": () => (/* binding */ getType),
3668 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3669 /* harmony export */ "isArray": () => (/* binding */ isArray),
3670 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3671 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3672 /* harmony export */ "isDate": () => (/* binding */ isDate),
3673 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3674 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3675 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3676 /* harmony export */ "isError": () => (/* binding */ isError),
3677 /* harmony export */ "isFile": () => (/* binding */ isFile),
3678 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3679 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3680 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3681 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3682 /* harmony export */ "isMap": () => (/* binding */ isMap),
3683 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3684 /* harmony export */ "isNull": () => (/* binding */ isNull),
3685 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3686 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3687 /* harmony export */ "isObject": () => (/* binding */ isObject),
3688 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3689 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3690 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3691 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3692 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3693 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3694 /* harmony export */ "isSet": () => (/* binding */ isSet),
3695 /* harmony export */ "isString": () => (/* binding */ isString),
3696 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3697 /* harmony export */ "isType": () => (/* binding */ isType),
3698 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3699 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3700 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3701 /* harmony export */ });
3702 /**
3703 * Returns the object type of the given payload
3704 *
3705 * @param {*} payload
3706 * @returns {string}
3707 */
3708 function getType(payload) {
3709 return Object.prototype.toString.call(payload).slice(8, -1);
3710 }
3711 /**
3712 * Returns whether the payload is undefined
3713 *
3714 * @param {*} payload
3715 * @returns {payload is undefined}
3716 */
3717 function isUndefined(payload) {
3718 return getType(payload) === 'Undefined';
3719 }
3720 /**
3721 * Returns whether the payload is null
3722 *
3723 * @param {*} payload
3724 * @returns {payload is null}
3725 */
3726 function isNull(payload) {
3727 return getType(payload) === 'Null';
3728 }
3729 /**
3730 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3731 *
3732 * @param {*} payload
3733 * @returns {payload is PlainObject}
3734 */
3735 function isPlainObject(payload) {
3736 if (getType(payload) !== 'Object')
3737 return false;
3738 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3739 }
3740 /**
3741 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3742 *
3743 * @param {*} payload
3744 * @returns {payload is PlainObject}
3745 */
3746 function isObject(payload) {
3747 return isPlainObject(payload);
3748 }
3749 /**
3750 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3751 *
3752 * @param {*} payload
3753 * @returns {payload is { [K in any]: never }}
3754 */
3755 function isEmptyObject(payload) {
3756 return isPlainObject(payload) && Object.keys(payload).length === 0;
3757 }
3758 /**
3759 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3760 *
3761 * @param {*} payload
3762 * @returns {payload is PlainObject}
3763 */
3764 function isFullObject(payload) {
3765 return isPlainObject(payload) && Object.keys(payload).length > 0;
3766 }
3767 /**
3768 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3769 *
3770 * @param {*} payload
3771 * @returns {payload is PlainObject}
3772 */
3773 function isAnyObject(payload) {
3774 return getType(payload) === 'Object';
3775 }
3776 /**
3777 * Returns whether the payload is an object like a type passed in < >
3778 *
3779 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3780 *
3781 * @template T this must be passed in < >
3782 * @param {*} payload
3783 * @returns {payload is T}
3784 */
3785 function isObjectLike(payload) {
3786 return isAnyObject(payload);
3787 }
3788 /**
3789 * Returns whether the payload is a function (regular or async)
3790 *
3791 * @param {*} payload
3792 * @returns {payload is AnyFunction}
3793 */
3794 function isFunction(payload) {
3795 return typeof payload === 'function';
3796 }
3797 /**
3798 * Returns whether the payload is an array
3799 *
3800 * @param {any} payload
3801 * @returns {payload is any[]}
3802 */
3803 function isArray(payload) {
3804 return getType(payload) === 'Array';
3805 }
3806 /**
3807 * Returns whether the payload is a an array with at least 1 item
3808 *
3809 * @param {*} payload
3810 * @returns {payload is any[]}
3811 */
3812 function isFullArray(payload) {
3813 return isArray(payload) && payload.length > 0;
3814 }
3815 /**
3816 * Returns whether the payload is a an empty array
3817 *
3818 * @param {*} payload
3819 * @returns {payload is []}
3820 */
3821 function isEmptyArray(payload) {
3822 return isArray(payload) && payload.length === 0;
3823 }
3824 /**
3825 * Returns whether the payload is a string
3826 *
3827 * @param {*} payload
3828 * @returns {payload is string}
3829 */
3830 function isString(payload) {
3831 return getType(payload) === 'String';
3832 }
3833 /**
3834 * Returns whether the payload is a string, BUT returns false for ''
3835 *
3836 * @param {*} payload
3837 * @returns {payload is string}
3838 */
3839 function isFullString(payload) {
3840 return isString(payload) && payload !== '';
3841 }
3842 /**
3843 * Returns whether the payload is ''
3844 *
3845 * @param {*} payload
3846 * @returns {payload is string}
3847 */
3848 function isEmptyString(payload) {
3849 return payload === '';
3850 }
3851 /**
3852 * Returns whether the payload is a number (but not NaN)
3853 *
3854 * This will return `false` for `NaN`!!
3855 *
3856 * @param {*} payload
3857 * @returns {payload is number}
3858 */
3859 function isNumber(payload) {
3860 return getType(payload) === 'Number' && !isNaN(payload);
3861 }
3862 /**
3863 * Returns whether the payload is a boolean
3864 *
3865 * @param {*} payload
3866 * @returns {payload is boolean}
3867 */
3868 function isBoolean(payload) {
3869 return getType(payload) === 'Boolean';
3870 }
3871 /**
3872 * Returns whether the payload is a regular expression (RegExp)
3873 *
3874 * @param {*} payload
3875 * @returns {payload is RegExp}
3876 */
3877 function isRegExp(payload) {
3878 return getType(payload) === 'RegExp';
3879 }
3880 /**
3881 * Returns whether the payload is a Map
3882 *
3883 * @param {*} payload
3884 * @returns {payload is Map<any, any>}
3885 */
3886 function isMap(payload) {
3887 return getType(payload) === 'Map';
3888 }
3889 /**
3890 * Returns whether the payload is a WeakMap
3891 *
3892 * @param {*} payload
3893 * @returns {payload is WeakMap<any, any>}
3894 */
3895 function isWeakMap(payload) {
3896 return getType(payload) === 'WeakMap';
3897 }
3898 /**
3899 * Returns whether the payload is a Set
3900 *
3901 * @param {*} payload
3902 * @returns {payload is Set<any>}
3903 */
3904 function isSet(payload) {
3905 return getType(payload) === 'Set';
3906 }
3907 /**
3908 * Returns whether the payload is a WeakSet
3909 *
3910 * @param {*} payload
3911 * @returns {payload is WeakSet<any>}
3912 */
3913 function isWeakSet(payload) {
3914 return getType(payload) === 'WeakSet';
3915 }
3916 /**
3917 * Returns whether the payload is a Symbol
3918 *
3919 * @param {*} payload
3920 * @returns {payload is symbol}
3921 */
3922 function isSymbol(payload) {
3923 return getType(payload) === 'Symbol';
3924 }
3925 /**
3926 * Returns whether the payload is a Date, and that the date is valid
3927 *
3928 * @param {*} payload
3929 * @returns {payload is Date}
3930 */
3931 function isDate(payload) {
3932 return getType(payload) === 'Date' && !isNaN(payload);
3933 }
3934 /**
3935 * Returns whether the payload is a Blob
3936 *
3937 * @param {*} payload
3938 * @returns {payload is Blob}
3939 */
3940 function isBlob(payload) {
3941 return getType(payload) === 'Blob';
3942 }
3943 /**
3944 * Returns whether the payload is a File
3945 *
3946 * @param {*} payload
3947 * @returns {payload is File}
3948 */
3949 function isFile(payload) {
3950 return getType(payload) === 'File';
3951 }
3952 /**
3953 * Returns whether the payload is a Promise
3954 *
3955 * @param {*} payload
3956 * @returns {payload is Promise<any>}
3957 */
3958 function isPromise(payload) {
3959 return getType(payload) === 'Promise';
3960 }
3961 /**
3962 * Returns whether the payload is an Error
3963 *
3964 * @param {*} payload
3965 * @returns {payload is Error}
3966 */
3967 function isError(payload) {
3968 return getType(payload) === 'Error';
3969 }
3970 /**
3971 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3972 *
3973 * @param {*} payload
3974 * @returns {payload is typeof NaN}
3975 */
3976 function isNaNValue(payload) {
3977 return getType(payload) === 'Number' && isNaN(payload);
3978 }
3979 /**
3980 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3981 *
3982 * @param {*} payload
3983 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3984 */
3985 function isPrimitive(payload) {
3986 return (isBoolean(payload) ||
3987 isNull(payload) ||
3988 isUndefined(payload) ||
3989 isNumber(payload) ||
3990 isString(payload) ||
3991 isSymbol(payload));
3992 }
3993 /**
3994 * Returns true whether the payload is null or undefined
3995 *
3996 * @param {*} payload
3997 * @returns {(payload is null | undefined)}
3998 */
3999 var isNullOrUndefined = isOneOf(isNull, isUndefined);
4000 function isOneOf(a, b, c, d, e) {
4001 return function (value) {
4002 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
4003 };
4004 }
4005 /**
4006 * Does a generic check to check that the given payload is of a given type.
4007 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
4008 * It will, however, differentiate between object and null
4009 *
4010 * @template T
4011 * @param {*} payload
4012 * @param {T} type
4013 * @throws {TypeError} Will throw type error if type is an invalid type
4014 * @returns {payload is T}
4015 */
4016 function isType(payload, type) {
4017 if (!(type instanceof Function)) {
4018 throw new TypeError('Type must be a function');
4019 }
4020 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
4021 throw new TypeError('Type is not a class');
4022 }
4023 // Classes usually have names (as functions usually have names)
4024 var name = type.name;
4025 return getType(payload) === name || Boolean(payload && payload.constructor === type);
4026 }
4027
4028
4029
4030
4031 /***/ }),
4032
4033 /***/ "./node_modules/lodash/_Symbol.js":
4034 /*!****************************************!*\
4035 !*** ./node_modules/lodash/_Symbol.js ***!
4036 \****************************************/
4037 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4038
4039 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4040
4041 /** Built-in value references. */
4042 var Symbol = root.Symbol;
4043
4044 module.exports = Symbol;
4045
4046
4047 /***/ }),
4048
4049 /***/ "./node_modules/lodash/_baseGetTag.js":
4050 /*!********************************************!*\
4051 !*** ./node_modules/lodash/_baseGetTag.js ***!
4052 \********************************************/
4053 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4054
4055 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
4056 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
4057 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
4058
4059 /** `Object#toString` result references. */
4060 var nullTag = '[object Null]',
4061 undefinedTag = '[object Undefined]';
4062
4063 /** Built-in value references. */
4064 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4065
4066 /**
4067 * The base implementation of `getTag` without fallbacks for buggy environments.
4068 *
4069 * @private
4070 * @param {*} value The value to query.
4071 * @returns {string} Returns the `toStringTag`.
4072 */
4073 function baseGetTag(value) {
4074 if (value == null) {
4075 return value === undefined ? undefinedTag : nullTag;
4076 }
4077 return (symToStringTag && symToStringTag in Object(value))
4078 ? getRawTag(value)
4079 : objectToString(value);
4080 }
4081
4082 module.exports = baseGetTag;
4083
4084
4085 /***/ }),
4086
4087 /***/ "./node_modules/lodash/_baseTrim.js":
4088 /*!******************************************!*\
4089 !*** ./node_modules/lodash/_baseTrim.js ***!
4090 \******************************************/
4091 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4092
4093 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
4094
4095 /** Used to match leading whitespace. */
4096 var reTrimStart = /^\s+/;
4097
4098 /**
4099 * The base implementation of `_.trim`.
4100 *
4101 * @private
4102 * @param {string} string The string to trim.
4103 * @returns {string} Returns the trimmed string.
4104 */
4105 function baseTrim(string) {
4106 return string
4107 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
4108 : string;
4109 }
4110
4111 module.exports = baseTrim;
4112
4113
4114 /***/ }),
4115
4116 /***/ "./node_modules/lodash/_freeGlobal.js":
4117 /*!********************************************!*\
4118 !*** ./node_modules/lodash/_freeGlobal.js ***!
4119 \********************************************/
4120 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4121
4122 /** Detect free variable `global` from Node.js. */
4123 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
4124
4125 module.exports = freeGlobal;
4126
4127
4128 /***/ }),
4129
4130 /***/ "./node_modules/lodash/_getRawTag.js":
4131 /*!*******************************************!*\
4132 !*** ./node_modules/lodash/_getRawTag.js ***!
4133 \*******************************************/
4134 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4135
4136 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
4137
4138 /** Used for built-in method references. */
4139 var objectProto = Object.prototype;
4140
4141 /** Used to check objects for own properties. */
4142 var hasOwnProperty = objectProto.hasOwnProperty;
4143
4144 /**
4145 * Used to resolve the
4146 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4147 * of values.
4148 */
4149 var nativeObjectToString = objectProto.toString;
4150
4151 /** Built-in value references. */
4152 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
4153
4154 /**
4155 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
4156 *
4157 * @private
4158 * @param {*} value The value to query.
4159 * @returns {string} Returns the raw `toStringTag`.
4160 */
4161 function getRawTag(value) {
4162 var isOwn = hasOwnProperty.call(value, symToStringTag),
4163 tag = value[symToStringTag];
4164
4165 try {
4166 value[symToStringTag] = undefined;
4167 var unmasked = true;
4168 } catch (e) {}
4169
4170 var result = nativeObjectToString.call(value);
4171 if (unmasked) {
4172 if (isOwn) {
4173 value[symToStringTag] = tag;
4174 } else {
4175 delete value[symToStringTag];
4176 }
4177 }
4178 return result;
4179 }
4180
4181 module.exports = getRawTag;
4182
4183
4184 /***/ }),
4185
4186 /***/ "./node_modules/lodash/_objectToString.js":
4187 /*!************************************************!*\
4188 !*** ./node_modules/lodash/_objectToString.js ***!
4189 \************************************************/
4190 /***/ ((module) => {
4191
4192 /** Used for built-in method references. */
4193 var objectProto = Object.prototype;
4194
4195 /**
4196 * Used to resolve the
4197 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4198 * of values.
4199 */
4200 var nativeObjectToString = objectProto.toString;
4201
4202 /**
4203 * Converts `value` to a string using `Object.prototype.toString`.
4204 *
4205 * @private
4206 * @param {*} value The value to convert.
4207 * @returns {string} Returns the converted string.
4208 */
4209 function objectToString(value) {
4210 return nativeObjectToString.call(value);
4211 }
4212
4213 module.exports = objectToString;
4214
4215
4216 /***/ }),
4217
4218 /***/ "./node_modules/lodash/_root.js":
4219 /*!**************************************!*\
4220 !*** ./node_modules/lodash/_root.js ***!
4221 \**************************************/
4222 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4223
4224 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
4225
4226 /** Detect free variable `self`. */
4227 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4228
4229 /** Used as a reference to the global object. */
4230 var root = freeGlobal || freeSelf || Function('return this')();
4231
4232 module.exports = root;
4233
4234
4235 /***/ }),
4236
4237 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
4238 /*!*************************************************!*\
4239 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
4240 \*************************************************/
4241 /***/ ((module) => {
4242
4243 /** Used to match a single whitespace character. */
4244 var reWhitespace = /\s/;
4245
4246 /**
4247 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
4248 * character of `string`.
4249 *
4250 * @private
4251 * @param {string} string The string to inspect.
4252 * @returns {number} Returns the index of the last non-whitespace character.
4253 */
4254 function trimmedEndIndex(string) {
4255 var index = string.length;
4256
4257 while (index-- && reWhitespace.test(string.charAt(index))) {}
4258 return index;
4259 }
4260
4261 module.exports = trimmedEndIndex;
4262
4263
4264 /***/ }),
4265
4266 /***/ "./node_modules/lodash/debounce.js":
4267 /*!*****************************************!*\
4268 !*** ./node_modules/lodash/debounce.js ***!
4269 \*****************************************/
4270 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4271
4272 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4273 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
4274 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
4275
4276 /** Error message constants. */
4277 var FUNC_ERROR_TEXT = 'Expected a function';
4278
4279 /* Built-in method references for those with the same name as other `lodash` methods. */
4280 var nativeMax = Math.max,
4281 nativeMin = Math.min;
4282
4283 /**
4284 * Creates a debounced function that delays invoking `func` until after `wait`
4285 * milliseconds have elapsed since the last time the debounced function was
4286 * invoked. The debounced function comes with a `cancel` method to cancel
4287 * delayed `func` invocations and a `flush` method to immediately invoke them.
4288 * Provide `options` to indicate whether `func` should be invoked on the
4289 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
4290 * with the last arguments provided to the debounced function. Subsequent
4291 * calls to the debounced function return the result of the last `func`
4292 * invocation.
4293 *
4294 * **Note:** If `leading` and `trailing` options are `true`, `func` is
4295 * invoked on the trailing edge of the timeout only if the debounced function
4296 * is invoked more than once during the `wait` timeout.
4297 *
4298 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
4299 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
4300 *
4301 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
4302 * for details over the differences between `_.debounce` and `_.throttle`.
4303 *
4304 * @static
4305 * @memberOf _
4306 * @since 0.1.0
4307 * @category Function
4308 * @param {Function} func The function to debounce.
4309 * @param {number} [wait=0] The number of milliseconds to delay.
4310 * @param {Object} [options={}] The options object.
4311 * @param {boolean} [options.leading=false]
4312 * Specify invoking on the leading edge of the timeout.
4313 * @param {number} [options.maxWait]
4314 * The maximum time `func` is allowed to be delayed before it's invoked.
4315 * @param {boolean} [options.trailing=true]
4316 * Specify invoking on the trailing edge of the timeout.
4317 * @returns {Function} Returns the new debounced function.
4318 * @example
4319 *
4320 * // Avoid costly calculations while the window size is in flux.
4321 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
4322 *
4323 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
4324 * jQuery(element).on('click', _.debounce(sendMail, 300, {
4325 * 'leading': true,
4326 * 'trailing': false
4327 * }));
4328 *
4329 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
4330 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
4331 * var source = new EventSource('/stream');
4332 * jQuery(source).on('message', debounced);
4333 *
4334 * // Cancel the trailing debounced invocation.
4335 * jQuery(window).on('popstate', debounced.cancel);
4336 */
4337 function debounce(func, wait, options) {
4338 var lastArgs,
4339 lastThis,
4340 maxWait,
4341 result,
4342 timerId,
4343 lastCallTime,
4344 lastInvokeTime = 0,
4345 leading = false,
4346 maxing = false,
4347 trailing = true;
4348
4349 if (typeof func != 'function') {
4350 throw new TypeError(FUNC_ERROR_TEXT);
4351 }
4352 wait = toNumber(wait) || 0;
4353 if (isObject(options)) {
4354 leading = !!options.leading;
4355 maxing = 'maxWait' in options;
4356 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
4357 trailing = 'trailing' in options ? !!options.trailing : trailing;
4358 }
4359
4360 function invokeFunc(time) {
4361 var args = lastArgs,
4362 thisArg = lastThis;
4363
4364 lastArgs = lastThis = undefined;
4365 lastInvokeTime = time;
4366 result = func.apply(thisArg, args);
4367 return result;
4368 }
4369
4370 function leadingEdge(time) {
4371 // Reset any `maxWait` timer.
4372 lastInvokeTime = time;
4373 // Start the timer for the trailing edge.
4374 timerId = setTimeout(timerExpired, wait);
4375 // Invoke the leading edge.
4376 return leading ? invokeFunc(time) : result;
4377 }
4378
4379 function remainingWait(time) {
4380 var timeSinceLastCall = time - lastCallTime,
4381 timeSinceLastInvoke = time - lastInvokeTime,
4382 timeWaiting = wait - timeSinceLastCall;
4383
4384 return maxing
4385 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4386 : timeWaiting;
4387 }
4388
4389 function shouldInvoke(time) {
4390 var timeSinceLastCall = time - lastCallTime,
4391 timeSinceLastInvoke = time - lastInvokeTime;
4392
4393 // Either this is the first call, activity has stopped and we're at the
4394 // trailing edge, the system time has gone backwards and we're treating
4395 // it as the trailing edge, or we've hit the `maxWait` limit.
4396 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4397 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4398 }
4399
4400 function timerExpired() {
4401 var time = now();
4402 if (shouldInvoke(time)) {
4403 return trailingEdge(time);
4404 }
4405 // Restart the timer.
4406 timerId = setTimeout(timerExpired, remainingWait(time));
4407 }
4408
4409 function trailingEdge(time) {
4410 timerId = undefined;
4411
4412 // Only invoke if we have `lastArgs` which means `func` has been
4413 // debounced at least once.
4414 if (trailing && lastArgs) {
4415 return invokeFunc(time);
4416 }
4417 lastArgs = lastThis = undefined;
4418 return result;
4419 }
4420
4421 function cancel() {
4422 if (timerId !== undefined) {
4423 clearTimeout(timerId);
4424 }
4425 lastInvokeTime = 0;
4426 lastArgs = lastCallTime = lastThis = timerId = undefined;
4427 }
4428
4429 function flush() {
4430 return timerId === undefined ? result : trailingEdge(now());
4431 }
4432
4433 function debounced() {
4434 var time = now(),
4435 isInvoking = shouldInvoke(time);
4436
4437 lastArgs = arguments;
4438 lastThis = this;
4439 lastCallTime = time;
4440
4441 if (isInvoking) {
4442 if (timerId === undefined) {
4443 return leadingEdge(lastCallTime);
4444 }
4445 if (maxing) {
4446 // Handle invocations in a tight loop.
4447 clearTimeout(timerId);
4448 timerId = setTimeout(timerExpired, wait);
4449 return invokeFunc(lastCallTime);
4450 }
4451 }
4452 if (timerId === undefined) {
4453 timerId = setTimeout(timerExpired, wait);
4454 }
4455 return result;
4456 }
4457 debounced.cancel = cancel;
4458 debounced.flush = flush;
4459 return debounced;
4460 }
4461
4462 module.exports = debounce;
4463
4464
4465 /***/ }),
4466
4467 /***/ "./node_modules/lodash/isObject.js":
4468 /*!*****************************************!*\
4469 !*** ./node_modules/lodash/isObject.js ***!
4470 \*****************************************/
4471 /***/ ((module) => {
4472
4473 /**
4474 * Checks if `value` is the
4475 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4476 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4477 *
4478 * @static
4479 * @memberOf _
4480 * @since 0.1.0
4481 * @category Lang
4482 * @param {*} value The value to check.
4483 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4484 * @example
4485 *
4486 * _.isObject({});
4487 * // => true
4488 *
4489 * _.isObject([1, 2, 3]);
4490 * // => true
4491 *
4492 * _.isObject(_.noop);
4493 * // => true
4494 *
4495 * _.isObject(null);
4496 * // => false
4497 */
4498 function isObject(value) {
4499 var type = typeof value;
4500 return value != null && (type == 'object' || type == 'function');
4501 }
4502
4503 module.exports = isObject;
4504
4505
4506 /***/ }),
4507
4508 /***/ "./node_modules/lodash/isObjectLike.js":
4509 /*!*********************************************!*\
4510 !*** ./node_modules/lodash/isObjectLike.js ***!
4511 \*********************************************/
4512 /***/ ((module) => {
4513
4514 /**
4515 * Checks if `value` is object-like. A value is object-like if it's not `null`
4516 * and has a `typeof` result of "object".
4517 *
4518 * @static
4519 * @memberOf _
4520 * @since 4.0.0
4521 * @category Lang
4522 * @param {*} value The value to check.
4523 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4524 * @example
4525 *
4526 * _.isObjectLike({});
4527 * // => true
4528 *
4529 * _.isObjectLike([1, 2, 3]);
4530 * // => true
4531 *
4532 * _.isObjectLike(_.noop);
4533 * // => false
4534 *
4535 * _.isObjectLike(null);
4536 * // => false
4537 */
4538 function isObjectLike(value) {
4539 return value != null && typeof value == 'object';
4540 }
4541
4542 module.exports = isObjectLike;
4543
4544
4545 /***/ }),
4546
4547 /***/ "./node_modules/lodash/isSymbol.js":
4548 /*!*****************************************!*\
4549 !*** ./node_modules/lodash/isSymbol.js ***!
4550 \*****************************************/
4551 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4552
4553 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4554 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4555
4556 /** `Object#toString` result references. */
4557 var symbolTag = '[object Symbol]';
4558
4559 /**
4560 * Checks if `value` is classified as a `Symbol` primitive or object.
4561 *
4562 * @static
4563 * @memberOf _
4564 * @since 4.0.0
4565 * @category Lang
4566 * @param {*} value The value to check.
4567 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4568 * @example
4569 *
4570 * _.isSymbol(Symbol.iterator);
4571 * // => true
4572 *
4573 * _.isSymbol('abc');
4574 * // => false
4575 */
4576 function isSymbol(value) {
4577 return typeof value == 'symbol' ||
4578 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4579 }
4580
4581 module.exports = isSymbol;
4582
4583
4584 /***/ }),
4585
4586 /***/ "./node_modules/lodash/now.js":
4587 /*!************************************!*\
4588 !*** ./node_modules/lodash/now.js ***!
4589 \************************************/
4590 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4591
4592 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4593
4594 /**
4595 * Gets the timestamp of the number of milliseconds that have elapsed since
4596 * the Unix epoch (1 January 1970 00:00:00 UTC).
4597 *
4598 * @static
4599 * @memberOf _
4600 * @since 2.4.0
4601 * @category Date
4602 * @returns {number} Returns the timestamp.
4603 * @example
4604 *
4605 * _.defer(function(stamp) {
4606 * console.log(_.now() - stamp);
4607 * }, _.now());
4608 * // => Logs the number of milliseconds it took for the deferred invocation.
4609 */
4610 var now = function() {
4611 return root.Date.now();
4612 };
4613
4614 module.exports = now;
4615
4616
4617 /***/ }),
4618
4619 /***/ "./node_modules/lodash/toNumber.js":
4620 /*!*****************************************!*\
4621 !*** ./node_modules/lodash/toNumber.js ***!
4622 \*****************************************/
4623 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4624
4625 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4626 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4627 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4628
4629 /** Used as references for various `Number` constants. */
4630 var NAN = 0 / 0;
4631
4632 /** Used to detect bad signed hexadecimal string values. */
4633 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4634
4635 /** Used to detect binary string values. */
4636 var reIsBinary = /^0b[01]+$/i;
4637
4638 /** Used to detect octal string values. */
4639 var reIsOctal = /^0o[0-7]+$/i;
4640
4641 /** Built-in method references without a dependency on `root`. */
4642 var freeParseInt = parseInt;
4643
4644 /**
4645 * Converts `value` to a number.
4646 *
4647 * @static
4648 * @memberOf _
4649 * @since 4.0.0
4650 * @category Lang
4651 * @param {*} value The value to process.
4652 * @returns {number} Returns the number.
4653 * @example
4654 *
4655 * _.toNumber(3.2);
4656 * // => 3.2
4657 *
4658 * _.toNumber(Number.MIN_VALUE);
4659 * // => 5e-324
4660 *
4661 * _.toNumber(Infinity);
4662 * // => Infinity
4663 *
4664 * _.toNumber('3.2');
4665 * // => 3.2
4666 */
4667 function toNumber(value) {
4668 if (typeof value == 'number') {
4669 return value;
4670 }
4671 if (isSymbol(value)) {
4672 return NAN;
4673 }
4674 if (isObject(value)) {
4675 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4676 value = isObject(other) ? (other + '') : other;
4677 }
4678 if (typeof value != 'string') {
4679 return value === 0 ? value : +value;
4680 }
4681 value = baseTrim(value);
4682 var isBinary = reIsBinary.test(value);
4683 return (isBinary || reIsOctal.test(value))
4684 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4685 : (reIsBadHex.test(value) ? NAN : +value);
4686 }
4687
4688 module.exports = toNumber;
4689
4690
4691 /***/ }),
4692
4693 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4694 /*!**********************************************************!*\
4695 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4696 \**********************************************************/
4697 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4698
4699 "use strict";
4700 __webpack_require__.r(__webpack_exports__);
4701 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4702 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4703 /* harmony export */ });
4704 var safeIsNaN = Number.isNaN ||
4705 function ponyfill(value) {
4706 return typeof value === 'number' && value !== value;
4707 };
4708 function isEqual(first, second) {
4709 if (first === second) {
4710 return true;
4711 }
4712 if (safeIsNaN(first) && safeIsNaN(second)) {
4713 return true;
4714 }
4715 return false;
4716 }
4717 function areInputsEqual(newInputs, lastInputs) {
4718 if (newInputs.length !== lastInputs.length) {
4719 return false;
4720 }
4721 for (var i = 0; i < newInputs.length; i++) {
4722 if (!isEqual(newInputs[i], lastInputs[i])) {
4723 return false;
4724 }
4725 }
4726 return true;
4727 }
4728
4729 function memoizeOne(resultFn, isEqual) {
4730 if (isEqual === void 0) { isEqual = areInputsEqual; }
4731 var lastThis;
4732 var lastArgs = [];
4733 var lastResult;
4734 var calledOnce = false;
4735 function memoized() {
4736 var newArgs = [];
4737 for (var _i = 0; _i < arguments.length; _i++) {
4738 newArgs[_i] = arguments[_i];
4739 }
4740 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4741 return lastResult;
4742 }
4743 lastResult = resultFn.apply(this, newArgs);
4744 calledOnce = true;
4745 lastThis = this;
4746 lastArgs = newArgs;
4747 return lastResult;
4748 }
4749 return memoized;
4750 }
4751
4752 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4753
4754
4755 /***/ }),
4756
4757 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4758 /*!*******************************************************!*\
4759 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4760 \*******************************************************/
4761 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4762
4763 "use strict";
4764 __webpack_require__.r(__webpack_exports__);
4765 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4766 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4767 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4768 /* harmony export */ "merge": () => (/* binding */ merge)
4769 /* harmony export */ });
4770 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4771
4772
4773 /*! *****************************************************************************
4774 Copyright (c) Microsoft Corporation. All rights reserved.
4775 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4776 this file except in compliance with the License. You may obtain a copy of the
4777 License at http://www.apache.org/licenses/LICENSE-2.0
4778
4779 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4780 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4781 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4782 MERCHANTABLITY OR NON-INFRINGEMENT.
4783
4784 See the Apache Version 2.0 License for specific language governing permissions
4785 and limitations under the License.
4786 ***************************************************************************** */
4787
4788 function __spreadArrays() {
4789 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4790 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4791 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4792 r[k] = a[j];
4793 return r;
4794 }
4795
4796 function assignProp(carry, key, newVal, originalObject) {
4797 var propType = originalObject.propertyIsEnumerable(key)
4798 ? 'enumerable'
4799 : 'nonenumerable';
4800 if (propType === 'enumerable')
4801 carry[key] = newVal;
4802 if (propType === 'nonenumerable') {
4803 Object.defineProperty(carry, key, {
4804 value: newVal,
4805 enumerable: false,
4806 writable: true,
4807 configurable: true
4808 });
4809 }
4810 }
4811 function mergeRecursively(origin, newComer, extensions) {
4812 // work directly on newComer if its not an object
4813 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4814 // extend merge rules
4815 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4816 extensions.forEach(function (extend) {
4817 newComer = extend(origin, newComer);
4818 });
4819 }
4820 return newComer;
4821 }
4822 // define newObject to merge all values upon
4823 var newObject = {};
4824 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4825 var props_1 = Object.getOwnPropertyNames(origin);
4826 var symbols_1 = Object.getOwnPropertySymbols(origin);
4827 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4828 // @ts-ignore
4829 var targetVal = origin[key];
4830 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4831 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4832 assignProp(carry, key, targetVal, origin);
4833 }
4834 return carry;
4835 }, {});
4836 }
4837 var props = Object.getOwnPropertyNames(newComer);
4838 var symbols = Object.getOwnPropertySymbols(newComer);
4839 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4840 // re-define the origin and newComer as targetVal and newVal
4841 var newVal = newComer[key];
4842 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4843 // @ts-ignore
4844 ? origin[key]
4845 : undefined;
4846 // extend merge rules
4847 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4848 extensions.forEach(function (extend) {
4849 newVal = extend(targetVal, newVal);
4850 });
4851 }
4852 // When newVal is an object do the merge recursively
4853 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4854 newVal = mergeRecursively(targetVal, newVal, extensions);
4855 }
4856 assignProp(carry, key, newVal, newComer);
4857 return carry;
4858 }, newObject);
4859 return result;
4860 }
4861 /**
4862 * Merge anything recursively.
4863 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4864 * Basic types overwrite objects or other basic types.
4865 *
4866 * @param {(IConfig | any)} origin
4867 * @param {...any[]} newComers
4868 * @returns the result
4869 */
4870 function merge(origin) {
4871 var newComers = [];
4872 for (var _i = 1; _i < arguments.length; _i++) {
4873 newComers[_i - 1] = arguments[_i];
4874 }
4875 var extensions = null;
4876 var base = origin;
4877 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4878 base = {};
4879 extensions = origin.extensions;
4880 }
4881 return newComers.reduce(function (result, newComer) {
4882 return mergeRecursively(result, newComer, extensions);
4883 }, base);
4884 }
4885
4886 function concatArrays(originVal, newVal) {
4887 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4888 // concat logic
4889 return originVal.concat(newVal);
4890 }
4891 return newVal; // always return newVal as fallback!!
4892 }
4893
4894 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4895
4896
4897
4898 /***/ }),
4899
4900 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4901 /*!****************************************************************************************************************************************************************************************!*\
4902 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4903 \****************************************************************************************************************************************************************************************/
4904 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4905
4906 "use strict";
4907 __webpack_require__.r(__webpack_exports__);
4908 // extracted by mini-css-extract-plugin
4909
4910
4911 /***/ }),
4912
4913 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4914 /*!*******************************************************************************************************************************************************************************!*\
4915 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4916 \*******************************************************************************************************************************************************************************/
4917 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4918
4919 "use strict";
4920 __webpack_require__.r(__webpack_exports__);
4921 // extracted by mini-css-extract-plugin
4922
4923
4924 /***/ }),
4925
4926 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4927 /*!************************************************************************************************************************************************************************************!*\
4928 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4929 \************************************************************************************************************************************************************************************/
4930 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4931
4932 "use strict";
4933 __webpack_require__.r(__webpack_exports__);
4934 // extracted by mini-css-extract-plugin
4935
4936
4937 /***/ }),
4938
4939 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4940 /*!***********************************************************************************************************************************************************************************!*\
4941 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4942 \***********************************************************************************************************************************************************************************/
4943 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4944
4945 "use strict";
4946 __webpack_require__.r(__webpack_exports__);
4947 // extracted by mini-css-extract-plugin
4948
4949
4950 /***/ }),
4951
4952 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4953 /*!************************************************************************************************************************************************************************************!*\
4954 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4955 \************************************************************************************************************************************************************************************/
4956 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4957
4958 "use strict";
4959 __webpack_require__.r(__webpack_exports__);
4960 // extracted by mini-css-extract-plugin
4961
4962
4963 /***/ }),
4964
4965 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4966 /*!******************************************************************************************************************************************************************************************!*\
4967 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4968 \******************************************************************************************************************************************************************************************/
4969 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4970
4971 "use strict";
4972 __webpack_require__.r(__webpack_exports__);
4973 // extracted by mini-css-extract-plugin
4974
4975
4976 /***/ }),
4977
4978 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4979 /*!**************************************************************************************************************************************************************************************!*\
4980 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4981 \**************************************************************************************************************************************************************************************/
4982 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4983
4984 "use strict";
4985 __webpack_require__.r(__webpack_exports__);
4986 // extracted by mini-css-extract-plugin
4987
4988
4989 /***/ }),
4990
4991 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4992 /*!************************************************************************************************************************************************************************************!*\
4993 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4994 \************************************************************************************************************************************************************************************/
4995 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4996
4997 "use strict";
4998 __webpack_require__.r(__webpack_exports__);
4999 // extracted by mini-css-extract-plugin
5000
5001
5002 /***/ }),
5003
5004 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
5005 /*!***************************************************************************************************************************************************************************************!*\
5006 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
5007 \***************************************************************************************************************************************************************************************/
5008 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5009
5010 "use strict";
5011 __webpack_require__.r(__webpack_exports__);
5012 // extracted by mini-css-extract-plugin
5013
5014
5015 /***/ }),
5016
5017 /***/ "./node_modules/object-assign/index.js":
5018 /*!*********************************************!*\
5019 !*** ./node_modules/object-assign/index.js ***!
5020 \*********************************************/
5021 /***/ ((module) => {
5022
5023 "use strict";
5024 /*
5025 object-assign
5026 (c) Sindre Sorhus
5027 @license MIT
5028 */
5029
5030
5031 /* eslint-disable no-unused-vars */
5032 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
5033 var hasOwnProperty = Object.prototype.hasOwnProperty;
5034 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
5035
5036 function toObject(val) {
5037 if (val === null || val === undefined) {
5038 throw new TypeError('Object.assign cannot be called with null or undefined');
5039 }
5040
5041 return Object(val);
5042 }
5043
5044 function shouldUseNative() {
5045 try {
5046 if (!Object.assign) {
5047 return false;
5048 }
5049
5050 // Detect buggy property enumeration order in older V8 versions.
5051
5052 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
5053 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
5054 test1[5] = 'de';
5055 if (Object.getOwnPropertyNames(test1)[0] === '5') {
5056 return false;
5057 }
5058
5059 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5060 var test2 = {};
5061 for (var i = 0; i < 10; i++) {
5062 test2['_' + String.fromCharCode(i)] = i;
5063 }
5064 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
5065 return test2[n];
5066 });
5067 if (order2.join('') !== '0123456789') {
5068 return false;
5069 }
5070
5071 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
5072 var test3 = {};
5073 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
5074 test3[letter] = letter;
5075 });
5076 if (Object.keys(Object.assign({}, test3)).join('') !==
5077 'abcdefghijklmnopqrst') {
5078 return false;
5079 }
5080
5081 return true;
5082 } catch (err) {
5083 // We don't expect any of the above to throw, but better to be safe.
5084 return false;
5085 }
5086 }
5087
5088 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
5089 var from;
5090 var to = toObject(target);
5091 var symbols;
5092
5093 for (var s = 1; s < arguments.length; s++) {
5094 from = Object(arguments[s]);
5095
5096 for (var key in from) {
5097 if (hasOwnProperty.call(from, key)) {
5098 to[key] = from[key];
5099 }
5100 }
5101
5102 if (getOwnPropertySymbols) {
5103 symbols = getOwnPropertySymbols(from);
5104 for (var i = 0; i < symbols.length; i++) {
5105 if (propIsEnumerable.call(from, symbols[i])) {
5106 to[symbols[i]] = from[symbols[i]];
5107 }
5108 }
5109 }
5110 }
5111
5112 return to;
5113 };
5114
5115
5116 /***/ }),
5117
5118 /***/ "./node_modules/prop-types/checkPropTypes.js":
5119 /*!***************************************************!*\
5120 !*** ./node_modules/prop-types/checkPropTypes.js ***!
5121 \***************************************************/
5122 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5123
5124 "use strict";
5125 /**
5126 * Copyright (c) 2013-present, Facebook, Inc.
5127 *
5128 * This source code is licensed under the MIT license found in the
5129 * LICENSE file in the root directory of this source tree.
5130 */
5131
5132
5133
5134 var printWarning = function() {};
5135
5136 if (true) {
5137 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
5138 var loggedTypeFailures = {};
5139 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
5140
5141 printWarning = function(text) {
5142 var message = 'Warning: ' + text;
5143 if (typeof console !== 'undefined') {
5144 console.error(message);
5145 }
5146 try {
5147 // --- Welcome to debugging React ---
5148 // This error was thrown as a convenience so that you can use this stack
5149 // to find the callsite that caused this warning to fire.
5150 throw new Error(message);
5151 } catch (x) { /**/ }
5152 };
5153 }
5154
5155 /**
5156 * Assert that the values match with the type specs.
5157 * Error messages are memorized and will only be shown once.
5158 *
5159 * @param {object} typeSpecs Map of name to a ReactPropType
5160 * @param {object} values Runtime values that need to be type-checked
5161 * @param {string} location e.g. "prop", "context", "child context"
5162 * @param {string} componentName Name of the component for error messages.
5163 * @param {?Function} getStack Returns the component stack.
5164 * @private
5165 */
5166 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
5167 if (true) {
5168 for (var typeSpecName in typeSpecs) {
5169 if (has(typeSpecs, typeSpecName)) {
5170 var error;
5171 // Prop type validation may throw. In case they do, we don't want to
5172 // fail the render phase where it didn't fail before. So we log it.
5173 // After these have been cleaned up, we'll let them throw.
5174 try {
5175 // This is intentionally an invariant that gets caught. It's the same
5176 // behavior as without this statement except with a better message.
5177 if (typeof typeSpecs[typeSpecName] !== 'function') {
5178 var err = Error(
5179 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
5180 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
5181 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
5182 );
5183 err.name = 'Invariant Violation';
5184 throw err;
5185 }
5186 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
5187 } catch (ex) {
5188 error = ex;
5189 }
5190 if (error && !(error instanceof Error)) {
5191 printWarning(
5192 (componentName || 'React class') + ': type specification of ' +
5193 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
5194 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
5195 'You may have forgotten to pass an argument to the type checker ' +
5196 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
5197 'shape all require an argument).'
5198 );
5199 }
5200 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
5201 // Only monitor this failure once because there tends to be a lot of the
5202 // same error.
5203 loggedTypeFailures[error.message] = true;
5204
5205 var stack = getStack ? getStack() : '';
5206
5207 printWarning(
5208 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
5209 );
5210 }
5211 }
5212 }
5213 }
5214 }
5215
5216 /**
5217 * Resets warning cache when testing.
5218 *
5219 * @private
5220 */
5221 checkPropTypes.resetWarningCache = function() {
5222 if (true) {
5223 loggedTypeFailures = {};
5224 }
5225 }
5226
5227 module.exports = checkPropTypes;
5228
5229
5230 /***/ }),
5231
5232 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
5233 /*!************************************************************!*\
5234 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
5235 \************************************************************/
5236 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5237
5238 "use strict";
5239 /**
5240 * Copyright (c) 2013-present, Facebook, Inc.
5241 *
5242 * This source code is licensed under the MIT license found in the
5243 * LICENSE file in the root directory of this source tree.
5244 */
5245
5246
5247
5248 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5249 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
5250
5251 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
5252 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
5253 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
5254
5255 var printWarning = function() {};
5256
5257 if (true) {
5258 printWarning = function(text) {
5259 var message = 'Warning: ' + text;
5260 if (typeof console !== 'undefined') {
5261 console.error(message);
5262 }
5263 try {
5264 // --- Welcome to debugging React ---
5265 // This error was thrown as a convenience so that you can use this stack
5266 // to find the callsite that caused this warning to fire.
5267 throw new Error(message);
5268 } catch (x) {}
5269 };
5270 }
5271
5272 function emptyFunctionThatReturnsNull() {
5273 return null;
5274 }
5275
5276 module.exports = function(isValidElement, throwOnDirectAccess) {
5277 /* global Symbol */
5278 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
5279 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
5280
5281 /**
5282 * Returns the iterator method function contained on the iterable object.
5283 *
5284 * Be sure to invoke the function with the iterable as context:
5285 *
5286 * var iteratorFn = getIteratorFn(myIterable);
5287 * if (iteratorFn) {
5288 * var iterator = iteratorFn.call(myIterable);
5289 * ...
5290 * }
5291 *
5292 * @param {?object} maybeIterable
5293 * @return {?function}
5294 */
5295 function getIteratorFn(maybeIterable) {
5296 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
5297 if (typeof iteratorFn === 'function') {
5298 return iteratorFn;
5299 }
5300 }
5301
5302 /**
5303 * Collection of methods that allow declaration and validation of props that are
5304 * supplied to React components. Example usage:
5305 *
5306 * var Props = require('ReactPropTypes');
5307 * var MyArticle = React.createClass({
5308 * propTypes: {
5309 * // An optional string prop named "description".
5310 * description: Props.string,
5311 *
5312 * // A required enum prop named "category".
5313 * category: Props.oneOf(['News','Photos']).isRequired,
5314 *
5315 * // A prop named "dialog" that requires an instance of Dialog.
5316 * dialog: Props.instanceOf(Dialog).isRequired
5317 * },
5318 * render: function() { ... }
5319 * });
5320 *
5321 * A more formal specification of how these methods are used:
5322 *
5323 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
5324 * decl := ReactPropTypes.{type}(.isRequired)?
5325 *
5326 * Each and every declaration produces a function with the same signature. This
5327 * allows the creation of custom validation functions. For example:
5328 *
5329 * var MyLink = React.createClass({
5330 * propTypes: {
5331 * // An optional string or URI prop named "href".
5332 * href: function(props, propName, componentName) {
5333 * var propValue = props[propName];
5334 * if (propValue != null && typeof propValue !== 'string' &&
5335 * !(propValue instanceof URI)) {
5336 * return new Error(
5337 * 'Expected a string or an URI for ' + propName + ' in ' +
5338 * componentName
5339 * );
5340 * }
5341 * }
5342 * },
5343 * render: function() {...}
5344 * });
5345 *
5346 * @internal
5347 */
5348
5349 var ANONYMOUS = '<<anonymous>>';
5350
5351 // Important!
5352 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
5353 var ReactPropTypes = {
5354 array: createPrimitiveTypeChecker('array'),
5355 bigint: createPrimitiveTypeChecker('bigint'),
5356 bool: createPrimitiveTypeChecker('boolean'),
5357 func: createPrimitiveTypeChecker('function'),
5358 number: createPrimitiveTypeChecker('number'),
5359 object: createPrimitiveTypeChecker('object'),
5360 string: createPrimitiveTypeChecker('string'),
5361 symbol: createPrimitiveTypeChecker('symbol'),
5362
5363 any: createAnyTypeChecker(),
5364 arrayOf: createArrayOfTypeChecker,
5365 element: createElementTypeChecker(),
5366 elementType: createElementTypeTypeChecker(),
5367 instanceOf: createInstanceTypeChecker,
5368 node: createNodeChecker(),
5369 objectOf: createObjectOfTypeChecker,
5370 oneOf: createEnumTypeChecker,
5371 oneOfType: createUnionTypeChecker,
5372 shape: createShapeTypeChecker,
5373 exact: createStrictShapeTypeChecker,
5374 };
5375
5376 /**
5377 * inlined Object.is polyfill to avoid requiring consumers ship their own
5378 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5379 */
5380 /*eslint-disable no-self-compare*/
5381 function is(x, y) {
5382 // SameValue algorithm
5383 if (x === y) {
5384 // Steps 1-5, 7-10
5385 // Steps 6.b-6.e: +0 != -0
5386 return x !== 0 || 1 / x === 1 / y;
5387 } else {
5388 // Step 6.a: NaN == NaN
5389 return x !== x && y !== y;
5390 }
5391 }
5392 /*eslint-enable no-self-compare*/
5393
5394 /**
5395 * We use an Error-like object for backward compatibility as people may call
5396 * PropTypes directly and inspect their output. However, we don't use real
5397 * Errors anymore. We don't inspect their stack anyway, and creating them
5398 * is prohibitively expensive if they are created too often, such as what
5399 * happens in oneOfType() for any type before the one that matched.
5400 */
5401 function PropTypeError(message, data) {
5402 this.message = message;
5403 this.data = data && typeof data === 'object' ? data: {};
5404 this.stack = '';
5405 }
5406 // Make `instanceof Error` still work for returned errors.
5407 PropTypeError.prototype = Error.prototype;
5408
5409 function createChainableTypeChecker(validate) {
5410 if (true) {
5411 var manualPropTypeCallCache = {};
5412 var manualPropTypeWarningCount = 0;
5413 }
5414 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5415 componentName = componentName || ANONYMOUS;
5416 propFullName = propFullName || propName;
5417
5418 if (secret !== ReactPropTypesSecret) {
5419 if (throwOnDirectAccess) {
5420 // New behavior only for users of `prop-types` package
5421 var err = new Error(
5422 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5423 'Use `PropTypes.checkPropTypes()` to call them. ' +
5424 'Read more at http://fb.me/use-check-prop-types'
5425 );
5426 err.name = 'Invariant Violation';
5427 throw err;
5428 } else if ( true && typeof console !== 'undefined') {
5429 // Old behavior for people using React.PropTypes
5430 var cacheKey = componentName + ':' + propName;
5431 if (
5432 !manualPropTypeCallCache[cacheKey] &&
5433 // Avoid spamming the console because they are often not actionable except for lib authors
5434 manualPropTypeWarningCount < 3
5435 ) {
5436 printWarning(
5437 'You are manually calling a React.PropTypes validation ' +
5438 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5439 'and will throw in the standalone `prop-types` package. ' +
5440 'You may be seeing this warning due to a third-party PropTypes ' +
5441 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5442 );
5443 manualPropTypeCallCache[cacheKey] = true;
5444 manualPropTypeWarningCount++;
5445 }
5446 }
5447 }
5448 if (props[propName] == null) {
5449 if (isRequired) {
5450 if (props[propName] === null) {
5451 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5452 }
5453 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5454 }
5455 return null;
5456 } else {
5457 return validate(props, propName, componentName, location, propFullName);
5458 }
5459 }
5460
5461 var chainedCheckType = checkType.bind(null, false);
5462 chainedCheckType.isRequired = checkType.bind(null, true);
5463
5464 return chainedCheckType;
5465 }
5466
5467 function createPrimitiveTypeChecker(expectedType) {
5468 function validate(props, propName, componentName, location, propFullName, secret) {
5469 var propValue = props[propName];
5470 var propType = getPropType(propValue);
5471 if (propType !== expectedType) {
5472 // `propValue` being instance of, say, date/regexp, pass the 'object'
5473 // check, but we can offer a more precise error message here rather than
5474 // 'of type `object`'.
5475 var preciseType = getPreciseType(propValue);
5476
5477 return new PropTypeError(
5478 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5479 {expectedType: expectedType}
5480 );
5481 }
5482 return null;
5483 }
5484 return createChainableTypeChecker(validate);
5485 }
5486
5487 function createAnyTypeChecker() {
5488 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5489 }
5490
5491 function createArrayOfTypeChecker(typeChecker) {
5492 function validate(props, propName, componentName, location, propFullName) {
5493 if (typeof typeChecker !== 'function') {
5494 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5495 }
5496 var propValue = props[propName];
5497 if (!Array.isArray(propValue)) {
5498 var propType = getPropType(propValue);
5499 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5500 }
5501 for (var i = 0; i < propValue.length; i++) {
5502 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5503 if (error instanceof Error) {
5504 return error;
5505 }
5506 }
5507 return null;
5508 }
5509 return createChainableTypeChecker(validate);
5510 }
5511
5512 function createElementTypeChecker() {
5513 function validate(props, propName, componentName, location, propFullName) {
5514 var propValue = props[propName];
5515 if (!isValidElement(propValue)) {
5516 var propType = getPropType(propValue);
5517 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5518 }
5519 return null;
5520 }
5521 return createChainableTypeChecker(validate);
5522 }
5523
5524 function createElementTypeTypeChecker() {
5525 function validate(props, propName, componentName, location, propFullName) {
5526 var propValue = props[propName];
5527 if (!ReactIs.isValidElementType(propValue)) {
5528 var propType = getPropType(propValue);
5529 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5530 }
5531 return null;
5532 }
5533 return createChainableTypeChecker(validate);
5534 }
5535
5536 function createInstanceTypeChecker(expectedClass) {
5537 function validate(props, propName, componentName, location, propFullName) {
5538 if (!(props[propName] instanceof expectedClass)) {
5539 var expectedClassName = expectedClass.name || ANONYMOUS;
5540 var actualClassName = getClassName(props[propName]);
5541 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5542 }
5543 return null;
5544 }
5545 return createChainableTypeChecker(validate);
5546 }
5547
5548 function createEnumTypeChecker(expectedValues) {
5549 if (!Array.isArray(expectedValues)) {
5550 if (true) {
5551 if (arguments.length > 1) {
5552 printWarning(
5553 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5554 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5555 );
5556 } else {
5557 printWarning('Invalid argument supplied to oneOf, expected an array.');
5558 }
5559 }
5560 return emptyFunctionThatReturnsNull;
5561 }
5562
5563 function validate(props, propName, componentName, location, propFullName) {
5564 var propValue = props[propName];
5565 for (var i = 0; i < expectedValues.length; i++) {
5566 if (is(propValue, expectedValues[i])) {
5567 return null;
5568 }
5569 }
5570
5571 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5572 var type = getPreciseType(value);
5573 if (type === 'symbol') {
5574 return String(value);
5575 }
5576 return value;
5577 });
5578 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5579 }
5580 return createChainableTypeChecker(validate);
5581 }
5582
5583 function createObjectOfTypeChecker(typeChecker) {
5584 function validate(props, propName, componentName, location, propFullName) {
5585 if (typeof typeChecker !== 'function') {
5586 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5587 }
5588 var propValue = props[propName];
5589 var propType = getPropType(propValue);
5590 if (propType !== 'object') {
5591 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5592 }
5593 for (var key in propValue) {
5594 if (has(propValue, key)) {
5595 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5596 if (error instanceof Error) {
5597 return error;
5598 }
5599 }
5600 }
5601 return null;
5602 }
5603 return createChainableTypeChecker(validate);
5604 }
5605
5606 function createUnionTypeChecker(arrayOfTypeCheckers) {
5607 if (!Array.isArray(arrayOfTypeCheckers)) {
5608 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5609 return emptyFunctionThatReturnsNull;
5610 }
5611
5612 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5613 var checker = arrayOfTypeCheckers[i];
5614 if (typeof checker !== 'function') {
5615 printWarning(
5616 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5617 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5618 );
5619 return emptyFunctionThatReturnsNull;
5620 }
5621 }
5622
5623 function validate(props, propName, componentName, location, propFullName) {
5624 var expectedTypes = [];
5625 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5626 var checker = arrayOfTypeCheckers[i];
5627 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5628 if (checkerResult == null) {
5629 return null;
5630 }
5631 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5632 expectedTypes.push(checkerResult.data.expectedType);
5633 }
5634 }
5635 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5636 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5637 }
5638 return createChainableTypeChecker(validate);
5639 }
5640
5641 function createNodeChecker() {
5642 function validate(props, propName, componentName, location, propFullName) {
5643 if (!isNode(props[propName])) {
5644 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5645 }
5646 return null;
5647 }
5648 return createChainableTypeChecker(validate);
5649 }
5650
5651 function invalidValidatorError(componentName, location, propFullName, key, type) {
5652 return new PropTypeError(
5653 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5654 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5655 );
5656 }
5657
5658 function createShapeTypeChecker(shapeTypes) {
5659 function validate(props, propName, componentName, location, propFullName) {
5660 var propValue = props[propName];
5661 var propType = getPropType(propValue);
5662 if (propType !== 'object') {
5663 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5664 }
5665 for (var key in shapeTypes) {
5666 var checker = shapeTypes[key];
5667 if (typeof checker !== 'function') {
5668 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5669 }
5670 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5671 if (error) {
5672 return error;
5673 }
5674 }
5675 return null;
5676 }
5677 return createChainableTypeChecker(validate);
5678 }
5679
5680 function createStrictShapeTypeChecker(shapeTypes) {
5681 function validate(props, propName, componentName, location, propFullName) {
5682 var propValue = props[propName];
5683 var propType = getPropType(propValue);
5684 if (propType !== 'object') {
5685 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5686 }
5687 // We need to check all keys in case some are required but missing from props.
5688 var allKeys = assign({}, props[propName], shapeTypes);
5689 for (var key in allKeys) {
5690 var checker = shapeTypes[key];
5691 if (has(shapeTypes, key) && typeof checker !== 'function') {
5692 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5693 }
5694 if (!checker) {
5695 return new PropTypeError(
5696 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5697 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5698 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5699 );
5700 }
5701 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5702 if (error) {
5703 return error;
5704 }
5705 }
5706 return null;
5707 }
5708
5709 return createChainableTypeChecker(validate);
5710 }
5711
5712 function isNode(propValue) {
5713 switch (typeof propValue) {
5714 case 'number':
5715 case 'string':
5716 case 'undefined':
5717 return true;
5718 case 'boolean':
5719 return !propValue;
5720 case 'object':
5721 if (Array.isArray(propValue)) {
5722 return propValue.every(isNode);
5723 }
5724 if (propValue === null || isValidElement(propValue)) {
5725 return true;
5726 }
5727
5728 var iteratorFn = getIteratorFn(propValue);
5729 if (iteratorFn) {
5730 var iterator = iteratorFn.call(propValue);
5731 var step;
5732 if (iteratorFn !== propValue.entries) {
5733 while (!(step = iterator.next()).done) {
5734 if (!isNode(step.value)) {
5735 return false;
5736 }
5737 }
5738 } else {
5739 // Iterator will provide entry [k,v] tuples rather than values.
5740 while (!(step = iterator.next()).done) {
5741 var entry = step.value;
5742 if (entry) {
5743 if (!isNode(entry[1])) {
5744 return false;
5745 }
5746 }
5747 }
5748 }
5749 } else {
5750 return false;
5751 }
5752
5753 return true;
5754 default:
5755 return false;
5756 }
5757 }
5758
5759 function isSymbol(propType, propValue) {
5760 // Native Symbol.
5761 if (propType === 'symbol') {
5762 return true;
5763 }
5764
5765 // falsy value can't be a Symbol
5766 if (!propValue) {
5767 return false;
5768 }
5769
5770 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5771 if (propValue['@@toStringTag'] === 'Symbol') {
5772 return true;
5773 }
5774
5775 // Fallback for non-spec compliant Symbols which are polyfilled.
5776 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5777 return true;
5778 }
5779
5780 return false;
5781 }
5782
5783 // Equivalent of `typeof` but with special handling for array and regexp.
5784 function getPropType(propValue) {
5785 var propType = typeof propValue;
5786 if (Array.isArray(propValue)) {
5787 return 'array';
5788 }
5789 if (propValue instanceof RegExp) {
5790 // Old webkits (at least until Android 4.0) return 'function' rather than
5791 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5792 // passes PropTypes.object.
5793 return 'object';
5794 }
5795 if (isSymbol(propType, propValue)) {
5796 return 'symbol';
5797 }
5798 return propType;
5799 }
5800
5801 // This handles more types than `getPropType`. Only used for error messages.
5802 // See `createPrimitiveTypeChecker`.
5803 function getPreciseType(propValue) {
5804 if (typeof propValue === 'undefined' || propValue === null) {
5805 return '' + propValue;
5806 }
5807 var propType = getPropType(propValue);
5808 if (propType === 'object') {
5809 if (propValue instanceof Date) {
5810 return 'date';
5811 } else if (propValue instanceof RegExp) {
5812 return 'regexp';
5813 }
5814 }
5815 return propType;
5816 }
5817
5818 // Returns a string that is postfixed to a warning about an invalid type.
5819 // For example, "undefined" or "of type array"
5820 function getPostfixForTypeWarning(value) {
5821 var type = getPreciseType(value);
5822 switch (type) {
5823 case 'array':
5824 case 'object':
5825 return 'an ' + type;
5826 case 'boolean':
5827 case 'date':
5828 case 'regexp':
5829 return 'a ' + type;
5830 default:
5831 return type;
5832 }
5833 }
5834
5835 // Returns class name of the object, if any.
5836 function getClassName(propValue) {
5837 if (!propValue.constructor || !propValue.constructor.name) {
5838 return ANONYMOUS;
5839 }
5840 return propValue.constructor.name;
5841 }
5842
5843 ReactPropTypes.checkPropTypes = checkPropTypes;
5844 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5845 ReactPropTypes.PropTypes = ReactPropTypes;
5846
5847 return ReactPropTypes;
5848 };
5849
5850
5851 /***/ }),
5852
5853 /***/ "./node_modules/prop-types/index.js":
5854 /*!******************************************!*\
5855 !*** ./node_modules/prop-types/index.js ***!
5856 \******************************************/
5857 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5858
5859 /**
5860 * Copyright (c) 2013-present, Facebook, Inc.
5861 *
5862 * This source code is licensed under the MIT license found in the
5863 * LICENSE file in the root directory of this source tree.
5864 */
5865
5866 if (true) {
5867 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5868
5869 // By explicitly using `prop-types` you are opting into new development behavior.
5870 // http://fb.me/prop-types-in-prod
5871 var throwOnDirectAccess = true;
5872 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5873 } else {}
5874
5875
5876 /***/ }),
5877
5878 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5879 /*!*************************************************************!*\
5880 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5881 \*************************************************************/
5882 /***/ ((module) => {
5883
5884 "use strict";
5885 /**
5886 * Copyright (c) 2013-present, Facebook, Inc.
5887 *
5888 * This source code is licensed under the MIT license found in the
5889 * LICENSE file in the root directory of this source tree.
5890 */
5891
5892
5893
5894 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5895
5896 module.exports = ReactPropTypesSecret;
5897
5898
5899 /***/ }),
5900
5901 /***/ "./node_modules/prop-types/lib/has.js":
5902 /*!********************************************!*\
5903 !*** ./node_modules/prop-types/lib/has.js ***!
5904 \********************************************/
5905 /***/ ((module) => {
5906
5907 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5908
5909
5910 /***/ }),
5911
5912 /***/ "./node_modules/raven-js/src/configError.js":
5913 /*!**************************************************!*\
5914 !*** ./node_modules/raven-js/src/configError.js ***!
5915 \**************************************************/
5916 /***/ ((module) => {
5917
5918 function RavenConfigError(message) {
5919 this.name = 'RavenConfigError';
5920 this.message = message;
5921 }
5922 RavenConfigError.prototype = new Error();
5923 RavenConfigError.prototype.constructor = RavenConfigError;
5924
5925 module.exports = RavenConfigError;
5926
5927
5928 /***/ }),
5929
5930 /***/ "./node_modules/raven-js/src/console.js":
5931 /*!**********************************************!*\
5932 !*** ./node_modules/raven-js/src/console.js ***!
5933 \**********************************************/
5934 /***/ ((module) => {
5935
5936 var wrapMethod = function(console, level, callback) {
5937 var originalConsoleLevel = console[level];
5938 var originalConsole = console;
5939
5940 if (!(level in console)) {
5941 return;
5942 }
5943
5944 var sentryLevel = level === 'warn' ? 'warning' : level;
5945
5946 console[level] = function() {
5947 var args = [].slice.call(arguments);
5948
5949 var msg = '' + args.join(' ');
5950 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5951
5952 if (level === 'assert') {
5953 if (args[0] === false) {
5954 // Default browsers message
5955 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5956 data.extra.arguments = args.slice(1);
5957 callback && callback(msg, data);
5958 }
5959 } else {
5960 callback && callback(msg, data);
5961 }
5962
5963 // this fails for some browsers. :(
5964 if (originalConsoleLevel) {
5965 // IE9 doesn't allow calling apply on console functions directly
5966 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5967 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5968 }
5969 };
5970 };
5971
5972 module.exports = {
5973 wrapMethod: wrapMethod
5974 };
5975
5976
5977 /***/ }),
5978
5979 /***/ "./node_modules/raven-js/src/raven.js":
5980 /*!********************************************!*\
5981 !*** ./node_modules/raven-js/src/raven.js ***!
5982 \********************************************/
5983 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5984
5985 /*global XDomainRequest:false */
5986
5987 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5988 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5989 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5990
5991 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5992 var isError = utils.isError;
5993 var isObject = utils.isObject;
5994 var isObject = utils.isObject;
5995 var isErrorEvent = utils.isErrorEvent;
5996 var isUndefined = utils.isUndefined;
5997 var isFunction = utils.isFunction;
5998 var isString = utils.isString;
5999 var isEmptyObject = utils.isEmptyObject;
6000 var each = utils.each;
6001 var objectMerge = utils.objectMerge;
6002 var truncate = utils.truncate;
6003 var objectFrozen = utils.objectFrozen;
6004 var hasKey = utils.hasKey;
6005 var joinRegExp = utils.joinRegExp;
6006 var urlencode = utils.urlencode;
6007 var uuid4 = utils.uuid4;
6008 var htmlTreeAsString = utils.htmlTreeAsString;
6009 var isSameException = utils.isSameException;
6010 var isSameStacktrace = utils.isSameStacktrace;
6011 var parseUrl = utils.parseUrl;
6012 var fill = utils.fill;
6013
6014 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
6015
6016 var dsnKeys = 'source protocol user pass host port path'.split(' '),
6017 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
6018
6019 function now() {
6020 return +new Date();
6021 }
6022
6023 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
6024 var _window =
6025 typeof window !== 'undefined'
6026 ? window
6027 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
6028 var _document = _window.document;
6029 var _navigator = _window.navigator;
6030
6031 function keepOriginalCallback(original, callback) {
6032 return isFunction(callback)
6033 ? function(data) {
6034 return callback(data, original);
6035 }
6036 : callback;
6037 }
6038
6039 // First, check for JSON support
6040 // If there is no JSON, we no-op the core features of Raven
6041 // since JSON is required to encode the payload
6042 function Raven() {
6043 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
6044 // Raven can run in contexts where there's no document (react-native)
6045 this._hasDocument = !isUndefined(_document);
6046 this._hasNavigator = !isUndefined(_navigator);
6047 this._lastCapturedException = null;
6048 this._lastData = null;
6049 this._lastEventId = null;
6050 this._globalServer = null;
6051 this._globalKey = null;
6052 this._globalProject = null;
6053 this._globalContext = {};
6054 this._globalOptions = {
6055 logger: 'javascript',
6056 ignoreErrors: [],
6057 ignoreUrls: [],
6058 whitelistUrls: [],
6059 includePaths: [],
6060 collectWindowErrors: true,
6061 maxMessageLength: 0,
6062
6063 // By default, truncates URL values to 250 chars
6064 maxUrlLength: 250,
6065 stackTraceLimit: 50,
6066 autoBreadcrumbs: true,
6067 instrument: true,
6068 sampleRate: 1
6069 };
6070 this._ignoreOnError = 0;
6071 this._isRavenInstalled = false;
6072 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
6073 // capture references to window.console *and* all its methods first
6074 // before the console plugin has a chance to monkey patch
6075 this._originalConsole = _window.console || {};
6076 this._originalConsoleMethods = {};
6077 this._plugins = [];
6078 this._startTime = now();
6079 this._wrappedBuiltIns = [];
6080 this._breadcrumbs = [];
6081 this._lastCapturedEvent = null;
6082 this._keypressTimeout;
6083 this._location = _window.location;
6084 this._lastHref = this._location && this._location.href;
6085 this._resetBackoff();
6086
6087 // eslint-disable-next-line guard-for-in
6088 for (var method in this._originalConsole) {
6089 this._originalConsoleMethods[method] = this._originalConsole[method];
6090 }
6091 }
6092
6093 /*
6094 * The core Raven singleton
6095 *
6096 * @this {Raven}
6097 */
6098
6099 Raven.prototype = {
6100 // Hardcode version string so that raven source can be loaded directly via
6101 // webpack (using a build step causes webpack #1617). Grunt verifies that
6102 // this value matches package.json during build.
6103 // See: https://github.com/getsentry/raven-js/issues/465
6104 VERSION: '3.19.1',
6105
6106 debug: false,
6107
6108 TraceKit: TraceKit, // alias to TraceKit
6109
6110 /*
6111 * Configure Raven with a DSN and extra options
6112 *
6113 * @param {string} dsn The public Sentry DSN
6114 * @param {object} options Set of global options [optional]
6115 * @return {Raven}
6116 */
6117 config: function(dsn, options) {
6118 var self = this;
6119
6120 if (self._globalServer) {
6121 this._logDebug('error', 'Error: Raven has already been configured');
6122 return self;
6123 }
6124 if (!dsn) return self;
6125
6126 var globalOptions = self._globalOptions;
6127
6128 // merge in options
6129 if (options) {
6130 each(options, function(key, value) {
6131 // tags and extra are special and need to be put into context
6132 if (key === 'tags' || key === 'extra' || key === 'user') {
6133 self._globalContext[key] = value;
6134 } else {
6135 globalOptions[key] = value;
6136 }
6137 });
6138 }
6139
6140 self.setDSN(dsn);
6141
6142 // "Script error." is hard coded into browsers for errors that it can't read.
6143 // this is the result of a script being pulled in from an external domain and CORS.
6144 globalOptions.ignoreErrors.push(/^Script error\.?$/);
6145 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
6146
6147 // join regexp rules into one big rule
6148 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
6149 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
6150 ? joinRegExp(globalOptions.ignoreUrls)
6151 : false;
6152 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
6153 ? joinRegExp(globalOptions.whitelistUrls)
6154 : false;
6155 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
6156 globalOptions.maxBreadcrumbs = Math.max(
6157 0,
6158 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
6159 ); // default and hard limit is 100
6160
6161 var autoBreadcrumbDefaults = {
6162 xhr: true,
6163 console: true,
6164 dom: true,
6165 location: true
6166 };
6167
6168 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
6169 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
6170 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
6171 } else if (autoBreadcrumbs !== false) {
6172 autoBreadcrumbs = autoBreadcrumbDefaults;
6173 }
6174 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
6175
6176 var instrumentDefaults = {
6177 tryCatch: true
6178 };
6179
6180 var instrument = globalOptions.instrument;
6181 if ({}.toString.call(instrument) === '[object Object]') {
6182 instrument = objectMerge(instrumentDefaults, instrument);
6183 } else if (instrument !== false) {
6184 instrument = instrumentDefaults;
6185 }
6186 globalOptions.instrument = instrument;
6187
6188 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
6189
6190 // return for chaining
6191 return self;
6192 },
6193
6194 /*
6195 * Installs a global window.onerror error handler
6196 * to capture and report uncaught exceptions.
6197 * At this point, install() is required to be called due
6198 * to the way TraceKit is set up.
6199 *
6200 * @return {Raven}
6201 */
6202 install: function() {
6203 var self = this;
6204 if (self.isSetup() && !self._isRavenInstalled) {
6205 TraceKit.report.subscribe(function() {
6206 self._handleOnErrorStackInfo.apply(self, arguments);
6207 });
6208 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
6209 self._instrumentTryCatch();
6210 }
6211
6212 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
6213
6214 // Install all of the plugins
6215 self._drainPlugins();
6216
6217 self._isRavenInstalled = true;
6218 }
6219
6220 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
6221 return this;
6222 },
6223
6224 /*
6225 * Set the DSN (can be called multiple time unlike config)
6226 *
6227 * @param {string} dsn The public Sentry DSN
6228 */
6229 setDSN: function(dsn) {
6230 var self = this,
6231 uri = self._parseDSN(dsn),
6232 lastSlash = uri.path.lastIndexOf('/'),
6233 path = uri.path.substr(1, lastSlash);
6234
6235 self._dsn = dsn;
6236 self._globalKey = uri.user;
6237 self._globalSecret = uri.pass && uri.pass.substr(1);
6238 self._globalProject = uri.path.substr(lastSlash + 1);
6239
6240 self._globalServer = self._getGlobalServer(uri);
6241
6242 self._globalEndpoint =
6243 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
6244
6245 // Reset backoff state since we may be pointing at a
6246 // new project/server
6247 this._resetBackoff();
6248 },
6249
6250 /*
6251 * Wrap code within a context so Raven can capture errors
6252 * reliably across domains that is executed immediately.
6253 *
6254 * @param {object} options A specific set of options for this context [optional]
6255 * @param {function} func The callback to be immediately executed within the context
6256 * @param {array} args An array of arguments to be called with the callback [optional]
6257 */
6258 context: function(options, func, args) {
6259 if (isFunction(options)) {
6260 args = func || [];
6261 func = options;
6262 options = undefined;
6263 }
6264
6265 return this.wrap(options, func).apply(this, args);
6266 },
6267
6268 /*
6269 * Wrap code within a context and returns back a new function to be executed
6270 *
6271 * @param {object} options A specific set of options for this context [optional]
6272 * @param {function} func The function to be wrapped in a new context
6273 * @param {function} func A function to call before the try/catch wrapper [optional, private]
6274 * @return {function} The newly wrapped functions with a context
6275 */
6276 wrap: function(options, func, _before) {
6277 var self = this;
6278 // 1 argument has been passed, and it's not a function
6279 // so just return it
6280 if (isUndefined(func) && !isFunction(options)) {
6281 return options;
6282 }
6283
6284 // options is optional
6285 if (isFunction(options)) {
6286 func = options;
6287 options = undefined;
6288 }
6289
6290 // At this point, we've passed along 2 arguments, and the second one
6291 // is not a function either, so we'll just return the second argument.
6292 if (!isFunction(func)) {
6293 return func;
6294 }
6295
6296 // We don't wanna wrap it twice!
6297 try {
6298 if (func.__raven__) {
6299 return func;
6300 }
6301
6302 // If this has already been wrapped in the past, return that
6303 if (func.__raven_wrapper__) {
6304 return func.__raven_wrapper__;
6305 }
6306 } catch (e) {
6307 // Just accessing custom props in some Selenium environments
6308 // can cause a "Permission denied" exception (see raven-js#495).
6309 // Bail on wrapping and return the function as-is (defers to window.onerror).
6310 return func;
6311 }
6312
6313 function wrapped() {
6314 var args = [],
6315 i = arguments.length,
6316 deep = !options || (options && options.deep !== false);
6317
6318 if (_before && isFunction(_before)) {
6319 _before.apply(this, arguments);
6320 }
6321
6322 // Recursively wrap all of a function's arguments that are
6323 // functions themselves.
6324 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
6325
6326 try {
6327 // Attempt to invoke user-land function
6328 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
6329 // means Raven caught an error invoking your application code. This is
6330 // expected behavior and NOT indicative of a bug with Raven.js.
6331 return func.apply(this, args);
6332 } catch (e) {
6333 self._ignoreNextOnError();
6334 self.captureException(e, options);
6335 throw e;
6336 }
6337 }
6338
6339 // copy over properties of the old function
6340 for (var property in func) {
6341 if (hasKey(func, property)) {
6342 wrapped[property] = func[property];
6343 }
6344 }
6345 wrapped.prototype = func.prototype;
6346
6347 func.__raven_wrapper__ = wrapped;
6348 // Signal that this function has been wrapped already
6349 // for both debugging and to prevent it to being wrapped twice
6350 wrapped.__raven__ = true;
6351 wrapped.__inner__ = func;
6352
6353 return wrapped;
6354 },
6355
6356 /*
6357 * Uninstalls the global error handler.
6358 *
6359 * @return {Raven}
6360 */
6361 uninstall: function() {
6362 TraceKit.report.uninstall();
6363
6364 this._restoreBuiltIns();
6365
6366 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6367 this._isRavenInstalled = false;
6368
6369 return this;
6370 },
6371
6372 /*
6373 * Manually capture an exception and send it over to Sentry
6374 *
6375 * @param {error} ex An exception to be logged
6376 * @param {object} options A specific set of options for this error [optional]
6377 * @return {Raven}
6378 */
6379 captureException: function(ex, options) {
6380 // Cases for sending ex as a message, rather than an exception
6381 var isNotError = !isError(ex);
6382 var isNotErrorEvent = !isErrorEvent(ex);
6383 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6384
6385 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6386 return this.captureMessage(
6387 ex,
6388 objectMerge(
6389 {
6390 trimHeadFrames: 1,
6391 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6392 },
6393 options
6394 )
6395 );
6396 }
6397
6398 // Get actual Error from ErrorEvent
6399 if (isErrorEvent(ex)) ex = ex.error;
6400
6401 // Store the raw exception object for potential debugging and introspection
6402 this._lastCapturedException = ex;
6403
6404 // TraceKit.report will re-raise any exception passed to it,
6405 // which means you have to wrap it in try/catch. Instead, we
6406 // can wrap it here and only re-raise if TraceKit.report
6407 // raises an exception different from the one we asked to
6408 // report on.
6409 try {
6410 var stack = TraceKit.computeStackTrace(ex);
6411 this._handleStackInfo(stack, options);
6412 } catch (ex1) {
6413 if (ex !== ex1) {
6414 throw ex1;
6415 }
6416 }
6417
6418 return this;
6419 },
6420
6421 /*
6422 * Manually send a message to Sentry
6423 *
6424 * @param {string} msg A plain message to be captured in Sentry
6425 * @param {object} options A specific set of options for this message [optional]
6426 * @return {Raven}
6427 */
6428 captureMessage: function(msg, options) {
6429 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6430 // early call; we'll error on the side of logging anything called before configuration since it's
6431 // probably something you should see:
6432 if (
6433 !!this._globalOptions.ignoreErrors.test &&
6434 this._globalOptions.ignoreErrors.test(msg)
6435 ) {
6436 return;
6437 }
6438
6439 options = options || {};
6440
6441 var data = objectMerge(
6442 {
6443 message: msg + '' // Make sure it's actually a string
6444 },
6445 options
6446 );
6447
6448 var ex;
6449 // Generate a "synthetic" stack trace from this point.
6450 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6451 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6452 // or if it catches a thrown object without a "stack" property.
6453 try {
6454 throw new Error(msg);
6455 } catch (ex1) {
6456 ex = ex1;
6457 }
6458
6459 // null exception name so `Error` isn't prefixed to msg
6460 ex.name = null;
6461 var stack = TraceKit.computeStackTrace(ex);
6462
6463 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6464 var initialCall = stack.stack[1];
6465
6466 var fileurl = (initialCall && initialCall.url) || '';
6467
6468 if (
6469 !!this._globalOptions.ignoreUrls.test &&
6470 this._globalOptions.ignoreUrls.test(fileurl)
6471 ) {
6472 return;
6473 }
6474
6475 if (
6476 !!this._globalOptions.whitelistUrls.test &&
6477 !this._globalOptions.whitelistUrls.test(fileurl)
6478 ) {
6479 return;
6480 }
6481
6482 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6483 options = objectMerge(
6484 {
6485 // fingerprint on msg, not stack trace (legacy behavior, could be
6486 // revisited)
6487 fingerprint: msg,
6488 // since we know this is a synthetic trace, the top N-most frames
6489 // MUST be from Raven.js, so mark them as in_app later by setting
6490 // trimHeadFrames
6491 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6492 },
6493 options
6494 );
6495
6496 var frames = this._prepareFrames(stack, options);
6497 data.stacktrace = {
6498 // Sentry expects frames oldest to newest
6499 frames: frames.reverse()
6500 };
6501 }
6502
6503 // Fire away!
6504 this._send(data);
6505
6506 return this;
6507 },
6508
6509 captureBreadcrumb: function(obj) {
6510 var crumb = objectMerge(
6511 {
6512 timestamp: now() / 1000
6513 },
6514 obj
6515 );
6516
6517 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6518 var result = this._globalOptions.breadcrumbCallback(crumb);
6519
6520 if (isObject(result) && !isEmptyObject(result)) {
6521 crumb = result;
6522 } else if (result === false) {
6523 return this;
6524 }
6525 }
6526
6527 this._breadcrumbs.push(crumb);
6528 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6529 this._breadcrumbs.shift();
6530 }
6531 return this;
6532 },
6533
6534 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6535 var pluginArgs = [].slice.call(arguments, 1);
6536
6537 this._plugins.push([plugin, pluginArgs]);
6538 if (this._isRavenInstalled) {
6539 this._drainPlugins();
6540 }
6541
6542 return this;
6543 },
6544
6545 /*
6546 * Set/clear a user to be sent along with the payload.
6547 *
6548 * @param {object} user An object representing user data [optional]
6549 * @return {Raven}
6550 */
6551 setUserContext: function(user) {
6552 // Intentionally do not merge here since that's an unexpected behavior.
6553 this._globalContext.user = user;
6554
6555 return this;
6556 },
6557
6558 /*
6559 * Merge extra attributes to be sent along with the payload.
6560 *
6561 * @param {object} extra An object representing extra data [optional]
6562 * @return {Raven}
6563 */
6564 setExtraContext: function(extra) {
6565 this._mergeContext('extra', extra);
6566
6567 return this;
6568 },
6569
6570 /*
6571 * Merge tags to be sent along with the payload.
6572 *
6573 * @param {object} tags An object representing tags [optional]
6574 * @return {Raven}
6575 */
6576 setTagsContext: function(tags) {
6577 this._mergeContext('tags', tags);
6578
6579 return this;
6580 },
6581
6582 /*
6583 * Clear all of the context.
6584 *
6585 * @return {Raven}
6586 */
6587 clearContext: function() {
6588 this._globalContext = {};
6589
6590 return this;
6591 },
6592
6593 /*
6594 * Get a copy of the current context. This cannot be mutated.
6595 *
6596 * @return {object} copy of context
6597 */
6598 getContext: function() {
6599 // lol javascript
6600 return JSON.parse(stringify(this._globalContext));
6601 },
6602
6603 /*
6604 * Set environment of application
6605 *
6606 * @param {string} environment Typically something like 'production'.
6607 * @return {Raven}
6608 */
6609 setEnvironment: function(environment) {
6610 this._globalOptions.environment = environment;
6611
6612 return this;
6613 },
6614
6615 /*
6616 * Set release version of application
6617 *
6618 * @param {string} release Typically something like a git SHA to identify version
6619 * @return {Raven}
6620 */
6621 setRelease: function(release) {
6622 this._globalOptions.release = release;
6623
6624 return this;
6625 },
6626
6627 /*
6628 * Set the dataCallback option
6629 *
6630 * @param {function} callback The callback to run which allows the
6631 * data blob to be mutated before sending
6632 * @return {Raven}
6633 */
6634 setDataCallback: function(callback) {
6635 var original = this._globalOptions.dataCallback;
6636 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6637 return this;
6638 },
6639
6640 /*
6641 * Set the breadcrumbCallback option
6642 *
6643 * @param {function} callback The callback to run which allows filtering
6644 * or mutating breadcrumbs
6645 * @return {Raven}
6646 */
6647 setBreadcrumbCallback: function(callback) {
6648 var original = this._globalOptions.breadcrumbCallback;
6649 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6650 return this;
6651 },
6652
6653 /*
6654 * Set the shouldSendCallback option
6655 *
6656 * @param {function} callback The callback to run which allows
6657 * introspecting the blob before sending
6658 * @return {Raven}
6659 */
6660 setShouldSendCallback: function(callback) {
6661 var original = this._globalOptions.shouldSendCallback;
6662 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6663 return this;
6664 },
6665
6666 /**
6667 * Override the default HTTP transport mechanism that transmits data
6668 * to the Sentry server.
6669 *
6670 * @param {function} transport Function invoked instead of the default
6671 * `makeRequest` handler.
6672 *
6673 * @return {Raven}
6674 */
6675 setTransport: function(transport) {
6676 this._globalOptions.transport = transport;
6677
6678 return this;
6679 },
6680
6681 /*
6682 * Get the latest raw exception that was captured by Raven.
6683 *
6684 * @return {error}
6685 */
6686 lastException: function() {
6687 return this._lastCapturedException;
6688 },
6689
6690 /*
6691 * Get the last event id
6692 *
6693 * @return {string}
6694 */
6695 lastEventId: function() {
6696 return this._lastEventId;
6697 },
6698
6699 /*
6700 * Determine if Raven is setup and ready to go.
6701 *
6702 * @return {boolean}
6703 */
6704 isSetup: function() {
6705 if (!this._hasJSON) return false; // needs JSON support
6706 if (!this._globalServer) {
6707 if (!this.ravenNotConfiguredError) {
6708 this.ravenNotConfiguredError = true;
6709 this._logDebug('error', 'Error: Raven has not been configured.');
6710 }
6711 return false;
6712 }
6713 return true;
6714 },
6715
6716 afterLoad: function() {
6717 // TODO: remove window dependence?
6718
6719 // Attempt to initialize Raven on load
6720 var RavenConfig = _window.RavenConfig;
6721 if (RavenConfig) {
6722 this.config(RavenConfig.dsn, RavenConfig.config).install();
6723 }
6724 },
6725
6726 showReportDialog: function(options) {
6727 if (
6728 !_document // doesn't work without a document (React native)
6729 )
6730 return;
6731
6732 options = options || {};
6733
6734 var lastEventId = options.eventId || this.lastEventId();
6735 if (!lastEventId) {
6736 throw new RavenConfigError('Missing eventId');
6737 }
6738
6739 var dsn = options.dsn || this._dsn;
6740 if (!dsn) {
6741 throw new RavenConfigError('Missing DSN');
6742 }
6743
6744 var encode = encodeURIComponent;
6745 var qs = '';
6746 qs += '?eventId=' + encode(lastEventId);
6747 qs += '&dsn=' + encode(dsn);
6748
6749 var user = options.user || this._globalContext.user;
6750 if (user) {
6751 if (user.name) qs += '&name=' + encode(user.name);
6752 if (user.email) qs += '&email=' + encode(user.email);
6753 }
6754
6755 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6756
6757 var script = _document.createElement('script');
6758 script.async = true;
6759 script.src = globalServer + '/api/embed/error-page/' + qs;
6760 (_document.head || _document.body).appendChild(script);
6761 },
6762
6763 /**** Private functions ****/
6764 _ignoreNextOnError: function() {
6765 var self = this;
6766 this._ignoreOnError += 1;
6767 setTimeout(function() {
6768 // onerror should trigger before setTimeout
6769 self._ignoreOnError -= 1;
6770 });
6771 },
6772
6773 _triggerEvent: function(eventType, options) {
6774 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6775 var evt, key;
6776
6777 if (!this._hasDocument) return;
6778
6779 options = options || {};
6780
6781 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6782
6783 if (_document.createEvent) {
6784 evt = _document.createEvent('HTMLEvents');
6785 evt.initEvent(eventType, true, true);
6786 } else {
6787 evt = _document.createEventObject();
6788 evt.eventType = eventType;
6789 }
6790
6791 for (key in options)
6792 if (hasKey(options, key)) {
6793 evt[key] = options[key];
6794 }
6795
6796 if (_document.createEvent) {
6797 // IE9 if standards
6798 _document.dispatchEvent(evt);
6799 } else {
6800 // IE8 regardless of Quirks or Standards
6801 // IE9 if quirks
6802 try {
6803 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6804 } catch (e) {
6805 // Do nothing
6806 }
6807 }
6808 },
6809
6810 /**
6811 * Wraps addEventListener to capture UI breadcrumbs
6812 * @param evtName the event name (e.g. "click")
6813 * @returns {Function}
6814 * @private
6815 */
6816 _breadcrumbEventHandler: function(evtName) {
6817 var self = this;
6818 return function(evt) {
6819 // reset keypress timeout; e.g. triggering a 'click' after
6820 // a 'keypress' will reset the keypress debounce so that a new
6821 // set of keypresses can be recorded
6822 self._keypressTimeout = null;
6823
6824 // It's possible this handler might trigger multiple times for the same
6825 // event (e.g. event propagation through node ancestors). Ignore if we've
6826 // already captured the event.
6827 if (self._lastCapturedEvent === evt) return;
6828
6829 self._lastCapturedEvent = evt;
6830
6831 // try/catch both:
6832 // - accessing evt.target (see getsentry/raven-js#838, #768)
6833 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6834 // can throw an exception in some circumstances.
6835 var target;
6836 try {
6837 target = htmlTreeAsString(evt.target);
6838 } catch (e) {
6839 target = '<unknown>';
6840 }
6841
6842 self.captureBreadcrumb({
6843 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6844 message: target
6845 });
6846 };
6847 },
6848
6849 /**
6850 * Wraps addEventListener to capture keypress UI events
6851 * @returns {Function}
6852 * @private
6853 */
6854 _keypressEventHandler: function() {
6855 var self = this,
6856 debounceDuration = 1000; // milliseconds
6857
6858 // TODO: if somehow user switches keypress target before
6859 // debounce timeout is triggered, we will only capture
6860 // a single breadcrumb from the FIRST target (acceptable?)
6861 return function(evt) {
6862 var target;
6863 try {
6864 target = evt.target;
6865 } catch (e) {
6866 // just accessing event properties can throw an exception in some rare circumstances
6867 // see: https://github.com/getsentry/raven-js/issues/838
6868 return;
6869 }
6870 var tagName = target && target.tagName;
6871
6872 // only consider keypress events on actual input elements
6873 // this will disregard keypresses targeting body (e.g. tabbing
6874 // through elements, hotkeys, etc)
6875 if (
6876 !tagName ||
6877 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6878 )
6879 return;
6880
6881 // record first keypress in a series, but ignore subsequent
6882 // keypresses until debounce clears
6883 var timeout = self._keypressTimeout;
6884 if (!timeout) {
6885 self._breadcrumbEventHandler('input')(evt);
6886 }
6887 clearTimeout(timeout);
6888 self._keypressTimeout = setTimeout(function() {
6889 self._keypressTimeout = null;
6890 }, debounceDuration);
6891 };
6892 },
6893
6894 /**
6895 * Captures a breadcrumb of type "navigation", normalizing input URLs
6896 * @param to the originating URL
6897 * @param from the target URL
6898 * @private
6899 */
6900 _captureUrlChange: function(from, to) {
6901 var parsedLoc = parseUrl(this._location.href);
6902 var parsedTo = parseUrl(to);
6903 var parsedFrom = parseUrl(from);
6904
6905 // because onpopstate only tells you the "new" (to) value of location.href, and
6906 // not the previous (from) value, we need to track the value of the current URL
6907 // state ourselves
6908 this._lastHref = to;
6909
6910 // Use only the path component of the URL if the URL matches the current
6911 // document (almost all the time when using pushState)
6912 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6913 to = parsedTo.relative;
6914 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6915 from = parsedFrom.relative;
6916
6917 this.captureBreadcrumb({
6918 category: 'navigation',
6919 data: {
6920 to: to,
6921 from: from
6922 }
6923 });
6924 },
6925
6926 /**
6927 * Wrap timer functions and event targets to catch errors and provide
6928 * better metadata.
6929 */
6930 _instrumentTryCatch: function() {
6931 var self = this;
6932
6933 var wrappedBuiltIns = self._wrappedBuiltIns;
6934
6935 function wrapTimeFn(orig) {
6936 return function(fn, t) {
6937 // preserve arity
6938 // Make a copy of the arguments to prevent deoptimization
6939 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6940 var args = new Array(arguments.length);
6941 for (var i = 0; i < args.length; ++i) {
6942 args[i] = arguments[i];
6943 }
6944 var originalCallback = args[0];
6945 if (isFunction(originalCallback)) {
6946 args[0] = self.wrap(originalCallback);
6947 }
6948
6949 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6950 // also supports only two arguments and doesn't care what this is, so we
6951 // can just call the original function directly.
6952 if (orig.apply) {
6953 return orig.apply(this, args);
6954 } else {
6955 return orig(args[0], args[1]);
6956 }
6957 };
6958 }
6959
6960 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6961
6962 function wrapEventTarget(global) {
6963 var proto = _window[global] && _window[global].prototype;
6964 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6965 fill(
6966 proto,
6967 'addEventListener',
6968 function(orig) {
6969 return function(evtName, fn, capture, secure) {
6970 // preserve arity
6971 try {
6972 if (fn && fn.handleEvent) {
6973 fn.handleEvent = self.wrap(fn.handleEvent);
6974 }
6975 } catch (err) {
6976 // can sometimes get 'Permission denied to access property "handle Event'
6977 }
6978
6979 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6980 // so that we don't have more than one wrapper function
6981 var before, clickHandler, keypressHandler;
6982
6983 if (
6984 autoBreadcrumbs &&
6985 autoBreadcrumbs.dom &&
6986 (global === 'EventTarget' || global === 'Node')
6987 ) {
6988 // NOTE: generating multiple handlers per addEventListener invocation, should
6989 // revisit and verify we can just use one (almost certainly)
6990 clickHandler = self._breadcrumbEventHandler('click');
6991 keypressHandler = self._keypressEventHandler();
6992 before = function(evt) {
6993 // need to intercept every DOM event in `before` argument, in case that
6994 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6995 // see #724
6996 if (!evt) return;
6997
6998 var eventType;
6999 try {
7000 eventType = evt.type;
7001 } catch (e) {
7002 // just accessing event properties can throw an exception in some rare circumstances
7003 // see: https://github.com/getsentry/raven-js/issues/838
7004 return;
7005 }
7006 if (eventType === 'click') return clickHandler(evt);
7007 else if (eventType === 'keypress') return keypressHandler(evt);
7008 };
7009 }
7010 return orig.call(
7011 this,
7012 evtName,
7013 self.wrap(fn, undefined, before),
7014 capture,
7015 secure
7016 );
7017 };
7018 },
7019 wrappedBuiltIns
7020 );
7021 fill(
7022 proto,
7023 'removeEventListener',
7024 function(orig) {
7025 return function(evt, fn, capture, secure) {
7026 try {
7027 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
7028 } catch (e) {
7029 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
7030 }
7031 return orig.call(this, evt, fn, capture, secure);
7032 };
7033 },
7034 wrappedBuiltIns
7035 );
7036 }
7037 }
7038
7039 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
7040 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
7041 if (_window.requestAnimationFrame) {
7042 fill(
7043 _window,
7044 'requestAnimationFrame',
7045 function(orig) {
7046 return function(cb) {
7047 return orig(self.wrap(cb));
7048 };
7049 },
7050 wrappedBuiltIns
7051 );
7052 }
7053
7054 // event targets borrowed from bugsnag-js:
7055 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
7056 var eventTargets = [
7057 'EventTarget',
7058 'Window',
7059 'Node',
7060 'ApplicationCache',
7061 'AudioTrackList',
7062 'ChannelMergerNode',
7063 'CryptoOperation',
7064 'EventSource',
7065 'FileReader',
7066 'HTMLUnknownElement',
7067 'IDBDatabase',
7068 'IDBRequest',
7069 'IDBTransaction',
7070 'KeyOperation',
7071 'MediaController',
7072 'MessagePort',
7073 'ModalWindow',
7074 'Notification',
7075 'SVGElementInstance',
7076 'Screen',
7077 'TextTrack',
7078 'TextTrackCue',
7079 'TextTrackList',
7080 'WebSocket',
7081 'WebSocketWorker',
7082 'Worker',
7083 'XMLHttpRequest',
7084 'XMLHttpRequestEventTarget',
7085 'XMLHttpRequestUpload'
7086 ];
7087 for (var i = 0; i < eventTargets.length; i++) {
7088 wrapEventTarget(eventTargets[i]);
7089 }
7090 },
7091
7092 /**
7093 * Instrument browser built-ins w/ breadcrumb capturing
7094 * - XMLHttpRequests
7095 * - DOM interactions (click/typing)
7096 * - window.location changes
7097 * - console
7098 *
7099 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
7100 */
7101 _instrumentBreadcrumbs: function() {
7102 var self = this;
7103 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
7104
7105 var wrappedBuiltIns = self._wrappedBuiltIns;
7106
7107 function wrapProp(prop, xhr) {
7108 if (prop in xhr && isFunction(xhr[prop])) {
7109 fill(xhr, prop, function(orig) {
7110 return self.wrap(orig);
7111 }); // intentionally don't track filled methods on XHR instances
7112 }
7113 }
7114
7115 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
7116 var xhrproto = XMLHttpRequest.prototype;
7117 fill(
7118 xhrproto,
7119 'open',
7120 function(origOpen) {
7121 return function(method, url) {
7122 // preserve arity
7123
7124 // if Sentry key appears in URL, don't capture
7125 if (isString(url) && url.indexOf(self._globalKey) === -1) {
7126 this.__raven_xhr = {
7127 method: method,
7128 url: url,
7129 status_code: null
7130 };
7131 }
7132
7133 return origOpen.apply(this, arguments);
7134 };
7135 },
7136 wrappedBuiltIns
7137 );
7138
7139 fill(
7140 xhrproto,
7141 'send',
7142 function(origSend) {
7143 return function(data) {
7144 // preserve arity
7145 var xhr = this;
7146
7147 function onreadystatechangeHandler() {
7148 if (xhr.__raven_xhr && xhr.readyState === 4) {
7149 try {
7150 // touching statusCode in some platforms throws
7151 // an exception
7152 xhr.__raven_xhr.status_code = xhr.status;
7153 } catch (e) {
7154 /* do nothing */
7155 }
7156
7157 self.captureBreadcrumb({
7158 type: 'http',
7159 category: 'xhr',
7160 data: xhr.__raven_xhr
7161 });
7162 }
7163 }
7164
7165 var props = ['onload', 'onerror', 'onprogress'];
7166 for (var j = 0; j < props.length; j++) {
7167 wrapProp(props[j], xhr);
7168 }
7169
7170 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
7171 fill(
7172 xhr,
7173 'onreadystatechange',
7174 function(orig) {
7175 return self.wrap(orig, undefined, onreadystatechangeHandler);
7176 } /* intentionally don't track this instrumentation */
7177 );
7178 } else {
7179 // if onreadystatechange wasn't actually set by the page on this xhr, we
7180 // are free to set our own and capture the breadcrumb
7181 xhr.onreadystatechange = onreadystatechangeHandler;
7182 }
7183
7184 return origSend.apply(this, arguments);
7185 };
7186 },
7187 wrappedBuiltIns
7188 );
7189 }
7190
7191 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
7192 fill(
7193 _window,
7194 'fetch',
7195 function(origFetch) {
7196 return function(fn, t) {
7197 // preserve arity
7198 // Make a copy of the arguments to prevent deoptimization
7199 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
7200 var args = new Array(arguments.length);
7201 for (var i = 0; i < args.length; ++i) {
7202 args[i] = arguments[i];
7203 }
7204
7205 var fetchInput = args[0];
7206 var method = 'GET';
7207 var url;
7208
7209 if (typeof fetchInput === 'string') {
7210 url = fetchInput;
7211 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
7212 url = fetchInput.url;
7213 if (fetchInput.method) {
7214 method = fetchInput.method;
7215 }
7216 } else {
7217 url = '' + fetchInput;
7218 }
7219
7220 if (args[1] && args[1].method) {
7221 method = args[1].method;
7222 }
7223
7224 var fetchData = {
7225 method: method,
7226 url: url,
7227 status_code: null
7228 };
7229
7230 self.captureBreadcrumb({
7231 type: 'http',
7232 category: 'fetch',
7233 data: fetchData
7234 });
7235
7236 return origFetch.apply(this, args).then(function(response) {
7237 fetchData.status_code = response.status;
7238
7239 return response;
7240 });
7241 };
7242 },
7243 wrappedBuiltIns
7244 );
7245 }
7246
7247 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
7248 // to the document. Do this before we instrument addEventListener.
7249 if (autoBreadcrumbs.dom && this._hasDocument) {
7250 if (_document.addEventListener) {
7251 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
7252 _document.addEventListener('keypress', self._keypressEventHandler(), false);
7253 } else {
7254 // IE8 Compatibility
7255 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
7256 _document.attachEvent('onkeypress', self._keypressEventHandler());
7257 }
7258 }
7259
7260 // record navigation (URL) changes
7261 // NOTE: in Chrome App environment, touching history.pushState, *even inside
7262 // a try/catch block*, will cause Chrome to output an error to console.error
7263 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
7264 var chrome = _window.chrome;
7265 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
7266 var hasPushAndReplaceState =
7267 !isChromePackagedApp &&
7268 _window.history &&
7269 history.pushState &&
7270 history.replaceState;
7271 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
7272 // TODO: remove onpopstate handler on uninstall()
7273 var oldOnPopState = _window.onpopstate;
7274 _window.onpopstate = function() {
7275 var currentHref = self._location.href;
7276 self._captureUrlChange(self._lastHref, currentHref);
7277
7278 if (oldOnPopState) {
7279 return oldOnPopState.apply(this, arguments);
7280 }
7281 };
7282
7283 var historyReplacementFunction = function(origHistFunction) {
7284 // note history.pushState.length is 0; intentionally not declaring
7285 // params to preserve 0 arity
7286 return function(/* state, title, url */) {
7287 var url = arguments.length > 2 ? arguments[2] : undefined;
7288
7289 // url argument is optional
7290 if (url) {
7291 // coerce to string (this is what pushState does)
7292 self._captureUrlChange(self._lastHref, url + '');
7293 }
7294
7295 return origHistFunction.apply(this, arguments);
7296 };
7297 };
7298
7299 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
7300 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
7301 }
7302
7303 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
7304 // console
7305 var consoleMethodCallback = function(msg, data) {
7306 self.captureBreadcrumb({
7307 message: msg,
7308 level: data.level,
7309 category: 'console'
7310 });
7311 };
7312
7313 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
7314 wrapConsoleMethod(console, level, consoleMethodCallback);
7315 });
7316 }
7317 },
7318
7319 _restoreBuiltIns: function() {
7320 // restore any wrapped builtins
7321 var builtin;
7322 while (this._wrappedBuiltIns.length) {
7323 builtin = this._wrappedBuiltIns.shift();
7324
7325 var obj = builtin[0],
7326 name = builtin[1],
7327 orig = builtin[2];
7328
7329 obj[name] = orig;
7330 }
7331 },
7332
7333 _drainPlugins: function() {
7334 var self = this;
7335
7336 // FIX ME TODO
7337 each(this._plugins, function(_, plugin) {
7338 var installer = plugin[0];
7339 var args = plugin[1];
7340 installer.apply(self, [self].concat(args));
7341 });
7342 },
7343
7344 _parseDSN: function(str) {
7345 var m = dsnPattern.exec(str),
7346 dsn = {},
7347 i = 7;
7348
7349 try {
7350 while (i--) dsn[dsnKeys[i]] = m[i] || '';
7351 } catch (e) {
7352 throw new RavenConfigError('Invalid DSN: ' + str);
7353 }
7354
7355 if (dsn.pass && !this._globalOptions.allowSecretKey) {
7356 throw new RavenConfigError(
7357 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
7358 );
7359 }
7360
7361 return dsn;
7362 },
7363
7364 _getGlobalServer: function(uri) {
7365 // assemble the endpoint from the uri pieces
7366 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7367
7368 if (uri.protocol) {
7369 globalServer = uri.protocol + ':' + globalServer;
7370 }
7371 return globalServer;
7372 },
7373
7374 _handleOnErrorStackInfo: function() {
7375 // if we are intentionally ignoring errors via onerror, bail out
7376 if (!this._ignoreOnError) {
7377 this._handleStackInfo.apply(this, arguments);
7378 }
7379 },
7380
7381 _handleStackInfo: function(stackInfo, options) {
7382 var frames = this._prepareFrames(stackInfo, options);
7383
7384 this._triggerEvent('handle', {
7385 stackInfo: stackInfo,
7386 options: options
7387 });
7388
7389 this._processException(
7390 stackInfo.name,
7391 stackInfo.message,
7392 stackInfo.url,
7393 stackInfo.lineno,
7394 frames,
7395 options
7396 );
7397 },
7398
7399 _prepareFrames: function(stackInfo, options) {
7400 var self = this;
7401 var frames = [];
7402 if (stackInfo.stack && stackInfo.stack.length) {
7403 each(stackInfo.stack, function(i, stack) {
7404 var frame = self._normalizeFrame(stack, stackInfo.url);
7405 if (frame) {
7406 frames.push(frame);
7407 }
7408 });
7409
7410 // e.g. frames captured via captureMessage throw
7411 if (options && options.trimHeadFrames) {
7412 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7413 frames[j].in_app = false;
7414 }
7415 }
7416 }
7417 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7418 return frames;
7419 },
7420
7421 _normalizeFrame: function(frame, stackInfoUrl) {
7422 // normalize the frames data
7423 var normalized = {
7424 filename: frame.url,
7425 lineno: frame.line,
7426 colno: frame.column,
7427 function: frame.func || '?'
7428 };
7429
7430 // Case when we don't have any information about the error
7431 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7432 // Generating synthetic error doesn't add any value here
7433 //
7434 // We should probably somehow let a user know that they should fix their code
7435 if (!frame.url) {
7436 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7437 }
7438
7439 normalized.in_app = !// determine if an exception came from outside of our app
7440 // first we check the global includePaths list.
7441 (
7442 (!!this._globalOptions.includePaths.test &&
7443 !this._globalOptions.includePaths.test(normalized.filename)) ||
7444 // Now we check for fun, if the function name is Raven or TraceKit
7445 /(Raven|TraceKit)\./.test(normalized['function']) ||
7446 // finally, we do a last ditch effort and check for raven.min.js
7447 /raven\.(min\.)?js$/.test(normalized.filename)
7448 );
7449
7450 return normalized;
7451 },
7452
7453 _processException: function(type, message, fileurl, lineno, frames, options) {
7454 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7455 if (
7456 !!this._globalOptions.ignoreErrors.test &&
7457 (this._globalOptions.ignoreErrors.test(message) ||
7458 this._globalOptions.ignoreErrors.test(prefixedMessage))
7459 ) {
7460 return;
7461 }
7462
7463 var stacktrace;
7464
7465 if (frames && frames.length) {
7466 fileurl = frames[0].filename || fileurl;
7467 // Sentry expects frames oldest to newest
7468 // and JS sends them as newest to oldest
7469 frames.reverse();
7470 stacktrace = {frames: frames};
7471 } else if (fileurl) {
7472 stacktrace = {
7473 frames: [
7474 {
7475 filename: fileurl,
7476 lineno: lineno,
7477 in_app: true
7478 }
7479 ]
7480 };
7481 }
7482
7483 if (
7484 !!this._globalOptions.ignoreUrls.test &&
7485 this._globalOptions.ignoreUrls.test(fileurl)
7486 ) {
7487 return;
7488 }
7489
7490 if (
7491 !!this._globalOptions.whitelistUrls.test &&
7492 !this._globalOptions.whitelistUrls.test(fileurl)
7493 ) {
7494 return;
7495 }
7496
7497 var data = objectMerge(
7498 {
7499 // sentry.interfaces.Exception
7500 exception: {
7501 values: [
7502 {
7503 type: type,
7504 value: message,
7505 stacktrace: stacktrace
7506 }
7507 ]
7508 },
7509 culprit: fileurl
7510 },
7511 options
7512 );
7513
7514 // Fire away!
7515 this._send(data);
7516 },
7517
7518 _trimPacket: function(data) {
7519 // For now, we only want to truncate the two different messages
7520 // but this could/should be expanded to just trim everything
7521 var max = this._globalOptions.maxMessageLength;
7522 if (data.message) {
7523 data.message = truncate(data.message, max);
7524 }
7525 if (data.exception) {
7526 var exception = data.exception.values[0];
7527 exception.value = truncate(exception.value, max);
7528 }
7529
7530 var request = data.request;
7531 if (request) {
7532 if (request.url) {
7533 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7534 }
7535 if (request.Referer) {
7536 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7537 }
7538 }
7539
7540 if (data.breadcrumbs && data.breadcrumbs.values)
7541 this._trimBreadcrumbs(data.breadcrumbs);
7542
7543 return data;
7544 },
7545
7546 /**
7547 * Truncate breadcrumb values (right now just URLs)
7548 */
7549 _trimBreadcrumbs: function(breadcrumbs) {
7550 // known breadcrumb properties with urls
7551 // TODO: also consider arbitrary prop values that start with (https?)?://
7552 var urlProps = ['to', 'from', 'url'],
7553 urlProp,
7554 crumb,
7555 data;
7556
7557 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7558 crumb = breadcrumbs.values[i];
7559 if (
7560 !crumb.hasOwnProperty('data') ||
7561 !isObject(crumb.data) ||
7562 objectFrozen(crumb.data)
7563 )
7564 continue;
7565
7566 data = objectMerge({}, crumb.data);
7567 for (var j = 0; j < urlProps.length; ++j) {
7568 urlProp = urlProps[j];
7569 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7570 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7571 }
7572 }
7573 breadcrumbs.values[i].data = data;
7574 }
7575 },
7576
7577 _getHttpData: function() {
7578 if (!this._hasNavigator && !this._hasDocument) return;
7579 var httpData = {};
7580
7581 if (this._hasNavigator && _navigator.userAgent) {
7582 httpData.headers = {
7583 'User-Agent': navigator.userAgent
7584 };
7585 }
7586
7587 if (this._hasDocument) {
7588 if (_document.location && _document.location.href) {
7589 httpData.url = _document.location.href;
7590 }
7591 if (_document.referrer) {
7592 if (!httpData.headers) httpData.headers = {};
7593 httpData.headers.Referer = _document.referrer;
7594 }
7595 }
7596
7597 return httpData;
7598 },
7599
7600 _resetBackoff: function() {
7601 this._backoffDuration = 0;
7602 this._backoffStart = null;
7603 },
7604
7605 _shouldBackoff: function() {
7606 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7607 },
7608
7609 /**
7610 * Returns true if the in-process data payload matches the signature
7611 * of the previously-sent data
7612 *
7613 * NOTE: This has to be done at this level because TraceKit can generate
7614 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7615 * other old browsers). This can take the form of an "exception"
7616 * data object with a single frame (derived from the onerror args).
7617 */
7618 _isRepeatData: function(current) {
7619 var last = this._lastData;
7620
7621 if (
7622 !last ||
7623 current.message !== last.message || // defined for captureMessage
7624 current.culprit !== last.culprit // defined for captureException/onerror
7625 )
7626 return false;
7627
7628 // Stacktrace interface (i.e. from captureMessage)
7629 if (current.stacktrace || last.stacktrace) {
7630 return isSameStacktrace(current.stacktrace, last.stacktrace);
7631 } else if (current.exception || last.exception) {
7632 // Exception interface (i.e. from captureException/onerror)
7633 return isSameException(current.exception, last.exception);
7634 }
7635
7636 return true;
7637 },
7638
7639 _setBackoffState: function(request) {
7640 // If we are already in a backoff state, don't change anything
7641 if (this._shouldBackoff()) {
7642 return;
7643 }
7644
7645 var status = request.status;
7646
7647 // 400 - project_id doesn't exist or some other fatal
7648 // 401 - invalid/revoked dsn
7649 // 429 - too many requests
7650 if (!(status === 400 || status === 401 || status === 429)) return;
7651
7652 var retry;
7653 try {
7654 // If Retry-After is not in Access-Control-Expose-Headers, most
7655 // browsers will throw an exception trying to access it
7656 retry = request.getResponseHeader('Retry-After');
7657 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7658 } catch (e) {
7659 /* eslint no-empty:0 */
7660 }
7661
7662 this._backoffDuration = retry
7663 ? // If Sentry server returned a Retry-After value, use it
7664 retry
7665 : // Otherwise, double the last backoff duration (starts at 1 sec)
7666 this._backoffDuration * 2 || 1000;
7667
7668 this._backoffStart = now();
7669 },
7670
7671 _send: function(data) {
7672 var globalOptions = this._globalOptions;
7673
7674 var baseData = {
7675 project: this._globalProject,
7676 logger: globalOptions.logger,
7677 platform: 'javascript'
7678 },
7679 httpData = this._getHttpData();
7680
7681 if (httpData) {
7682 baseData.request = httpData;
7683 }
7684
7685 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7686 if (data.trimHeadFrames) delete data.trimHeadFrames;
7687
7688 data = objectMerge(baseData, data);
7689
7690 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7691 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7692 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7693
7694 // Send along our own collected metadata with extra
7695 data.extra['session:duration'] = now() - this._startTime;
7696
7697 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7698 // intentionally make shallow copy so that additions
7699 // to breadcrumbs aren't accidentally sent in this request
7700 data.breadcrumbs = {
7701 values: [].slice.call(this._breadcrumbs, 0)
7702 };
7703 }
7704
7705 // If there are no tags/extra, strip the key from the payload alltogther.
7706 if (isEmptyObject(data.tags)) delete data.tags;
7707
7708 if (this._globalContext.user) {
7709 // sentry.interfaces.User
7710 data.user = this._globalContext.user;
7711 }
7712
7713 // Include the environment if it's defined in globalOptions
7714 if (globalOptions.environment) data.environment = globalOptions.environment;
7715
7716 // Include the release if it's defined in globalOptions
7717 if (globalOptions.release) data.release = globalOptions.release;
7718
7719 // Include server_name if it's defined in globalOptions
7720 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7721
7722 if (isFunction(globalOptions.dataCallback)) {
7723 data = globalOptions.dataCallback(data) || data;
7724 }
7725
7726 // Why??????????
7727 if (!data || isEmptyObject(data)) {
7728 return;
7729 }
7730
7731 // Check if the request should be filtered or not
7732 if (
7733 isFunction(globalOptions.shouldSendCallback) &&
7734 !globalOptions.shouldSendCallback(data)
7735 ) {
7736 return;
7737 }
7738
7739 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7740 // so drop requests until "cool-off" period has elapsed.
7741 if (this._shouldBackoff()) {
7742 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7743 return;
7744 }
7745
7746 if (typeof globalOptions.sampleRate === 'number') {
7747 if (Math.random() < globalOptions.sampleRate) {
7748 this._sendProcessedPayload(data);
7749 }
7750 } else {
7751 this._sendProcessedPayload(data);
7752 }
7753 },
7754
7755 _getUuid: function() {
7756 return uuid4();
7757 },
7758
7759 _sendProcessedPayload: function(data, callback) {
7760 var self = this;
7761 var globalOptions = this._globalOptions;
7762
7763 if (!this.isSetup()) return;
7764
7765 // Try and clean up the packet before sending by truncating long values
7766 data = this._trimPacket(data);
7767
7768 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7769 // but this would require copying an un-truncated copy of the data packet, which can be
7770 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7771 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7772 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7773 return;
7774 }
7775
7776 // Send along an event_id if not explicitly passed.
7777 // This event_id can be used to reference the error within Sentry itself.
7778 // Set lastEventId after we know the error should actually be sent
7779 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7780
7781 // Store outbound payload after trim
7782 this._lastData = data;
7783
7784 this._logDebug('debug', 'Raven about to send:', data);
7785
7786 var auth = {
7787 sentry_version: '7',
7788 sentry_client: 'raven-js/' + this.VERSION,
7789 sentry_key: this._globalKey
7790 };
7791
7792 if (this._globalSecret) {
7793 auth.sentry_secret = this._globalSecret;
7794 }
7795
7796 var exception = data.exception && data.exception.values[0];
7797 this.captureBreadcrumb({
7798 category: 'sentry',
7799 message: exception
7800 ? (exception.type ? exception.type + ': ' : '') + exception.value
7801 : data.message,
7802 event_id: data.event_id,
7803 level: data.level || 'error' // presume error unless specified
7804 });
7805
7806 var url = this._globalEndpoint;
7807 (globalOptions.transport || this._makeRequest).call(this, {
7808 url: url,
7809 auth: auth,
7810 data: data,
7811 options: globalOptions,
7812 onSuccess: function success() {
7813 self._resetBackoff();
7814
7815 self._triggerEvent('success', {
7816 data: data,
7817 src: url
7818 });
7819 callback && callback();
7820 },
7821 onError: function failure(error) {
7822 self._logDebug('error', 'Raven transport failed to send: ', error);
7823
7824 if (error.request) {
7825 self._setBackoffState(error.request);
7826 }
7827
7828 self._triggerEvent('failure', {
7829 data: data,
7830 src: url
7831 });
7832 error = error || new Error('Raven send failed (no additional details provided)');
7833 callback && callback(error);
7834 }
7835 });
7836 },
7837
7838 _makeRequest: function(opts) {
7839 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7840 if (!request) return;
7841
7842 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7843 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7844
7845 if (!hasCORS) return;
7846
7847 var url = opts.url;
7848
7849 if ('withCredentials' in request) {
7850 request.onreadystatechange = function() {
7851 if (request.readyState !== 4) {
7852 return;
7853 } else if (request.status === 200) {
7854 opts.onSuccess && opts.onSuccess();
7855 } else if (opts.onError) {
7856 var err = new Error('Sentry error code: ' + request.status);
7857 err.request = request;
7858 opts.onError(err);
7859 }
7860 };
7861 } else {
7862 request = new XDomainRequest();
7863 // xdomainrequest cannot go http -> https (or vice versa),
7864 // so always use protocol relative
7865 url = url.replace(/^https?:/, '');
7866
7867 // onreadystatechange not supported by XDomainRequest
7868 if (opts.onSuccess) {
7869 request.onload = opts.onSuccess;
7870 }
7871 if (opts.onError) {
7872 request.onerror = function() {
7873 var err = new Error('Sentry error code: XDomainRequest');
7874 err.request = request;
7875 opts.onError(err);
7876 };
7877 }
7878 }
7879
7880 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7881 // HTTP header) so as to avoid preflight CORS requests
7882 request.open('POST', url + '?' + urlencode(opts.auth));
7883 request.send(stringify(opts.data));
7884 },
7885
7886 _logDebug: function(level) {
7887 if (this._originalConsoleMethods[level] && this.debug) {
7888 // In IE<10 console methods do not have their own 'apply' method
7889 Function.prototype.apply.call(
7890 this._originalConsoleMethods[level],
7891 this._originalConsole,
7892 [].slice.call(arguments, 1)
7893 );
7894 }
7895 },
7896
7897 _mergeContext: function(key, context) {
7898 if (isUndefined(context)) {
7899 delete this._globalContext[key];
7900 } else {
7901 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7902 }
7903 }
7904 };
7905
7906 // Deprecations
7907 Raven.prototype.setUser = Raven.prototype.setUserContext;
7908 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7909
7910 module.exports = Raven;
7911
7912
7913 /***/ }),
7914
7915 /***/ "./node_modules/raven-js/src/singleton.js":
7916 /*!************************************************!*\
7917 !*** ./node_modules/raven-js/src/singleton.js ***!
7918 \************************************************/
7919 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7920
7921 /**
7922 * Enforces a single instance of the Raven client, and the
7923 * main entry point for Raven. If you are a consumer of the
7924 * Raven library, you SHOULD load this file (vs raven.js).
7925 **/
7926
7927 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7928
7929 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7930 var _window =
7931 typeof window !== 'undefined'
7932 ? window
7933 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7934 var _Raven = _window.Raven;
7935
7936 var Raven = new RavenConstructor();
7937
7938 /*
7939 * Allow multiple versions of Raven to be installed.
7940 * Strip Raven from the global context and returns the instance.
7941 *
7942 * @return {Raven}
7943 */
7944 Raven.noConflict = function() {
7945 _window.Raven = _Raven;
7946 return Raven;
7947 };
7948
7949 Raven.afterLoad();
7950
7951 module.exports = Raven;
7952
7953
7954 /***/ }),
7955
7956 /***/ "./node_modules/raven-js/src/utils.js":
7957 /*!********************************************!*\
7958 !*** ./node_modules/raven-js/src/utils.js ***!
7959 \********************************************/
7960 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7961
7962 var _window =
7963 typeof window !== 'undefined'
7964 ? window
7965 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7966
7967 function isObject(what) {
7968 return typeof what === 'object' && what !== null;
7969 }
7970
7971 // Yanked from https://git.io/vS8DV re-used under CC0
7972 // with some tiny modifications
7973 function isError(value) {
7974 switch ({}.toString.call(value)) {
7975 case '[object Error]':
7976 return true;
7977 case '[object Exception]':
7978 return true;
7979 case '[object DOMException]':
7980 return true;
7981 default:
7982 return value instanceof Error;
7983 }
7984 }
7985
7986 function isErrorEvent(value) {
7987 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7988 }
7989
7990 function isUndefined(what) {
7991 return what === void 0;
7992 }
7993
7994 function isFunction(what) {
7995 return typeof what === 'function';
7996 }
7997
7998 function isString(what) {
7999 return Object.prototype.toString.call(what) === '[object String]';
8000 }
8001
8002 function isEmptyObject(what) {
8003 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
8004 return true;
8005 }
8006
8007 function supportsErrorEvent() {
8008 try {
8009 new ErrorEvent(''); // eslint-disable-line no-new
8010 return true;
8011 } catch (e) {
8012 return false;
8013 }
8014 }
8015
8016 function wrappedCallback(callback) {
8017 function dataCallback(data, original) {
8018 var normalizedData = callback(data) || data;
8019 if (original) {
8020 return original(normalizedData) || normalizedData;
8021 }
8022 return normalizedData;
8023 }
8024
8025 return dataCallback;
8026 }
8027
8028 function each(obj, callback) {
8029 var i, j;
8030
8031 if (isUndefined(obj.length)) {
8032 for (i in obj) {
8033 if (hasKey(obj, i)) {
8034 callback.call(null, i, obj[i]);
8035 }
8036 }
8037 } else {
8038 j = obj.length;
8039 if (j) {
8040 for (i = 0; i < j; i++) {
8041 callback.call(null, i, obj[i]);
8042 }
8043 }
8044 }
8045 }
8046
8047 function objectMerge(obj1, obj2) {
8048 if (!obj2) {
8049 return obj1;
8050 }
8051 each(obj2, function(key, value) {
8052 obj1[key] = value;
8053 });
8054 return obj1;
8055 }
8056
8057 /**
8058 * This function is only used for react-native.
8059 * react-native freezes object that have already been sent over the
8060 * js bridge. We need this function in order to check if the object is frozen.
8061 * So it's ok that objectFrozen returns false if Object.isFrozen is not
8062 * supported because it's not relevant for other "platforms". See related issue:
8063 * https://github.com/getsentry/react-native-sentry/issues/57
8064 */
8065 function objectFrozen(obj) {
8066 if (!Object.isFrozen) {
8067 return false;
8068 }
8069 return Object.isFrozen(obj);
8070 }
8071
8072 function truncate(str, max) {
8073 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
8074 }
8075
8076 /**
8077 * hasKey, a better form of hasOwnProperty
8078 * Example: hasKey(MainHostObject, property) === true/false
8079 *
8080 * @param {Object} host object to check property
8081 * @param {string} key to check
8082 */
8083 function hasKey(object, key) {
8084 return Object.prototype.hasOwnProperty.call(object, key);
8085 }
8086
8087 function joinRegExp(patterns) {
8088 // Combine an array of regular expressions and strings into one large regexp
8089 // Be mad.
8090 var sources = [],
8091 i = 0,
8092 len = patterns.length,
8093 pattern;
8094
8095 for (; i < len; i++) {
8096 pattern = patterns[i];
8097 if (isString(pattern)) {
8098 // If it's a string, we need to escape it
8099 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
8100 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
8101 } else if (pattern && pattern.source) {
8102 // If it's a regexp already, we want to extract the source
8103 sources.push(pattern.source);
8104 }
8105 // Intentionally skip other cases
8106 }
8107 return new RegExp(sources.join('|'), 'i');
8108 }
8109
8110 function urlencode(o) {
8111 var pairs = [];
8112 each(o, function(key, value) {
8113 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
8114 });
8115 return pairs.join('&');
8116 }
8117
8118 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
8119 // intentionally using regex and not <a/> href parsing trick because React Native and other
8120 // environments where DOM might not be available
8121 function parseUrl(url) {
8122 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
8123 if (!match) return {};
8124
8125 // coerce to undefined values to empty string so we don't get 'undefined'
8126 var query = match[6] || '';
8127 var fragment = match[8] || '';
8128 return {
8129 protocol: match[2],
8130 host: match[4],
8131 path: match[5],
8132 relative: match[5] + query + fragment // everything minus origin
8133 };
8134 }
8135 function uuid4() {
8136 var crypto = _window.crypto || _window.msCrypto;
8137
8138 if (!isUndefined(crypto) && crypto.getRandomValues) {
8139 // Use window.crypto API if available
8140 // eslint-disable-next-line no-undef
8141 var arr = new Uint16Array(8);
8142 crypto.getRandomValues(arr);
8143
8144 // set 4 in byte 7
8145 arr[3] = (arr[3] & 0xfff) | 0x4000;
8146 // set 2 most significant bits of byte 9 to '10'
8147 arr[4] = (arr[4] & 0x3fff) | 0x8000;
8148
8149 var pad = function(num) {
8150 var v = num.toString(16);
8151 while (v.length < 4) {
8152 v = '0' + v;
8153 }
8154 return v;
8155 };
8156
8157 return (
8158 pad(arr[0]) +
8159 pad(arr[1]) +
8160 pad(arr[2]) +
8161 pad(arr[3]) +
8162 pad(arr[4]) +
8163 pad(arr[5]) +
8164 pad(arr[6]) +
8165 pad(arr[7])
8166 );
8167 } else {
8168 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
8169 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
8170 var r = (Math.random() * 16) | 0,
8171 v = c === 'x' ? r : (r & 0x3) | 0x8;
8172 return v.toString(16);
8173 });
8174 }
8175 }
8176
8177 /**
8178 * Given a child DOM element, returns a query-selector statement describing that
8179 * and its ancestors
8180 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
8181 * @param elem
8182 * @returns {string}
8183 */
8184 function htmlTreeAsString(elem) {
8185 /* eslint no-extra-parens:0*/
8186 var MAX_TRAVERSE_HEIGHT = 5,
8187 MAX_OUTPUT_LEN = 80,
8188 out = [],
8189 height = 0,
8190 len = 0,
8191 separator = ' > ',
8192 sepLength = separator.length,
8193 nextStr;
8194
8195 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
8196 nextStr = htmlElementAsString(elem);
8197 // bail out if
8198 // - nextStr is the 'html' element
8199 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
8200 // (ignore this limit if we are on the first iteration)
8201 if (
8202 nextStr === 'html' ||
8203 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
8204 ) {
8205 break;
8206 }
8207
8208 out.push(nextStr);
8209
8210 len += nextStr.length;
8211 elem = elem.parentNode;
8212 }
8213
8214 return out.reverse().join(separator);
8215 }
8216
8217 /**
8218 * Returns a simple, query-selector representation of a DOM element
8219 * e.g. [HTMLElement] => input#foo.btn[name=baz]
8220 * @param HTMLElement
8221 * @returns {string}
8222 */
8223 function htmlElementAsString(elem) {
8224 var out = [],
8225 className,
8226 classes,
8227 key,
8228 attr,
8229 i;
8230
8231 if (!elem || !elem.tagName) {
8232 return '';
8233 }
8234
8235 out.push(elem.tagName.toLowerCase());
8236 if (elem.id) {
8237 out.push('#' + elem.id);
8238 }
8239
8240 className = elem.className;
8241 if (className && isString(className)) {
8242 classes = className.split(/\s+/);
8243 for (i = 0; i < classes.length; i++) {
8244 out.push('.' + classes[i]);
8245 }
8246 }
8247 var attrWhitelist = ['type', 'name', 'title', 'alt'];
8248 for (i = 0; i < attrWhitelist.length; i++) {
8249 key = attrWhitelist[i];
8250 attr = elem.getAttribute(key);
8251 if (attr) {
8252 out.push('[' + key + '="' + attr + '"]');
8253 }
8254 }
8255 return out.join('');
8256 }
8257
8258 /**
8259 * Returns true if either a OR b is truthy, but not both
8260 */
8261 function isOnlyOneTruthy(a, b) {
8262 return !!(!!a ^ !!b);
8263 }
8264
8265 /**
8266 * Returns true if the two input exception interfaces have the same content
8267 */
8268 function isSameException(ex1, ex2) {
8269 if (isOnlyOneTruthy(ex1, ex2)) return false;
8270
8271 ex1 = ex1.values[0];
8272 ex2 = ex2.values[0];
8273
8274 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
8275
8276 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
8277 }
8278
8279 /**
8280 * Returns true if the two input stack trace interfaces have the same content
8281 */
8282 function isSameStacktrace(stack1, stack2) {
8283 if (isOnlyOneTruthy(stack1, stack2)) return false;
8284
8285 var frames1 = stack1.frames;
8286 var frames2 = stack2.frames;
8287
8288 // Exit early if frame count differs
8289 if (frames1.length !== frames2.length) return false;
8290
8291 // Iterate through every frame; bail out if anything differs
8292 var a, b;
8293 for (var i = 0; i < frames1.length; i++) {
8294 a = frames1[i];
8295 b = frames2[i];
8296 if (
8297 a.filename !== b.filename ||
8298 a.lineno !== b.lineno ||
8299 a.colno !== b.colno ||
8300 a['function'] !== b['function']
8301 )
8302 return false;
8303 }
8304 return true;
8305 }
8306
8307 /**
8308 * Polyfill a method
8309 * @param obj object e.g. `document`
8310 * @param name method name present on object e.g. `addEventListener`
8311 * @param replacement replacement function
8312 * @param track {optional} record instrumentation to an array
8313 */
8314 function fill(obj, name, replacement, track) {
8315 var orig = obj[name];
8316 obj[name] = replacement(orig);
8317 if (track) {
8318 track.push([obj, name, orig]);
8319 }
8320 }
8321
8322 module.exports = {
8323 isObject: isObject,
8324 isError: isError,
8325 isErrorEvent: isErrorEvent,
8326 isUndefined: isUndefined,
8327 isFunction: isFunction,
8328 isString: isString,
8329 isEmptyObject: isEmptyObject,
8330 supportsErrorEvent: supportsErrorEvent,
8331 wrappedCallback: wrappedCallback,
8332 each: each,
8333 objectMerge: objectMerge,
8334 truncate: truncate,
8335 objectFrozen: objectFrozen,
8336 hasKey: hasKey,
8337 joinRegExp: joinRegExp,
8338 urlencode: urlencode,
8339 uuid4: uuid4,
8340 htmlTreeAsString: htmlTreeAsString,
8341 htmlElementAsString: htmlElementAsString,
8342 isSameException: isSameException,
8343 isSameStacktrace: isSameStacktrace,
8344 parseUrl: parseUrl,
8345 fill: fill
8346 };
8347
8348
8349 /***/ }),
8350
8351 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
8352 /*!***********************************************************!*\
8353 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
8354 \***********************************************************/
8355 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8356
8357 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
8358
8359 /*
8360 TraceKit - Cross brower stack traces
8361
8362 This was originally forked from github.com/occ/TraceKit, but has since been
8363 largely re-written and is now maintained as part of raven-js. Tests for
8364 this are in test/vendor.
8365
8366 MIT license
8367 */
8368
8369 var TraceKit = {
8370 collectWindowErrors: true,
8371 debug: false
8372 };
8373
8374 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8375 var _window =
8376 typeof window !== 'undefined'
8377 ? window
8378 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8379
8380 // global reference to slice
8381 var _slice = [].slice;
8382 var UNKNOWN_FUNCTION = '?';
8383
8384 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8385 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8386
8387 function getLocationHref() {
8388 if (typeof document === 'undefined' || document.location == null) return '';
8389
8390 return document.location.href;
8391 }
8392
8393 /**
8394 * TraceKit.report: cross-browser processing of unhandled exceptions
8395 *
8396 * Syntax:
8397 * TraceKit.report.subscribe(function(stackInfo) { ... })
8398 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8399 * TraceKit.report(exception)
8400 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8401 *
8402 * Supports:
8403 * - Firefox: full stack trace with line numbers, plus column number
8404 * on top frame; column number is not guaranteed
8405 * - Opera: full stack trace with line and column numbers
8406 * - Chrome: full stack trace with line and column numbers
8407 * - Safari: line and column number for the top frame only; some frames
8408 * may be missing, and column number is not guaranteed
8409 * - IE: line and column number for the top frame only; some frames
8410 * may be missing, and column number is not guaranteed
8411 *
8412 * In theory, TraceKit should work on all of the following versions:
8413 * - IE5.5+ (only 8.0 tested)
8414 * - Firefox 0.9+ (only 3.5+ tested)
8415 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8416 * Exceptions Have Stacktrace to be enabled in opera:config)
8417 * - Safari 3+ (only 4+ tested)
8418 * - Chrome 1+ (only 5+ tested)
8419 * - Konqueror 3.5+ (untested)
8420 *
8421 * Requires TraceKit.computeStackTrace.
8422 *
8423 * Tries to catch all unhandled exceptions and report them to the
8424 * subscribed handlers. Please note that TraceKit.report will rethrow the
8425 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8426 * If the exception does not reach the top of the browser, you will only
8427 * get a stack trace from the point where TraceKit.report was called.
8428 *
8429 * Handlers receive a stackInfo object as described in the
8430 * TraceKit.computeStackTrace docs.
8431 */
8432 TraceKit.report = (function reportModuleWrapper() {
8433 var handlers = [],
8434 lastArgs = null,
8435 lastException = null,
8436 lastExceptionStack = null;
8437
8438 /**
8439 * Add a crash handler.
8440 * @param {Function} handler
8441 */
8442 function subscribe(handler) {
8443 installGlobalHandler();
8444 handlers.push(handler);
8445 }
8446
8447 /**
8448 * Remove a crash handler.
8449 * @param {Function} handler
8450 */
8451 function unsubscribe(handler) {
8452 for (var i = handlers.length - 1; i >= 0; --i) {
8453 if (handlers[i] === handler) {
8454 handlers.splice(i, 1);
8455 }
8456 }
8457 }
8458
8459 /**
8460 * Remove all crash handlers.
8461 */
8462 function unsubscribeAll() {
8463 uninstallGlobalHandler();
8464 handlers = [];
8465 }
8466
8467 /**
8468 * Dispatch stack information to all handlers.
8469 * @param {Object.<string, *>} stack
8470 */
8471 function notifyHandlers(stack, isWindowError) {
8472 var exception = null;
8473 if (isWindowError && !TraceKit.collectWindowErrors) {
8474 return;
8475 }
8476 for (var i in handlers) {
8477 if (handlers.hasOwnProperty(i)) {
8478 try {
8479 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8480 } catch (inner) {
8481 exception = inner;
8482 }
8483 }
8484 }
8485
8486 if (exception) {
8487 throw exception;
8488 }
8489 }
8490
8491 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8492
8493 /**
8494 * Ensures all global unhandled exceptions are recorded.
8495 * Supported by Gecko and IE.
8496 * @param {string} message Error message.
8497 * @param {string} url URL of script that generated the exception.
8498 * @param {(number|string)} lineNo The line number at which the error
8499 * occurred.
8500 * @param {?(number|string)} colNo The column number at which the error
8501 * occurred.
8502 * @param {?Error} ex The actual Error object.
8503 */
8504 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8505 var stack = null;
8506
8507 if (lastExceptionStack) {
8508 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8509 lastExceptionStack,
8510 url,
8511 lineNo,
8512 message
8513 );
8514 processLastException();
8515 } else if (ex && utils.isError(ex)) {
8516 // non-string `ex` arg; attempt to extract stack trace
8517
8518 // New chrome and blink send along a real error object
8519 // Let's just report that like a normal error.
8520 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8521 stack = TraceKit.computeStackTrace(ex);
8522 notifyHandlers(stack, true);
8523 } else {
8524 var location = {
8525 url: url,
8526 line: lineNo,
8527 column: colNo
8528 };
8529
8530 var name = undefined;
8531 var msg = message; // must be new var or will modify original `arguments`
8532 var groups;
8533 if ({}.toString.call(message) === '[object String]') {
8534 var groups = message.match(ERROR_TYPES_RE);
8535 if (groups) {
8536 name = groups[1];
8537 msg = groups[2];
8538 }
8539 }
8540
8541 location.func = UNKNOWN_FUNCTION;
8542
8543 stack = {
8544 name: name,
8545 message: msg,
8546 url: getLocationHref(),
8547 stack: [location]
8548 };
8549 notifyHandlers(stack, true);
8550 }
8551
8552 if (_oldOnerrorHandler) {
8553 return _oldOnerrorHandler.apply(this, arguments);
8554 }
8555
8556 return false;
8557 }
8558
8559 function installGlobalHandler() {
8560 if (_onErrorHandlerInstalled) {
8561 return;
8562 }
8563 _oldOnerrorHandler = _window.onerror;
8564 _window.onerror = traceKitWindowOnError;
8565 _onErrorHandlerInstalled = true;
8566 }
8567
8568 function uninstallGlobalHandler() {
8569 if (!_onErrorHandlerInstalled) {
8570 return;
8571 }
8572 _window.onerror = _oldOnerrorHandler;
8573 _onErrorHandlerInstalled = false;
8574 _oldOnerrorHandler = undefined;
8575 }
8576
8577 function processLastException() {
8578 var _lastExceptionStack = lastExceptionStack,
8579 _lastArgs = lastArgs;
8580 lastArgs = null;
8581 lastExceptionStack = null;
8582 lastException = null;
8583 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8584 }
8585
8586 /**
8587 * Reports an unhandled Error to TraceKit.
8588 * @param {Error} ex
8589 * @param {?boolean} rethrow If false, do not re-throw the exception.
8590 * Only used for window.onerror to not cause an infinite loop of
8591 * rethrowing.
8592 */
8593 function report(ex, rethrow) {
8594 var args = _slice.call(arguments, 1);
8595 if (lastExceptionStack) {
8596 if (lastException === ex) {
8597 return; // already caught by an inner catch block, ignore
8598 } else {
8599 processLastException();
8600 }
8601 }
8602
8603 var stack = TraceKit.computeStackTrace(ex);
8604 lastExceptionStack = stack;
8605 lastException = ex;
8606 lastArgs = args;
8607
8608 // If the stack trace is incomplete, wait for 2 seconds for
8609 // slow slow IE to see if onerror occurs or not before reporting
8610 // this exception; otherwise, we will end up with an incomplete
8611 // stack trace
8612 setTimeout(function() {
8613 if (lastException === ex) {
8614 processLastException();
8615 }
8616 }, stack.incomplete ? 2000 : 0);
8617
8618 if (rethrow !== false) {
8619 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8620 }
8621 }
8622
8623 report.subscribe = subscribe;
8624 report.unsubscribe = unsubscribe;
8625 report.uninstall = unsubscribeAll;
8626 return report;
8627 })();
8628
8629 /**
8630 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8631 *
8632 * Syntax:
8633 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8634 * Returns:
8635 * s.name - exception name
8636 * s.message - exception message
8637 * s.stack[i].url - JavaScript or HTML file URL
8638 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8639 * s.stack[i].args - arguments passed to the function, if known
8640 * s.stack[i].line - line number, if known
8641 * s.stack[i].column - column number, if known
8642 *
8643 * Supports:
8644 * - Firefox: full stack trace with line numbers and unreliable column
8645 * number on top frame
8646 * - Opera 10: full stack trace with line and column numbers
8647 * - Opera 9-: full stack trace with line numbers
8648 * - Chrome: full stack trace with line and column numbers
8649 * - Safari: line and column number for the topmost stacktrace element
8650 * only
8651 * - IE: no line numbers whatsoever
8652 *
8653 * Tries to guess names of anonymous functions by looking for assignments
8654 * in the source code. In IE and Safari, we have to guess source file names
8655 * by searching for function bodies inside all page scripts. This will not
8656 * work for scripts that are loaded cross-domain.
8657 * Here be dragons: some function names may be guessed incorrectly, and
8658 * duplicate functions may be mismatched.
8659 *
8660 * TraceKit.computeStackTrace should only be used for tracing purposes.
8661 * Logging of unhandled exceptions should be done with TraceKit.report,
8662 * which builds on top of TraceKit.computeStackTrace and provides better
8663 * IE support by utilizing the window.onerror event to retrieve information
8664 * about the top of the stack.
8665 *
8666 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8667 * so computeStackTrace instead walks its *own* chain of callers.
8668 * This means that:
8669 * * in Safari, some methods may be missing from the stack trace;
8670 * * in IE, the topmost function in the stack trace will always be the
8671 * caller of computeStackTrace.
8672 *
8673 * This is okay for tracing (because you are likely to be calling
8674 * computeStackTrace from the function you want to be the topmost element
8675 * of the stack trace anyway), but not okay for logging unhandled
8676 * exceptions (because your catch block will likely be far away from the
8677 * inner function that actually caused the exception).
8678 *
8679 */
8680 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8681 // Contents of Exception in various browsers.
8682 //
8683 // SAFARI:
8684 // ex.message = Can't find variable: qq
8685 // ex.line = 59
8686 // ex.sourceId = 580238192
8687 // ex.sourceURL = http://...
8688 // ex.expressionBeginOffset = 96
8689 // ex.expressionCaretOffset = 98
8690 // ex.expressionEndOffset = 98
8691 // ex.name = ReferenceError
8692 //
8693 // FIREFOX:
8694 // ex.message = qq is not defined
8695 // ex.fileName = http://...
8696 // ex.lineNumber = 59
8697 // ex.columnNumber = 69
8698 // ex.stack = ...stack trace... (see the example below)
8699 // ex.name = ReferenceError
8700 //
8701 // CHROME:
8702 // ex.message = qq is not defined
8703 // ex.name = ReferenceError
8704 // ex.type = not_defined
8705 // ex.arguments = ['aa']
8706 // ex.stack = ...stack trace...
8707 //
8708 // INTERNET EXPLORER:
8709 // ex.message = ...
8710 // ex.name = ReferenceError
8711 //
8712 // OPERA:
8713 // ex.message = ...message... (see the example below)
8714 // ex.name = ReferenceError
8715 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8716 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8717
8718 /**
8719 * Computes stack trace information from the stack property.
8720 * Chrome and Gecko use this property.
8721 * @param {Error} ex
8722 * @return {?Object.<string, *>} Stack trace information.
8723 */
8724 function computeStackTraceFromStackProp(ex) {
8725 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8726
8727 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8728 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8729 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8730 // Used to additionally parse URL/line/column from eval frames
8731 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8732 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8733 lines = ex.stack.split('\n'),
8734 stack = [],
8735 submatch,
8736 parts,
8737 element,
8738 reference = /^(.*) is undefined$/.exec(ex.message);
8739
8740 for (var i = 0, j = lines.length; i < j; ++i) {
8741 if ((parts = chrome.exec(lines[i]))) {
8742 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8743 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8744 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8745 // throw out eval line/column and use top-most line/column number
8746 parts[2] = submatch[1]; // url
8747 parts[3] = submatch[2]; // line
8748 parts[4] = submatch[3]; // column
8749 }
8750 element = {
8751 url: !isNative ? parts[2] : null,
8752 func: parts[1] || UNKNOWN_FUNCTION,
8753 args: isNative ? [parts[2]] : [],
8754 line: parts[3] ? +parts[3] : null,
8755 column: parts[4] ? +parts[4] : null
8756 };
8757 } else if ((parts = winjs.exec(lines[i]))) {
8758 element = {
8759 url: parts[2],
8760 func: parts[1] || UNKNOWN_FUNCTION,
8761 args: [],
8762 line: +parts[3],
8763 column: parts[4] ? +parts[4] : null
8764 };
8765 } else if ((parts = gecko.exec(lines[i]))) {
8766 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8767 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8768 // throw out eval line/column and use top-most line number
8769 parts[3] = submatch[1];
8770 parts[4] = submatch[2];
8771 parts[5] = null; // no column when eval
8772 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8773 // FireFox uses this awesome columnNumber property for its top frame
8774 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8775 // so adding 1
8776 // NOTE: this hack doesn't work if top-most frame is eval
8777 stack[0].column = ex.columnNumber + 1;
8778 }
8779 element = {
8780 url: parts[3],
8781 func: parts[1] || UNKNOWN_FUNCTION,
8782 args: parts[2] ? parts[2].split(',') : [],
8783 line: parts[4] ? +parts[4] : null,
8784 column: parts[5] ? +parts[5] : null
8785 };
8786 } else {
8787 continue;
8788 }
8789
8790 if (!element.func && element.line) {
8791 element.func = UNKNOWN_FUNCTION;
8792 }
8793
8794 stack.push(element);
8795 }
8796
8797 if (!stack.length) {
8798 return null;
8799 }
8800
8801 return {
8802 name: ex.name,
8803 message: ex.message,
8804 url: getLocationHref(),
8805 stack: stack
8806 };
8807 }
8808
8809 /**
8810 * Adds information about the first frame to incomplete stack traces.
8811 * Safari and IE require this to get complete data on the first frame.
8812 * @param {Object.<string, *>} stackInfo Stack trace information from
8813 * one of the compute* methods.
8814 * @param {string} url The URL of the script that caused an error.
8815 * @param {(number|string)} lineNo The line number of the script that
8816 * caused an error.
8817 * @param {string=} message The error generated by the browser, which
8818 * hopefully contains the name of the object that caused the error.
8819 * @return {boolean} Whether or not the stack information was
8820 * augmented.
8821 */
8822 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8823 var initial = {
8824 url: url,
8825 line: lineNo
8826 };
8827
8828 if (initial.url && initial.line) {
8829 stackInfo.incomplete = false;
8830
8831 if (!initial.func) {
8832 initial.func = UNKNOWN_FUNCTION;
8833 }
8834
8835 if (stackInfo.stack.length > 0) {
8836 if (stackInfo.stack[0].url === initial.url) {
8837 if (stackInfo.stack[0].line === initial.line) {
8838 return false; // already in stack trace
8839 } else if (
8840 !stackInfo.stack[0].line &&
8841 stackInfo.stack[0].func === initial.func
8842 ) {
8843 stackInfo.stack[0].line = initial.line;
8844 return false;
8845 }
8846 }
8847 }
8848
8849 stackInfo.stack.unshift(initial);
8850 stackInfo.partial = true;
8851 return true;
8852 } else {
8853 stackInfo.incomplete = true;
8854 }
8855
8856 return false;
8857 }
8858
8859 /**
8860 * Computes stack trace information by walking the arguments.caller
8861 * chain at the time the exception occurred. This will cause earlier
8862 * frames to be missed but is the only way to get any stack trace in
8863 * Safari and IE. The top frame is restored by
8864 * {@link augmentStackTraceWithInitialElement}.
8865 * @param {Error} ex
8866 * @return {?Object.<string, *>} Stack trace information.
8867 */
8868 function computeStackTraceByWalkingCallerChain(ex, depth) {
8869 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8870 stack = [],
8871 funcs = {},
8872 recursion = false,
8873 parts,
8874 item,
8875 source;
8876
8877 for (
8878 var curr = computeStackTraceByWalkingCallerChain.caller;
8879 curr && !recursion;
8880 curr = curr.caller
8881 ) {
8882 if (curr === computeStackTrace || curr === TraceKit.report) {
8883 // console.log('skipping internal function');
8884 continue;
8885 }
8886
8887 item = {
8888 url: null,
8889 func: UNKNOWN_FUNCTION,
8890 line: null,
8891 column: null
8892 };
8893
8894 if (curr.name) {
8895 item.func = curr.name;
8896 } else if ((parts = functionName.exec(curr.toString()))) {
8897 item.func = parts[1];
8898 }
8899
8900 if (typeof item.func === 'undefined') {
8901 try {
8902 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8903 } catch (e) {}
8904 }
8905
8906 if (funcs['' + curr]) {
8907 recursion = true;
8908 } else {
8909 funcs['' + curr] = true;
8910 }
8911
8912 stack.push(item);
8913 }
8914
8915 if (depth) {
8916 // console.log('depth is ' + depth);
8917 // console.log('stack is ' + stack.length);
8918 stack.splice(0, depth);
8919 }
8920
8921 var result = {
8922 name: ex.name,
8923 message: ex.message,
8924 url: getLocationHref(),
8925 stack: stack
8926 };
8927 augmentStackTraceWithInitialElement(
8928 result,
8929 ex.sourceURL || ex.fileName,
8930 ex.line || ex.lineNumber,
8931 ex.message || ex.description
8932 );
8933 return result;
8934 }
8935
8936 /**
8937 * Computes a stack trace for an exception.
8938 * @param {Error} ex
8939 * @param {(string|number)=} depth
8940 */
8941 function computeStackTrace(ex, depth) {
8942 var stack = null;
8943 depth = depth == null ? 0 : +depth;
8944
8945 try {
8946 stack = computeStackTraceFromStackProp(ex);
8947 if (stack) {
8948 return stack;
8949 }
8950 } catch (e) {
8951 if (TraceKit.debug) {
8952 throw e;
8953 }
8954 }
8955
8956 try {
8957 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8958 if (stack) {
8959 return stack;
8960 }
8961 } catch (e) {
8962 if (TraceKit.debug) {
8963 throw e;
8964 }
8965 }
8966 return {
8967 name: ex.name,
8968 message: ex.message,
8969 url: getLocationHref()
8970 };
8971 }
8972
8973 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8974 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8975
8976 return computeStackTrace;
8977 })();
8978
8979 module.exports = TraceKit;
8980
8981
8982 /***/ }),
8983
8984 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8985 /*!***********************************************************************!*\
8986 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8987 \***********************************************************************/
8988 /***/ ((module, exports) => {
8989
8990 /*
8991 json-stringify-safe
8992 Like JSON.stringify, but doesn't throw on circular references.
8993
8994 Originally forked from https://github.com/isaacs/json-stringify-safe
8995 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8996 and IE8 compatibility. Tests for this are in test/vendor.
8997
8998 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8999 */
9000
9001 exports = module.exports = stringify;
9002 exports.getSerialize = serializer;
9003
9004 function indexOf(haystack, needle) {
9005 for (var i = 0; i < haystack.length; ++i) {
9006 if (haystack[i] === needle) return i;
9007 }
9008 return -1;
9009 }
9010
9011 function stringify(obj, replacer, spaces, cycleReplacer) {
9012 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
9013 }
9014
9015 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
9016 function stringifyError(value) {
9017 var err = {
9018 // These properties are implemented as magical getters and don't show up in for in
9019 stack: value.stack,
9020 message: value.message,
9021 name: value.name
9022 };
9023
9024 for (var i in value) {
9025 if (Object.prototype.hasOwnProperty.call(value, i)) {
9026 err[i] = value[i];
9027 }
9028 }
9029
9030 return err;
9031 }
9032
9033 function serializer(replacer, cycleReplacer) {
9034 var stack = [];
9035 var keys = [];
9036
9037 if (cycleReplacer == null) {
9038 cycleReplacer = function(key, value) {
9039 if (stack[0] === value) {
9040 return '[Circular ~]';
9041 }
9042 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
9043 };
9044 }
9045
9046 return function(key, value) {
9047 if (stack.length > 0) {
9048 var thisPos = indexOf(stack, this);
9049 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
9050 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
9051
9052 if (~indexOf(stack, value)) {
9053 value = cycleReplacer.call(this, key, value);
9054 }
9055 } else {
9056 stack.push(value);
9057 }
9058
9059 return replacer == null
9060 ? value instanceof Error ? stringifyError(value) : value
9061 : replacer.call(this, key, value);
9062 };
9063 }
9064
9065
9066 /***/ }),
9067
9068 /***/ "./node_modules/react-is/cjs/react-is.development.js":
9069 /*!***********************************************************!*\
9070 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
9071 \***********************************************************/
9072 /***/ ((__unused_webpack_module, exports) => {
9073
9074 "use strict";
9075 /** @license React v16.13.1
9076 * react-is.development.js
9077 *
9078 * Copyright (c) Facebook, Inc. and its affiliates.
9079 *
9080 * This source code is licensed under the MIT license found in the
9081 * LICENSE file in the root directory of this source tree.
9082 */
9083
9084
9085
9086
9087
9088 if (true) {
9089 (function() {
9090 'use strict';
9091
9092 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
9093 // nor polyfill, then a plain number is used for performance.
9094 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
9095 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
9096 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
9097 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
9098 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
9099 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
9100 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
9101 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
9102 // (unstable) APIs that have been removed. Can we remove the symbols?
9103
9104 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
9105 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
9106 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
9107 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
9108 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
9109 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
9110 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
9111 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
9112 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
9113 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
9114 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
9115
9116 function isValidElementType(type) {
9117 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
9118 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);
9119 }
9120
9121 function typeOf(object) {
9122 if (typeof object === 'object' && object !== null) {
9123 var $$typeof = object.$$typeof;
9124
9125 switch ($$typeof) {
9126 case REACT_ELEMENT_TYPE:
9127 var type = object.type;
9128
9129 switch (type) {
9130 case REACT_ASYNC_MODE_TYPE:
9131 case REACT_CONCURRENT_MODE_TYPE:
9132 case REACT_FRAGMENT_TYPE:
9133 case REACT_PROFILER_TYPE:
9134 case REACT_STRICT_MODE_TYPE:
9135 case REACT_SUSPENSE_TYPE:
9136 return type;
9137
9138 default:
9139 var $$typeofType = type && type.$$typeof;
9140
9141 switch ($$typeofType) {
9142 case REACT_CONTEXT_TYPE:
9143 case REACT_FORWARD_REF_TYPE:
9144 case REACT_LAZY_TYPE:
9145 case REACT_MEMO_TYPE:
9146 case REACT_PROVIDER_TYPE:
9147 return $$typeofType;
9148
9149 default:
9150 return $$typeof;
9151 }
9152
9153 }
9154
9155 case REACT_PORTAL_TYPE:
9156 return $$typeof;
9157 }
9158 }
9159
9160 return undefined;
9161 } // AsyncMode is deprecated along with isAsyncMode
9162
9163 var AsyncMode = REACT_ASYNC_MODE_TYPE;
9164 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
9165 var ContextConsumer = REACT_CONTEXT_TYPE;
9166 var ContextProvider = REACT_PROVIDER_TYPE;
9167 var Element = REACT_ELEMENT_TYPE;
9168 var ForwardRef = REACT_FORWARD_REF_TYPE;
9169 var Fragment = REACT_FRAGMENT_TYPE;
9170 var Lazy = REACT_LAZY_TYPE;
9171 var Memo = REACT_MEMO_TYPE;
9172 var Portal = REACT_PORTAL_TYPE;
9173 var Profiler = REACT_PROFILER_TYPE;
9174 var StrictMode = REACT_STRICT_MODE_TYPE;
9175 var Suspense = REACT_SUSPENSE_TYPE;
9176 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
9177
9178 function isAsyncMode(object) {
9179 {
9180 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
9181 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
9182
9183 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.');
9184 }
9185 }
9186
9187 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
9188 }
9189 function isConcurrentMode(object) {
9190 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
9191 }
9192 function isContextConsumer(object) {
9193 return typeOf(object) === REACT_CONTEXT_TYPE;
9194 }
9195 function isContextProvider(object) {
9196 return typeOf(object) === REACT_PROVIDER_TYPE;
9197 }
9198 function isElement(object) {
9199 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9200 }
9201 function isForwardRef(object) {
9202 return typeOf(object) === REACT_FORWARD_REF_TYPE;
9203 }
9204 function isFragment(object) {
9205 return typeOf(object) === REACT_FRAGMENT_TYPE;
9206 }
9207 function isLazy(object) {
9208 return typeOf(object) === REACT_LAZY_TYPE;
9209 }
9210 function isMemo(object) {
9211 return typeOf(object) === REACT_MEMO_TYPE;
9212 }
9213 function isPortal(object) {
9214 return typeOf(object) === REACT_PORTAL_TYPE;
9215 }
9216 function isProfiler(object) {
9217 return typeOf(object) === REACT_PROFILER_TYPE;
9218 }
9219 function isStrictMode(object) {
9220 return typeOf(object) === REACT_STRICT_MODE_TYPE;
9221 }
9222 function isSuspense(object) {
9223 return typeOf(object) === REACT_SUSPENSE_TYPE;
9224 }
9225
9226 exports.AsyncMode = AsyncMode;
9227 exports.ConcurrentMode = ConcurrentMode;
9228 exports.ContextConsumer = ContextConsumer;
9229 exports.ContextProvider = ContextProvider;
9230 exports.Element = Element;
9231 exports.ForwardRef = ForwardRef;
9232 exports.Fragment = Fragment;
9233 exports.Lazy = Lazy;
9234 exports.Memo = Memo;
9235 exports.Portal = Portal;
9236 exports.Profiler = Profiler;
9237 exports.StrictMode = StrictMode;
9238 exports.Suspense = Suspense;
9239 exports.isAsyncMode = isAsyncMode;
9240 exports.isConcurrentMode = isConcurrentMode;
9241 exports.isContextConsumer = isContextConsumer;
9242 exports.isContextProvider = isContextProvider;
9243 exports.isElement = isElement;
9244 exports.isForwardRef = isForwardRef;
9245 exports.isFragment = isFragment;
9246 exports.isLazy = isLazy;
9247 exports.isMemo = isMemo;
9248 exports.isPortal = isPortal;
9249 exports.isProfiler = isProfiler;
9250 exports.isStrictMode = isStrictMode;
9251 exports.isSuspense = isSuspense;
9252 exports.isValidElementType = isValidElementType;
9253 exports.typeOf = typeOf;
9254 })();
9255 }
9256
9257
9258 /***/ }),
9259
9260 /***/ "./node_modules/react-is/index.js":
9261 /*!****************************************!*\
9262 !*** ./node_modules/react-is/index.js ***!
9263 \****************************************/
9264 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9265
9266 "use strict";
9267
9268
9269 if (false) {} else {
9270 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
9271 }
9272
9273
9274 /***/ }),
9275
9276 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
9277 /*!*****************************************************************!*\
9278 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
9279 \*****************************************************************/
9280 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9281
9282 "use strict";
9283 /**
9284 * @license React
9285 * react-jsx-runtime.development.js
9286 *
9287 * Copyright (c) Facebook, Inc. and its affiliates.
9288 *
9289 * This source code is licensed under the MIT license found in the
9290 * LICENSE file in the root directory of this source tree.
9291 */
9292
9293
9294
9295 if (true) {
9296 (function() {
9297 'use strict';
9298
9299 var React = __webpack_require__(/*! react */ "react");
9300
9301 // ATTENTION
9302 // When adding new symbols to this file,
9303 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
9304 // The Symbol used to tag the ReactElement-like types.
9305 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
9306 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
9307 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
9308 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
9309 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
9310 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
9311 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
9312 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
9313 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
9314 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
9315 var REACT_MEMO_TYPE = Symbol.for('react.memo');
9316 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
9317 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
9318 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
9319 var FAUX_ITERATOR_SYMBOL = '@@iterator';
9320 function getIteratorFn(maybeIterable) {
9321 if (maybeIterable === null || typeof maybeIterable !== 'object') {
9322 return null;
9323 }
9324
9325 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
9326
9327 if (typeof maybeIterator === 'function') {
9328 return maybeIterator;
9329 }
9330
9331 return null;
9332 }
9333
9334 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9335
9336 function error(format) {
9337 {
9338 {
9339 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9340 args[_key2 - 1] = arguments[_key2];
9341 }
9342
9343 printWarning('error', format, args);
9344 }
9345 }
9346 }
9347
9348 function printWarning(level, format, args) {
9349 // When changing this logic, you might want to also
9350 // update consoleWithStackDev.www.js as well.
9351 {
9352 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9353 var stack = ReactDebugCurrentFrame.getStackAddendum();
9354
9355 if (stack !== '') {
9356 format += '%s';
9357 args = args.concat([stack]);
9358 } // eslint-disable-next-line react-internal/safe-string-coercion
9359
9360
9361 var argsWithFormat = args.map(function (item) {
9362 return String(item);
9363 }); // Careful: RN currently depends on this prefix
9364
9365 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9366 // breaks IE9: https://github.com/facebook/react/issues/13610
9367 // eslint-disable-next-line react-internal/no-production-logging
9368
9369 Function.prototype.apply.call(console[level], console, argsWithFormat);
9370 }
9371 }
9372
9373 // -----------------------------------------------------------------------------
9374
9375 var enableScopeAPI = false; // Experimental Create Event Handle API.
9376 var enableCacheElement = false;
9377 var enableTransitionTracing = false; // No known bugs, but needs performance testing
9378
9379 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
9380 // stuff. Intended to enable React core members to more easily debug scheduling
9381 // issues in DEV builds.
9382
9383 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
9384
9385 var REACT_MODULE_REFERENCE;
9386
9387 {
9388 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
9389 }
9390
9391 function isValidElementType(type) {
9392 if (typeof type === 'string' || typeof type === 'function') {
9393 return true;
9394 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9395
9396
9397 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
9398 return true;
9399 }
9400
9401 if (typeof type === 'object' && type !== null) {
9402 if (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 || // This needs to include all possible module reference object
9403 // types supported by any Flight configuration anywhere since
9404 // we don't know which Flight build this will end up being used
9405 // with.
9406 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
9407 return true;
9408 }
9409 }
9410
9411 return false;
9412 }
9413
9414 function getWrappedName(outerType, innerType, wrapperName) {
9415 var displayName = outerType.displayName;
9416
9417 if (displayName) {
9418 return displayName;
9419 }
9420
9421 var functionName = innerType.displayName || innerType.name || '';
9422 return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
9423 } // Keep in sync with react-reconciler/getComponentNameFromFiber
9424
9425
9426 function getContextName(type) {
9427 return type.displayName || 'Context';
9428 } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
9429
9430
9431 function getComponentNameFromType(type) {
9432 if (type == null) {
9433 // Host root, text node or just invalid type.
9434 return null;
9435 }
9436
9437 {
9438 if (typeof type.tag === 'number') {
9439 error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
9440 }
9441 }
9442
9443 if (typeof type === 'function') {
9444 return type.displayName || type.name || null;
9445 }
9446
9447 if (typeof type === 'string') {
9448 return type;
9449 }
9450
9451 switch (type) {
9452 case REACT_FRAGMENT_TYPE:
9453 return 'Fragment';
9454
9455 case REACT_PORTAL_TYPE:
9456 return 'Portal';
9457
9458 case REACT_PROFILER_TYPE:
9459 return 'Profiler';
9460
9461 case REACT_STRICT_MODE_TYPE:
9462 return 'StrictMode';
9463
9464 case REACT_SUSPENSE_TYPE:
9465 return 'Suspense';
9466
9467 case REACT_SUSPENSE_LIST_TYPE:
9468 return 'SuspenseList';
9469
9470 }
9471
9472 if (typeof type === 'object') {
9473 switch (type.$$typeof) {
9474 case REACT_CONTEXT_TYPE:
9475 var context = type;
9476 return getContextName(context) + '.Consumer';
9477
9478 case REACT_PROVIDER_TYPE:
9479 var provider = type;
9480 return getContextName(provider._context) + '.Provider';
9481
9482 case REACT_FORWARD_REF_TYPE:
9483 return getWrappedName(type, type.render, 'ForwardRef');
9484
9485 case REACT_MEMO_TYPE:
9486 var outerName = type.displayName || null;
9487
9488 if (outerName !== null) {
9489 return outerName;
9490 }
9491
9492 return getComponentNameFromType(type.type) || 'Memo';
9493
9494 case REACT_LAZY_TYPE:
9495 {
9496 var lazyComponent = type;
9497 var payload = lazyComponent._payload;
9498 var init = lazyComponent._init;
9499
9500 try {
9501 return getComponentNameFromType(init(payload));
9502 } catch (x) {
9503 return null;
9504 }
9505 }
9506
9507 // eslint-disable-next-line no-fallthrough
9508 }
9509 }
9510
9511 return null;
9512 }
9513
9514 var assign = Object.assign;
9515
9516 // Helpers to patch console.logs to avoid logging during side-effect free
9517 // replaying on render function. This currently only patches the object
9518 // lazily which won't cover if the log function was extracted eagerly.
9519 // We could also eagerly patch the method.
9520 var disabledDepth = 0;
9521 var prevLog;
9522 var prevInfo;
9523 var prevWarn;
9524 var prevError;
9525 var prevGroup;
9526 var prevGroupCollapsed;
9527 var prevGroupEnd;
9528
9529 function disabledLog() {}
9530
9531 disabledLog.__reactDisabledLog = true;
9532 function disableLogs() {
9533 {
9534 if (disabledDepth === 0) {
9535 /* eslint-disable react-internal/no-production-logging */
9536 prevLog = console.log;
9537 prevInfo = console.info;
9538 prevWarn = console.warn;
9539 prevError = console.error;
9540 prevGroup = console.group;
9541 prevGroupCollapsed = console.groupCollapsed;
9542 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9543
9544 var props = {
9545 configurable: true,
9546 enumerable: true,
9547 value: disabledLog,
9548 writable: true
9549 }; // $FlowFixMe Flow thinks console is immutable.
9550
9551 Object.defineProperties(console, {
9552 info: props,
9553 log: props,
9554 warn: props,
9555 error: props,
9556 group: props,
9557 groupCollapsed: props,
9558 groupEnd: props
9559 });
9560 /* eslint-enable react-internal/no-production-logging */
9561 }
9562
9563 disabledDepth++;
9564 }
9565 }
9566 function reenableLogs() {
9567 {
9568 disabledDepth--;
9569
9570 if (disabledDepth === 0) {
9571 /* eslint-disable react-internal/no-production-logging */
9572 var props = {
9573 configurable: true,
9574 enumerable: true,
9575 writable: true
9576 }; // $FlowFixMe Flow thinks console is immutable.
9577
9578 Object.defineProperties(console, {
9579 log: assign({}, props, {
9580 value: prevLog
9581 }),
9582 info: assign({}, props, {
9583 value: prevInfo
9584 }),
9585 warn: assign({}, props, {
9586 value: prevWarn
9587 }),
9588 error: assign({}, props, {
9589 value: prevError
9590 }),
9591 group: assign({}, props, {
9592 value: prevGroup
9593 }),
9594 groupCollapsed: assign({}, props, {
9595 value: prevGroupCollapsed
9596 }),
9597 groupEnd: assign({}, props, {
9598 value: prevGroupEnd
9599 })
9600 });
9601 /* eslint-enable react-internal/no-production-logging */
9602 }
9603
9604 if (disabledDepth < 0) {
9605 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9606 }
9607 }
9608 }
9609
9610 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9611 var prefix;
9612 function describeBuiltInComponentFrame(name, source, ownerFn) {
9613 {
9614 if (prefix === undefined) {
9615 // Extract the VM specific prefix used by each line.
9616 try {
9617 throw Error();
9618 } catch (x) {
9619 var match = x.stack.trim().match(/\n( *(at )?)/);
9620 prefix = match && match[1] || '';
9621 }
9622 } // We use the prefix to ensure our stacks line up with native stack frames.
9623
9624
9625 return '\n' + prefix + name;
9626 }
9627 }
9628 var reentry = false;
9629 var componentFrameCache;
9630
9631 {
9632 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9633 componentFrameCache = new PossiblyWeakMap();
9634 }
9635
9636 function describeNativeComponentFrame(fn, construct) {
9637 // If something asked for a stack inside a fake render, it should get ignored.
9638 if ( !fn || reentry) {
9639 return '';
9640 }
9641
9642 {
9643 var frame = componentFrameCache.get(fn);
9644
9645 if (frame !== undefined) {
9646 return frame;
9647 }
9648 }
9649
9650 var control;
9651 reentry = true;
9652 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9653
9654 Error.prepareStackTrace = undefined;
9655 var previousDispatcher;
9656
9657 {
9658 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9659 // for warnings.
9660
9661 ReactCurrentDispatcher.current = null;
9662 disableLogs();
9663 }
9664
9665 try {
9666 // This should throw.
9667 if (construct) {
9668 // Something should be setting the props in the constructor.
9669 var Fake = function () {
9670 throw Error();
9671 }; // $FlowFixMe
9672
9673
9674 Object.defineProperty(Fake.prototype, 'props', {
9675 set: function () {
9676 // We use a throwing setter instead of frozen or non-writable props
9677 // because that won't throw in a non-strict mode function.
9678 throw Error();
9679 }
9680 });
9681
9682 if (typeof Reflect === 'object' && Reflect.construct) {
9683 // We construct a different control for this case to include any extra
9684 // frames added by the construct call.
9685 try {
9686 Reflect.construct(Fake, []);
9687 } catch (x) {
9688 control = x;
9689 }
9690
9691 Reflect.construct(fn, [], Fake);
9692 } else {
9693 try {
9694 Fake.call();
9695 } catch (x) {
9696 control = x;
9697 }
9698
9699 fn.call(Fake.prototype);
9700 }
9701 } else {
9702 try {
9703 throw Error();
9704 } catch (x) {
9705 control = x;
9706 }
9707
9708 fn();
9709 }
9710 } catch (sample) {
9711 // This is inlined manually because closure doesn't do it for us.
9712 if (sample && control && typeof sample.stack === 'string') {
9713 // This extracts the first frame from the sample that isn't also in the control.
9714 // Skipping one frame that we assume is the frame that calls the two.
9715 var sampleLines = sample.stack.split('\n');
9716 var controlLines = control.stack.split('\n');
9717 var s = sampleLines.length - 1;
9718 var c = controlLines.length - 1;
9719
9720 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9721 // We expect at least one stack frame to be shared.
9722 // Typically this will be the root most one. However, stack frames may be
9723 // cut off due to maximum stack limits. In this case, one maybe cut off
9724 // earlier than the other. We assume that the sample is longer or the same
9725 // and there for cut off earlier. So we should find the root most frame in
9726 // the sample somewhere in the control.
9727 c--;
9728 }
9729
9730 for (; s >= 1 && c >= 0; s--, c--) {
9731 // Next we find the first one that isn't the same which should be the
9732 // frame that called our sample function and the control.
9733 if (sampleLines[s] !== controlLines[c]) {
9734 // In V8, the first line is describing the message but other VMs don't.
9735 // If we're about to return the first line, and the control is also on the same
9736 // line, that's a pretty good indicator that our sample threw at same line as
9737 // the control. I.e. before we entered the sample frame. So we ignore this result.
9738 // This can happen if you passed a class to function component, or non-function.
9739 if (s !== 1 || c !== 1) {
9740 do {
9741 s--;
9742 c--; // We may still have similar intermediate frames from the construct call.
9743 // The next one that isn't the same should be our match though.
9744
9745 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9746 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9747 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
9748 // but we have a user-provided "displayName"
9749 // splice it in to make the stack more readable.
9750
9751
9752 if (fn.displayName && _frame.includes('<anonymous>')) {
9753 _frame = _frame.replace('<anonymous>', fn.displayName);
9754 }
9755
9756 {
9757 if (typeof fn === 'function') {
9758 componentFrameCache.set(fn, _frame);
9759 }
9760 } // Return the line we found.
9761
9762
9763 return _frame;
9764 }
9765 } while (s >= 1 && c >= 0);
9766 }
9767
9768 break;
9769 }
9770 }
9771 }
9772 } finally {
9773 reentry = false;
9774
9775 {
9776 ReactCurrentDispatcher.current = previousDispatcher;
9777 reenableLogs();
9778 }
9779
9780 Error.prepareStackTrace = previousPrepareStackTrace;
9781 } // Fallback to just using the name if we couldn't make it throw.
9782
9783
9784 var name = fn ? fn.displayName || fn.name : '';
9785 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9786
9787 {
9788 if (typeof fn === 'function') {
9789 componentFrameCache.set(fn, syntheticFrame);
9790 }
9791 }
9792
9793 return syntheticFrame;
9794 }
9795 function describeFunctionComponentFrame(fn, source, ownerFn) {
9796 {
9797 return describeNativeComponentFrame(fn, false);
9798 }
9799 }
9800
9801 function shouldConstruct(Component) {
9802 var prototype = Component.prototype;
9803 return !!(prototype && prototype.isReactComponent);
9804 }
9805
9806 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9807
9808 if (type == null) {
9809 return '';
9810 }
9811
9812 if (typeof type === 'function') {
9813 {
9814 return describeNativeComponentFrame(type, shouldConstruct(type));
9815 }
9816 }
9817
9818 if (typeof type === 'string') {
9819 return describeBuiltInComponentFrame(type);
9820 }
9821
9822 switch (type) {
9823 case REACT_SUSPENSE_TYPE:
9824 return describeBuiltInComponentFrame('Suspense');
9825
9826 case REACT_SUSPENSE_LIST_TYPE:
9827 return describeBuiltInComponentFrame('SuspenseList');
9828 }
9829
9830 if (typeof type === 'object') {
9831 switch (type.$$typeof) {
9832 case REACT_FORWARD_REF_TYPE:
9833 return describeFunctionComponentFrame(type.render);
9834
9835 case REACT_MEMO_TYPE:
9836 // Memo may contain any component type so we recursively resolve it.
9837 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9838
9839 case REACT_LAZY_TYPE:
9840 {
9841 var lazyComponent = type;
9842 var payload = lazyComponent._payload;
9843 var init = lazyComponent._init;
9844
9845 try {
9846 // Lazy may contain any component type so we recursively resolve it.
9847 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9848 } catch (x) {}
9849 }
9850 }
9851 }
9852
9853 return '';
9854 }
9855
9856 var hasOwnProperty = Object.prototype.hasOwnProperty;
9857
9858 var loggedTypeFailures = {};
9859 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9860
9861 function setCurrentlyValidatingElement(element) {
9862 {
9863 if (element) {
9864 var owner = element._owner;
9865 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9866 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9867 } else {
9868 ReactDebugCurrentFrame.setExtraStackFrame(null);
9869 }
9870 }
9871 }
9872
9873 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9874 {
9875 // $FlowFixMe This is okay but Flow doesn't know it.
9876 var has = Function.call.bind(hasOwnProperty);
9877
9878 for (var typeSpecName in typeSpecs) {
9879 if (has(typeSpecs, typeSpecName)) {
9880 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9881 // fail the render phase where it didn't fail before. So we log it.
9882 // After these have been cleaned up, we'll let them throw.
9883
9884 try {
9885 // This is intentionally an invariant that gets caught. It's the same
9886 // behavior as without this statement except with a better message.
9887 if (typeof typeSpecs[typeSpecName] !== 'function') {
9888 // eslint-disable-next-line react-internal/prod-error-codes
9889 var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
9890 err.name = 'Invariant Violation';
9891 throw err;
9892 }
9893
9894 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9895 } catch (ex) {
9896 error$1 = ex;
9897 }
9898
9899 if (error$1 && !(error$1 instanceof Error)) {
9900 setCurrentlyValidatingElement(element);
9901
9902 error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
9903
9904 setCurrentlyValidatingElement(null);
9905 }
9906
9907 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9908 // Only monitor this failure once because there tends to be a lot of the
9909 // same error.
9910 loggedTypeFailures[error$1.message] = true;
9911 setCurrentlyValidatingElement(element);
9912
9913 error('Failed %s type: %s', location, error$1.message);
9914
9915 setCurrentlyValidatingElement(null);
9916 }
9917 }
9918 }
9919 }
9920 }
9921
9922 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
9923
9924 function isArray(a) {
9925 return isArrayImpl(a);
9926 }
9927
9928 /*
9929 * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
9930 * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
9931 *
9932 * The functions in this module will throw an easier-to-understand,
9933 * easier-to-debug exception with a clear errors message message explaining the
9934 * problem. (Instead of a confusing exception thrown inside the implementation
9935 * of the `value` object).
9936 */
9937 // $FlowFixMe only called in DEV, so void return is not possible.
9938 function typeName(value) {
9939 {
9940 // toStringTag is needed for namespaced types like Temporal.Instant
9941 var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
9942 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
9943 return type;
9944 }
9945 } // $FlowFixMe only called in DEV, so void return is not possible.
9946
9947
9948 function willCoercionThrow(value) {
9949 {
9950 try {
9951 testStringCoercion(value);
9952 return false;
9953 } catch (e) {
9954 return true;
9955 }
9956 }
9957 }
9958
9959 function testStringCoercion(value) {
9960 // If you ended up here by following an exception call stack, here's what's
9961 // happened: you supplied an object or symbol value to React (as a prop, key,
9962 // DOM attribute, CSS property, string ref, etc.) and when React tried to
9963 // coerce it to a string using `'' + value`, an exception was thrown.
9964 //
9965 // The most common types that will cause this exception are `Symbol` instances
9966 // and Temporal objects like `Temporal.Instant`. But any object that has a
9967 // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
9968 // exception. (Library authors do this to prevent users from using built-in
9969 // numeric operators like `+` or comparison operators like `>=` because custom
9970 // methods are needed to perform accurate arithmetic or comparison.)
9971 //
9972 // To fix the problem, coerce this object or symbol value to a string before
9973 // passing it to React. The most reliable way is usually `String(value)`.
9974 //
9975 // To find which value is throwing, check the browser or debugger console.
9976 // Before this exception was thrown, there should be `console.error` output
9977 // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
9978 // problem and how that type was used: key, atrribute, input value prop, etc.
9979 // In most cases, this console output also shows the component and its
9980 // ancestor components where the exception happened.
9981 //
9982 // eslint-disable-next-line react-internal/safe-string-coercion
9983 return '' + value;
9984 }
9985 function checkKeyStringCoercion(value) {
9986 {
9987 if (willCoercionThrow(value)) {
9988 error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
9989
9990 return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
9991 }
9992 }
9993 }
9994
9995 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9996 var RESERVED_PROPS = {
9997 key: true,
9998 ref: true,
9999 __self: true,
10000 __source: true
10001 };
10002 var specialPropKeyWarningShown;
10003 var specialPropRefWarningShown;
10004 var didWarnAboutStringRefs;
10005
10006 {
10007 didWarnAboutStringRefs = {};
10008 }
10009
10010 function hasValidRef(config) {
10011 {
10012 if (hasOwnProperty.call(config, 'ref')) {
10013 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
10014
10015 if (getter && getter.isReactWarning) {
10016 return false;
10017 }
10018 }
10019 }
10020
10021 return config.ref !== undefined;
10022 }
10023
10024 function hasValidKey(config) {
10025 {
10026 if (hasOwnProperty.call(config, 'key')) {
10027 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
10028
10029 if (getter && getter.isReactWarning) {
10030 return false;
10031 }
10032 }
10033 }
10034
10035 return config.key !== undefined;
10036 }
10037
10038 function warnIfStringRefCannotBeAutoConverted(config, self) {
10039 {
10040 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
10041 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
10042
10043 if (!didWarnAboutStringRefs[componentName]) {
10044 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
10045
10046 didWarnAboutStringRefs[componentName] = true;
10047 }
10048 }
10049 }
10050 }
10051
10052 function defineKeyPropWarningGetter(props, displayName) {
10053 {
10054 var warnAboutAccessingKey = function () {
10055 if (!specialPropKeyWarningShown) {
10056 specialPropKeyWarningShown = true;
10057
10058 error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
10059 }
10060 };
10061
10062 warnAboutAccessingKey.isReactWarning = true;
10063 Object.defineProperty(props, 'key', {
10064 get: warnAboutAccessingKey,
10065 configurable: true
10066 });
10067 }
10068 }
10069
10070 function defineRefPropWarningGetter(props, displayName) {
10071 {
10072 var warnAboutAccessingRef = function () {
10073 if (!specialPropRefWarningShown) {
10074 specialPropRefWarningShown = true;
10075
10076 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
10077 }
10078 };
10079
10080 warnAboutAccessingRef.isReactWarning = true;
10081 Object.defineProperty(props, 'ref', {
10082 get: warnAboutAccessingRef,
10083 configurable: true
10084 });
10085 }
10086 }
10087 /**
10088 * Factory method to create a new React element. This no longer adheres to
10089 * the class pattern, so do not use new to call it. Also, instanceof check
10090 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
10091 * if something is a React Element.
10092 *
10093 * @param {*} type
10094 * @param {*} props
10095 * @param {*} key
10096 * @param {string|object} ref
10097 * @param {*} owner
10098 * @param {*} self A *temporary* helper to detect places where `this` is
10099 * different from the `owner` when React.createElement is called, so that we
10100 * can warn. We want to get rid of owner and replace string `ref`s with arrow
10101 * functions, and as long as `this` and owner are the same, there will be no
10102 * change in behavior.
10103 * @param {*} source An annotation object (added by a transpiler or otherwise)
10104 * indicating filename, line number, and/or other information.
10105 * @internal
10106 */
10107
10108
10109 var ReactElement = function (type, key, ref, self, source, owner, props) {
10110 var element = {
10111 // This tag allows us to uniquely identify this as a React Element
10112 $$typeof: REACT_ELEMENT_TYPE,
10113 // Built-in properties that belong on the element
10114 type: type,
10115 key: key,
10116 ref: ref,
10117 props: props,
10118 // Record the component responsible for creating this element.
10119 _owner: owner
10120 };
10121
10122 {
10123 // The validation flag is currently mutative. We put it on
10124 // an external backing store so that we can freeze the whole object.
10125 // This can be replaced with a WeakMap once they are implemented in
10126 // commonly used development environments.
10127 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
10128 // the validation flag non-enumerable (where possible, which should
10129 // include every environment we run tests in), so the test framework
10130 // ignores it.
10131
10132 Object.defineProperty(element._store, 'validated', {
10133 configurable: false,
10134 enumerable: false,
10135 writable: true,
10136 value: false
10137 }); // self and source are DEV only properties.
10138
10139 Object.defineProperty(element, '_self', {
10140 configurable: false,
10141 enumerable: false,
10142 writable: false,
10143 value: self
10144 }); // Two elements created in two different places should be considered
10145 // equal for testing purposes and therefore we hide it from enumeration.
10146
10147 Object.defineProperty(element, '_source', {
10148 configurable: false,
10149 enumerable: false,
10150 writable: false,
10151 value: source
10152 });
10153
10154 if (Object.freeze) {
10155 Object.freeze(element.props);
10156 Object.freeze(element);
10157 }
10158 }
10159
10160 return element;
10161 };
10162 /**
10163 * https://github.com/reactjs/rfcs/pull/107
10164 * @param {*} type
10165 * @param {object} props
10166 * @param {string} key
10167 */
10168
10169 function jsxDEV(type, config, maybeKey, source, self) {
10170 {
10171 var propName; // Reserved names are extracted
10172
10173 var props = {};
10174 var key = null;
10175 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
10176 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
10177 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
10178 // but as an intermediary step, we will use jsxDEV for everything except
10179 // <div {...props} key="Hi" />, because we aren't currently able to tell if
10180 // key is explicitly declared to be undefined or not.
10181
10182 if (maybeKey !== undefined) {
10183 {
10184 checkKeyStringCoercion(maybeKey);
10185 }
10186
10187 key = '' + maybeKey;
10188 }
10189
10190 if (hasValidKey(config)) {
10191 {
10192 checkKeyStringCoercion(config.key);
10193 }
10194
10195 key = '' + config.key;
10196 }
10197
10198 if (hasValidRef(config)) {
10199 ref = config.ref;
10200 warnIfStringRefCannotBeAutoConverted(config, self);
10201 } // Remaining properties are added to a new props object
10202
10203
10204 for (propName in config) {
10205 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
10206 props[propName] = config[propName];
10207 }
10208 } // Resolve default props
10209
10210
10211 if (type && type.defaultProps) {
10212 var defaultProps = type.defaultProps;
10213
10214 for (propName in defaultProps) {
10215 if (props[propName] === undefined) {
10216 props[propName] = defaultProps[propName];
10217 }
10218 }
10219 }
10220
10221 if (key || ref) {
10222 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
10223
10224 if (key) {
10225 defineKeyPropWarningGetter(props, displayName);
10226 }
10227
10228 if (ref) {
10229 defineRefPropWarningGetter(props, displayName);
10230 }
10231 }
10232
10233 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
10234 }
10235 }
10236
10237 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
10238 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
10239
10240 function setCurrentlyValidatingElement$1(element) {
10241 {
10242 if (element) {
10243 var owner = element._owner;
10244 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
10245 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
10246 } else {
10247 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
10248 }
10249 }
10250 }
10251
10252 var propTypesMisspellWarningShown;
10253
10254 {
10255 propTypesMisspellWarningShown = false;
10256 }
10257 /**
10258 * Verifies the object is a ReactElement.
10259 * See https://reactjs.org/docs/react-api.html#isvalidelement
10260 * @param {?object} object
10261 * @return {boolean} True if `object` is a ReactElement.
10262 * @final
10263 */
10264
10265
10266 function isValidElement(object) {
10267 {
10268 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
10269 }
10270 }
10271
10272 function getDeclarationErrorAddendum() {
10273 {
10274 if (ReactCurrentOwner$1.current) {
10275 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
10276
10277 if (name) {
10278 return '\n\nCheck the render method of `' + name + '`.';
10279 }
10280 }
10281
10282 return '';
10283 }
10284 }
10285
10286 function getSourceInfoErrorAddendum(source) {
10287 {
10288 if (source !== undefined) {
10289 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
10290 var lineNumber = source.lineNumber;
10291 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
10292 }
10293
10294 return '';
10295 }
10296 }
10297 /**
10298 * Warn if there's no key explicitly set on dynamic arrays of children or
10299 * object keys are not valid. This allows us to keep track of children between
10300 * updates.
10301 */
10302
10303
10304 var ownerHasKeyUseWarning = {};
10305
10306 function getCurrentComponentErrorInfo(parentType) {
10307 {
10308 var info = getDeclarationErrorAddendum();
10309
10310 if (!info) {
10311 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
10312
10313 if (parentName) {
10314 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
10315 }
10316 }
10317
10318 return info;
10319 }
10320 }
10321 /**
10322 * Warn if the element doesn't have an explicit key assigned to it.
10323 * This element is in an array. The array could grow and shrink or be
10324 * reordered. All children that haven't already been validated are required to
10325 * have a "key" property assigned to it. Error statuses are cached so a warning
10326 * will only be shown once.
10327 *
10328 * @internal
10329 * @param {ReactElement} element Element that requires a key.
10330 * @param {*} parentType element's parent's type.
10331 */
10332
10333
10334 function validateExplicitKey(element, parentType) {
10335 {
10336 if (!element._store || element._store.validated || element.key != null) {
10337 return;
10338 }
10339
10340 element._store.validated = true;
10341 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
10342
10343 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
10344 return;
10345 }
10346
10347 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
10348 // property, it may be the creator of the child that's responsible for
10349 // assigning it a key.
10350
10351 var childOwner = '';
10352
10353 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
10354 // Give the component that originally created this child.
10355 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
10356 }
10357
10358 setCurrentlyValidatingElement$1(element);
10359
10360 error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
10361
10362 setCurrentlyValidatingElement$1(null);
10363 }
10364 }
10365 /**
10366 * Ensure that every element either is passed in a static location, in an
10367 * array with an explicit keys property defined, or in an object literal
10368 * with valid key property.
10369 *
10370 * @internal
10371 * @param {ReactNode} node Statically passed child of any type.
10372 * @param {*} parentType node's parent's type.
10373 */
10374
10375
10376 function validateChildKeys(node, parentType) {
10377 {
10378 if (typeof node !== 'object') {
10379 return;
10380 }
10381
10382 if (isArray(node)) {
10383 for (var i = 0; i < node.length; i++) {
10384 var child = node[i];
10385
10386 if (isValidElement(child)) {
10387 validateExplicitKey(child, parentType);
10388 }
10389 }
10390 } else if (isValidElement(node)) {
10391 // This element was passed in a valid location.
10392 if (node._store) {
10393 node._store.validated = true;
10394 }
10395 } else if (node) {
10396 var iteratorFn = getIteratorFn(node);
10397
10398 if (typeof iteratorFn === 'function') {
10399 // Entry iterators used to provide implicit keys,
10400 // but now we print a separate warning for them later.
10401 if (iteratorFn !== node.entries) {
10402 var iterator = iteratorFn.call(node);
10403 var step;
10404
10405 while (!(step = iterator.next()).done) {
10406 if (isValidElement(step.value)) {
10407 validateExplicitKey(step.value, parentType);
10408 }
10409 }
10410 }
10411 }
10412 }
10413 }
10414 }
10415 /**
10416 * Given an element, validate that its props follow the propTypes definition,
10417 * provided by the type.
10418 *
10419 * @param {ReactElement} element
10420 */
10421
10422
10423 function validatePropTypes(element) {
10424 {
10425 var type = element.type;
10426
10427 if (type === null || type === undefined || typeof type === 'string') {
10428 return;
10429 }
10430
10431 var propTypes;
10432
10433 if (typeof type === 'function') {
10434 propTypes = type.propTypes;
10435 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
10436 // Inner props are checked in the reconciler.
10437 type.$$typeof === REACT_MEMO_TYPE)) {
10438 propTypes = type.propTypes;
10439 } else {
10440 return;
10441 }
10442
10443 if (propTypes) {
10444 // Intentionally inside to avoid triggering lazy initializers:
10445 var name = getComponentNameFromType(type);
10446 checkPropTypes(propTypes, element.props, 'prop', name, element);
10447 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
10448 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
10449
10450 var _name = getComponentNameFromType(type);
10451
10452 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
10453 }
10454
10455 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10456 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10457 }
10458 }
10459 }
10460 /**
10461 * Given a fragment, validate that it can only be provided with fragment props
10462 * @param {ReactElement} fragment
10463 */
10464
10465
10466 function validateFragmentProps(fragment) {
10467 {
10468 var keys = Object.keys(fragment.props);
10469
10470 for (var i = 0; i < keys.length; i++) {
10471 var key = keys[i];
10472
10473 if (key !== 'children' && key !== 'key') {
10474 setCurrentlyValidatingElement$1(fragment);
10475
10476 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10477
10478 setCurrentlyValidatingElement$1(null);
10479 break;
10480 }
10481 }
10482
10483 if (fragment.ref !== null) {
10484 setCurrentlyValidatingElement$1(fragment);
10485
10486 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10487
10488 setCurrentlyValidatingElement$1(null);
10489 }
10490 }
10491 }
10492
10493 var didWarnAboutKeySpread = {};
10494 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10495 {
10496 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10497 // succeed and there will likely be errors in render.
10498
10499 if (!validType) {
10500 var info = '';
10501
10502 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10503 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
10504 }
10505
10506 var sourceInfo = getSourceInfoErrorAddendum(source);
10507
10508 if (sourceInfo) {
10509 info += sourceInfo;
10510 } else {
10511 info += getDeclarationErrorAddendum();
10512 }
10513
10514 var typeString;
10515
10516 if (type === null) {
10517 typeString = 'null';
10518 } else if (isArray(type)) {
10519 typeString = 'array';
10520 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10521 typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
10522 info = ' Did you accidentally export a JSX literal instead of a component?';
10523 } else {
10524 typeString = typeof type;
10525 }
10526
10527 error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
10528 }
10529
10530 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10531 // TODO: Drop this when these are no longer allowed as the type argument.
10532
10533 if (element == null) {
10534 return element;
10535 } // Skip key warning if the type isn't valid since our key validation logic
10536 // doesn't expect a non-string/function type and can throw confusing errors.
10537 // We don't want exception behavior to differ between dev and prod.
10538 // (Rendering will throw with a helpful message and as soon as the type is
10539 // fixed, the key warnings will appear.)
10540
10541
10542 if (validType) {
10543 var children = props.children;
10544
10545 if (children !== undefined) {
10546 if (isStaticChildren) {
10547 if (isArray(children)) {
10548 for (var i = 0; i < children.length; i++) {
10549 validateChildKeys(children[i], type);
10550 }
10551
10552 if (Object.freeze) {
10553 Object.freeze(children);
10554 }
10555 } else {
10556 error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
10557 }
10558 } else {
10559 validateChildKeys(children, type);
10560 }
10561 }
10562 }
10563
10564 {
10565 if (hasOwnProperty.call(props, 'key')) {
10566 var componentName = getComponentNameFromType(type);
10567 var keys = Object.keys(props).filter(function (k) {
10568 return k !== 'key';
10569 });
10570 var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
10571
10572 if (!didWarnAboutKeySpread[componentName + beforeExample]) {
10573 var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
10574
10575 error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
10576
10577 didWarnAboutKeySpread[componentName + beforeExample] = true;
10578 }
10579 }
10580 }
10581
10582 if (type === REACT_FRAGMENT_TYPE) {
10583 validateFragmentProps(element);
10584 } else {
10585 validatePropTypes(element);
10586 }
10587
10588 return element;
10589 }
10590 } // These two functions exist to still get child warnings in dev
10591 // even with the prod transform. This means that jsxDEV is purely
10592 // opt-in behavior for better messages but that we won't stop
10593 // giving you warnings if you use production apis.
10594
10595 function jsxWithValidationStatic(type, props, key) {
10596 {
10597 return jsxWithValidation(type, props, key, true);
10598 }
10599 }
10600 function jsxWithValidationDynamic(type, props, key) {
10601 {
10602 return jsxWithValidation(type, props, key, false);
10603 }
10604 }
10605
10606 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10607 // for now we can ship identical prod functions
10608
10609 var jsxs = jsxWithValidationStatic ;
10610
10611 exports.Fragment = REACT_FRAGMENT_TYPE;
10612 exports.jsx = jsx;
10613 exports.jsxs = jsxs;
10614 })();
10615 }
10616
10617
10618 /***/ }),
10619
10620 /***/ "./node_modules/react/jsx-runtime.js":
10621 /*!*******************************************!*\
10622 !*** ./node_modules/react/jsx-runtime.js ***!
10623 \*******************************************/
10624 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10625
10626 "use strict";
10627
10628
10629 if (false) {} else {
10630 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10631 }
10632
10633
10634 /***/ }),
10635
10636 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10637 /*!******************************************************************************!*\
10638 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10639 \******************************************************************************/
10640 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10641
10642 "use strict";
10643 __webpack_require__.r(__webpack_exports__);
10644 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10645 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10646 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10647 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10648 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10649 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10650 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10651 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10652 /* harmony export */ "__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS": () => (/* binding */ __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS),
10653 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10654 /* harmony export */ "css": () => (/* binding */ css),
10655 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10656 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10657 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10658 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10659 /* harmony export */ });
10660 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10661 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10662 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10663 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10664 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10665 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10666 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10667 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10668 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10669 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10670 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10671 /* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js");
10672 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683 //
10684
10685 var interleave = (function (strings, interpolations) {
10686 var result = [strings[0]];
10687
10688 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10689 result.push(interpolations[i], strings[i + 1]);
10690 }
10691
10692 return result;
10693 });
10694
10695 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10696 return typeof obj;
10697 } : function (obj) {
10698 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10699 };
10700
10701 var classCallCheck = function (instance, Constructor) {
10702 if (!(instance instanceof Constructor)) {
10703 throw new TypeError("Cannot call a class as a function");
10704 }
10705 };
10706
10707 var createClass = function () {
10708 function defineProperties(target, props) {
10709 for (var i = 0; i < props.length; i++) {
10710 var descriptor = props[i];
10711 descriptor.enumerable = descriptor.enumerable || false;
10712 descriptor.configurable = true;
10713 if ("value" in descriptor) descriptor.writable = true;
10714 Object.defineProperty(target, descriptor.key, descriptor);
10715 }
10716 }
10717
10718 return function (Constructor, protoProps, staticProps) {
10719 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10720 if (staticProps) defineProperties(Constructor, staticProps);
10721 return Constructor;
10722 };
10723 }();
10724
10725 var _extends = Object.assign || function (target) {
10726 for (var i = 1; i < arguments.length; i++) {
10727 var source = arguments[i];
10728
10729 for (var key in source) {
10730 if (Object.prototype.hasOwnProperty.call(source, key)) {
10731 target[key] = source[key];
10732 }
10733 }
10734 }
10735
10736 return target;
10737 };
10738
10739 var inherits = function (subClass, superClass) {
10740 if (typeof superClass !== "function" && superClass !== null) {
10741 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10742 }
10743
10744 subClass.prototype = Object.create(superClass && superClass.prototype, {
10745 constructor: {
10746 value: subClass,
10747 enumerable: false,
10748 writable: true,
10749 configurable: true
10750 }
10751 });
10752 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10753 };
10754
10755 var objectWithoutProperties = function (obj, keys) {
10756 var target = {};
10757
10758 for (var i in obj) {
10759 if (keys.indexOf(i) >= 0) continue;
10760 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10761 target[i] = obj[i];
10762 }
10763
10764 return target;
10765 };
10766
10767 var possibleConstructorReturn = function (self, call) {
10768 if (!self) {
10769 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10770 }
10771
10772 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10773 };
10774
10775 //
10776 var isPlainObject = (function (x) {
10777 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10778 });
10779
10780 //
10781 var EMPTY_ARRAY = Object.freeze([]);
10782 var EMPTY_OBJECT = Object.freeze({});
10783
10784 //
10785 function isFunction(test) {
10786 return typeof test === 'function';
10787 }
10788
10789 //
10790
10791 function getComponentName(target) {
10792 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10793 }
10794
10795 //
10796 function isStatelessFunction(test) {
10797 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10798 }
10799
10800 //
10801 function isStyledComponent(target) {
10802 return target && typeof target.styledComponentId === 'string';
10803 }
10804
10805 //
10806
10807 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10808
10809 var SC_VERSION_ATTR = 'data-styled-version';
10810
10811 var SC_STREAM_ATTR = 'data-styled-streamed';
10812
10813 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10814
10815 var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || "development" !== 'production';
10816
10817 // Shared empty execution context when generating static styles
10818 var STATIC_EXECUTION_CONTEXT = {};
10819
10820 //
10821
10822
10823 /**
10824 * Parse errors.md and turn it into a simple hash of code: message
10825 */
10826 var ERRORS = true ? {
10827 "1": "Cannot create styled-component for component: %s.\n\n",
10828 "2": "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",
10829 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10830 "4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",
10831 "5": "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",
10832 "6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",
10833 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10834 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10835 "9": "Missing document `<head>`\n\n",
10836 "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",
10837 "11": "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",
10838 "12": "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",
10839 "13": "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n"
10840 } : 0;
10841
10842 /**
10843 * super basic version of sprintf
10844 */
10845 function format() {
10846 var a = arguments.length <= 0 ? undefined : arguments[0];
10847 var b = [];
10848
10849 for (var c = 1, len = arguments.length; c < len; c += 1) {
10850 b.push(arguments.length <= c ? undefined : arguments[c]);
10851 }
10852
10853 b.forEach(function (d) {
10854 a = a.replace(/%[a-z]/, d);
10855 });
10856
10857 return a;
10858 }
10859
10860 /**
10861 * Create an error file out of errors.md for development and a simple web link to the full errors
10862 * in production mode.
10863 */
10864
10865 var StyledComponentsError = function (_Error) {
10866 inherits(StyledComponentsError, _Error);
10867
10868 function StyledComponentsError(code) {
10869 classCallCheck(this, StyledComponentsError);
10870
10871 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10872 interpolations[_key - 1] = arguments[_key];
10873 }
10874
10875 if (false) { var _this; } else {
10876 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10877 }
10878 return possibleConstructorReturn(_this);
10879 }
10880
10881 return StyledComponentsError;
10882 }(Error);
10883
10884 //
10885 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10886
10887 var extractComps = (function (maybeCSS) {
10888 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10889 var existingComponents = [];
10890 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10891 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10892 return match;
10893 });
10894 return existingComponents.map(function (_ref, i) {
10895 var componentId = _ref.componentId,
10896 matchIndex = _ref.matchIndex;
10897
10898 var nextComp = existingComponents[i + 1];
10899 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10900 return { componentId: componentId, cssFromDOM: cssFromDOM };
10901 });
10902 });
10903
10904 //
10905
10906 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10907
10908 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10909 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10910 global: false,
10911 cascade: true,
10912 keyframe: false,
10913 prefix: false,
10914 compress: false,
10915 semicolon: true
10916 });
10917
10918 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10919 global: false,
10920 cascade: true,
10921 keyframe: false,
10922 prefix: true,
10923 compress: false,
10924 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10925 });
10926
10927 // Wrap `insertRulePlugin to build a list of rules,
10928 // and then make our own plugin to return the rules. This
10929 // makes it easier to hook into the existing SSR architecture
10930
10931 var parsingRules = [];
10932
10933 // eslint-disable-next-line consistent-return
10934 var returnRulesPlugin = function returnRulesPlugin(context) {
10935 if (context === -2) {
10936 var parsedRules = parsingRules;
10937 parsingRules = [];
10938 return parsedRules;
10939 }
10940 };
10941
10942 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10943 parsingRules.push(rule);
10944 });
10945
10946 var _componentId = void 0;
10947 var _selector = void 0;
10948 var _selectorRegexp = void 0;
10949
10950 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10951 if (
10952 // the first self-ref is always untouched
10953 offset > 0 &&
10954 // there should be at least two self-refs to do a replacement (.b > .b)
10955 string.slice(0, offset).indexOf(_selector) !== -1 &&
10956 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10957 string.slice(offset - _selector.length, offset) !== _selector) {
10958 return '.' + _componentId;
10959 }
10960
10961 return match;
10962 };
10963
10964 /**
10965 * When writing a style like
10966 *
10967 * & + & {
10968 * color: red;
10969 * }
10970 *
10971 * The second ampersand should be a reference to the static component class. stylis
10972 * has no knowledge of static class so we have to intelligently replace the base selector.
10973 */
10974 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10975 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10976 // eslint-disable-next-line no-param-reassign
10977 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10978 }
10979 };
10980
10981 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10982 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10983
10984 var splitByRules = function splitByRules(css) {
10985 return stylisSplitter('', css);
10986 };
10987
10988 function stringifyRules(rules, selector, prefix) {
10989 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10990
10991 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10992
10993 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10994
10995 // stylis has no concept of state to be passed to plugins
10996 // but since JS is single=threaded, we can rely on that to ensure
10997 // these properties stay in sync with the current stylis run
10998 _componentId = componentId;
10999 _selector = selector;
11000 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
11001
11002 return stylis(prefix || !selector ? '' : selector, cssStr);
11003 }
11004
11005 //
11006 /* eslint-disable camelcase, no-undef */
11007
11008 var getNonce = (function () {
11009 return true ? __webpack_require__.nc : 0;
11010 });
11011
11012 //
11013 /* These are helpers for the StyleTags to keep track of the injected
11014 * rule names for each (component) ID that they're keeping track of.
11015 * They're crucial for detecting whether a name has already been
11016 * injected.
11017 * (This excludes rehydrated names) */
11018
11019 /* adds a new ID:name pairing to a names dictionary */
11020 var addNameForId = function addNameForId(names, id, name) {
11021 if (name) {
11022 // eslint-disable-next-line no-param-reassign
11023 var namesForId = names[id] || (names[id] = Object.create(null));
11024 namesForId[name] = true;
11025 }
11026 };
11027
11028 /* resets an ID entirely by overwriting it in the dictionary */
11029 var resetIdNames = function resetIdNames(names, id) {
11030 // eslint-disable-next-line no-param-reassign
11031 names[id] = Object.create(null);
11032 };
11033
11034 /* factory for a names dictionary checking the existance of an ID:name pairing */
11035 var hasNameForId = function hasNameForId(names) {
11036 return function (id, name) {
11037 return names[id] !== undefined && names[id][name];
11038 };
11039 };
11040
11041 /* stringifies names for the html/element output */
11042 var stringifyNames = function stringifyNames(names) {
11043 var str = '';
11044 // eslint-disable-next-line guard-for-in
11045 for (var id in names) {
11046 str += Object.keys(names[id]).join(' ') + ' ';
11047 }
11048 return str.trim();
11049 };
11050
11051 /* clones the nested names dictionary */
11052 var cloneNames = function cloneNames(names) {
11053 var clone = Object.create(null);
11054 // eslint-disable-next-line guard-for-in
11055 for (var id in names) {
11056 clone[id] = _extends({}, names[id]);
11057 }
11058 return clone;
11059 };
11060
11061 //
11062
11063 /* These are helpers that deal with the insertRule (aka speedy) API
11064 * They are used in the StyleTags and specifically the speedy tag
11065 */
11066
11067 /* retrieve a sheet for a given style tag */
11068 var sheetForTag = function sheetForTag(tag) {
11069 // $FlowFixMe
11070 if (tag.sheet) return tag.sheet;
11071
11072 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
11073 var size = tag.ownerDocument.styleSheets.length;
11074 for (var i = 0; i < size; i += 1) {
11075 var sheet = tag.ownerDocument.styleSheets[i];
11076 // $FlowFixMe
11077 if (sheet.ownerNode === tag) return sheet;
11078 }
11079
11080 /* we should always be able to find a tag */
11081 throw new StyledComponentsError(10);
11082 };
11083
11084 /* insert a rule safely and return whether it was actually injected */
11085 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
11086 /* abort early if cssRule string is falsy */
11087 if (!cssRule) return false;
11088
11089 var maxIndex = sheet.cssRules.length;
11090
11091 try {
11092 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
11093 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
11094 } catch (err) {
11095 /* any error indicates an invalid rule */
11096 return false;
11097 }
11098
11099 return true;
11100 };
11101
11102 /* deletes `size` rules starting from `removalIndex` */
11103 var deleteRules = function deleteRules(sheet, removalIndex, size) {
11104 var lowerBound = removalIndex - size;
11105 for (var i = removalIndex; i > lowerBound; i -= 1) {
11106 sheet.deleteRule(i);
11107 }
11108 };
11109
11110 //
11111
11112 /* this marker separates component styles and is important for rehydration */
11113 var makeTextMarker = function makeTextMarker(id) {
11114 return '\n/* sc-component-id: ' + id + ' */\n';
11115 };
11116
11117 /* add up all numbers in array up until and including the index */
11118 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
11119 var totalUpToIndex = 0;
11120 for (var i = 0; i <= index; i += 1) {
11121 totalUpToIndex += sizes[i];
11122 }
11123
11124 return totalUpToIndex;
11125 };
11126
11127 /* create a new style tag after lastEl */
11128 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
11129 var targetDocument = document;
11130 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
11131
11132 var el = targetDocument.createElement('style');
11133 el.setAttribute(SC_ATTR, '');
11134 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
11135
11136 var nonce = getNonce();
11137 if (nonce) {
11138 el.setAttribute('nonce', nonce);
11139 }
11140
11141 /* Work around insertRule quirk in EdgeHTML */
11142 el.appendChild(targetDocument.createTextNode(''));
11143
11144 if (target && !tagEl) {
11145 /* Append to target when no previous element was passed */
11146 target.appendChild(el);
11147 } else {
11148 if (!tagEl || !target || !tagEl.parentNode) {
11149 throw new StyledComponentsError(6);
11150 }
11151
11152 /* Insert new style tag after the previous one */
11153 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
11154 }
11155
11156 return el;
11157 };
11158
11159 /* takes a css factory function and outputs an html styled tag factory */
11160 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
11161 return function (additionalAttrs) {
11162 var nonce = getNonce();
11163 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
11164
11165 var htmlAttr = attrs.filter(Boolean).join(' ');
11166 return '<style ' + htmlAttr + '>' + css() + '</style>';
11167 };
11168 };
11169
11170 /* takes a css factory function and outputs an element factory */
11171 var wrapAsElement = function wrapAsElement(css, names) {
11172 return function () {
11173 var _props;
11174
11175 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
11176
11177 var nonce = getNonce();
11178 if (nonce) {
11179 // $FlowFixMe
11180 props.nonce = nonce;
11181 }
11182
11183 // eslint-disable-next-line react/no-danger
11184 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
11185 };
11186 };
11187
11188 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
11189 return function () {
11190 return Object.keys(markers);
11191 };
11192 };
11193
11194 /* speedy tags utilise insertRule */
11195 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
11196 var names = Object.create(null);
11197 var markers = Object.create(null);
11198 var sizes = [];
11199
11200 var extractImport = getImportRuleTag !== undefined;
11201 /* indicates whether getImportRuleTag was called */
11202 var usedImportRuleTag = false;
11203
11204 var insertMarker = function insertMarker(id) {
11205 var prev = markers[id];
11206 if (prev !== undefined) {
11207 return prev;
11208 }
11209
11210 markers[id] = sizes.length;
11211 sizes.push(0);
11212 resetIdNames(names, id);
11213
11214 return markers[id];
11215 };
11216
11217 var insertRules = function insertRules(id, cssRules, name) {
11218 var marker = insertMarker(id);
11219 var sheet = sheetForTag(el);
11220 var insertIndex = addUpUntilIndex(sizes, marker);
11221
11222 var injectedRules = 0;
11223 var importRules = [];
11224 var cssRulesSize = cssRules.length;
11225
11226 for (var i = 0; i < cssRulesSize; i += 1) {
11227 var cssRule = cssRules[i];
11228 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
11229 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
11230 importRules.push(cssRule);
11231 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
11232 mayHaveImport = false;
11233 injectedRules += 1;
11234 }
11235 }
11236
11237 if (extractImport && importRules.length > 0) {
11238 usedImportRuleTag = true;
11239 // $FlowFixMe
11240 getImportRuleTag().insertRules(id + '-import', importRules);
11241 }
11242
11243 sizes[marker] += injectedRules; /* add up no of injected rules */
11244 addNameForId(names, id, name);
11245 };
11246
11247 var removeRules = function removeRules(id) {
11248 var marker = markers[id];
11249 if (marker === undefined) return;
11250 // $FlowFixMe
11251 if (el.isConnected === false) return;
11252
11253 var size = sizes[marker];
11254 var sheet = sheetForTag(el);
11255 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
11256 deleteRules(sheet, removalIndex, size);
11257 sizes[marker] = 0;
11258 resetIdNames(names, id);
11259
11260 if (extractImport && usedImportRuleTag) {
11261 // $FlowFixMe
11262 getImportRuleTag().removeRules(id + '-import');
11263 }
11264 };
11265
11266 var css = function css() {
11267 var _sheetForTag = sheetForTag(el),
11268 cssRules = _sheetForTag.cssRules;
11269
11270 var str = '';
11271
11272 // eslint-disable-next-line guard-for-in
11273 for (var id in markers) {
11274 str += makeTextMarker(id);
11275 var marker = markers[id];
11276 var end = addUpUntilIndex(sizes, marker);
11277 var size = sizes[marker];
11278 for (var i = end - size; i < end; i += 1) {
11279 var rule = cssRules[i];
11280 if (rule !== undefined) {
11281 str += rule.cssText;
11282 }
11283 }
11284 }
11285
11286 return str;
11287 };
11288
11289 return {
11290 clone: function clone() {
11291 throw new StyledComponentsError(5);
11292 },
11293
11294 css: css,
11295 getIds: getIdsFromMarkersFactory(markers),
11296 hasNameForId: hasNameForId(names),
11297 insertMarker: insertMarker,
11298 insertRules: insertRules,
11299 removeRules: removeRules,
11300 sealed: false,
11301 styleTag: el,
11302 toElement: wrapAsElement(css, names),
11303 toHTML: wrapAsHtmlTag(css, names)
11304 };
11305 };
11306
11307 var makeTextNode = function makeTextNode(targetDocument, id) {
11308 return targetDocument.createTextNode(makeTextMarker(id));
11309 };
11310
11311 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
11312 var names = Object.create(null);
11313 var markers = Object.create(null);
11314
11315 var extractImport = getImportRuleTag !== undefined;
11316
11317 /* indicates whether getImportRuleTag was called */
11318 var usedImportRuleTag = false;
11319
11320 var insertMarker = function insertMarker(id) {
11321 var prev = markers[id];
11322 if (prev !== undefined) {
11323 return prev;
11324 }
11325
11326 markers[id] = makeTextNode(el.ownerDocument, id);
11327 el.appendChild(markers[id]);
11328 names[id] = Object.create(null);
11329
11330 return markers[id];
11331 };
11332
11333 var insertRules = function insertRules(id, cssRules, name) {
11334 var marker = insertMarker(id);
11335 var importRules = [];
11336 var cssRulesSize = cssRules.length;
11337
11338 for (var i = 0; i < cssRulesSize; i += 1) {
11339 var rule = cssRules[i];
11340 var mayHaveImport = extractImport;
11341 if (mayHaveImport && rule.indexOf('@import') !== -1) {
11342 importRules.push(rule);
11343 } else {
11344 mayHaveImport = false;
11345 var separator = i === cssRulesSize - 1 ? '' : ' ';
11346 marker.appendData('' + rule + separator);
11347 }
11348 }
11349
11350 addNameForId(names, id, name);
11351
11352 if (extractImport && importRules.length > 0) {
11353 usedImportRuleTag = true;
11354 // $FlowFixMe
11355 getImportRuleTag().insertRules(id + '-import', importRules);
11356 }
11357 };
11358
11359 var removeRules = function removeRules(id) {
11360 var marker = markers[id];
11361 if (marker === undefined) return;
11362
11363 /* create new empty text node and replace the current one */
11364 var newMarker = makeTextNode(el.ownerDocument, id);
11365 el.replaceChild(newMarker, marker);
11366 markers[id] = newMarker;
11367 resetIdNames(names, id);
11368
11369 if (extractImport && usedImportRuleTag) {
11370 // $FlowFixMe
11371 getImportRuleTag().removeRules(id + '-import');
11372 }
11373 };
11374
11375 var css = function css() {
11376 var str = '';
11377
11378 // eslint-disable-next-line guard-for-in
11379 for (var id in markers) {
11380 str += markers[id].data;
11381 }
11382
11383 return str;
11384 };
11385
11386 return {
11387 clone: function clone() {
11388 throw new StyledComponentsError(5);
11389 },
11390
11391 css: css,
11392 getIds: getIdsFromMarkersFactory(markers),
11393 hasNameForId: hasNameForId(names),
11394 insertMarker: insertMarker,
11395 insertRules: insertRules,
11396 removeRules: removeRules,
11397 sealed: false,
11398 styleTag: el,
11399 toElement: wrapAsElement(css, names),
11400 toHTML: wrapAsHtmlTag(css, names)
11401 };
11402 };
11403
11404 var makeServerTag = function makeServerTag(namesArg, markersArg) {
11405 var names = namesArg === undefined ? Object.create(null) : namesArg;
11406 var markers = markersArg === undefined ? Object.create(null) : markersArg;
11407
11408 var insertMarker = function insertMarker(id) {
11409 var prev = markers[id];
11410 if (prev !== undefined) {
11411 return prev;
11412 }
11413
11414 return markers[id] = [''];
11415 };
11416
11417 var insertRules = function insertRules(id, cssRules, name) {
11418 var marker = insertMarker(id);
11419 marker[0] += cssRules.join(' ');
11420 addNameForId(names, id, name);
11421 };
11422
11423 var removeRules = function removeRules(id) {
11424 var marker = markers[id];
11425 if (marker === undefined) return;
11426 marker[0] = '';
11427 resetIdNames(names, id);
11428 };
11429
11430 var css = function css() {
11431 var str = '';
11432 // eslint-disable-next-line guard-for-in
11433 for (var id in markers) {
11434 var cssForId = markers[id][0];
11435 if (cssForId) {
11436 str += makeTextMarker(id) + cssForId;
11437 }
11438 }
11439 return str;
11440 };
11441
11442 var clone = function clone() {
11443 var namesClone = cloneNames(names);
11444 var markersClone = Object.create(null);
11445
11446 // eslint-disable-next-line guard-for-in
11447 for (var id in markers) {
11448 markersClone[id] = [markers[id][0]];
11449 }
11450
11451 return makeServerTag(namesClone, markersClone);
11452 };
11453
11454 var tag = {
11455 clone: clone,
11456 css: css,
11457 getIds: getIdsFromMarkersFactory(markers),
11458 hasNameForId: hasNameForId(names),
11459 insertMarker: insertMarker,
11460 insertRules: insertRules,
11461 removeRules: removeRules,
11462 sealed: false,
11463 styleTag: null,
11464 toElement: wrapAsElement(css, names),
11465 toHTML: wrapAsHtmlTag(css, names)
11466 };
11467
11468 return tag;
11469 };
11470
11471 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
11472 if (IS_BROWSER && !forceServer) {
11473 var el = makeStyleTag(target, tagEl, insertBefore);
11474
11475 if (DISABLE_SPEEDY) {
11476 return makeBrowserTag(el, getImportRuleTag);
11477 } else {
11478 return makeSpeedyTag(el, getImportRuleTag);
11479 }
11480 }
11481
11482 return makeServerTag();
11483 };
11484
11485 var rehydrate = function rehydrate(tag, els, extracted) {
11486 /* add all extracted components to the new tag */
11487 for (var i = 0, len = extracted.length; i < len; i += 1) {
11488 var _extracted$i = extracted[i],
11489 componentId = _extracted$i.componentId,
11490 cssFromDOM = _extracted$i.cssFromDOM;
11491
11492 var cssRules = splitByRules(cssFromDOM);
11493 tag.insertRules(componentId, cssRules);
11494 }
11495
11496 /* remove old HTMLStyleElements, since they have been rehydrated */
11497 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11498 var el = els[_i];
11499 if (el.parentNode) {
11500 el.parentNode.removeChild(el);
11501 }
11502 }
11503 };
11504
11505 //
11506
11507 var SPLIT_REGEX = /\s+/;
11508
11509 /* determine the maximum number of components before tags are sharded */
11510 var MAX_SIZE = void 0;
11511 if (IS_BROWSER) {
11512 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11513 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11514 } else {
11515 /* for servers we do not need to shard at all */
11516 MAX_SIZE = -1;
11517 }
11518
11519 var sheetRunningId = 0;
11520 var master = void 0;
11521
11522 var StyleSheet = function () {
11523
11524 /* a map from ids to tags */
11525
11526 /* deferred rules for a given id */
11527
11528 /* this is used for not reinjecting rules via hasNameForId() */
11529
11530 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11531
11532 /* a list of tags belonging to this StyleSheet */
11533
11534 /* a tag for import rules */
11535
11536 /* current capacity until a new tag must be created */
11537
11538 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11539
11540 function StyleSheet() {
11541 var _this = this;
11542
11543 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11544 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11545 classCallCheck(this, StyleSheet);
11546
11547 this.getImportRuleTag = function () {
11548 var importRuleTag = _this.importRuleTag;
11549
11550 if (importRuleTag !== undefined) {
11551 return importRuleTag;
11552 }
11553
11554 var firstTag = _this.tags[0];
11555 var insertBefore = true;
11556
11557 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11558 };
11559
11560 sheetRunningId += 1;
11561 this.id = sheetRunningId;
11562 this.forceServer = forceServer;
11563 this.target = forceServer ? null : target;
11564 this.tagMap = {};
11565 this.deferred = {};
11566 this.rehydratedNames = {};
11567 this.ignoreRehydratedNames = {};
11568 this.tags = [];
11569 this.capacity = 1;
11570 this.clones = [];
11571 }
11572
11573 /* rehydrate all SSR'd style tags */
11574
11575
11576 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11577 if (!IS_BROWSER || this.forceServer) return this;
11578
11579 var els = [];
11580 var extracted = [];
11581 var isStreamed = false;
11582
11583 /* retrieve all of our SSR style elements from the DOM */
11584 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11585
11586 var nodesSize = nodes.length;
11587
11588 /* abort rehydration if no previous style tags were found */
11589 if (!nodesSize) return this;
11590
11591 for (var i = 0; i < nodesSize; i += 1) {
11592 var el = nodes[i];
11593
11594 /* check if style tag is a streamed tag */
11595 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11596
11597 /* retrieve all component names */
11598 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11599 var elNamesSize = elNames.length;
11600 for (var j = 0, name; j < elNamesSize; j += 1) {
11601 name = elNames[j];
11602 /* add rehydrated name to sheet to avoid re-adding styles */
11603 this.rehydratedNames[name] = true;
11604 }
11605
11606 /* extract all components and their CSS */
11607 extracted.push.apply(extracted, extractComps(el.textContent));
11608
11609 /* store original HTMLStyleElement */
11610 els.push(el);
11611 }
11612
11613 /* abort rehydration if nothing was extracted */
11614 var extractedSize = extracted.length;
11615 if (!extractedSize) return this;
11616
11617 /* create a tag to be used for rehydration */
11618 var tag = this.makeTag(null);
11619
11620 rehydrate(tag, els, extracted);
11621
11622 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11623 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11624 this.tags.push(tag);
11625
11626 /* retrieve all component ids */
11627 for (var _j = 0; _j < extractedSize; _j += 1) {
11628 this.tagMap[extracted[_j].componentId] = tag;
11629 }
11630
11631 return this;
11632 };
11633
11634 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11635 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11636 * StyleSheetManager's context */
11637
11638
11639 /* reset the internal "master" instance */
11640 StyleSheet.reset = function reset() {
11641 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11642
11643 master = new StyleSheet(undefined, forceServer).rehydrate();
11644 };
11645
11646 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11647 * while their own rules do not affect the parent */
11648
11649
11650 StyleSheet.prototype.clone = function clone() {
11651 var sheet = new StyleSheet(this.target, this.forceServer);
11652
11653 /* add to clone array */
11654 this.clones.push(sheet);
11655
11656 /* clone all tags */
11657 sheet.tags = this.tags.map(function (tag) {
11658 var ids = tag.getIds();
11659 var newTag = tag.clone();
11660
11661 /* reconstruct tagMap */
11662 for (var i = 0; i < ids.length; i += 1) {
11663 sheet.tagMap[ids[i]] = newTag;
11664 }
11665
11666 return newTag;
11667 });
11668
11669 /* clone other maps */
11670 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11671 sheet.deferred = _extends({}, this.deferred);
11672
11673 return sheet;
11674 };
11675
11676 /* force StyleSheet to create a new tag on the next injection */
11677
11678
11679 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11680 this.capacity = 1;
11681
11682 this.tags.forEach(function (tag) {
11683 // eslint-disable-next-line no-param-reassign
11684 tag.sealed = true;
11685 });
11686 };
11687
11688 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11689 var lastEl = tag ? tag.styleTag : null;
11690 var insertBefore = false;
11691
11692 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11693 };
11694
11695 /* get a tag for a given componentId, assign the componentId to one, or shard */
11696 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11697 /* simply return a tag, when the componentId was already assigned one */
11698 var prev = this.tagMap[id];
11699 if (prev !== undefined && !prev.sealed) {
11700 return prev;
11701 }
11702
11703 var tag = this.tags[this.tags.length - 1];
11704
11705 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11706 this.capacity -= 1;
11707
11708 if (this.capacity === 0) {
11709 this.capacity = MAX_SIZE;
11710 tag = this.makeTag(tag);
11711 this.tags.push(tag);
11712 }
11713
11714 return this.tagMap[id] = tag;
11715 };
11716
11717 /* mainly for createGlobalStyle to check for its id */
11718
11719
11720 StyleSheet.prototype.hasId = function hasId(id) {
11721 return this.tagMap[id] !== undefined;
11722 };
11723
11724 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11725
11726
11727 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11728 /* exception for rehydrated names which are checked separately */
11729 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11730 return true;
11731 }
11732
11733 var tag = this.tagMap[id];
11734 return tag !== undefined && tag.hasNameForId(id, name);
11735 };
11736
11737 /* registers a componentId and registers it on its tag */
11738
11739
11740 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11741 /* don't inject when the id is already registered */
11742 if (this.tagMap[id] !== undefined) return;
11743
11744 var clones = this.clones;
11745
11746 for (var i = 0; i < clones.length; i += 1) {
11747 clones[i].deferredInject(id, cssRules);
11748 }
11749
11750 this.getTagForId(id).insertMarker(id);
11751 this.deferred[id] = cssRules;
11752 };
11753
11754 /* injects rules for a given id with a name that will need to be cached */
11755
11756
11757 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11758 var clones = this.clones;
11759
11760
11761 for (var i = 0; i < clones.length; i += 1) {
11762 clones[i].inject(id, cssRules, name);
11763 }
11764
11765 var tag = this.getTagForId(id);
11766
11767 /* add deferred rules for component */
11768 if (this.deferred[id] !== undefined) {
11769 // Combine passed cssRules with previously deferred CSS rules
11770 // NOTE: We cannot mutate the deferred array itself as all clones
11771 // do the same (see clones[i].inject)
11772 var rules = this.deferred[id].concat(cssRules);
11773 tag.insertRules(id, rules, name);
11774
11775 this.deferred[id] = undefined;
11776 } else {
11777 tag.insertRules(id, cssRules, name);
11778 }
11779 };
11780
11781 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11782
11783
11784 StyleSheet.prototype.remove = function remove(id) {
11785 var tag = this.tagMap[id];
11786 if (tag === undefined) return;
11787
11788 var clones = this.clones;
11789
11790 for (var i = 0; i < clones.length; i += 1) {
11791 clones[i].remove(id);
11792 }
11793
11794 /* remove all rules from the tag */
11795 tag.removeRules(id);
11796
11797 /* ignore possible rehydrated names */
11798 this.ignoreRehydratedNames[id] = true;
11799
11800 /* delete possible deferred rules */
11801 this.deferred[id] = undefined;
11802 };
11803
11804 StyleSheet.prototype.toHTML = function toHTML() {
11805 return this.tags.map(function (tag) {
11806 return tag.toHTML();
11807 }).join('');
11808 };
11809
11810 StyleSheet.prototype.toReactElements = function toReactElements() {
11811 var id = this.id;
11812
11813
11814 return this.tags.map(function (tag, i) {
11815 var key = 'sc-' + id + '-' + i;
11816 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11817 });
11818 };
11819
11820 createClass(StyleSheet, null, [{
11821 key: 'master',
11822 get: function get$$1() {
11823 return master || (master = new StyleSheet().rehydrate());
11824 }
11825
11826 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11827
11828 }, {
11829 key: 'instance',
11830 get: function get$$1() {
11831 return StyleSheet.master;
11832 }
11833 }]);
11834 return StyleSheet;
11835 }();
11836
11837 //
11838
11839 var Keyframes = function () {
11840 function Keyframes(name, rules) {
11841 var _this = this;
11842
11843 classCallCheck(this, Keyframes);
11844
11845 this.inject = function (styleSheet) {
11846 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11847 styleSheet.inject(_this.id, _this.rules, _this.name);
11848 }
11849 };
11850
11851 this.toString = function () {
11852 throw new StyledComponentsError(12, String(_this.name));
11853 };
11854
11855 this.name = name;
11856 this.rules = rules;
11857
11858 this.id = 'sc-keyframes-' + name;
11859 }
11860
11861 Keyframes.prototype.getName = function getName() {
11862 return this.name;
11863 };
11864
11865 return Keyframes;
11866 }();
11867
11868 //
11869
11870 /**
11871 * inlined version of
11872 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11873 */
11874
11875 var uppercasePattern = /([A-Z])/g;
11876 var msPattern = /^ms-/;
11877
11878 /**
11879 * Hyphenates a camelcased CSS property name, for example:
11880 *
11881 * > hyphenateStyleName('backgroundColor')
11882 * < "background-color"
11883 * > hyphenateStyleName('MozTransition')
11884 * < "-moz-transition"
11885 * > hyphenateStyleName('msTransition')
11886 * < "-ms-transition"
11887 *
11888 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11889 * is converted to `-ms-`.
11890 *
11891 * @param {string} string
11892 * @return {string}
11893 */
11894 function hyphenateStyleName(string) {
11895 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11896 }
11897
11898 //
11899
11900 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11901 function addUnitIfNeeded(name, value) {
11902 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11903 // $FlowFixMe
11904 if (value == null || typeof value === 'boolean' || value === '') {
11905 return '';
11906 }
11907
11908 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11909 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11910 }
11911
11912 return String(value).trim();
11913 }
11914
11915 //
11916
11917 /**
11918 * It's falsish not falsy because 0 is allowed.
11919 */
11920 var isFalsish = function isFalsish(chunk) {
11921 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11922 };
11923
11924 var objToCssArray = function objToCssArray(obj, prevKey) {
11925 var rules = [];
11926 var keys = Object.keys(obj);
11927
11928 keys.forEach(function (key) {
11929 if (!isFalsish(obj[key])) {
11930 if (isPlainObject(obj[key])) {
11931 rules.push.apply(rules, objToCssArray(obj[key], key));
11932
11933 return rules;
11934 } else if (isFunction(obj[key])) {
11935 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11936
11937 return rules;
11938 }
11939 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11940 }
11941 return rules;
11942 });
11943
11944 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11945 };
11946
11947 function flatten(chunk, executionContext, styleSheet) {
11948 if (Array.isArray(chunk)) {
11949 var ruleSet = [];
11950
11951 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11952 result = flatten(chunk[i], executionContext, styleSheet);
11953
11954 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11955 }
11956
11957 return ruleSet;
11958 }
11959
11960 if (isFalsish(chunk)) {
11961 return null;
11962 }
11963
11964 /* Handle other components */
11965 if (isStyledComponent(chunk)) {
11966 return '.' + chunk.styledComponentId;
11967 }
11968
11969 /* Either execute or defer the function */
11970 if (isFunction(chunk)) {
11971 if (isStatelessFunction(chunk) && executionContext) {
11972 var _result = chunk(executionContext);
11973
11974 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11975 // eslint-disable-next-line no-console
11976 console.warn(getComponentName(chunk) + ' is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.');
11977 }
11978
11979 return flatten(_result, executionContext, styleSheet);
11980 } else return chunk;
11981 }
11982
11983 if (chunk instanceof Keyframes) {
11984 if (styleSheet) {
11985 chunk.inject(styleSheet);
11986 return chunk.getName();
11987 } else return chunk;
11988 }
11989
11990 /* Handle objects */
11991 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11992 }
11993
11994 //
11995
11996 function css(styles) {
11997 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11998 interpolations[_key - 1] = arguments[_key];
11999 }
12000
12001 if (isFunction(styles) || isPlainObject(styles)) {
12002 // $FlowFixMe
12003 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
12004 }
12005
12006 // $FlowFixMe
12007 return flatten(interleave(styles, interpolations));
12008 }
12009
12010 //
12011
12012 function constructWithOptions(componentConstructor, tag) {
12013 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
12014
12015 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
12016 throw new StyledComponentsError(1, String(tag));
12017 }
12018
12019 /* This is callable directly as a template function */
12020 // $FlowFixMe: Not typed to avoid destructuring arguments
12021 var templateFunction = function templateFunction() {
12022 return componentConstructor(tag, options, css.apply(undefined, arguments));
12023 };
12024
12025 /* If config methods are called, wrap up a new template function and merge options */
12026 templateFunction.withConfig = function (config) {
12027 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
12028 };
12029
12030 /* Modify/inject new props at runtime */
12031 templateFunction.attrs = function (attrs) {
12032 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
12033 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
12034 }));
12035 };
12036
12037 return templateFunction;
12038 }
12039
12040 //
12041 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
12042 function murmurhash(c) {
12043 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
12044 b = c.charCodeAt(d) & 255 | (c.charCodeAt(++d) & 255) << 8 | (c.charCodeAt(++d) & 255) << 16 | (c.charCodeAt(++d) & 255) << 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), b ^= b >>> 24, b = 1540483477 * (b & 65535) + ((1540483477 * (b >>> 16) & 65535) << 16), a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16) ^ b, e -= 4, ++d;
12045 }
12046 switch (e) {
12047 case 3:
12048 a ^= (c.charCodeAt(d + 2) & 255) << 16;
12049 case 2:
12050 a ^= (c.charCodeAt(d + 1) & 255) << 8;
12051 case 1:
12052 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
12053 }
12054 a ^= a >>> 13;
12055 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
12056 return (a ^ a >>> 15) >>> 0;
12057 }
12058
12059 //
12060 /* eslint-disable no-bitwise */
12061
12062 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
12063 * counterparts */
12064 var charsLength = 52;
12065
12066 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
12067 var getAlphabeticChar = function getAlphabeticChar(code) {
12068 return String.fromCharCode(code + (code > 25 ? 39 : 97));
12069 };
12070
12071 /* input a number, usually a hash and convert it to base-52 */
12072 function generateAlphabeticName(code) {
12073 var name = '';
12074 var x = void 0;
12075
12076 /* get a char and divide by alphabet-length */
12077 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
12078 name = getAlphabeticChar(x % charsLength) + name;
12079 }
12080
12081 return getAlphabeticChar(x % charsLength) + name;
12082 }
12083
12084 //
12085
12086 function hasFunctionObjectKey(obj) {
12087 // eslint-disable-next-line guard-for-in, no-restricted-syntax
12088 for (var key in obj) {
12089 if (isFunction(obj[key])) {
12090 return true;
12091 }
12092 }
12093
12094 return false;
12095 }
12096
12097 function isStaticRules(rules, attrs) {
12098 for (var i = 0; i < rules.length; i += 1) {
12099 var rule = rules[i];
12100
12101 // recursive case
12102 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
12103 return false;
12104 } else if (isFunction(rule) && !isStyledComponent(rule)) {
12105 // functions are allowed to be static if they're just being
12106 // used to get the classname of a nested styled component
12107 return false;
12108 }
12109 }
12110
12111 if (attrs.some(function (x) {
12112 return isFunction(x) || hasFunctionObjectKey(x);
12113 })) return false;
12114
12115 return true;
12116 }
12117
12118 //
12119
12120 /* combines hashStr (murmurhash) and nameGenerator for convenience */
12121 var hasher = function hasher(str) {
12122 return generateAlphabeticName(murmurhash(str));
12123 };
12124
12125 /*
12126 ComponentStyle is all the CSS-specific stuff, not
12127 the React-specific stuff.
12128 */
12129
12130 var ComponentStyle = function () {
12131 function ComponentStyle(rules, attrs, componentId) {
12132 classCallCheck(this, ComponentStyle);
12133
12134 this.rules = rules;
12135 this.isStatic = false && 0;
12136 this.componentId = componentId;
12137
12138 if (!StyleSheet.master.hasId(componentId)) {
12139 StyleSheet.master.deferredInject(componentId, []);
12140 }
12141 }
12142
12143 /*
12144 * Flattens a rule set into valid CSS
12145 * Hashes it, wraps the whole chunk in a .hash1234 {}
12146 * Returns the hash to be injected on render()
12147 * */
12148
12149
12150 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
12151 var isStatic = this.isStatic,
12152 componentId = this.componentId,
12153 lastClassName = this.lastClassName;
12154
12155 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
12156 return lastClassName;
12157 }
12158
12159 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12160 var name = hasher(this.componentId + flatCSS.join(''));
12161 if (!styleSheet.hasNameForId(componentId, name)) {
12162 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
12163 }
12164
12165 this.lastClassName = name;
12166 return name;
12167 };
12168
12169 ComponentStyle.generateName = function generateName(str) {
12170 return hasher(str);
12171 };
12172
12173 return ComponentStyle;
12174 }();
12175
12176 //
12177
12178 var LIMIT = 200;
12179
12180 var createWarnTooManyClasses = (function (displayName) {
12181 var generatedClasses = {};
12182 var warningSeen = false;
12183
12184 return function (className) {
12185 if (!warningSeen) {
12186 generatedClasses[className] = true;
12187 if (Object.keys(generatedClasses).length >= LIMIT) {
12188 // Unable to find latestRule in test environment.
12189 /* eslint-disable no-console, prefer-template */
12190 console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs(props => ({\n' + ' style: {\n' + ' background: props.background,\n' + ' },\n' + ' }))`width: 100%;`\n\n' + ' <Component />');
12191 warningSeen = true;
12192 generatedClasses = {};
12193 }
12194 }
12195 };
12196 });
12197
12198 //
12199
12200 var determineTheme = (function (props, fallbackTheme) {
12201 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
12202
12203 // Props should take precedence over ThemeProvider, which should take precedence over
12204 // defaultProps, but React automatically puts defaultProps on props.
12205
12206 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
12207 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
12208 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
12209 /* eslint-enable */
12210
12211 return theme;
12212 });
12213
12214 //
12215 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
12216 var dashesAtEnds = /(^-|-$)/g;
12217
12218 /**
12219 * TODO: Explore using CSS.escape when it becomes more available
12220 * in evergreen browsers.
12221 */
12222 function escape(str) {
12223 return str
12224 // Replace all possible CSS selectors
12225 .replace(escapeRegex, '-')
12226
12227 // Remove extraneous hyphens at the start and end
12228 .replace(dashesAtEnds, '');
12229 }
12230
12231 //
12232
12233 function isTag(target) {
12234 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
12235 }
12236
12237 //
12238
12239 function generateDisplayName(target) {
12240 // $FlowFixMe
12241 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
12242 }
12243
12244 var _TYPE_STATICS;
12245
12246 var REACT_STATICS = {
12247 childContextTypes: true,
12248 contextTypes: true,
12249 defaultProps: true,
12250 displayName: true,
12251 getDerivedStateFromProps: true,
12252 propTypes: true,
12253 type: true
12254 };
12255
12256 var KNOWN_STATICS = {
12257 name: true,
12258 length: true,
12259 prototype: true,
12260 caller: true,
12261 callee: true,
12262 arguments: true,
12263 arity: true
12264 };
12265
12266 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
12267 $$typeof: true,
12268 render: true
12269 }, _TYPE_STATICS);
12270
12271 var defineProperty$1 = Object.defineProperty,
12272 getOwnPropertyNames = Object.getOwnPropertyNames,
12273 _Object$getOwnPropert = Object.getOwnPropertySymbols,
12274 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
12275 return [];
12276 } : _Object$getOwnPropert,
12277 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
12278 getPrototypeOf = Object.getPrototypeOf,
12279 objectPrototype = Object.prototype;
12280 var arrayPrototype = Array.prototype;
12281
12282
12283 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
12284 if (typeof sourceComponent !== 'string') {
12285 // don't hoist over string (html) components
12286
12287 var inheritedComponent = getPrototypeOf(sourceComponent);
12288
12289 if (inheritedComponent && inheritedComponent !== objectPrototype) {
12290 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
12291 }
12292
12293 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
12294 // $FlowFixMe
12295 getOwnPropertySymbols(sourceComponent));
12296
12297 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
12298
12299 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
12300
12301 var i = keys.length;
12302 var descriptor = void 0;
12303 var key = void 0;
12304
12305 // eslint-disable-next-line no-plusplus
12306 while (i--) {
12307 key = keys[i];
12308
12309 if (
12310 // $FlowFixMe
12311 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
12312 // $FlowFixMe
12313 !(targetStatics && targetStatics[key])) {
12314 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
12315
12316 if (descriptor) {
12317 try {
12318 // Avoid failures from read-only properties
12319 defineProperty$1(targetComponent, key, descriptor);
12320 } catch (e) {
12321 /* fail silently */
12322 }
12323 }
12324 }
12325 }
12326
12327 return targetComponent;
12328 }
12329
12330 return targetComponent;
12331 }
12332
12333 //
12334 function isDerivedReactComponent(fn) {
12335 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
12336 }
12337
12338 //
12339 // Helper to call a given function, only once
12340 var once = (function (cb) {
12341 var called = false;
12342
12343 return function () {
12344 if (!called) {
12345 called = true;
12346 cb.apply(undefined, arguments);
12347 }
12348 };
12349 });
12350
12351 //
12352
12353 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12354
12355 var ThemeConsumer = ThemeContext.Consumer;
12356
12357 /**
12358 * Provide a theme to an entire react component tree via context
12359 */
12360
12361 var ThemeProvider = function (_Component) {
12362 inherits(ThemeProvider, _Component);
12363
12364 function ThemeProvider(props) {
12365 classCallCheck(this, ThemeProvider);
12366
12367 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12368
12369 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
12370 _this.renderInner = _this.renderInner.bind(_this);
12371 return _this;
12372 }
12373
12374 ThemeProvider.prototype.render = function render() {
12375 if (!this.props.children) return null;
12376
12377 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12378 ThemeContext.Consumer,
12379 null,
12380 this.renderInner
12381 );
12382 };
12383
12384 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
12385 var context = this.getContext(this.props.theme, outerTheme);
12386
12387 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12388 ThemeContext.Provider,
12389 { value: context },
12390 this.props.children
12391 );
12392 };
12393
12394 /**
12395 * Get the theme from the props, supporting both (outerTheme) => {}
12396 * as well as object notation
12397 */
12398
12399
12400 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
12401 if (isFunction(theme)) {
12402 var mergedTheme = theme(outerTheme);
12403
12404 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
12405 throw new StyledComponentsError(7);
12406 }
12407
12408 return mergedTheme;
12409 }
12410
12411 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
12412 throw new StyledComponentsError(8);
12413 }
12414
12415 return _extends({}, outerTheme, theme);
12416 };
12417
12418 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
12419 return this.getTheme(theme, outerTheme);
12420 };
12421
12422 return ThemeProvider;
12423 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12424
12425 //
12426
12427 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
12428
12429 var ServerStyleSheet = function () {
12430 function ServerStyleSheet() {
12431 classCallCheck(this, ServerStyleSheet);
12432
12433 /* The master sheet might be reset, so keep a reference here */
12434 this.masterSheet = StyleSheet.master;
12435 this.instance = this.masterSheet.clone();
12436 this.sealed = false;
12437 }
12438
12439 /**
12440 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
12441 * StyleSheet singleton.
12442 */
12443
12444
12445 ServerStyleSheet.prototype.seal = function seal() {
12446 if (!this.sealed) {
12447 /* Remove sealed StyleSheets from the master sheet */
12448 var index = this.masterSheet.clones.indexOf(this.instance);
12449 this.masterSheet.clones.splice(index, 1);
12450 this.sealed = true;
12451 }
12452 };
12453
12454 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
12455 if (this.sealed) {
12456 throw new StyledComponentsError(2);
12457 }
12458
12459 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12460 StyleSheetManager,
12461 { sheet: this.instance },
12462 children
12463 );
12464 };
12465
12466 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
12467 this.seal();
12468 return this.instance.toHTML();
12469 };
12470
12471 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
12472 this.seal();
12473 return this.instance.toReactElements();
12474 };
12475
12476 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12477 var _this = this;
12478
12479 {
12480 throw new StyledComponentsError(3);
12481 }
12482
12483 /* the tag index keeps track of which tags have already been emitted */
12484 var instance = this.instance;
12485
12486 var instanceTagIndex = 0;
12487
12488 var streamAttr = SC_STREAM_ATTR + '="true"';
12489
12490 var transformer = new stream.Transform({
12491 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12492 var tags = instance.tags;
12493
12494 var html = '';
12495
12496 /* retrieve html for each new style tag */
12497 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12498 var tag = tags[instanceTagIndex];
12499 html += tag.toHTML(streamAttr);
12500 }
12501
12502 /* force our StyleSheets to emit entirely new tags */
12503 instance.sealAllTags();
12504
12505 var renderedHtml = chunk.toString();
12506
12507 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12508 if (CLOSING_TAG_R.test(renderedHtml)) {
12509 var endOfClosingTag = renderedHtml.indexOf('>');
12510
12511 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12512 } else this.push(html + renderedHtml);
12513
12514 callback();
12515 }
12516 });
12517
12518 readableStream.on('end', function () {
12519 return _this.seal();
12520 });
12521
12522 readableStream.on('error', function (err) {
12523 _this.seal();
12524
12525 // forward the error to the transform stream
12526 transformer.emit('error', err);
12527 });
12528
12529 return readableStream.pipe(transformer);
12530 };
12531
12532 return ServerStyleSheet;
12533 }();
12534
12535 //
12536
12537 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12538 var StyleSheetConsumer = StyleSheetContext.Consumer;
12539
12540 var StyleSheetManager = function (_Component) {
12541 inherits(StyleSheetManager, _Component);
12542
12543 function StyleSheetManager(props) {
12544 classCallCheck(this, StyleSheetManager);
12545
12546 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12547
12548 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12549 return _this;
12550 }
12551
12552 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12553 if (sheet) {
12554 return sheet;
12555 } else if (target) {
12556 return new StyleSheet(target);
12557 } else {
12558 throw new StyledComponentsError(4);
12559 }
12560 };
12561
12562 StyleSheetManager.prototype.render = function render() {
12563 var _props = this.props,
12564 children = _props.children,
12565 sheet = _props.sheet,
12566 target = _props.target;
12567
12568
12569 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12570 StyleSheetContext.Provider,
12571 { value: this.getContext(sheet, target) },
12572 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12573 );
12574 };
12575
12576 return StyleSheetManager;
12577 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12578 true ? StyleSheetManager.propTypes = {
12579 sheet: prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().instanceOf(StyleSheet), prop_types__WEBPACK_IMPORTED_MODULE_8___default().instanceOf(ServerStyleSheet)]),
12580
12581 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12582 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12583 })
12584 } : 0;
12585
12586 //
12587
12588 var identifiers = {};
12589
12590 /* We depend on components having unique IDs */
12591 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12592 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12593
12594 /**
12595 * This ensures uniqueness if two components happen to share
12596 * the same displayName.
12597 */
12598 var nr = (identifiers[displayName] || 0) + 1;
12599 identifiers[displayName] = nr;
12600
12601 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12602
12603 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12604 }
12605
12606 // $FlowFixMe
12607
12608 var StyledComponent = function (_Component) {
12609 inherits(StyledComponent, _Component);
12610
12611 function StyledComponent() {
12612 classCallCheck(this, StyledComponent);
12613
12614 var _this = possibleConstructorReturn(this, _Component.call(this));
12615
12616 _this.attrs = {};
12617
12618 _this.renderOuter = _this.renderOuter.bind(_this);
12619 _this.renderInner = _this.renderInner.bind(_this);
12620
12621 if (true) {
12622 _this.warnInnerRef = once(function (displayName) {
12623 return (
12624 // eslint-disable-next-line no-console
12625 console.warn('The "innerRef" API has been removed in styled-components v4 in favor of React 16 ref forwarding, use "ref" instead like a typical component. "innerRef" was detected on component "' + displayName + '".')
12626 );
12627 });
12628
12629 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12630 return (
12631 // eslint-disable-next-line no-console
12632 console.warn('Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "' + key + '" on component "' + displayName + '".', '\n ' + new Error().stack)
12633 );
12634 });
12635
12636 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12637 return (
12638 // eslint-disable-next-line no-console
12639 console.warn('It looks like you\'ve used a non styled-component as the value for the "' + key + '" prop in an object-form attrs constructor of "' + displayName + '".\n' + 'You should use the new function-form attrs constructor which avoids this issue: attrs(props => ({ yourStuff }))\n' + "To continue using the deprecated object syntax, you'll need to wrap your component prop in a function to make it available inside the styled component (you'll still get the deprecation warning though.)\n" + ('For example, { ' + key + ': () => InnerComponent } instead of { ' + key + ': InnerComponent }'))
12640 );
12641 });
12642 }
12643 return _this;
12644 }
12645
12646 StyledComponent.prototype.render = function render() {
12647 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12648 StyleSheetConsumer,
12649 null,
12650 this.renderOuter
12651 );
12652 };
12653
12654 StyledComponent.prototype.renderOuter = function renderOuter() {
12655 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12656
12657 this.styleSheet = styleSheet;
12658
12659 // No need to subscribe a static component to theme changes, it won't change anything
12660 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12661
12662 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12663 ThemeConsumer,
12664 null,
12665 this.renderInner
12666 );
12667 };
12668
12669 StyledComponent.prototype.renderInner = function renderInner(theme) {
12670 var _props$forwardedCompo = this.props.forwardedComponent,
12671 componentStyle = _props$forwardedCompo.componentStyle,
12672 defaultProps = _props$forwardedCompo.defaultProps,
12673 displayName = _props$forwardedCompo.displayName,
12674 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12675 styledComponentId = _props$forwardedCompo.styledComponentId,
12676 target = _props$forwardedCompo.target;
12677
12678
12679 var generatedClassName = void 0;
12680 if (componentStyle.isStatic) {
12681 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12682 } else {
12683 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12684 }
12685
12686 var elementToBeCreated = this.props.as || this.attrs.as || target;
12687 var isTargetTag = isTag(elementToBeCreated);
12688
12689 var propsForElement = {};
12690 var computedProps = _extends({}, this.props, this.attrs);
12691
12692 var key = void 0;
12693 // eslint-disable-next-line guard-for-in
12694 for (key in computedProps) {
12695 if ( true && key === 'innerRef' && isTargetTag) {
12696 this.warnInnerRef(displayName);
12697 }
12698
12699 if (key === 'forwardedComponent' || key === 'as') {
12700 continue;
12701 } else if (key === 'forwardedRef') propsForElement.ref = computedProps[key];else if (key === 'forwardedAs') propsForElement.as = computedProps[key];else if (!isTargetTag || (0,_emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_5__["default"])(key)) {
12702 // Don't pass through non HTML tags through to HTML elements
12703 propsForElement[key] = computedProps[key];
12704 }
12705 }
12706
12707 if (this.props.style && this.attrs.style) {
12708 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12709 }
12710
12711 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12712
12713 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12714 };
12715
12716 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12717 var _this2 = this;
12718
12719 var context = _extends({}, props, { theme: theme });
12720
12721 if (!attrs.length) return context;
12722
12723 this.attrs = {};
12724
12725 attrs.forEach(function (attrDef) {
12726 var resolvedAttrDef = attrDef;
12727 var attrDefWasFn = false;
12728 var attr = void 0;
12729 var key = void 0;
12730
12731 if (isFunction(resolvedAttrDef)) {
12732 // $FlowFixMe
12733 resolvedAttrDef = resolvedAttrDef(context);
12734 attrDefWasFn = true;
12735 }
12736
12737 /* eslint-disable guard-for-in */
12738 // $FlowFixMe
12739 for (key in resolvedAttrDef) {
12740 attr = resolvedAttrDef[key];
12741
12742 if (!attrDefWasFn) {
12743 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12744 if (true) {
12745 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12746 }
12747
12748 attr = attr(context);
12749
12750 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12751 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12752 }
12753 }
12754 }
12755
12756 _this2.attrs[key] = attr;
12757 context[key] = attr;
12758 }
12759 /* eslint-enable */
12760 });
12761
12762 return context;
12763 };
12764
12765 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12766 var _props$forwardedCompo2 = props.forwardedComponent,
12767 attrs = _props$forwardedCompo2.attrs,
12768 componentStyle = _props$forwardedCompo2.componentStyle,
12769 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12770
12771 // statically styled-components don't need to build an execution context object,
12772 // and shouldn't be increasing the number of class names
12773
12774 if (componentStyle.isStatic && !attrs.length) {
12775 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12776 }
12777
12778 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12779
12780 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12781
12782 return className;
12783 };
12784
12785 return StyledComponent;
12786 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12787
12788 function createStyledComponent(target, options, rules) {
12789 var isTargetStyledComp = isStyledComponent(target);
12790 var isClass = !isTag(target);
12791
12792 var _options$displayName = options.displayName,
12793 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12794 _options$componentId = options.componentId,
12795 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12796 _options$ParentCompon = options.ParentComponent,
12797 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12798 _options$attrs = options.attrs,
12799 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12800
12801
12802 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12803
12804 // fold the underlying StyledComponent attrs up (implicit extend)
12805 var finalAttrs =
12806 // $FlowFixMe
12807 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12808
12809 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12810 // $FlowFixMe
12811 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12812
12813 /**
12814 * forwardRef creates a new interim component, which we'll take advantage of
12815 * instead of extending ParentComponent to create _another_ interim class
12816 */
12817 var WrappedStyledComponent = void 0;
12818 var forwardRef = function forwardRef(props, ref) {
12819 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12820 };
12821 forwardRef.displayName = displayName;
12822 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12823 WrappedStyledComponent.displayName = displayName;
12824
12825 // $FlowFixMe
12826 WrappedStyledComponent.attrs = finalAttrs;
12827 // $FlowFixMe
12828 WrappedStyledComponent.componentStyle = componentStyle;
12829
12830 // $FlowFixMe
12831 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12832 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12833
12834 // $FlowFixMe
12835 WrappedStyledComponent.styledComponentId = styledComponentId;
12836
12837 // fold the underlying StyledComponent target up since we folded the styles
12838 // $FlowFixMe
12839 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12840
12841 // $FlowFixMe
12842 WrappedStyledComponent.withComponent = function withComponent(tag) {
12843 var previousComponentId = options.componentId,
12844 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12845
12846
12847 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12848
12849 var newOptions = _extends({}, optionsToCopy, {
12850 attrs: finalAttrs,
12851 componentId: newComponentId,
12852 ParentComponent: ParentComponent
12853 });
12854
12855 return createStyledComponent(tag, newOptions, rules);
12856 };
12857
12858 // $FlowFixMe
12859 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12860 get: function get$$1() {
12861 return this._foldedDefaultProps;
12862 },
12863 set: function set$$1(obj) {
12864 // $FlowFixMe
12865 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12866 }
12867 });
12868
12869 if (true) {
12870 // $FlowFixMe
12871 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12872 }
12873
12874 // $FlowFixMe
12875 WrappedStyledComponent.toString = function () {
12876 return '.' + WrappedStyledComponent.styledComponentId;
12877 };
12878
12879 if (isClass) {
12880 hoistNonReactStatics(WrappedStyledComponent, target, {
12881 // all SC-specific things should not be hoisted
12882 attrs: true,
12883 componentStyle: true,
12884 displayName: true,
12885 foldedComponentIds: true,
12886 styledComponentId: true,
12887 target: true,
12888 withComponent: true
12889 });
12890 }
12891
12892 return WrappedStyledComponent;
12893 }
12894
12895 //
12896 // Thanks to ReactDOMFactories for this handy list!
12897
12898 var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',
12899
12900 // SVG
12901 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12902
12903 //
12904
12905 var styled = function styled(tag) {
12906 return constructWithOptions(createStyledComponent, tag);
12907 };
12908
12909 // Shorthands for all valid HTML Elements
12910 domElements.forEach(function (domElement) {
12911 styled[domElement] = styled(domElement);
12912 });
12913
12914 //
12915
12916 var GlobalStyle = function () {
12917 function GlobalStyle(rules, componentId) {
12918 classCallCheck(this, GlobalStyle);
12919
12920 this.rules = rules;
12921 this.componentId = componentId;
12922 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12923
12924 if (!StyleSheet.master.hasId(componentId)) {
12925 StyleSheet.master.deferredInject(componentId, []);
12926 }
12927 }
12928
12929 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12930 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12931 var css = stringifyRules(flatCSS, '');
12932
12933 styleSheet.inject(this.componentId, css);
12934 };
12935
12936 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12937 var componentId = this.componentId;
12938
12939 if (styleSheet.hasId(componentId)) {
12940 styleSheet.remove(componentId);
12941 }
12942 };
12943
12944 // TODO: overwrite in-place instead of remove+create?
12945
12946
12947 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12948 this.removeStyles(styleSheet);
12949 this.createStyles(executionContext, styleSheet);
12950 };
12951
12952 return GlobalStyle;
12953 }();
12954
12955 //
12956
12957 // place our cache into shared context so it'll persist between HMRs
12958 if (IS_BROWSER) {
12959 window.scCGSHMRCache = {};
12960 }
12961
12962 function createGlobalStyle(strings) {
12963 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12964 interpolations[_key - 1] = arguments[_key];
12965 }
12966
12967 var rules = css.apply(undefined, [strings].concat(interpolations));
12968 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12969 var style = new GlobalStyle(rules, id);
12970
12971 var GlobalStyleComponent = function (_React$Component) {
12972 inherits(GlobalStyleComponent, _React$Component);
12973
12974 function GlobalStyleComponent(props) {
12975 classCallCheck(this, GlobalStyleComponent);
12976
12977 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12978
12979 var _this$constructor = _this.constructor,
12980 globalStyle = _this$constructor.globalStyle,
12981 styledComponentId = _this$constructor.styledComponentId;
12982
12983
12984 if (IS_BROWSER) {
12985 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12986 }
12987
12988 /**
12989 * This fixes HMR compatibility. Don't ask me why, but this combination of
12990 * caching the closure variables via statics and then persisting the statics in
12991 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12992 */
12993 _this.state = {
12994 globalStyle: globalStyle,
12995 styledComponentId: styledComponentId
12996 };
12997 return _this;
12998 }
12999
13000 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
13001 if (window.scCGSHMRCache[this.state.styledComponentId]) {
13002 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
13003 }
13004 /**
13005 * Depending on the order "render" is called this can cause the styles to be lost
13006 * until the next render pass of the remaining instance, which may
13007 * not be immediate.
13008 */
13009 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
13010 this.state.globalStyle.removeStyles(this.styleSheet);
13011 }
13012 };
13013
13014 GlobalStyleComponent.prototype.render = function render() {
13015 var _this2 = this;
13016
13017 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
13018 // eslint-disable-next-line no-console
13019 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
13020 }
13021
13022 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13023 StyleSheetConsumer,
13024 null,
13025 function (styleSheet) {
13026 _this2.styleSheet = styleSheet || StyleSheet.master;
13027
13028 var globalStyle = _this2.state.globalStyle;
13029
13030
13031 if (globalStyle.isStatic) {
13032 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
13033
13034 return null;
13035 } else {
13036 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13037 ThemeConsumer,
13038 null,
13039 function (theme) {
13040 // $FlowFixMe
13041 var defaultProps = _this2.constructor.defaultProps;
13042
13043
13044 var context = _extends({}, _this2.props);
13045
13046 if (typeof theme !== 'undefined') {
13047 context.theme = determineTheme(_this2.props, theme, defaultProps);
13048 }
13049
13050 globalStyle.renderStyles(context, _this2.styleSheet);
13051
13052 return null;
13053 }
13054 );
13055 }
13056 }
13057 );
13058 };
13059
13060 return GlobalStyleComponent;
13061 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
13062
13063 GlobalStyleComponent.globalStyle = style;
13064 GlobalStyleComponent.styledComponentId = id;
13065
13066
13067 return GlobalStyleComponent;
13068 }
13069
13070 //
13071
13072 var replaceWhitespace = function replaceWhitespace(str) {
13073 return str.replace(/\s|\\n/g, '');
13074 };
13075
13076 function keyframes(strings) {
13077 /* Warning if you've used keyframes on React Native */
13078 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
13079 // eslint-disable-next-line no-console
13080 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
13081 }
13082
13083 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
13084 interpolations[_key - 1] = arguments[_key];
13085 }
13086
13087 var rules = css.apply(undefined, [strings].concat(interpolations));
13088
13089 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
13090
13091 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
13092 }
13093
13094 //
13095
13096 var withTheme = (function (Component$$1) {
13097 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
13098 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
13099 ThemeConsumer,
13100 null,
13101 function (theme) {
13102 // $FlowFixMe
13103 var defaultProps = Component$$1.defaultProps;
13104
13105 var themeProp = determineTheme(props, theme, defaultProps);
13106
13107 if ( true && themeProp === undefined) {
13108 // eslint-disable-next-line no-console
13109 console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "' + getComponentName(Component$$1) + '"');
13110 }
13111
13112 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
13113 }
13114 );
13115 });
13116
13117 hoistNonReactStatics(WithTheme, Component$$1);
13118
13119 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
13120
13121 return WithTheme;
13122 });
13123
13124 //
13125
13126 /* eslint-disable */
13127 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
13128 StyleSheet: StyleSheet
13129 };
13130
13131 //
13132
13133 /* Warning if you've imported this file on React Native */
13134 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
13135 // eslint-disable-next-line no-console
13136 console.warn("It looks like you've imported 'styled-components' on React Native.\n" + "Perhaps you're looking to import 'styled-components/native'?\n" + 'Read more about this at https://www.styled-components.com/docs/basics#react-native');
13137 }
13138
13139 /* Warning if there are several instances of styled-components */
13140 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
13141 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
13142
13143 if (window['__styled-components-init__'] === 1) {
13144 // eslint-disable-next-line no-console
13145 console.warn("It looks like there are several instances of 'styled-components' initialized in this application. " + 'This may cause dynamic styles not rendering properly, errors happening during rehydration process ' + 'and makes your application bigger without a good reason.\n\n' + 'See https://s-c.sh/2BAXzed for more info.');
13146 }
13147
13148 window['__styled-components-init__'] += 1;
13149 }
13150
13151 //
13152
13153 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
13154
13155 //# sourceMappingURL=styled-components.browser.esm.js.map
13156
13157
13158 /***/ }),
13159
13160 /***/ "./node_modules/stylis-rule-sheet/index.js":
13161 /*!*************************************************!*\
13162 !*** ./node_modules/stylis-rule-sheet/index.js ***!
13163 \*************************************************/
13164 /***/ ((module) => {
13165
13166 (function (factory) {
13167 true ? (module['exports'] = factory()) :
13168 0
13169 }(function () {
13170
13171 'use strict'
13172
13173 return function (insertRule) {
13174 var delimiter = '/*|*/'
13175 var needle = delimiter+'}'
13176
13177 function toSheet (block) {
13178 if (block)
13179 try {
13180 insertRule(block + '}')
13181 } catch (e) {}
13182 }
13183
13184 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
13185 switch (context) {
13186 // property
13187 case 1:
13188 // @import
13189 if (depth === 0 && content.charCodeAt(0) === 64)
13190 return insertRule(content+';'), ''
13191 break
13192 // selector
13193 case 2:
13194 if (ns === 0)
13195 return content + delimiter
13196 break
13197 // at-rule
13198 case 3:
13199 switch (ns) {
13200 // @font-face, @page
13201 case 102:
13202 case 112:
13203 return insertRule(selectors[0]+content), ''
13204 default:
13205 return content + (at === 0 ? delimiter : '')
13206 }
13207 case -2:
13208 content.split(needle).forEach(toSheet)
13209 }
13210 }
13211 }
13212 }))
13213
13214
13215 /***/ }),
13216
13217 /***/ "./node_modules/stylis/stylis.min.js":
13218 /*!*******************************************!*\
13219 !*** ./node_modules/stylis/stylis.min.js ***!
13220 \*******************************************/
13221 /***/ ((module) => {
13222
13223 !function(e){ true?module.exports=e(null):0}(function e(a){"use strict";var r=/^\0+/g,c=/[\0\r\f]/g,s=/: */g,t=/zoo|gra/,i=/([,: ])(transform)/g,f=/,+\s*(?![^(]*[)])/g,n=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,o=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,u=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,b=/@(k\w+)\s*(\S*)\s*/,p=/::(place)/g,k=/:(read-only)/g,g=/\s+(?=[{\];=:>])/g,A=/([[}=:>])\s+/g,C=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,v=/([^\(])(:+) */g,m=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,$=/([\s\S]*?);/g,y=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,z=/([^-])(image-set\()/,N="-webkit-",S="-moz-",F="-ms-",W=59,q=125,B=123,D=40,E=41,G=91,H=93,I=10,J=13,K=9,L=64,M=32,P=38,Q=45,R=95,T=42,U=44,V=58,X=39,Y=34,Z=47,_=62,ee=43,ae=126,re=0,ce=12,se=11,te=107,ie=109,fe=115,ne=112,le=111,oe=105,he=99,ue=100,de=112,be=1,pe=1,ke=0,ge=1,Ae=1,Ce=1,we=0,ve=0,me=0,xe=[],$e=[],ye=0,Oe=null,je=-2,ze=-1,Ne=0,Se=1,Fe=2,We=3,qe=0,Be=1,De="",Ee="",Ge="";function He(e,a,s,t,i){for(var f,n,o=0,h=0,u=0,d=0,g=0,A=0,C=0,w=0,m=0,$=0,y=0,O=0,j=0,z=0,R=0,we=0,$e=0,Oe=0,je=0,ze=s.length,Je=ze-1,Re="",Te="",Ue="",Ve="",Xe="",Ye="";R<ze;){if(C=s.charCodeAt(R),R===Je)if(h+d+u+o!==0){if(0!==h)C=h===Z?I:Z;d=u=o=0,ze++,Je++}if(h+d+u+o===0){if(R===Je){if(we>0)Te=Te.replace(c,"");if(Te.trim().length>0){switch(C){case M:case K:case W:case J:case I:break;default:Te+=s.charAt(R)}C=W}}if(1===$e)switch(C){case B:case q:case W:case Y:case X:case D:case E:case U:$e=0;case K:case J:case I:case M:break;default:for($e=0,je=R,g=C,R--,C=W;je<ze;)switch(s.charCodeAt(je++)){case I:case J:case W:++R,C=g,je=ze;break;case V:if(we>0)++R,C=g;case B:je=ze}}switch(C){case B:for(g=(Te=Te.trim()).charCodeAt(0),y=1,je=++R;R<ze;){switch(C=s.charCodeAt(R)){case B:y++;break;case q:y--;break;case Z:switch(A=s.charCodeAt(R+1)){case T:case Z:R=Qe(A,R,Je,s)}break;case G:C++;case D:C++;case Y:case X:for(;R++<Je&&s.charCodeAt(R)!==C;);}if(0===y)break;R++}if(Ue=s.substring(je,R),g===re)g=(Te=Te.replace(r,"").trim()).charCodeAt(0);switch(g){case L:if(we>0)Te=Te.replace(c,"");switch(A=Te.charCodeAt(1)){case ue:case ie:case fe:case Q:f=a;break;default:f=xe}if(je=(Ue=He(a,f,Ue,A,i+1)).length,me>0&&0===je)je=Te.length;if(ye>0)if(f=Ie(xe,Te,Oe),n=Pe(We,Ue,f,a,pe,be,je,A,i,t),Te=f.join(""),void 0!==n)if(0===(je=(Ue=n.trim()).length))A=0,Ue="";if(je>0)switch(A){case fe:Te=Te.replace(x,Me);case ue:case ie:case Q:Ue=Te+"{"+Ue+"}";break;case te:if(Ue=(Te=Te.replace(b,"$1 $2"+(Be>0?De:"")))+"{"+Ue+"}",1===Ae||2===Ae&&Le("@"+Ue,3))Ue="@"+N+Ue+"@"+Ue;else Ue="@"+Ue;break;default:if(Ue=Te+Ue,t===de)Ve+=Ue,Ue=""}else Ue="";break;default:Ue=He(a,Ie(a,Te,Oe),Ue,t,i+1)}Xe+=Ue,O=0,$e=0,z=0,we=0,Oe=0,j=0,Te="",Ue="",C=s.charCodeAt(++R);break;case q:case W:if((je=(Te=(we>0?Te.replace(c,""):Te).trim()).length)>1){if(0===z)if((g=Te.charCodeAt(0))===Q||g>96&&g<123)je=(Te=Te.replace(" ",":")).length;if(ye>0)if(void 0!==(n=Pe(Se,Te,a,e,pe,be,Ve.length,t,i,t)))if(0===(je=(Te=n.trim()).length))Te="\0\0";switch(g=Te.charCodeAt(0),A=Te.charCodeAt(1),g){case re:break;case L:if(A===oe||A===he){Ye+=Te+s.charAt(R);break}default:if(Te.charCodeAt(je-1)===V)break;Ve+=Ke(Te,g,A,Te.charCodeAt(2))}}O=0,$e=0,z=0,we=0,Oe=0,Te="",C=s.charCodeAt(++R)}}switch(C){case J:case I:if(h+d+u+o+ve===0)switch($){case E:case X:case Y:case L:case ae:case _:case T:case ee:case Z:case Q:case V:case U:case W:case B:case q:break;default:if(z>0)$e=1}if(h===Z)h=0;else if(ge+O===0&&t!==te&&Te.length>0)we=1,Te+="\0";if(ye*qe>0)Pe(Ne,Te,a,e,pe,be,Ve.length,t,i,t);be=1,pe++;break;case W:case q:if(h+d+u+o===0){be++;break}default:switch(be++,Re=s.charAt(R),C){case K:case M:if(d+o+h===0)switch(w){case U:case V:case K:case M:Re="";break;default:if(C!==M)Re=" "}break;case re:Re="\\0";break;case ce:Re="\\f";break;case se:Re="\\v";break;case P:if(d+h+o===0&&ge>0)Oe=1,we=1,Re="\f"+Re;break;case 108:if(d+h+o+ke===0&&z>0)switch(R-z){case 2:if(w===ne&&s.charCodeAt(R-3)===V)ke=w;case 8:if(m===le)ke=m}break;case V:if(d+h+o===0)z=R;break;case U:if(h+u+d+o===0)we=1,Re+="\r";break;case Y:case X:if(0===h)d=d===C?0:0===d?C:d;break;case G:if(d+h+u===0)o++;break;case H:if(d+h+u===0)o--;break;case E:if(d+h+o===0)u--;break;case D:if(d+h+o===0){if(0===O)switch(2*w+3*m){case 533:break;default:y=0,O=1}u++}break;case L:if(h+u+d+o+z+j===0)j=1;break;case T:case Z:if(d+o+u>0)break;switch(h){case 0:switch(2*C+3*s.charCodeAt(R+1)){case 235:h=Z;break;case 220:je=R,h=T}break;case T:if(C===Z&&w===T&&je+2!==R){if(33===s.charCodeAt(je+2))Ve+=s.substring(je,R+1);Re="",h=0}}}if(0===h){if(ge+d+o+j===0&&t!==te&&C!==W)switch(C){case U:case ae:case _:case ee:case E:case D:if(0===O){switch(w){case K:case M:case I:case J:Re+="\0";break;default:Re="\0"+Re+(C===U?"":"\0")}we=1}else switch(C){case D:if(z+7===R&&108===w)z=0;O=++y;break;case E:if(0==(O=--y))we=1,Re+="\0"}break;case K:case M:switch(w){case re:case B:case q:case W:case U:case ce:case K:case M:case I:case J:break;default:if(0===O)we=1,Re+="\0"}}if(Te+=Re,C!==M&&C!==K)$=C}}m=w,w=C,R++}if(je=Ve.length,me>0)if(0===je&&0===Xe.length&&0===a[0].length==false)if(t!==ie||1===a.length&&(ge>0?Ee:Ge)===a[0])je=a.join(",").length+2;if(je>0){if(f=0===ge&&t!==te?function(e){for(var a,r,s=0,t=e.length,i=Array(t);s<t;++s){for(var f=e[s].split(l),n="",o=0,h=0,u=0,d=0,b=f.length;o<b;++o){if(0===(h=(r=f[o]).length)&&b>1)continue;if(u=n.charCodeAt(n.length-1),d=r.charCodeAt(0),a="",0!==o)switch(u){case T:case ae:case _:case ee:case M:case D:break;default:a=" "}switch(d){case P:r=a+Ee;case ae:case _:case ee:case M:case E:case D:break;case G:r=a+r+Ee;break;case V:switch(2*r.charCodeAt(1)+3*r.charCodeAt(2)){case 530:if(Ce>0){r=a+r.substring(8,h-1);break}default:if(o<1||f[o-1].length<1)r=a+Ee+r}break;case U:a="";default:if(h>1&&r.indexOf(":")>0)r=a+r.replace(v,"$1"+Ee+"$2");else r=a+r+Ee}n+=r}i[s]=n.replace(c,"").trim()}return i}(a):a,ye>0)if(void 0!==(n=Pe(Fe,Ve,f,e,pe,be,je,t,i,t))&&0===(Ve=n).length)return Ye+Ve+Xe;if(Ve=f.join(",")+"{"+Ve+"}",Ae*ke!=0){if(2===Ae&&!Le(Ve,2))ke=0;switch(ke){case le:Ve=Ve.replace(k,":"+S+"$1")+Ve;break;case ne:Ve=Ve.replace(p,"::"+N+"input-$1")+Ve.replace(p,"::"+S+"$1")+Ve.replace(p,":"+F+"input-$1")+Ve}ke=0}}return Ye+Ve+Xe}function Ie(e,a,r){var c=a.trim().split(o),s=c,t=c.length,i=e.length;switch(i){case 0:case 1:for(var f=0,n=0===i?"":e[0]+" ";f<t;++f)s[f]=Je(n,s[f],r,i).trim();break;default:f=0;var l=0;for(s=[];f<t;++f)for(var h=0;h<i;++h)s[l++]=Je(e[h]+" ",c[f],r,i).trim()}return s}function Je(e,a,r,c){var s=a,t=s.charCodeAt(0);if(t<33)t=(s=s.trim()).charCodeAt(0);switch(t){case P:switch(ge+c){case 0:case 1:if(0===e.trim().length)break;default:return s.replace(h,"$1"+e.trim())}break;case V:switch(s.charCodeAt(1)){case 103:if(Ce>0&&ge>0)return s.replace(u,"$1").replace(h,"$1"+Ge);break;default:return e.trim()+s.replace(h,"$1"+e.trim())}default:if(r*ge>0&&s.indexOf("\f")>0)return s.replace(h,(e.charCodeAt(0)===V?"":"$1")+e.trim())}return e+s}function Ke(e,a,r,c){var l,o=0,h=e+";",u=2*a+3*r+4*c;if(944===u)return function(e){var a=e.length,r=e.indexOf(":",9)+1,c=e.substring(0,r).trim(),s=e.substring(r,a-1).trim();switch(e.charCodeAt(9)*Be){case 0:break;case Q:if(110!==e.charCodeAt(10))break;default:for(var t=s.split((s="",f)),i=0,r=0,a=t.length;i<a;r=0,++i){for(var l=t[i],o=l.split(n);l=o[r];){var h=l.charCodeAt(0);if(1===Be&&(h>L&&h<90||h>96&&h<123||h===R||h===Q&&l.charCodeAt(1)!==Q))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=De}}o[r++]=l}s+=(0===i?"":",")+o.join(" ")}}if(s=c+s+";",1===Ae||2===Ae&&Le(s,1))return N+s+s;return s}(h);else if(0===Ae||2===Ae&&!Le(h,1))return h;switch(u){case 1015:return 97===h.charCodeAt(10)?N+h+h:h;case 951:return 116===h.charCodeAt(3)?N+h+h:h;case 963:return 110===h.charCodeAt(5)?N+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return N+h+h;case 978:return N+h+S+h+h;case 1019:case 983:return N+h+S+h+F+h+h;case 883:if(h.charCodeAt(8)===Q)return N+h+h;if(h.indexOf("image-set(",11)>0)return h.replace(z,"$1"+N+"$2")+h;return h;case 932:if(h.charCodeAt(4)===Q)switch(h.charCodeAt(5)){case 103:return N+"box-"+h.replace("-grow","")+N+h+F+h.replace("grow","positive")+h;case 115:return N+h+F+h.replace("shrink","negative")+h;case 98:return N+h+F+h.replace("basis","preferred-size")+h}return N+h+F+h+h;case 964:return N+h+F+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return l=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),N+"box-pack"+l+N+h+F+"flex-pack"+l+h;case 1005:return t.test(h)?h.replace(s,":"+N)+h.replace(s,":"+S)+h:h;case 1e3:switch(o=(l=h.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(o)){case 226:l=h.replace(m,"tb");break;case 232:l=h.replace(m,"tb-rl");break;case 220:l=h.replace(m,"lr");break;default:return h}return N+h+F+l+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(o=(h=e).length-10,u=(l=(33===h.charCodeAt(o)?h.substring(0,o):h).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:h=h.replace(l,N+l)+";"+h;break;case 207:case 102:h=h.replace(l,N+(u>102?"inline-":"")+"box")+";"+h.replace(l,N+l)+";"+h.replace(l,F+l+"box")+";"+h}return h+";";case 938:if(h.charCodeAt(5)===Q)switch(h.charCodeAt(6)){case 105:return l=h.replace("-items",""),N+h+N+"box-"+l+F+"flex-"+l+h;case 115:return N+h+F+"flex-item-"+h.replace(y,"")+h;default:return N+h+F+"flex-line-pack"+h.replace("align-content","").replace(y,"")+h}break;case 973:case 989:if(h.charCodeAt(3)!==Q||122===h.charCodeAt(4))break;case 931:case 953:if(true===j.test(e))if(115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0))return Ke(e.replace("stretch","fill-available"),a,r,c).replace(":fill-available",":stretch");else return h.replace(l,N+l)+h.replace(l,S+l.replace("fill-",""))+h;break;case 962:if(h=N+h+(102===h.charCodeAt(5)?F+h:"")+h,r+c===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(i,"$1"+N+"$2")+h}return h}function Le(e,a){var r=e.indexOf(1===a?":":"{"),c=e.substring(0,3!==a?r:10),s=e.substring(r+1,e.length-1);return Oe(2!==a?c:c.replace(O,"$1"),s,a)}function Me(e,a){var r=Ke(a,a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2));return r!==a+";"?r.replace($," or ($1)").substring(4):"("+a+")"}function Pe(e,a,r,c,s,t,i,f,n,l){for(var o,h=0,u=a;h<ye;++h)switch(o=$e[h].call(Te,e,u,r,c,s,t,i,f,n,l)){case void 0:case false:case true:case null:break;default:u=o}if(u!==a)return u}function Qe(e,a,r,c){for(var s=a+1;s<r;++s)switch(c.charCodeAt(s)){case Z:if(e===T)if(c.charCodeAt(s-1)===T&&a+2!==s)return s+1;break;case I:if(e===Z)return s+1}return s}function Re(e){for(var a in e){var r=e[a];switch(a){case"keyframe":Be=0|r;break;case"global":Ce=0|r;break;case"cascade":ge=0|r;break;case"compress":we=0|r;break;case"semicolon":ve=0|r;break;case"preserve":me=0|r;break;case"prefix":if(Oe=null,!r)Ae=0;else if("function"!=typeof r)Ae=1;else Ae=2,Oe=r}}return Re}function Te(a,r){if(void 0!==this&&this.constructor===Te)return e(a);var s=a,t=s.charCodeAt(0);if(t<33)t=(s=s.trim()).charCodeAt(0);if(Be>0)De=s.replace(d,t===G?"":"-");if(t=1,1===ge)Ge=s;else Ee=s;var i,f=[Ge];if(ye>0)if(void 0!==(i=Pe(ze,r,f,f,pe,be,0,0,0,0))&&"string"==typeof i)r=i;var n=He(xe,f,r,0,0);if(ye>0)if(void 0!==(i=Pe(je,n,f,f,pe,be,n.length,0,0,0))&&"string"!=typeof(n=i))t=0;return De="",Ge="",Ee="",ke=0,pe=1,be=1,we*t==0?n:n.replace(c,"").replace(g,"").replace(A,"$1").replace(C,"$1").replace(w," ")}if(Te.use=function e(a){switch(a){case void 0:case null:ye=$e.length=0;break;default:if("function"==typeof a)$e[ye++]=a;else if("object"==typeof a)for(var r=0,c=a.length;r<c;++r)e(a[r]);else qe=0|!!a}return e},Te.set=Re,void 0!==a)Re(a);return Te});
13224 //# sourceMappingURL=stylis.min.js.map
13225
13226 /***/ }),
13227
13228 /***/ "react":
13229 /*!************************!*\
13230 !*** external "React" ***!
13231 \************************/
13232 /***/ ((module) => {
13233
13234 "use strict";
13235 module.exports = window["React"];
13236
13237 /***/ }),
13238
13239 /***/ "jquery":
13240 /*!*************************!*\
13241 !*** external "jQuery" ***!
13242 \*************************/
13243 /***/ ((module) => {
13244
13245 "use strict";
13246 module.exports = window["jQuery"];
13247
13248 /***/ }),
13249
13250 /***/ "@wordpress/block-editor":
13251 /*!*************************************!*\
13252 !*** external ["wp","blockEditor"] ***!
13253 \*************************************/
13254 /***/ ((module) => {
13255
13256 "use strict";
13257 module.exports = window["wp"]["blockEditor"];
13258
13259 /***/ }),
13260
13261 /***/ "@wordpress/blocks":
13262 /*!********************************!*\
13263 !*** external ["wp","blocks"] ***!
13264 \********************************/
13265 /***/ ((module) => {
13266
13267 "use strict";
13268 module.exports = window["wp"]["blocks"];
13269
13270 /***/ }),
13271
13272 /***/ "@wordpress/components":
13273 /*!************************************!*\
13274 !*** external ["wp","components"] ***!
13275 \************************************/
13276 /***/ ((module) => {
13277
13278 "use strict";
13279 module.exports = window["wp"]["components"];
13280
13281 /***/ }),
13282
13283 /***/ "@wordpress/compose":
13284 /*!*********************************!*\
13285 !*** external ["wp","compose"] ***!
13286 \*********************************/
13287 /***/ ((module) => {
13288
13289 "use strict";
13290 module.exports = window["wp"]["compose"];
13291
13292 /***/ }),
13293
13294 /***/ "@wordpress/data":
13295 /*!******************************!*\
13296 !*** external ["wp","data"] ***!
13297 \******************************/
13298 /***/ ((module) => {
13299
13300 "use strict";
13301 module.exports = window["wp"]["data"];
13302
13303 /***/ }),
13304
13305 /***/ "@wordpress/edit-post":
13306 /*!**********************************!*\
13307 !*** external ["wp","editPost"] ***!
13308 \**********************************/
13309 /***/ ((module) => {
13310
13311 "use strict";
13312 module.exports = window["wp"]["editPost"];
13313
13314 /***/ }),
13315
13316 /***/ "@wordpress/element":
13317 /*!*********************************!*\
13318 !*** external ["wp","element"] ***!
13319 \*********************************/
13320 /***/ ((module) => {
13321
13322 "use strict";
13323 module.exports = window["wp"]["element"];
13324
13325 /***/ }),
13326
13327 /***/ "@wordpress/i18n":
13328 /*!******************************!*\
13329 !*** external ["wp","i18n"] ***!
13330 \******************************/
13331 /***/ ((module) => {
13332
13333 "use strict";
13334 module.exports = window["wp"]["i18n"];
13335
13336 /***/ }),
13337
13338 /***/ "@wordpress/plugins":
13339 /*!*********************************!*\
13340 !*** external ["wp","plugins"] ***!
13341 \*********************************/
13342 /***/ ((module) => {
13343
13344 "use strict";
13345 module.exports = window["wp"]["plugins"];
13346
13347 /***/ }),
13348
13349 /***/ "./node_modules/@linaria/react/dist/index.mjs":
13350 /*!****************************************************!*\
13351 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
13352 \****************************************************/
13353 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13354
13355 "use strict";
13356 __webpack_require__.r(__webpack_exports__);
13357 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13358 /* harmony export */ "styled": () => (/* binding */ styled_default)
13359 /* harmony export */ });
13360 /* harmony import */ var _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@linaria/react/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js");
13361 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
13362 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
13363 // src/styled.ts
13364
13365
13366
13367 var isCapital = (ch) => ch.toUpperCase() === ch;
13368 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
13369 var omit = (obj, keys) => {
13370 const res = {};
13371 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
13372 res[key] = obj[key];
13373 });
13374 return res;
13375 };
13376 function filterProps(asIs, props, omitKeys) {
13377 const filteredProps = omit(props, omitKeys);
13378 if (!asIs) {
13379 const interopValidAttr = typeof _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"] === "function" ? { default: _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"] } : _emotion_is_prop_valid__WEBPACK_IMPORTED_MODULE_0__["default"];
13380 Object.keys(filteredProps).forEach((key) => {
13381 if (!interopValidAttr.default(key)) {
13382 delete filteredProps[key];
13383 }
13384 });
13385 }
13386 return filteredProps;
13387 }
13388 var warnIfInvalid = (value, componentName) => {
13389 if (true) {
13390 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
13391 return;
13392 }
13393 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
13394 console.warn(
13395 `An interpolation evaluated to '${stringified}' in the component '${componentName}', which is probably a mistake. You should explicitly cast or transform the value to a string.`
13396 );
13397 }
13398 };
13399 var idx = 0;
13400 function styled(tag) {
13401 var _a;
13402 let mockedClass = "";
13403 if (false) {}
13404 return (options) => {
13405 if (true) {
13406 if (Array.isArray(options)) {
13407 throw new Error(
13408 'Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup'
13409 );
13410 }
13411 }
13412 const render = (props, ref) => {
13413 const { as: component = tag, class: className = mockedClass } = props;
13414 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
13415 const filteredProps = filterProps(shouldKeepProps, props, [
13416 "as",
13417 "class"
13418 ]);
13419 filteredProps.ref = ref;
13420 filteredProps.className = options.atomic ? (0,_linaria_core__WEBPACK_IMPORTED_MODULE_2__.cx)(options.class, filteredProps.className || className) : (0,_linaria_core__WEBPACK_IMPORTED_MODULE_2__.cx)(filteredProps.className || className, options.class);
13421 const { vars } = options;
13422 if (vars) {
13423 const style = {};
13424 for (const name in vars) {
13425 const variable = vars[name];
13426 const result = variable[0];
13427 const unit = variable[1] || "";
13428 const value = typeof result === "function" ? result(props) : result;
13429 warnIfInvalid(value, options.name);
13430 style[`--${name}`] = `${value}${unit}`;
13431 }
13432 const ownStyle = filteredProps.style || {};
13433 const keys = Object.keys(ownStyle);
13434 if (keys.length > 0) {
13435 keys.forEach((key) => {
13436 style[key] = ownStyle[key];
13437 });
13438 }
13439 filteredProps.style = style;
13440 }
13441 if (tag.__linaria && tag !== component) {
13442 filteredProps.as = component;
13443 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
13444 }
13445 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
13446 };
13447 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
13448 const rest = omit(props, ["innerRef"]);
13449 return render(rest, props.innerRef);
13450 };
13451 Result.displayName = options.name;
13452 Result.__linaria = {
13453 className: options.class || mockedClass,
13454 extends: tag
13455 };
13456 return Result;
13457 };
13458 }
13459 var styled_default = true ? new Proxy(styled, {
13460 get(o, prop) {
13461 return o(prop);
13462 }
13463 }) : 0;
13464
13465 //# sourceMappingURL=index.mjs.map
13466
13467 /***/ }),
13468
13469 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
13470 /*!*******************************************************************************!*\
13471 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
13472 \*******************************************************************************/
13473 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13474
13475 "use strict";
13476 __webpack_require__.r(__webpack_exports__);
13477 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13478 /* harmony export */ "css": () => (/* binding */ css_default),
13479 /* harmony export */ "cx": () => (/* binding */ cx_default)
13480 /* harmony export */ });
13481 // src/css.ts
13482 var idx = 0;
13483 var css = () => {
13484 if (false) {}
13485 throw new Error(
13486 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
13487 );
13488 };
13489 var css_default = css;
13490
13491 // src/cx.ts
13492 var cx = function cx2() {
13493 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
13494 const atomicClasses = {};
13495 const nonAtomicClasses = [];
13496 presentClassNames.forEach((arg) => {
13497 const individualClassNames = arg ? arg.split(" ") : [];
13498 individualClassNames.forEach((className) => {
13499 if (className.startsWith("atm_")) {
13500 const [, keyHash] = className.split("_");
13501 atomicClasses[keyHash] = className;
13502 } else {
13503 nonAtomicClasses.push(className);
13504 }
13505 });
13506 });
13507 const result = [];
13508 for (const keyHash in atomicClasses) {
13509 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13510 result.push(atomicClasses[keyHash]);
13511 }
13512 }
13513 result.push(...nonAtomicClasses);
13514 return result.join(" ");
13515 };
13516 var cx_default = cx;
13517
13518 //# sourceMappingURL=index.mjs.map
13519
13520 /***/ })
13521
13522 /******/ });
13523 /************************************************************************/
13524 /******/ // The module cache
13525 /******/ var __webpack_module_cache__ = {};
13526 /******/
13527 /******/ // The require function
13528 /******/ function __webpack_require__(moduleId) {
13529 /******/ // Check if module is in cache
13530 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13531 /******/ if (cachedModule !== undefined) {
13532 /******/ return cachedModule.exports;
13533 /******/ }
13534 /******/ // Create a new module (and put it into the cache)
13535 /******/ var module = __webpack_module_cache__[moduleId] = {
13536 /******/ // no module.id needed
13537 /******/ // no module.loaded needed
13538 /******/ exports: {}
13539 /******/ };
13540 /******/
13541 /******/ // Execute the module function
13542 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13543 /******/
13544 /******/ // Return the exports of the module
13545 /******/ return module.exports;
13546 /******/ }
13547 /******/
13548 /************************************************************************/
13549 /******/ /* webpack/runtime/compat get default export */
13550 /******/ (() => {
13551 /******/ // getDefaultExport function for compatibility with non-harmony modules
13552 /******/ __webpack_require__.n = (module) => {
13553 /******/ var getter = module && module.__esModule ?
13554 /******/ () => (module['default']) :
13555 /******/ () => (module);
13556 /******/ __webpack_require__.d(getter, { a: getter });
13557 /******/ return getter;
13558 /******/ };
13559 /******/ })();
13560 /******/
13561 /******/ /* webpack/runtime/define property getters */
13562 /******/ (() => {
13563 /******/ // define getter functions for harmony exports
13564 /******/ __webpack_require__.d = (exports, definition) => {
13565 /******/ for(var key in definition) {
13566 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13567 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13568 /******/ }
13569 /******/ }
13570 /******/ };
13571 /******/ })();
13572 /******/
13573 /******/ /* webpack/runtime/global */
13574 /******/ (() => {
13575 /******/ __webpack_require__.g = (function() {
13576 /******/ if (typeof globalThis === 'object') return globalThis;
13577 /******/ try {
13578 /******/ return this || new Function('return this')();
13579 /******/ } catch (e) {
13580 /******/ if (typeof window === 'object') return window;
13581 /******/ }
13582 /******/ })();
13583 /******/ })();
13584 /******/
13585 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13586 /******/ (() => {
13587 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13588 /******/ })();
13589 /******/
13590 /******/ /* webpack/runtime/make namespace object */
13591 /******/ (() => {
13592 /******/ // define __esModule on exports
13593 /******/ __webpack_require__.r = (exports) => {
13594 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13595 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13596 /******/ }
13597 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13598 /******/ };
13599 /******/ })();
13600 /******/
13601 /******/ /* webpack/runtime/nonce */
13602 /******/ (() => {
13603 /******/ __webpack_require__.nc = undefined;
13604 /******/ })();
13605 /******/
13606 /************************************************************************/
13607 var __webpack_exports__ = {};
13608 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13609 (() => {
13610 "use strict";
13611 /*!**************************************!*\
13612 !*** ./scripts/entries/gutenberg.ts ***!
13613 \**************************************/
13614 __webpack_require__.r(__webpack_exports__);
13615 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13616 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13617 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13618 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13619
13620
13621
13622
13623 (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__.initBackgroundApp)([_gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__["default"], _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__["default"], _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__.registerHubspotSidebar]);
13624 })();
13625
13626 /******/ })()
13627 ;
13628 //# sourceMappingURL=gutenberg.js.map