PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.1.11
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.1.11
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.1.11, at build/gutenberg.js

13,124 lines 500.1 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": () => (__WEBPACK_DEFAULT_EXPORT__)
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 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
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": () => (__WEBPACK_DEFAULT_EXPORT__)
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 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|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
163
164 var isPropValid = /* #__PURE__ */(0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
165 return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
166 /* o */
167 && prop.charCodeAt(1) === 110
168 /* n */
169 && prop.charCodeAt(2) < 91;
170 }
171 /* Z+1 */
172 );
173
174 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isPropValid);
175
176
177 /***/ }),
178
179 /***/ "./scripts/constants/defaultFormOptions.ts":
180 /*!*************************************************!*\
181 !*** ./scripts/constants/defaultFormOptions.ts ***!
182 \*************************************************/
183 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
184
185 "use strict";
186 __webpack_require__.r(__webpack_exports__);
187 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
188 /* harmony export */ "DEFAULT_OPTIONS": () => (/* binding */ DEFAULT_OPTIONS),
189 /* harmony export */ "isDefaultForm": () => (/* binding */ isDefaultForm)
190 /* harmony export */ });
191 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
192 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);
193
194 var REGISTRATION_FORM = 'REGISTRATION_FORM';
195 var CONTACT_US_FORM = 'CONTACT_US_FORM';
196 var NEWSLETTER_FORM = 'NEWSLETTER_FORM';
197 var SUPPORT_FORM = 'SUPPORT_FORM';
198 var EVENT_FORM = 'EVENT_FORM';
199 var DEFAULT_OPTIONS = {
200 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Templates', 'leadin'),
201 options: [{
202 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Registration Form', 'leadin'),
203 value: REGISTRATION_FORM
204 }, {
205 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Contact us Form', 'leadin'),
206 value: CONTACT_US_FORM
207 }, {
208 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Newsletter sign-up Form', 'leadin'),
209 value: NEWSLETTER_FORM
210 }, {
211 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Support Form', 'leadin'),
212 value: SUPPORT_FORM
213 }, {
214 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)('Event Registration Form', 'leadin'),
215 value: EVENT_FORM
216 }]
217 };
218 function isDefaultForm(value) {
219 return value === REGISTRATION_FORM || value === CONTACT_US_FORM || value === NEWSLETTER_FORM || value === SUPPORT_FORM || value === EVENT_FORM;
220 }
221
222 /***/ }),
223
224 /***/ "./scripts/constants/leadinConfig.ts":
225 /*!*******************************************!*\
226 !*** ./scripts/constants/leadinConfig.ts ***!
227 \*******************************************/
228 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
229
230 "use strict";
231 __webpack_require__.r(__webpack_exports__);
232 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
233 /* harmony export */ "accountName": () => (/* binding */ accountName),
234 /* harmony export */ "activationTime": () => (/* binding */ activationTime),
235 /* harmony export */ "adminUrl": () => (/* binding */ adminUrl),
236 /* harmony export */ "connectionStatus": () => (/* binding */ connectionStatus),
237 /* harmony export */ "contentEmbed": () => (/* binding */ contentEmbed),
238 /* harmony export */ "deviceId": () => (/* binding */ deviceId),
239 /* harmony export */ "didDisconnect": () => (/* binding */ didDisconnect),
240 /* harmony export */ "env": () => (/* binding */ env),
241 /* harmony export */ "formsScript": () => (/* binding */ formsScript),
242 /* harmony export */ "formsScriptPayload": () => (/* binding */ formsScriptPayload),
243 /* harmony export */ "hublet": () => (/* binding */ hublet),
244 /* harmony export */ "hubspotBaseUrl": () => (/* binding */ hubspotBaseUrl),
245 /* harmony export */ "hubspotNonce": () => (/* binding */ hubspotNonce),
246 /* harmony export */ "iframeUrl": () => (/* binding */ iframeUrl),
247 /* harmony export */ "impactLink": () => (/* binding */ impactLink),
248 /* harmony export */ "lastAuthorizeTime": () => (/* binding */ lastAuthorizeTime),
249 /* harmony export */ "lastDeauthorizeTime": () => (/* binding */ lastDeauthorizeTime),
250 /* harmony export */ "lastDisconnectTime": () => (/* binding */ lastDisconnectTime),
251 /* harmony export */ "leadinPluginVersion": () => (/* binding */ leadinPluginVersion),
252 /* harmony export */ "leadinQueryParams": () => (/* binding */ leadinQueryParams),
253 /* harmony export */ "locale": () => (/* binding */ locale),
254 /* harmony export */ "loginUrl": () => (/* binding */ loginUrl),
255 /* harmony export */ "meetingsScript": () => (/* binding */ meetingsScript),
256 /* harmony export */ "phpVersion": () => (/* binding */ phpVersion),
257 /* harmony export */ "pluginPath": () => (/* binding */ pluginPath),
258 /* harmony export */ "plugins": () => (/* binding */ plugins),
259 /* harmony export */ "portalDomain": () => (/* binding */ portalDomain),
260 /* harmony export */ "portalEmail": () => (/* binding */ portalEmail),
261 /* harmony export */ "portalId": () => (/* binding */ portalId),
262 /* harmony export */ "redirectNonce": () => (/* binding */ redirectNonce),
263 /* harmony export */ "refreshToken": () => (/* binding */ refreshToken),
264 /* harmony export */ "refreshTokenError": () => (/* binding */ refreshTokenError),
265 /* harmony export */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
266 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
267 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
268 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
269 /* harmony export */ "theme": () => (/* binding */ theme),
270 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
271 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
272 /* harmony export */ });
273 var _window$leadinConfig = window.leadinConfig,
274 accountName = _window$leadinConfig.accountName,
275 adminUrl = _window$leadinConfig.adminUrl,
276 activationTime = _window$leadinConfig.activationTime,
277 connectionStatus = _window$leadinConfig.connectionStatus,
278 deviceId = _window$leadinConfig.deviceId,
279 didDisconnect = _window$leadinConfig.didDisconnect,
280 env = _window$leadinConfig.env,
281 formsScript = _window$leadinConfig.formsScript,
282 meetingsScript = _window$leadinConfig.meetingsScript,
283 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
284 hublet = _window$leadinConfig.hublet,
285 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
286 hubspotNonce = _window$leadinConfig.hubspotNonce,
287 iframeUrl = _window$leadinConfig.iframeUrl,
288 impactLink = _window$leadinConfig.impactLink,
289 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
290 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
291 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
292 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
293 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
294 locale = _window$leadinConfig.locale,
295 loginUrl = _window$leadinConfig.loginUrl,
296 phpVersion = _window$leadinConfig.phpVersion,
297 pluginPath = _window$leadinConfig.pluginPath,
298 plugins = _window$leadinConfig.plugins,
299 portalDomain = _window$leadinConfig.portalDomain,
300 portalEmail = _window$leadinConfig.portalEmail,
301 portalId = _window$leadinConfig.portalId,
302 redirectNonce = _window$leadinConfig.redirectNonce,
303 restNonce = _window$leadinConfig.restNonce,
304 restUrl = _window$leadinConfig.restUrl,
305 refreshToken = _window$leadinConfig.refreshToken,
306 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
307 theme = _window$leadinConfig.theme,
308 trackConsent = _window$leadinConfig.trackConsent,
309 wpVersion = _window$leadinConfig.wpVersion,
310 contentEmbed = _window$leadinConfig.contentEmbed,
311 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope,
312 refreshTokenError = _window$leadinConfig.refreshTokenError;
313
314
315 /***/ }),
316
317 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
318 /*!***************************************************!*\
319 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
320 \***************************************************/
321 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
322
323 "use strict";
324 __webpack_require__.r(__webpack_exports__);
325 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
326 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
327 /* harmony export */ });
328 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
329
330 function CalendarIcon() {
331 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
332 width: "18",
333 height: "18",
334 viewBox: "0 0 18 18",
335 fill: "none",
336 xmlns: "http://www.w3.org/2000/svg",
337 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
338 clipPath: "url(#clip0_903_1965)",
339 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
340 fillRule: "evenodd",
341 clipRule: "evenodd",
342 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",
343 fill: "#FF7A59"
344 })
345 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
346 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
347 id: "clip0_903_1965",
348 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
349 width: "18",
350 height: "18",
351 fill: "white"
352 })
353 })
354 })]
355 });
356 }
357
358 /***/ }),
359
360 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
361 /*!**********************************************************!*\
362 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
363 \**********************************************************/
364 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
365
366 "use strict";
367 __webpack_require__.r(__webpack_exports__);
368 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
369 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
370 /* harmony export */ });
371 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
372
373 function SidebarSprocketIcon() {
374 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
375 width: "20px",
376 height: "20px",
377 version: "1.1",
378 viewBox: "0 0 40 42",
379 xmlns: "http://www.w3.org/2000/svg",
380 xmlnsXlink: "http://www.w3.org/1999/xlink",
381 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
382 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",
383 id: "Fill-1",
384 fillRule: "evenodd"
385 })
386 });
387 }
388
389 /***/ }),
390
391 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
392 /*!***************************************************!*\
393 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
394 \***************************************************/
395 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
396
397 "use strict";
398 __webpack_require__.r(__webpack_exports__);
399 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
400 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
401 /* harmony export */ });
402 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
403
404 function SprocketIcon() {
405 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
406 width: "40px",
407 height: "42px",
408 viewBox: "0 0 40 42",
409 version: "1.1",
410 xmlns: "http://www.w3.org/2000/svg",
411 xmlnsXlink: "http://www.w3.org/1999/xlink",
412 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
413 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
414 id: "path-1",
415 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
416 })
417 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
418 id: "Page-1",
419 stroke: "none",
420 strokeWidth: "1",
421 fill: "none",
422 fillRule: "evenodd",
423 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
424 id: "HubSpot-Sprocket---Full-Color",
425 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
426 id: "mask-2",
427 fill: "white",
428 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
429 xlinkHref: "#path-1"
430 })
431 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
432 id: "path-1"
433 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
434 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",
435 id: "Fill-1",
436 fill: "#F3785B",
437 fillRule: "nonzero",
438 mask: "url(#mask-2)"
439 })]
440 })
441 })]
442 });
443 }
444
445 /***/ }),
446
447 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
448 /*!*******************************************************!*\
449 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
450 \*******************************************************/
451 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
452
453 "use strict";
454 __webpack_require__.r(__webpack_exports__);
455 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
456 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
457 /* harmony export */ });
458 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
459 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
460 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
461
462
463 function FormSaveBlock(_ref) {
464 var attributes = _ref.attributes;
465 var portalId = attributes.portalId,
466 formId = attributes.formId;
467
468 if (portalId && formId) {
469 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
470 className: "wp-block-leadin-hubspot-form-block",
471 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
472 });
473 }
474
475 return null;
476 }
477
478 /***/ }),
479
480 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
481 /*!**************************************************************!*\
482 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
483 \**************************************************************/
484 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
485
486 "use strict";
487 __webpack_require__.r(__webpack_exports__);
488 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
489 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
490 /* harmony export */ });
491 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
492 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
493 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
494 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
495 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
496
497
498
499
500 function FormGutenbergPreview() {
501 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
502 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
503 alt: "Create a new Hubspot Form",
504 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
505 })
506 });
507 }
508
509 /***/ }),
510
511 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
512 /*!***********************************************************!*\
513 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
514 \***********************************************************/
515 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
516
517 "use strict";
518 __webpack_require__.r(__webpack_exports__);
519 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
520 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
521 /* harmony export */ });
522 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
523 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
524 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
525 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
526 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
527 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
528 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
529 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
530 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
531 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
532 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
533 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
534 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
535 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
536
537 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
538
539 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
540
541
542
543
544
545
546
547
548
549
550
551
552 function registerFormBlock() {
553 var editComponent = function editComponent(props) {
554 if (props.attributes.preview) {
555 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
556 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
557 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
558 origin: "gutenberg",
559 preview: true
560 }));
561 } else {
562 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
563 status: 401
564 });
565 }
566 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
567
568
569 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
570 return null;
571 }
572
573 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
574 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
575 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
576 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
577 category: 'leadin-blocks',
578 attributes: {
579 portalId: {
580 type: 'string',
581 "default": ''
582 },
583 formId: {
584 type: 'string'
585 },
586 formName: {
587 type: 'string'
588 },
589 preview: {
590 type: 'boolean',
591 "default": false
592 }
593 },
594 example: {
595 attributes: {
596 preview: true
597 }
598 },
599 edit: editComponent,
600 save: function save(props) {
601 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
602 }
603 });
604 }
605
606 /***/ }),
607
608 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
609 /*!*********************************************************************!*\
610 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
611 \*********************************************************************/
612 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
613
614 "use strict";
615 __webpack_require__.r(__webpack_exports__);
616 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
617 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
618 /* harmony export */ });
619 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
620 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
621 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
622 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
623 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
624
625
626
627
628 function MeetingGutenbergPreview() {
629 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
630 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
631 alt: "Create a new Hubspot Meeting",
632 width: "100%",
633 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
634 })
635 });
636 }
637
638 /***/ }),
639
640 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
641 /*!**************************************************************!*\
642 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
643 \**************************************************************/
644 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
645
646 "use strict";
647 __webpack_require__.r(__webpack_exports__);
648 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
649 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
650 /* harmony export */ });
651 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
652 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
653 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
654
655
656 function MeetingSaveBlock(_ref) {
657 var attributes = _ref.attributes;
658 var url = attributes.url;
659
660 if (url) {
661 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
662 className: "wp-block-leadin-hubspot-meeting-block",
663 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
664 });
665 }
666
667 return null;
668 }
669
670 /***/ }),
671
672 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
673 /*!******************************************************************!*\
674 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.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 */ registerMeetingBlock)
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_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
685 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
686 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
687 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
688 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
689 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
690 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
691 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
692 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
693 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
694 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
695 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
696
697 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
698
699 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
700
701
702
703
704
705
706
707
708
709
710
711 var ConnectionStatus = {
712 Connected: 'Connected',
713 NotConnected: 'NotConnected'
714 };
715 function registerMeetingBlock() {
716 var editComponent = function editComponent(props) {
717 if (props.attributes.preview) {
718 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
719 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
720 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
721 preview: true,
722 origin: "gutenberg"
723 }));
724 } else {
725 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
726 status: 401
727 });
728 }
729 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
730
731
732 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
733 return null;
734 }
735
736 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
737 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
738 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'),
739 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
740 category: 'leadin-blocks',
741 attributes: {
742 url: {
743 type: 'string',
744 "default": ''
745 },
746 preview: {
747 type: 'boolean',
748 "default": false
749 }
750 },
751 example: {
752 attributes: {
753 preview: true
754 }
755 },
756 edit: editComponent,
757 save: function save(props) {
758 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
759 }
760 });
761 }
762
763 /***/ }),
764
765 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
766 /*!***************************************************!*\
767 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
768 \***************************************************/
769 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
770
771 "use strict";
772 __webpack_require__.r(__webpack_exports__);
773 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
774 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
775 /* harmony export */ });
776 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
777 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
778 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
779 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
780 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
781 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
782 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
783 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
784 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
785 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
786 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
787 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
788 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
789 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
790 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
791 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
792 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
793 var _templateObject;
794
795 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
796
797
798
799
800
801
802
803
804
805
806
807
808
809 function registerHubspotSidebar() {
810 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
811
812 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
813 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
814 });
815
816 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
817 var postType = _ref.postType;
818 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
819 name: "leadin",
820 title: "HubSpot",
821 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
822 className: "hs-plugin-sidebar-sprocket",
823 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
824 }),
825 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
826 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
827 initialOpen: true,
828 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
829 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
830 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
831 metaKey: "content-type",
832 className: "select-content-type",
833 label: ContentTypeLabel,
834 options: [{
835 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
836 value: ''
837 }, {
838 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
839 value: 'blog-post'
840 }, {
841 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
842 value: 'knowledge-article'
843 }, {
844 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
845 value: 'landing-page'
846 }, {
847 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
848 value: 'listing-page'
849 }, {
850 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
851 value: 'standard-page'
852 }]
853 })
854 })
855 })
856 }) : null;
857 };
858
859 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
860 var data = select('core/editor');
861 return {
862 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
863 };
864 })(LeadinPluginSidebar);
865
866 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
867 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
868 render: LeadinPluginSidebarWrapper,
869 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
870 });
871 }
872 }
873
874 /***/ }),
875
876 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
877 /*!***************************************************!*\
878 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
879 \***************************************************/
880 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
881
882 "use strict";
883 __webpack_require__.r(__webpack_exports__);
884 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
885 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
886 /* harmony export */ });
887 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
888
889
890 var _exp = /*#__PURE__*/function _exp() {
891 return function (props) {
892 return props.height ? props.height : 'auto';
893 };
894 };
895
896 var _exp2 = /*#__PURE__*/function _exp2() {
897 return function (props) {
898 return props.width ? props.width : 'auto';
899 };
900 };
901
902 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
903 name: "UIImage0",
904 "class": "ump7xqy",
905 propsAsIs: false,
906 vars: {
907 "ump7xqy-0": [_exp()],
908 "ump7xqy-1": [_exp2()]
909 }
910 }));
911
912 __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");
913
914 /***/ }),
915
916 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
917 /*!*******************************************************************!*\
918 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
919 \*******************************************************************/
920 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
921
922 "use strict";
923 __webpack_require__.r(__webpack_exports__);
924 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
925 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
926 /* harmony export */ });
927 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
928 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
929 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
930 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
931 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
932 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
933 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
934
935 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
936
937 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
938
939
940
941
942
943
944
945 var UISidebarSelectControl = function UISidebarSelectControl(props) {
946 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
947 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
948 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
949 value: props.metaValue,
950 onChange: function onChange(content) {
951 if (props.setMetaValue) {
952 props.setMetaValue(content);
953 }
954
955 isBackgroundAppReady && monitorSidebarMetaChange({
956 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
957 payload: {
958 metaKey: props.metaKey
959 }
960 });
961 }
962 }, props));
963 };
964
965 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
966
967 /***/ }),
968
969 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
970 /*!****************************************************************!*\
971 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
972 \****************************************************************/
973 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
974
975 "use strict";
976 __webpack_require__.r(__webpack_exports__);
977 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
978 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
979 /* harmony export */ });
980 var CoreMessages = {
981 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
982 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
983 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
984 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
985 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
986 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
987 };
988
989 /***/ }),
990
991 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
992 /*!******************************************************************!*\
993 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
994 \******************************************************************/
995 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
996
997 "use strict";
998 __webpack_require__.r(__webpack_exports__);
999 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1000 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
1001 /* harmony export */ });
1002 var FormMessages = {
1003 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1004 };
1005
1006 /***/ }),
1007
1008 /***/ "./scripts/iframe/integratedMessages/index.ts":
1009 /*!****************************************************!*\
1010 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1011 \****************************************************/
1012 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1013
1014 "use strict";
1015 __webpack_require__.r(__webpack_exports__);
1016 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1017 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1018 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1019 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1020 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1021 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1022 /* harmony export */ });
1023 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1024 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1025 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1026 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1027 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1028
1029
1030
1031
1032
1033
1034 /***/ }),
1035
1036 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1037 /*!************************************************************************!*\
1038 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1039 \************************************************************************/
1040 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1041
1042 "use strict";
1043 __webpack_require__.r(__webpack_exports__);
1044 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1045 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1046 /* harmony export */ });
1047 var LiveChatMessages = {
1048 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1049 };
1050
1051 /***/ }),
1052
1053 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1054 /*!********************************************************************!*\
1055 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1056 \********************************************************************/
1057 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1058
1059 "use strict";
1060 __webpack_require__.r(__webpack_exports__);
1061 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1062 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1063 /* harmony export */ });
1064 var PluginMessages = {
1065 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1066 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1067 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1068 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1069 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1070 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1071 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1072 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1073 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1074 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1075 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1076 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1077 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1078 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1079 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1080 SkipReviewError: 'SKIP_REVIEW_ERROR',
1081 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1082 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1083 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1084 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1085 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1086 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1087 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1088 };
1089
1090 /***/ }),
1091
1092 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1093 /*!******************************************************************!*\
1094 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1095 \******************************************************************/
1096 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1097
1098 "use strict";
1099 __webpack_require__.r(__webpack_exports__);
1100 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1101 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1102 /* harmony export */ });
1103 var ProxyMessages = {
1104 FetchForms: 'FETCH_FORMS',
1105 FetchForm: 'FETCH_FORM',
1106 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1107 FetchAuth: 'FETCH_AUTH',
1108 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1109 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1110 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1111 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1112 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1113 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1114 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1115 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1116 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1117 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1118 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1119 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1120 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1121 };
1122
1123 /***/ }),
1124
1125 /***/ "./scripts/iframe/useBackgroundApp.ts":
1126 /*!********************************************!*\
1127 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1128 \********************************************/
1129 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1130
1131 "use strict";
1132 __webpack_require__.r(__webpack_exports__);
1133 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1134 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1135 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1136 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1137 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1138 /* harmony export */ });
1139 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1140 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1141
1142 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1143 function useBackgroundAppContext() {
1144 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1145 }
1146 function usePostBackgroundMessage() {
1147 var app = useBackgroundAppContext();
1148 return function (message) {
1149 app.postMessage(message);
1150 };
1151 }
1152 function usePostAsyncBackgroundMessage() {
1153 var app = useBackgroundAppContext();
1154 return function (message) {
1155 return app.postAsyncMessage(message);
1156 };
1157 }
1158
1159 /***/ }),
1160
1161 /***/ "./scripts/lib/Raven.ts":
1162 /*!******************************!*\
1163 !*** ./scripts/lib/Raven.ts ***!
1164 \******************************/
1165 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1166
1167 "use strict";
1168 __webpack_require__.r(__webpack_exports__);
1169 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1170 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1171 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1172 /* harmony export */ });
1173 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1174 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1175 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1176
1177
1178 function configureRaven() {
1179 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1180 return;
1181 }
1182
1183 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1184 instrument: {
1185 tryCatch: false
1186 },
1187 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1188 }).install();
1189 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1190 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1191 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1192 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1193 });
1194 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1195 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1196 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1197 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1198 }).join(',')
1199 });
1200 }
1201 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1202
1203 /***/ }),
1204
1205 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1206 /*!***********************************************!*\
1207 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1208 \***********************************************/
1209 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1210
1211 "use strict";
1212 __webpack_require__.r(__webpack_exports__);
1213 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1214 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1215 /* harmony export */ });
1216 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1217 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1218 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1219 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1220 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1221 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1222 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1223 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1224
1225 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."); }
1226
1227 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1228
1229 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1230
1231 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1232
1233 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1234
1235
1236
1237
1238
1239
1240
1241 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1242 name: "Container",
1243 "class": "c1wxx7eu",
1244 propsAsIs: false
1245 });
1246
1247 var _exp2 = /*#__PURE__*/function _exp2() {
1248 return function (props) {
1249 return props.focused ? '0' : '1px';
1250 };
1251 };
1252
1253 var _exp3 = /*#__PURE__*/function _exp3() {
1254 return function (props) {
1255 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1256 };
1257 };
1258
1259 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1260 name: "ControlContainer",
1261 "class": "c1rgwbep",
1262 propsAsIs: false,
1263 vars: {
1264 "c1rgwbep-0": [_exp2()],
1265 "c1rgwbep-1": [_exp3()]
1266 }
1267 });
1268 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1269 name: "ValueContainer",
1270 "class": "v1mdmbaj",
1271 propsAsIs: false
1272 });
1273 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1274 name: "Placeholder",
1275 "class": "p1gwkvxy",
1276 propsAsIs: false
1277 });
1278 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1279 name: "SingleValue",
1280 "class": "s1bwlafs",
1281 propsAsIs: false
1282 });
1283 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1284 name: "IndicatorContainer",
1285 "class": "i196z9y5",
1286 propsAsIs: false
1287 });
1288 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1289 name: "DropdownIndicator",
1290 "class": "d1dfo5ow",
1291 propsAsIs: false
1292 });
1293 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1294 name: "InputContainer",
1295 "class": "if3lze",
1296 propsAsIs: false
1297 });
1298 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1299 name: "Input",
1300 "class": "i9kxf50",
1301 propsAsIs: false
1302 });
1303 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1304 name: "InputShadow",
1305 "class": "igjr3uc",
1306 propsAsIs: false
1307 });
1308 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1309 name: "MenuContainer",
1310 "class": "mhb9if7",
1311 propsAsIs: false
1312 });
1313 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1314 name: "MenuList",
1315 "class": "mxaof7s",
1316 propsAsIs: false
1317 });
1318 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1319 name: "MenuGroup",
1320 "class": "mw50s5v",
1321 propsAsIs: false
1322 });
1323 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1324 name: "MenuGroupHeader",
1325 "class": "m11rzvjw",
1326 propsAsIs: false
1327 });
1328
1329 var _exp5 = /*#__PURE__*/function _exp5() {
1330 return function (props) {
1331 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1332 };
1333 };
1334
1335 var _exp6 = /*#__PURE__*/function _exp6() {
1336 return function (props) {
1337 return props.selected ? '#fff' : 'inherit';
1338 };
1339 };
1340
1341 var _exp7 = /*#__PURE__*/function _exp7() {
1342 return function (props) {
1343 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1344 };
1345 };
1346
1347 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1348 name: "MenuItem",
1349 "class": "m1jcdsjv",
1350 propsAsIs: false,
1351 vars: {
1352 "m1jcdsjv-0": [_exp5()],
1353 "m1jcdsjv-1": [_exp6()],
1354 "m1jcdsjv-2": [_exp7()]
1355 }
1356 });
1357 function AsyncSelect(_ref) {
1358 var placeholder = _ref.placeholder,
1359 value = _ref.value,
1360 loadOptions = _ref.loadOptions,
1361 onChange = _ref.onChange,
1362 defaultOptions = _ref.defaultOptions;
1363 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1364 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1365
1366 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1367 _useState2 = _slicedToArray(_useState, 2),
1368 isFocused = _useState2[0],
1369 setFocus = _useState2[1];
1370
1371 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1372 _useState4 = _slicedToArray(_useState3, 2),
1373 loadState = _useState4[0],
1374 setLoadState = _useState4[1];
1375
1376 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1377 _useState6 = _slicedToArray(_useState5, 2),
1378 localValue = _useState6[0],
1379 setLocalValue = _useState6[1];
1380
1381 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1382 _useState8 = _slicedToArray(_useState7, 2),
1383 options = _useState8[0],
1384 setOptions = _useState8[1];
1385
1386 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1387 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1388 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1389 loadOptions('', function (result) {
1390 setOptions(result);
1391 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1392 });
1393 }
1394 }, [loadOptions, loadState]);
1395
1396 var renderItems = function renderItems() {
1397 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1398 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1399 return items.map(function (item, index) {
1400 if (item.options) {
1401 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1402 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1403 id: "".concat(index, "-heading"),
1404 children: item.label
1405 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1406 children: renderItems(item.options, index)
1407 })]
1408 }, "async-select-item-".concat(index));
1409 } else {
1410 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1411 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1412 id: key,
1413 selected: value && item.value === value.value,
1414 onClick: function onClick() {
1415 onChange(item);
1416 setFocus(false);
1417 },
1418 children: item.label
1419 }, key);
1420 }
1421 });
1422 };
1423
1424 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1425 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1426 id: "leadin-async-selector",
1427 focused: isFocused,
1428 onClick: function onClick() {
1429 if (isFocused) {
1430 if (inputEl.current) {
1431 inputEl.current.blur();
1432 }
1433
1434 setFocus(false);
1435 setLocalValue('');
1436 } else {
1437 if (inputEl.current) {
1438 inputEl.current.focus();
1439 }
1440
1441 setFocus(true);
1442 }
1443 },
1444 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1445 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1446 children: placeholder
1447 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1448 children: value.label
1449 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1450 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1451 ref: inputEl,
1452 onFocus: function onFocus() {
1453 setFocus(true);
1454 },
1455 onChange: function onChange(e) {
1456 setLocalValue(e.target.value);
1457 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1458 loadOptions && loadOptions(e.target.value, function (result) {
1459 setOptions(result);
1460 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1461 });
1462 },
1463 value: localValue,
1464 width: inputSize,
1465 id: "asycn-select-input"
1466 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1467 ref: inputShadowEl,
1468 children: localValue
1469 })]
1470 })]
1471 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1472 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, {})]
1473 })]
1474 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1475 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1476 children: renderItems(options)
1477 })
1478 })]
1479 });
1480 }
1481
1482 __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");
1483
1484 /***/ }),
1485
1486 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1487 /*!************************************************!*\
1488 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1489 \************************************************/
1490 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1491
1492 "use strict";
1493 __webpack_require__.r(__webpack_exports__);
1494 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1495 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1496 /* harmony export */ });
1497 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1498 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1499 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1500 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1501 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1502 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1503 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1504
1505
1506
1507
1508
1509
1510
1511
1512 function redirectToPlugin() {
1513 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);
1514 }
1515
1516 function ErrorHandler(_ref) {
1517 var status = _ref.status,
1518 resetErrorState = _ref.resetErrorState,
1519 _ref$errorInfo = _ref.errorInfo,
1520 errorInfo = _ref$errorInfo === void 0 ? {
1521 header: '',
1522 message: '',
1523 action: ''
1524 } : _ref$errorInfo;
1525 var isUnauthorized = status === 401 || status === 403;
1526 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1527 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1528 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1529 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1530 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1531 textAlign: "center",
1532 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1533 children: errorHeader
1534 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1535 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1536 children: errorMessage
1537 })
1538 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1539 "data-test-id": "authorize-button",
1540 onClick: redirectToPlugin,
1541 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1542 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1543 "data-test-id": "retry-button",
1544 onClick: resetErrorState,
1545 children: errorInfo.action
1546 })]
1547 })
1548 });
1549 }
1550
1551 /***/ }),
1552
1553 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1554 /*!*************************************************!*\
1555 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1556 \*************************************************/
1557 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1558
1559 "use strict";
1560 __webpack_require__.r(__webpack_exports__);
1561 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1562 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1563 /* harmony export */ });
1564 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1565
1566
1567 var _exp = /*#__PURE__*/function _exp() {
1568 return function (props) {
1569 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1570 };
1571 };
1572
1573 var _exp2 = /*#__PURE__*/function _exp2() {
1574 return function (props) {
1575 return props.padding || '90px 20% 25px';
1576 };
1577 };
1578
1579 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1580 name: "HubspotWrapper0",
1581 "class": "h1q5v5ee",
1582 propsAsIs: false,
1583 vars: {
1584 "h1q5v5ee-0": [_exp()],
1585 "h1q5v5ee-1": [_exp2()]
1586 }
1587 }));
1588
1589 __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");
1590
1591 /***/ }),
1592
1593 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1594 /*!************************************************!*\
1595 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1596 \************************************************/
1597 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1598
1599 "use strict";
1600 __webpack_require__.r(__webpack_exports__);
1601 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1602 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1603 /* harmony export */ });
1604 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1605 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1606 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1607 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1608
1609
1610
1611
1612 function LoadingBlock() {
1613 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1614 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1615 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1616 size: 50
1617 })
1618 });
1619 }
1620
1621 /***/ }),
1622
1623 /***/ "./scripts/shared/Form/FormEdit.tsx":
1624 /*!******************************************!*\
1625 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1626 \******************************************/
1627 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1628
1629 "use strict";
1630 __webpack_require__.r(__webpack_exports__);
1631 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1632 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1633 /* harmony export */ });
1634 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1635 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1636 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1637 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1638 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1639 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1640 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1641 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1642 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1643 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1644 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1645 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1646
1647 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1648
1649 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662 function FormEdit(_ref) {
1663 var attributes = _ref.attributes,
1664 isSelected = _ref.isSelected,
1665 setAttributes = _ref.setAttributes,
1666 _ref$preview = _ref.preview,
1667 preview = _ref$preview === void 0 ? true : _ref$preview,
1668 _ref$origin = _ref.origin,
1669 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1670 var formId = attributes.formId,
1671 formName = attributes.formName;
1672 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1673 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1674 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1675
1676 var handleChange = function handleChange(selectedForm) {
1677 setAttributes({
1678 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1679 formId: selectedForm.value,
1680 formName: selectedForm.label
1681 });
1682 };
1683
1684 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1685 monitorFormPreviewRender({
1686 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1687 payload: {
1688 origin: origin
1689 }
1690 });
1691 }, [origin]);
1692 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, {
1693 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1694 formId: formId,
1695 formName: formName,
1696 handleChange: handleChange,
1697 origin: origin
1698 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1699 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"], {
1700 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1701 formId: formId
1702 })]
1703 })]
1704 });
1705 }
1706
1707 function FormEditContainer(props) {
1708 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1709 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1710 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1711 });
1712 }
1713
1714 /***/ }),
1715
1716 /***/ "./scripts/shared/Form/FormSelect.tsx":
1717 /*!********************************************!*\
1718 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1719 \********************************************/
1720 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1721
1722 "use strict";
1723 __webpack_require__.r(__webpack_exports__);
1724 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1725 /* harmony export */ "default": () => (/* binding */ FormSelect)
1726 /* harmony export */ });
1727 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1728 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1729 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1730 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1731 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1732 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1733 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1734 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1735 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1736
1737
1738
1739
1740
1741
1742
1743
1744 function FormSelect(_ref) {
1745 var formId = _ref.formId,
1746 formName = _ref.formName,
1747 handleChange = _ref.handleChange,
1748 _ref$origin = _ref.origin,
1749 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1750
1751 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1752 search = _useForms.search,
1753 formApiError = _useForms.formApiError,
1754 reset = _useForms.reset;
1755
1756 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1757 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1758 createReset = _useCreateFormFromTem.reset,
1759 isCreating = _useCreateFormFromTem.isCreating,
1760 hasError = _useCreateFormFromTem.hasError,
1761 createApiError = _useCreateFormFromTem.formApiError;
1762
1763 var value = formId && formName ? {
1764 label: formName,
1765 value: formId
1766 } : null;
1767
1768 var handleLocalChange = function handleLocalChange(option) {
1769 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1770 createFormByTemplate(option.value).then(function (_ref2) {
1771 var guid = _ref2.guid,
1772 name = _ref2.name;
1773 handleChange({
1774 value: guid,
1775 label: name
1776 });
1777 });
1778 } else {
1779 handleChange(option);
1780 }
1781 };
1782
1783 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"], {
1784 status: formApiError ? formApiError.status : createApiError.status,
1785 resetErrorState: function resetErrorState() {
1786 if (hasError) {
1787 createReset();
1788 } else {
1789 reset();
1790 }
1791 },
1792 errorInfo: {
1793 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1794 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1795 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1796 }
1797 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1798 loadOptions: search,
1799 onChange: function onChange(option) {
1800 return handleLocalChange(option);
1801 },
1802 value: value
1803 });
1804 }
1805
1806 /***/ }),
1807
1808 /***/ "./scripts/shared/Form/FormSelector.tsx":
1809 /*!**********************************************!*\
1810 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1811 \**********************************************/
1812 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1813
1814 "use strict";
1815 __webpack_require__.r(__webpack_exports__);
1816 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1817 /* harmony export */ "default": () => (/* binding */ FormSelector)
1818 /* harmony export */ });
1819 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1820 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1821 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1822 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1823 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1824 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1825
1826
1827
1828
1829
1830 function FormSelector(_ref) {
1831 var loadOptions = _ref.loadOptions,
1832 onChange = _ref.onChange,
1833 value = _ref.value;
1834 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1835 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1836 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1837 "data-test-id": "leadin-form-select",
1838 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1839 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1840 })
1841 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1842 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1843 value: value,
1844 loadOptions: loadOptions,
1845 onChange: onChange
1846 })]
1847 });
1848 }
1849
1850 /***/ }),
1851
1852 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1853 /*!*********************************************!*\
1854 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1855 \*********************************************/
1856 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1857
1858 "use strict";
1859 __webpack_require__.r(__webpack_exports__);
1860 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1861 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1862 /* harmony export */ });
1863 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1864 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1865 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1866 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1867 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1868 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1869
1870
1871
1872
1873
1874 function PreviewForm(_ref) {
1875 var portalId = _ref.portalId,
1876 formId = _ref.formId;
1877 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1878 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1879 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1880 if (!ready) {
1881 return;
1882 }
1883
1884 if (inputEl.current) {
1885 inputEl.current.innerHTML = '';
1886 var embedScript = document.createElement('script');
1887 embedScript.innerHTML = "hbspt.forms.create({ portalId: '".concat(portalId, "', formId: '").concat(formId, "', region: '").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.hublet, "', ").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.formsScriptPayload, " });");
1888 inputEl.current.appendChild(embedScript);
1889 }
1890 }, [formId, portalId, ready, inputEl]);
1891 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1892 ref: inputEl
1893 });
1894 }
1895
1896 /***/ }),
1897
1898 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1899 /*!****************************************************************!*\
1900 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1901 \****************************************************************/
1902 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1903
1904 "use strict";
1905 __webpack_require__.r(__webpack_exports__);
1906 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1907 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1908 /* harmony export */ });
1909 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1910 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1911 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1912 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1913 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1914 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1915
1916 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."); }
1917
1918 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1919
1920 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1921
1922 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1923
1924 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1925
1926
1927
1928
1929
1930 function useCreateFormFromTemplate() {
1931 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1932 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1933 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1934
1935 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1936 _useState2 = _slicedToArray(_useState, 2),
1937 loadState = _useState2[0],
1938 setLoadState = _useState2[1];
1939
1940 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1941 _useState4 = _slicedToArray(_useState3, 2),
1942 formApiError = _useState4[0],
1943 setFormApiError = _useState4[1];
1944
1945 var createFormByTemplate = function createFormByTemplate(type) {
1946 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1947 track({
1948 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1949 payload: {
1950 type: type,
1951 origin: origin
1952 }
1953 });
1954 return proxy({
1955 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1956 payload: type
1957 }).then(function (form) {
1958 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1959 return form;
1960 })["catch"](function (err) {
1961 setFormApiError(err);
1962 track({
1963 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1964 payload: {
1965 origin: origin
1966 }
1967 });
1968 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1969 });
1970 };
1971
1972 return {
1973 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1974 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1975 formApiError: formApiError,
1976 createFormByTemplate: createFormByTemplate,
1977 reset: function reset() {
1978 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1979 }
1980 };
1981 }
1982
1983 /***/ }),
1984
1985 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1986 /*!***********************************************!*\
1987 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1988 \***********************************************/
1989 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1990
1991 "use strict";
1992 __webpack_require__.r(__webpack_exports__);
1993 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1994 /* harmony export */ "default": () => (/* binding */ useForms)
1995 /* harmony export */ });
1996 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1997 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1998 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
1999 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
2000 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2001 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2002 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2003 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2004
2005 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."); }
2006
2007 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2008
2009 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2010
2011 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2012
2013 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."); }
2014
2015 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2016
2017 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2018
2019 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2020
2021 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2022
2023
2024
2025
2026
2027
2028 function useForms() {
2029 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2030
2031 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2032 _useState2 = _slicedToArray(_useState, 2),
2033 formApiError = _useState2[0],
2034 setFormApiError = _useState2[1];
2035
2036 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2037 return proxy({
2038 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2039 payload: {
2040 search: search
2041 }
2042 }).then(function (forms) {
2043 callback([].concat(_toConsumableArray(forms.map(function (form) {
2044 return {
2045 label: form.name,
2046 value: form.guid
2047 };
2048 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2049 })["catch"](function (error) {
2050 setFormApiError(error);
2051 });
2052 }, 300, {
2053 trailing: true
2054 });
2055 return {
2056 search: search,
2057 formApiError: formApiError,
2058 reset: function reset() {
2059 return setFormApiError(null);
2060 }
2061 };
2062 }
2063
2064 /***/ }),
2065
2066 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2067 /*!*****************************************************!*\
2068 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2069 \*****************************************************/
2070 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2071
2072 "use strict";
2073 __webpack_require__.r(__webpack_exports__);
2074 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2075 /* harmony export */ "default": () => (/* binding */ useFormScript)
2076 /* harmony export */ });
2077 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2078 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2079 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2080 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2081 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2082 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2083 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2084
2085 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."); }
2086
2087 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2088
2089 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2090
2091 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2092
2093 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2094
2095
2096
2097
2098
2099 var promise;
2100
2101 function loadFormsScript() {
2102 if (!promise) {
2103 promise = new Promise(function (resolve, reject) {
2104 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2105 });
2106 }
2107
2108 return promise;
2109 }
2110
2111 function useFormScript() {
2112 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2113 _useState2 = _slicedToArray(_useState, 2),
2114 ready = _useState2[0],
2115 setReady = _useState2[1];
2116
2117 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2118 loadFormsScript().then(function () {
2119 return setReady(true);
2120 })["catch"](function (error) {
2121 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2122 });
2123 }, []);
2124 return ready;
2125 }
2126
2127 /***/ }),
2128
2129 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2130 /*!******************************************************!*\
2131 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2132 \******************************************************/
2133 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2134
2135 "use strict";
2136 __webpack_require__.r(__webpack_exports__);
2137 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2138 /* harmony export */ "default": () => (/* binding */ MeetingController)
2139 /* harmony export */ });
2140 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2141 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2142 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2143 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2144 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2145 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2146 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2147 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2148 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2149 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2150 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2151 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2152 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2153 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165 function MeetingController(_ref) {
2166 var handleChange = _ref.handleChange,
2167 url = _ref.url;
2168
2169 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2170 meetings = _useMeetings.mappedMeetings,
2171 loading = _useMeetings.loading,
2172 error = _useMeetings.error,
2173 reload = _useMeetings.reload,
2174 connectCalendar = _useMeetings.connectCalendar;
2175
2176 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2177 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2178 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2179 if (!url && meetings.length > 0) {
2180 handleChange(meetings[0].value);
2181 }
2182 }, [meetings, url, handleChange]);
2183
2184 var handleLocalChange = function handleLocalChange(option) {
2185 handleChange(option.value);
2186 };
2187
2188 var handleConnectCalendar = function handleConnectCalendar() {
2189 return connectCalendar().then(function () {
2190 reload();
2191 })["catch"](function (error) {
2192 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2193 extra: {
2194 error: error
2195 }
2196 });
2197 });
2198 };
2199
2200 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2201 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"], {
2202 status: error && error.status || error,
2203 resetErrorState: function resetErrorState() {
2204 return reload();
2205 },
2206 errorInfo: {
2207 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2208 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2209 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2210 }
2211 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2212 padding: "90px 32px 24px",
2213 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2214 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2215 status: selectedMeetingCalendar,
2216 onConnectCalendar: handleConnectCalendar
2217 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2218 onChange: handleLocalChange,
2219 options: meetings,
2220 value: selectedMeetingOption
2221 })]
2222 })
2223 });
2224 }
2225
2226 /***/ }),
2227
2228 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2229 /*!************************************************!*\
2230 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2231 \************************************************/
2232 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2233
2234 "use strict";
2235 __webpack_require__.r(__webpack_exports__);
2236 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2237 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2238 /* harmony export */ });
2239 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2240 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2241 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2242 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2243 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2244 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2245 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2246 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2247 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2248 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2249 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2250
2251 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2252
2253 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265 function MeetingEdit(_ref) {
2266 var url = _ref.attributes.url,
2267 isSelected = _ref.isSelected,
2268 setAttributes = _ref.setAttributes,
2269 _ref$preview = _ref.preview,
2270 preview = _ref$preview === void 0 ? true : _ref$preview,
2271 _ref$origin = _ref.origin,
2272 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2273 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2274 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2275
2276 var handleChange = function handleChange(newUrl) {
2277 setAttributes({
2278 url: newUrl
2279 });
2280 };
2281
2282 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2283 monitorFormPreviewRender({
2284 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2285 payload: {
2286 origin: origin
2287 }
2288 });
2289 }, [origin]);
2290 return !isBackgroundAppReady ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__["default"], {}) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2291 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2292 url: url,
2293 handleChange: handleChange
2294 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2295 url: url
2296 })]
2297 });
2298 }
2299
2300 function MeetingsEditContainer(props) {
2301 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2302 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2303 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2304 });
2305 }
2306
2307 /***/ }),
2308
2309 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2310 /*!****************************************************!*\
2311 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2312 \****************************************************/
2313 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2314
2315 "use strict";
2316 __webpack_require__.r(__webpack_exports__);
2317 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2318 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2319 /* harmony export */ });
2320 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2321 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2322 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2323 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2324 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2325 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2326 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2327
2328
2329
2330
2331
2332 function MeetingSelector(_ref) {
2333 var options = _ref.options,
2334 onChange = _ref.onChange,
2335 value = _ref.value;
2336 var optionsWrapper = [{
2337 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2338 options: options
2339 }];
2340 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2341 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", {
2342 "data-test-id": "leadin-meeting-select",
2343 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2344 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2345 })
2346 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2347 defaultOptions: optionsWrapper,
2348 onChange: onChange,
2349 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2350 value: value
2351 })]
2352 });
2353 }
2354
2355 /***/ }),
2356
2357 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2358 /*!***************************************************!*\
2359 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2360 \***************************************************/
2361 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2362
2363 "use strict";
2364 __webpack_require__.r(__webpack_exports__);
2365 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2366 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2367 /* harmony export */ });
2368 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2369 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2370 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2371 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2372 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2373 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2374
2375
2376
2377
2378
2379 function MeetingWarning(_ref) {
2380 var status = _ref.status,
2381 onConnectCalendar = _ref.onConnectCalendar;
2382 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2383 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');
2384 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');
2385 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2386 titleText: titleText,
2387 titleMessage: titleMessage,
2388 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2389 use: "tertiary",
2390 id: "meetings-connect-calendar",
2391 onClick: onConnectCalendar,
2392 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2393 })
2394 });
2395 }
2396
2397 /***/ }),
2398
2399 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2400 /*!***************************************************!*\
2401 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2402 \***************************************************/
2403 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2404
2405 "use strict";
2406 __webpack_require__.r(__webpack_exports__);
2407 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2408 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2409 /* harmony export */ });
2410 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2411 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2412 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2413 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2414 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2415
2416
2417
2418
2419 function PreviewForm(_ref) {
2420 var url = _ref.url;
2421 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2422 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2423 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2424 if (!ready) {
2425 return;
2426 }
2427
2428 if (inputEl.current) {
2429 inputEl.current.innerHTML = '';
2430 var container = document.createElement('div');
2431 container.dataset.src = "".concat(url, "?embed=true");
2432 container.classList.add('meetings-iframe-container');
2433 inputEl.current.appendChild(container);
2434 var embedScript = document.createElement('script');
2435 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2436 inputEl.current.appendChild(embedScript);
2437 }
2438 }, [url, ready, inputEl]);
2439 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2440 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2441 ref: inputEl
2442 })
2443 });
2444 }
2445
2446 /***/ }),
2447
2448 /***/ "./scripts/shared/Meeting/constants.ts":
2449 /*!*********************************************!*\
2450 !*** ./scripts/shared/Meeting/constants.ts ***!
2451 \*********************************************/
2452 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2453
2454 "use strict";
2455 __webpack_require__.r(__webpack_exports__);
2456 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2457 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2458 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2459 /* harmony export */ });
2460 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2461 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2462
2463 /***/ }),
2464
2465 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2466 /*!*************************************************************!*\
2467 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2468 \*************************************************************/
2469 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2470
2471 "use strict";
2472 __webpack_require__.r(__webpack_exports__);
2473 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2474 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2475 /* harmony export */ });
2476 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2477 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2478 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2479 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2480 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2481 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2482
2483 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."); }
2484
2485 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2486
2487 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2488
2489 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2490
2491 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2492
2493
2494
2495
2496
2497 var user = null;
2498 function useCurrentUserFetch() {
2499 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2500
2501 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2502 _useState2 = _slicedToArray(_useState, 2),
2503 loadState = _useState2[0],
2504 setLoadState = _useState2[1];
2505
2506 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2507 _useState4 = _slicedToArray(_useState3, 2),
2508 error = _useState4[0],
2509 setError = _useState4[1];
2510
2511 var createUser = function createUser() {
2512 if (!user) {
2513 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2514 }
2515 };
2516
2517 var reload = function reload() {
2518 user = null;
2519 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2520 setError(null);
2521 };
2522
2523 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2524 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2525 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2526 proxy({
2527 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2528 }).then(function (data) {
2529 user = data;
2530 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2531 })["catch"](function (err) {
2532 setError(err);
2533 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2534 });
2535 }
2536 }, [loadState]);
2537 return {
2538 user: user,
2539 loadUserState: loadState,
2540 error: error,
2541 createUser: createUser,
2542 reload: reload
2543 };
2544 }
2545
2546 /***/ }),
2547
2548 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2549 /*!*****************************************************!*\
2550 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2551 \*****************************************************/
2552 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2553
2554 "use strict";
2555 __webpack_require__.r(__webpack_exports__);
2556 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2557 /* harmony export */ "default": () => (/* binding */ useMeetings),
2558 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2559 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2560 /* harmony export */ });
2561 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2562 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2563 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2564 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2565 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2566 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2567 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2568 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2569 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2570 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2571 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2572
2573 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2574
2575 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2576
2577 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2578
2579 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."); }
2580
2581 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2582
2583 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2584
2585 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2586
2587 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2599 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2600 meetingOwnerId = _meeting$meetingsUser[0];
2601
2602 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2603
2604 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2605 var user = meetingUsers[meetingOwnerId];
2606 result += " (".concat(user.userProfile.fullName, ")");
2607 }
2608
2609 return result;
2610 }
2611
2612 function hasCalendarObject(user) {
2613 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2614 }
2615
2616 function useMeetings() {
2617 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2618
2619 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2620 meetings = _useMeetingsFetch.meetings,
2621 meetingUsers = _useMeetingsFetch.meetingUsers,
2622 meetingsError = _useMeetingsFetch.error,
2623 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2624 reloadMeetings = _useMeetingsFetch.reload;
2625
2626 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2627 currentUser = _useCurrentUserFetch.user,
2628 userError = _useCurrentUserFetch.error,
2629 loadUserState = _useCurrentUserFetch.loadUserState,
2630 reloadUser = _useCurrentUserFetch.reload;
2631
2632 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2633 reloadUser();
2634 reloadMeetings();
2635 }, [reloadUser, reloadMeetings]);
2636
2637 var connectCalendar = function connectCalendar() {
2638 return proxy({
2639 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2640 });
2641 };
2642
2643 return {
2644 mappedMeetings: meetings.map(function (meet) {
2645 return {
2646 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2647 value: meet.link
2648 };
2649 }),
2650 meetings: meetings,
2651 meetingUsers: meetingUsers,
2652 currentUser: currentUser,
2653 error: meetingsError || userError,
2654 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2655 reload: reload,
2656 connectCalendar: connectCalendar
2657 };
2658 }
2659 function useSelectedMeeting(url) {
2660 var _useMeetings = useMeetings(),
2661 meetings = _useMeetings.mappedMeetings;
2662
2663 var option = meetings.find(function (_ref) {
2664 var value = _ref.value;
2665 return value === url;
2666 });
2667 return option;
2668 }
2669 function useSelectedMeetingCalendar(url) {
2670 var _useMeetings2 = useMeetings(),
2671 meetings = _useMeetings2.meetings,
2672 meetingUsers = _useMeetings2.meetingUsers,
2673 currentUser = _useMeetings2.currentUser;
2674
2675 var meeting = meetings.find(function (meet) {
2676 return meet.link === url;
2677 });
2678 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2679 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2680 }, {});
2681
2682 if (!meeting) {
2683 return null;
2684 } else {
2685 var meetingsUserIds = meeting.meetingsUserIds;
2686
2687 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2688 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2689 } else if (meetingsUserIds.map(function (id) {
2690 return mappedMeetingUsersId[id];
2691 }).some(function (user) {
2692 return !hasCalendarObject(user);
2693 })) {
2694 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2695 } else {
2696 return null;
2697 }
2698 }
2699 }
2700
2701 /***/ }),
2702
2703 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2704 /*!**********************************************************!*\
2705 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2706 \**********************************************************/
2707 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2708
2709 "use strict";
2710 __webpack_require__.r(__webpack_exports__);
2711 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2712 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2713 /* harmony export */ });
2714 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2715 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2716 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2717 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2718 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2719 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2720
2721 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."); }
2722
2723 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2724
2725 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2726
2727 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2728
2729 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2730
2731
2732
2733
2734
2735 var meetings = [];
2736 var meetingUsers = [];
2737 function useMeetingsFetch() {
2738 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2739
2740 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2741 _useState2 = _slicedToArray(_useState, 2),
2742 loadState = _useState2[0],
2743 setLoadState = _useState2[1];
2744
2745 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2746 _useState4 = _slicedToArray(_useState3, 2),
2747 error = _useState4[0],
2748 setError = _useState4[1];
2749
2750 var reload = function reload() {
2751 meetings = [];
2752 setError(null);
2753 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2754 };
2755
2756 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2757 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2758 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2759 proxy({
2760 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2761 }).then(function (data) {
2762 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2763 meetings = data && data.meetingLinks;
2764 meetingUsers = data && data.meetingUsers;
2765 })["catch"](function (e) {
2766 setError(e);
2767 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2768 });
2769 }
2770 }, [loadState]);
2771 return {
2772 meetings: meetings,
2773 meetingUsers: meetingUsers,
2774 loadMeetingsState: loadState,
2775 error: error,
2776 reload: reload
2777 };
2778 }
2779
2780 /***/ }),
2781
2782 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2783 /*!***********************************************************!*\
2784 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.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 */ useMeetingsScript)
2792 /* harmony export */ });
2793 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2794 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2795 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2796 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2797 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2798 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2799 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2800
2801 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."); }
2802
2803 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2804
2805 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2806
2807 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2808
2809 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2810
2811
2812
2813
2814
2815 var promise;
2816
2817 function loadMeetingsScript() {
2818 if (!promise) {
2819 promise = new Promise(function (resolve, reject) {
2820 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2821 });
2822 }
2823
2824 return promise;
2825 }
2826
2827 function useMeetingsScript() {
2828 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2829 _useState2 = _slicedToArray(_useState, 2),
2830 ready = _useState2[0],
2831 setReady = _useState2[1];
2832
2833 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2834 loadMeetingsScript().then(function () {
2835 return setReady(true);
2836 })["catch"](function (error) {
2837 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2838 });
2839 }, []);
2840 return ready;
2841 }
2842
2843 /***/ }),
2844
2845 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2846 /*!*************************************************!*\
2847 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2848 \*************************************************/
2849 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2850
2851 "use strict";
2852 __webpack_require__.r(__webpack_exports__);
2853 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2854 /* harmony export */ "default": () => (/* binding */ UIAlert)
2855 /* harmony export */ });
2856 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2857 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2858
2859
2860 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2861 name: "AlertContainer",
2862 "class": "a1h8m4fo",
2863 propsAsIs: false
2864 });
2865 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2866 name: "Title",
2867 "class": "tyndzxk",
2868 propsAsIs: false
2869 });
2870 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2871 name: "Message",
2872 "class": "m1m9sbk4",
2873 propsAsIs: false
2874 });
2875 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2876 name: "MessageContainer",
2877 "class": "mg5o421",
2878 propsAsIs: false
2879 });
2880 function UIAlert(_ref) {
2881 var titleText = _ref.titleText,
2882 titleMessage = _ref.titleMessage,
2883 children = _ref.children;
2884 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2885 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2886 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2887 children: titleText
2888 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2889 children: titleMessage
2890 })]
2891 }), children]
2892 });
2893 }
2894
2895 __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");
2896
2897 /***/ }),
2898
2899 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2900 /*!*************************************************!*\
2901 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2902 \*************************************************/
2903 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2904
2905 "use strict";
2906 __webpack_require__.r(__webpack_exports__);
2907 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2908 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2909 /* harmony export */ });
2910 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2911 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2912
2913
2914
2915 var _exp2 = /*#__PURE__*/function _exp2() {
2916 return function (props) {
2917 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2918 };
2919 };
2920
2921 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2922 name: "UIButton0",
2923 "class": "ug152ch",
2924 propsAsIs: false,
2925 vars: {
2926 "ug152ch-0": [_exp2()]
2927 }
2928 }));
2929
2930 __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");
2931
2932 /***/ }),
2933
2934 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2935 /*!****************************************************!*\
2936 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2937 \****************************************************/
2938 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2939
2940 "use strict";
2941 __webpack_require__.r(__webpack_exports__);
2942 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2943 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2944 /* harmony export */ });
2945 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2946
2947
2948 var _exp = /*#__PURE__*/function _exp() {
2949 return function (props) {
2950 return props.textAlign ? props.textAlign : 'inherit';
2951 };
2952 };
2953
2954 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2955 name: "UIContainer0",
2956 "class": "ua13n1c",
2957 propsAsIs: false,
2958 vars: {
2959 "ua13n1c-0": [_exp()]
2960 }
2961 }));
2962
2963 __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");
2964
2965 /***/ }),
2966
2967 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2968 /*!**************************************************!*\
2969 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2970 \**************************************************/
2971 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2972
2973 "use strict";
2974 __webpack_require__.r(__webpack_exports__);
2975 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2976 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2977 /* harmony export */ });
2978 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2979
2980 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2981 name: "UIOverlay0",
2982 "class": "u1q7a48k",
2983 propsAsIs: false
2984 }));
2985
2986 __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");
2987
2988 /***/ }),
2989
2990 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2991 /*!*************************************************!*\
2992 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2993 \*************************************************/
2994 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2995
2996 "use strict";
2997 __webpack_require__.r(__webpack_exports__);
2998 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2999 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3000 /* harmony export */ });
3001 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3002
3003 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3004 name: "UISpacer0",
3005 "class": "u3qxofx",
3006 propsAsIs: false
3007 }));
3008
3009 __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");
3010
3011 /***/ }),
3012
3013 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3014 /*!***************************************************!*\
3015 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3016 \***************************************************/
3017 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3018
3019 "use strict";
3020 __webpack_require__.r(__webpack_exports__);
3021 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3022 /* harmony export */ "default": () => (/* binding */ UISpinner)
3023 /* harmony export */ });
3024 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3025 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3026 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3027
3028
3029
3030 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3031 name: "SpinnerOuter",
3032 "class": "sxa9zrc",
3033 propsAsIs: false
3034 });
3035 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3036 name: "SpinnerInner",
3037 "class": "s14430wa",
3038 propsAsIs: false
3039 });
3040
3041 var _exp = /*#__PURE__*/function _exp() {
3042 return function (props) {
3043 return props.color;
3044 };
3045 };
3046
3047 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3048 name: "Circle",
3049 "class": "ct87ghk",
3050 propsAsIs: true,
3051 vars: {
3052 "ct87ghk-0": [_exp()]
3053 }
3054 });
3055
3056 var _exp2 = /*#__PURE__*/function _exp2() {
3057 return function (props) {
3058 return props.color;
3059 };
3060 };
3061
3062 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3063 name: "AnimatedCircle",
3064 "class": "avili0h",
3065 propsAsIs: true,
3066 vars: {
3067 "avili0h-0": [_exp2()]
3068 }
3069 });
3070 function UISpinner(_ref) {
3071 var _ref$size = _ref.size,
3072 size = _ref$size === void 0 ? 20 : _ref$size;
3073 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3074 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3075 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3076 height: size,
3077 width: size,
3078 viewBox: "0 0 50 50",
3079 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3080 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3081 cx: "25",
3082 cy: "25",
3083 r: "22.5"
3084 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3085 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3086 cx: "25",
3087 cy: "25",
3088 r: "22.5"
3089 })]
3090 })
3091 })
3092 });
3093 }
3094
3095 __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");
3096
3097 /***/ }),
3098
3099 /***/ "./scripts/shared/UIComponents/colors.ts":
3100 /*!***********************************************!*\
3101 !*** ./scripts/shared/UIComponents/colors.ts ***!
3102 \***********************************************/
3103 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3104
3105 "use strict";
3106 __webpack_require__.r(__webpack_exports__);
3107 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3108 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3109 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3110 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3111 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3112 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3113 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3114 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3115 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3116 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3117 /* harmony export */ });
3118 var CALYPSO = '#00a4bd';
3119 var CALYPSO_MEDIUM = '#7fd1de';
3120 var CALYPSO_LIGHT = '#e5f5f8';
3121 var LORAX = '#ff7a59';
3122 var OLAF = '#ffffff';
3123 var HEFFALUMP = '#425b76';
3124 var MARIGOLD_LIGHT = '#fef8f0';
3125 var MARIGOLD_MEDIUM = '#fae0b5';
3126 var OBSIDIAN = '#33475b';
3127
3128 /***/ }),
3129
3130 /***/ "./scripts/shared/enums/connectionStatus.ts":
3131 /*!**************************************************!*\
3132 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3133 \**************************************************/
3134 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3135
3136 "use strict";
3137 __webpack_require__.r(__webpack_exports__);
3138 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3139 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3140 /* harmony export */ });
3141 var ConnectionStatus = {
3142 Connected: 'Connected',
3143 NotConnected: 'NotConnected'
3144 };
3145 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3146
3147 /***/ }),
3148
3149 /***/ "./scripts/shared/enums/loadState.ts":
3150 /*!*******************************************!*\
3151 !*** ./scripts/shared/enums/loadState.ts ***!
3152 \*******************************************/
3153 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3154
3155 "use strict";
3156 __webpack_require__.r(__webpack_exports__);
3157 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3158 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3159 /* harmony export */ });
3160 var LoadState = {
3161 NotLoaded: 'NotLoaded',
3162 Loading: 'Loading',
3163 Loaded: 'Loaded',
3164 Idle: 'Idle',
3165 Failed: 'Failed'
3166 };
3167 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3168
3169 /***/ }),
3170
3171 /***/ "./scripts/utils/appUtils.ts":
3172 /*!***********************************!*\
3173 !*** ./scripts/utils/appUtils.ts ***!
3174 \***********************************/
3175 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3176
3177 "use strict";
3178 __webpack_require__.r(__webpack_exports__);
3179 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3180 /* harmony export */ "initApp": () => (/* binding */ initApp),
3181 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3182 /* harmony export */ });
3183 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3184 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3185 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3186
3187
3188 function initApp(initFn) {
3189 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3190 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3191 }
3192 function initAppOnReady(initFn) {
3193 function main() {
3194 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3195 }
3196
3197 initApp(main);
3198 }
3199
3200 /***/ }),
3201
3202 /***/ "./scripts/utils/backgroundAppUtils.ts":
3203 /*!*********************************************!*\
3204 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3205 \*********************************************/
3206 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3207
3208 "use strict";
3209 __webpack_require__.r(__webpack_exports__);
3210 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3211 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3212 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3213 /* harmony export */ });
3214 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3215 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3216
3217
3218 function initBackgroundApp(initFn) {
3219 function main() {
3220 if (Array.isArray(initFn)) {
3221 initFn.forEach(function (callback) {
3222 return callback();
3223 });
3224 } else {
3225 initFn();
3226 }
3227 }
3228
3229 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3230 }
3231 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3232 if (window.LeadinBackgroundApp) {
3233 return window.LeadinBackgroundApp;
3234 }
3235
3236 var _window = window,
3237 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3238 IntegratedAppOptions = _window.IntegratedAppOptions;
3239 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3240 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3241 embedder.attachTo(document.body, false);
3242 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3243
3244 window.LeadinBackgroundApp = embedder;
3245 return window.LeadinBackgroundApp;
3246 };
3247
3248 /***/ }),
3249
3250 /***/ "./scripts/utils/withMetaData.ts":
3251 /*!***************************************!*\
3252 !*** ./scripts/utils/withMetaData.ts ***!
3253 \***************************************/
3254 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3255
3256 "use strict";
3257 __webpack_require__.r(__webpack_exports__);
3258 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3259 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3260 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3261 /* harmony export */ });
3262 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3263 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3264 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3265
3266 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3267
3268 var isFullSiteEditor = function isFullSiteEditor() {
3269 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3270 };
3271 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3272 return {
3273 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3274 };
3275 });
3276 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3277 return {
3278 setMetaValue: function setMetaValue(value) {
3279 dispatch('core/editor').editPost({
3280 meta: _defineProperty({}, props.metaKey, value)
3281 });
3282 }
3283 };
3284 });
3285
3286 function apply(el) {
3287 return applyWithSelect(applyWithDispatch(el));
3288 }
3289
3290 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3291
3292 /***/ }),
3293
3294 /***/ "./node_modules/is-what/dist/index.esm.js":
3295 /*!************************************************!*\
3296 !*** ./node_modules/is-what/dist/index.esm.js ***!
3297 \************************************************/
3298 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3299
3300 "use strict";
3301 __webpack_require__.r(__webpack_exports__);
3302 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3303 /* harmony export */ "getType": () => (/* binding */ getType),
3304 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3305 /* harmony export */ "isArray": () => (/* binding */ isArray),
3306 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3307 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3308 /* harmony export */ "isDate": () => (/* binding */ isDate),
3309 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3310 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3311 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3312 /* harmony export */ "isError": () => (/* binding */ isError),
3313 /* harmony export */ "isFile": () => (/* binding */ isFile),
3314 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3315 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3316 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3317 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3318 /* harmony export */ "isMap": () => (/* binding */ isMap),
3319 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3320 /* harmony export */ "isNull": () => (/* binding */ isNull),
3321 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3322 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3323 /* harmony export */ "isObject": () => (/* binding */ isObject),
3324 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3325 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3326 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3327 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3328 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3329 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3330 /* harmony export */ "isSet": () => (/* binding */ isSet),
3331 /* harmony export */ "isString": () => (/* binding */ isString),
3332 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3333 /* harmony export */ "isType": () => (/* binding */ isType),
3334 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3335 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3336 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3337 /* harmony export */ });
3338 /**
3339 * Returns the object type of the given payload
3340 *
3341 * @param {*} payload
3342 * @returns {string}
3343 */
3344 function getType(payload) {
3345 return Object.prototype.toString.call(payload).slice(8, -1);
3346 }
3347 /**
3348 * Returns whether the payload is undefined
3349 *
3350 * @param {*} payload
3351 * @returns {payload is undefined}
3352 */
3353 function isUndefined(payload) {
3354 return getType(payload) === 'Undefined';
3355 }
3356 /**
3357 * Returns whether the payload is null
3358 *
3359 * @param {*} payload
3360 * @returns {payload is null}
3361 */
3362 function isNull(payload) {
3363 return getType(payload) === 'Null';
3364 }
3365 /**
3366 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3367 *
3368 * @param {*} payload
3369 * @returns {payload is PlainObject}
3370 */
3371 function isPlainObject(payload) {
3372 if (getType(payload) !== 'Object')
3373 return false;
3374 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3375 }
3376 /**
3377 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3378 *
3379 * @param {*} payload
3380 * @returns {payload is PlainObject}
3381 */
3382 function isObject(payload) {
3383 return isPlainObject(payload);
3384 }
3385 /**
3386 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3387 *
3388 * @param {*} payload
3389 * @returns {payload is { [K in any]: never }}
3390 */
3391 function isEmptyObject(payload) {
3392 return isPlainObject(payload) && Object.keys(payload).length === 0;
3393 }
3394 /**
3395 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3396 *
3397 * @param {*} payload
3398 * @returns {payload is PlainObject}
3399 */
3400 function isFullObject(payload) {
3401 return isPlainObject(payload) && Object.keys(payload).length > 0;
3402 }
3403 /**
3404 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3405 *
3406 * @param {*} payload
3407 * @returns {payload is PlainObject}
3408 */
3409 function isAnyObject(payload) {
3410 return getType(payload) === 'Object';
3411 }
3412 /**
3413 * Returns whether the payload is an object like a type passed in < >
3414 *
3415 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3416 *
3417 * @template T this must be passed in < >
3418 * @param {*} payload
3419 * @returns {payload is T}
3420 */
3421 function isObjectLike(payload) {
3422 return isAnyObject(payload);
3423 }
3424 /**
3425 * Returns whether the payload is a function (regular or async)
3426 *
3427 * @param {*} payload
3428 * @returns {payload is AnyFunction}
3429 */
3430 function isFunction(payload) {
3431 return typeof payload === 'function';
3432 }
3433 /**
3434 * Returns whether the payload is an array
3435 *
3436 * @param {any} payload
3437 * @returns {payload is any[]}
3438 */
3439 function isArray(payload) {
3440 return getType(payload) === 'Array';
3441 }
3442 /**
3443 * Returns whether the payload is a an array with at least 1 item
3444 *
3445 * @param {*} payload
3446 * @returns {payload is any[]}
3447 */
3448 function isFullArray(payload) {
3449 return isArray(payload) && payload.length > 0;
3450 }
3451 /**
3452 * Returns whether the payload is a an empty array
3453 *
3454 * @param {*} payload
3455 * @returns {payload is []}
3456 */
3457 function isEmptyArray(payload) {
3458 return isArray(payload) && payload.length === 0;
3459 }
3460 /**
3461 * Returns whether the payload is a string
3462 *
3463 * @param {*} payload
3464 * @returns {payload is string}
3465 */
3466 function isString(payload) {
3467 return getType(payload) === 'String';
3468 }
3469 /**
3470 * Returns whether the payload is a string, BUT returns false for ''
3471 *
3472 * @param {*} payload
3473 * @returns {payload is string}
3474 */
3475 function isFullString(payload) {
3476 return isString(payload) && payload !== '';
3477 }
3478 /**
3479 * Returns whether the payload is ''
3480 *
3481 * @param {*} payload
3482 * @returns {payload is string}
3483 */
3484 function isEmptyString(payload) {
3485 return payload === '';
3486 }
3487 /**
3488 * Returns whether the payload is a number (but not NaN)
3489 *
3490 * This will return `false` for `NaN`!!
3491 *
3492 * @param {*} payload
3493 * @returns {payload is number}
3494 */
3495 function isNumber(payload) {
3496 return getType(payload) === 'Number' && !isNaN(payload);
3497 }
3498 /**
3499 * Returns whether the payload is a boolean
3500 *
3501 * @param {*} payload
3502 * @returns {payload is boolean}
3503 */
3504 function isBoolean(payload) {
3505 return getType(payload) === 'Boolean';
3506 }
3507 /**
3508 * Returns whether the payload is a regular expression (RegExp)
3509 *
3510 * @param {*} payload
3511 * @returns {payload is RegExp}
3512 */
3513 function isRegExp(payload) {
3514 return getType(payload) === 'RegExp';
3515 }
3516 /**
3517 * Returns whether the payload is a Map
3518 *
3519 * @param {*} payload
3520 * @returns {payload is Map<any, any>}
3521 */
3522 function isMap(payload) {
3523 return getType(payload) === 'Map';
3524 }
3525 /**
3526 * Returns whether the payload is a WeakMap
3527 *
3528 * @param {*} payload
3529 * @returns {payload is WeakMap<any, any>}
3530 */
3531 function isWeakMap(payload) {
3532 return getType(payload) === 'WeakMap';
3533 }
3534 /**
3535 * Returns whether the payload is a Set
3536 *
3537 * @param {*} payload
3538 * @returns {payload is Set<any>}
3539 */
3540 function isSet(payload) {
3541 return getType(payload) === 'Set';
3542 }
3543 /**
3544 * Returns whether the payload is a WeakSet
3545 *
3546 * @param {*} payload
3547 * @returns {payload is WeakSet<any>}
3548 */
3549 function isWeakSet(payload) {
3550 return getType(payload) === 'WeakSet';
3551 }
3552 /**
3553 * Returns whether the payload is a Symbol
3554 *
3555 * @param {*} payload
3556 * @returns {payload is symbol}
3557 */
3558 function isSymbol(payload) {
3559 return getType(payload) === 'Symbol';
3560 }
3561 /**
3562 * Returns whether the payload is a Date, and that the date is valid
3563 *
3564 * @param {*} payload
3565 * @returns {payload is Date}
3566 */
3567 function isDate(payload) {
3568 return getType(payload) === 'Date' && !isNaN(payload);
3569 }
3570 /**
3571 * Returns whether the payload is a Blob
3572 *
3573 * @param {*} payload
3574 * @returns {payload is Blob}
3575 */
3576 function isBlob(payload) {
3577 return getType(payload) === 'Blob';
3578 }
3579 /**
3580 * Returns whether the payload is a File
3581 *
3582 * @param {*} payload
3583 * @returns {payload is File}
3584 */
3585 function isFile(payload) {
3586 return getType(payload) === 'File';
3587 }
3588 /**
3589 * Returns whether the payload is a Promise
3590 *
3591 * @param {*} payload
3592 * @returns {payload is Promise<any>}
3593 */
3594 function isPromise(payload) {
3595 return getType(payload) === 'Promise';
3596 }
3597 /**
3598 * Returns whether the payload is an Error
3599 *
3600 * @param {*} payload
3601 * @returns {payload is Error}
3602 */
3603 function isError(payload) {
3604 return getType(payload) === 'Error';
3605 }
3606 /**
3607 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3608 *
3609 * @param {*} payload
3610 * @returns {payload is typeof NaN}
3611 */
3612 function isNaNValue(payload) {
3613 return getType(payload) === 'Number' && isNaN(payload);
3614 }
3615 /**
3616 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3617 *
3618 * @param {*} payload
3619 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3620 */
3621 function isPrimitive(payload) {
3622 return (isBoolean(payload) ||
3623 isNull(payload) ||
3624 isUndefined(payload) ||
3625 isNumber(payload) ||
3626 isString(payload) ||
3627 isSymbol(payload));
3628 }
3629 /**
3630 * Returns true whether the payload is null or undefined
3631 *
3632 * @param {*} payload
3633 * @returns {(payload is null | undefined)}
3634 */
3635 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3636 function isOneOf(a, b, c, d, e) {
3637 return function (value) {
3638 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3639 };
3640 }
3641 /**
3642 * Does a generic check to check that the given payload is of a given type.
3643 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3644 * It will, however, differentiate between object and null
3645 *
3646 * @template T
3647 * @param {*} payload
3648 * @param {T} type
3649 * @throws {TypeError} Will throw type error if type is an invalid type
3650 * @returns {payload is T}
3651 */
3652 function isType(payload, type) {
3653 if (!(type instanceof Function)) {
3654 throw new TypeError('Type must be a function');
3655 }
3656 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3657 throw new TypeError('Type is not a class');
3658 }
3659 // Classes usually have names (as functions usually have names)
3660 var name = type.name;
3661 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3662 }
3663
3664
3665
3666
3667 /***/ }),
3668
3669 /***/ "./node_modules/lodash/_Symbol.js":
3670 /*!****************************************!*\
3671 !*** ./node_modules/lodash/_Symbol.js ***!
3672 \****************************************/
3673 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3674
3675 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3676
3677 /** Built-in value references. */
3678 var Symbol = root.Symbol;
3679
3680 module.exports = Symbol;
3681
3682
3683 /***/ }),
3684
3685 /***/ "./node_modules/lodash/_baseGetTag.js":
3686 /*!********************************************!*\
3687 !*** ./node_modules/lodash/_baseGetTag.js ***!
3688 \********************************************/
3689 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3690
3691 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3692 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3693 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3694
3695 /** `Object#toString` result references. */
3696 var nullTag = '[object Null]',
3697 undefinedTag = '[object Undefined]';
3698
3699 /** Built-in value references. */
3700 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3701
3702 /**
3703 * The base implementation of `getTag` without fallbacks for buggy environments.
3704 *
3705 * @private
3706 * @param {*} value The value to query.
3707 * @returns {string} Returns the `toStringTag`.
3708 */
3709 function baseGetTag(value) {
3710 if (value == null) {
3711 return value === undefined ? undefinedTag : nullTag;
3712 }
3713 return (symToStringTag && symToStringTag in Object(value))
3714 ? getRawTag(value)
3715 : objectToString(value);
3716 }
3717
3718 module.exports = baseGetTag;
3719
3720
3721 /***/ }),
3722
3723 /***/ "./node_modules/lodash/_baseTrim.js":
3724 /*!******************************************!*\
3725 !*** ./node_modules/lodash/_baseTrim.js ***!
3726 \******************************************/
3727 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3728
3729 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3730
3731 /** Used to match leading whitespace. */
3732 var reTrimStart = /^\s+/;
3733
3734 /**
3735 * The base implementation of `_.trim`.
3736 *
3737 * @private
3738 * @param {string} string The string to trim.
3739 * @returns {string} Returns the trimmed string.
3740 */
3741 function baseTrim(string) {
3742 return string
3743 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3744 : string;
3745 }
3746
3747 module.exports = baseTrim;
3748
3749
3750 /***/ }),
3751
3752 /***/ "./node_modules/lodash/_freeGlobal.js":
3753 /*!********************************************!*\
3754 !*** ./node_modules/lodash/_freeGlobal.js ***!
3755 \********************************************/
3756 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3757
3758 /** Detect free variable `global` from Node.js. */
3759 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3760
3761 module.exports = freeGlobal;
3762
3763
3764 /***/ }),
3765
3766 /***/ "./node_modules/lodash/_getRawTag.js":
3767 /*!*******************************************!*\
3768 !*** ./node_modules/lodash/_getRawTag.js ***!
3769 \*******************************************/
3770 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3771
3772 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3773
3774 /** Used for built-in method references. */
3775 var objectProto = Object.prototype;
3776
3777 /** Used to check objects for own properties. */
3778 var hasOwnProperty = objectProto.hasOwnProperty;
3779
3780 /**
3781 * Used to resolve the
3782 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3783 * of values.
3784 */
3785 var nativeObjectToString = objectProto.toString;
3786
3787 /** Built-in value references. */
3788 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3789
3790 /**
3791 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3792 *
3793 * @private
3794 * @param {*} value The value to query.
3795 * @returns {string} Returns the raw `toStringTag`.
3796 */
3797 function getRawTag(value) {
3798 var isOwn = hasOwnProperty.call(value, symToStringTag),
3799 tag = value[symToStringTag];
3800
3801 try {
3802 value[symToStringTag] = undefined;
3803 var unmasked = true;
3804 } catch (e) {}
3805
3806 var result = nativeObjectToString.call(value);
3807 if (unmasked) {
3808 if (isOwn) {
3809 value[symToStringTag] = tag;
3810 } else {
3811 delete value[symToStringTag];
3812 }
3813 }
3814 return result;
3815 }
3816
3817 module.exports = getRawTag;
3818
3819
3820 /***/ }),
3821
3822 /***/ "./node_modules/lodash/_objectToString.js":
3823 /*!************************************************!*\
3824 !*** ./node_modules/lodash/_objectToString.js ***!
3825 \************************************************/
3826 /***/ ((module) => {
3827
3828 /** Used for built-in method references. */
3829 var objectProto = Object.prototype;
3830
3831 /**
3832 * Used to resolve the
3833 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3834 * of values.
3835 */
3836 var nativeObjectToString = objectProto.toString;
3837
3838 /**
3839 * Converts `value` to a string using `Object.prototype.toString`.
3840 *
3841 * @private
3842 * @param {*} value The value to convert.
3843 * @returns {string} Returns the converted string.
3844 */
3845 function objectToString(value) {
3846 return nativeObjectToString.call(value);
3847 }
3848
3849 module.exports = objectToString;
3850
3851
3852 /***/ }),
3853
3854 /***/ "./node_modules/lodash/_root.js":
3855 /*!**************************************!*\
3856 !*** ./node_modules/lodash/_root.js ***!
3857 \**************************************/
3858 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3859
3860 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3861
3862 /** Detect free variable `self`. */
3863 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3864
3865 /** Used as a reference to the global object. */
3866 var root = freeGlobal || freeSelf || Function('return this')();
3867
3868 module.exports = root;
3869
3870
3871 /***/ }),
3872
3873 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3874 /*!*************************************************!*\
3875 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3876 \*************************************************/
3877 /***/ ((module) => {
3878
3879 /** Used to match a single whitespace character. */
3880 var reWhitespace = /\s/;
3881
3882 /**
3883 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3884 * character of `string`.
3885 *
3886 * @private
3887 * @param {string} string The string to inspect.
3888 * @returns {number} Returns the index of the last non-whitespace character.
3889 */
3890 function trimmedEndIndex(string) {
3891 var index = string.length;
3892
3893 while (index-- && reWhitespace.test(string.charAt(index))) {}
3894 return index;
3895 }
3896
3897 module.exports = trimmedEndIndex;
3898
3899
3900 /***/ }),
3901
3902 /***/ "./node_modules/lodash/debounce.js":
3903 /*!*****************************************!*\
3904 !*** ./node_modules/lodash/debounce.js ***!
3905 \*****************************************/
3906 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3907
3908 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3909 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3910 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3911
3912 /** Error message constants. */
3913 var FUNC_ERROR_TEXT = 'Expected a function';
3914
3915 /* Built-in method references for those with the same name as other `lodash` methods. */
3916 var nativeMax = Math.max,
3917 nativeMin = Math.min;
3918
3919 /**
3920 * Creates a debounced function that delays invoking `func` until after `wait`
3921 * milliseconds have elapsed since the last time the debounced function was
3922 * invoked. The debounced function comes with a `cancel` method to cancel
3923 * delayed `func` invocations and a `flush` method to immediately invoke them.
3924 * Provide `options` to indicate whether `func` should be invoked on the
3925 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3926 * with the last arguments provided to the debounced function. Subsequent
3927 * calls to the debounced function return the result of the last `func`
3928 * invocation.
3929 *
3930 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3931 * invoked on the trailing edge of the timeout only if the debounced function
3932 * is invoked more than once during the `wait` timeout.
3933 *
3934 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3935 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3936 *
3937 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3938 * for details over the differences between `_.debounce` and `_.throttle`.
3939 *
3940 * @static
3941 * @memberOf _
3942 * @since 0.1.0
3943 * @category Function
3944 * @param {Function} func The function to debounce.
3945 * @param {number} [wait=0] The number of milliseconds to delay.
3946 * @param {Object} [options={}] The options object.
3947 * @param {boolean} [options.leading=false]
3948 * Specify invoking on the leading edge of the timeout.
3949 * @param {number} [options.maxWait]
3950 * The maximum time `func` is allowed to be delayed before it's invoked.
3951 * @param {boolean} [options.trailing=true]
3952 * Specify invoking on the trailing edge of the timeout.
3953 * @returns {Function} Returns the new debounced function.
3954 * @example
3955 *
3956 * // Avoid costly calculations while the window size is in flux.
3957 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3958 *
3959 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3960 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3961 * 'leading': true,
3962 * 'trailing': false
3963 * }));
3964 *
3965 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3966 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3967 * var source = new EventSource('/stream');
3968 * jQuery(source).on('message', debounced);
3969 *
3970 * // Cancel the trailing debounced invocation.
3971 * jQuery(window).on('popstate', debounced.cancel);
3972 */
3973 function debounce(func, wait, options) {
3974 var lastArgs,
3975 lastThis,
3976 maxWait,
3977 result,
3978 timerId,
3979 lastCallTime,
3980 lastInvokeTime = 0,
3981 leading = false,
3982 maxing = false,
3983 trailing = true;
3984
3985 if (typeof func != 'function') {
3986 throw new TypeError(FUNC_ERROR_TEXT);
3987 }
3988 wait = toNumber(wait) || 0;
3989 if (isObject(options)) {
3990 leading = !!options.leading;
3991 maxing = 'maxWait' in options;
3992 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3993 trailing = 'trailing' in options ? !!options.trailing : trailing;
3994 }
3995
3996 function invokeFunc(time) {
3997 var args = lastArgs,
3998 thisArg = lastThis;
3999
4000 lastArgs = lastThis = undefined;
4001 lastInvokeTime = time;
4002 result = func.apply(thisArg, args);
4003 return result;
4004 }
4005
4006 function leadingEdge(time) {
4007 // Reset any `maxWait` timer.
4008 lastInvokeTime = time;
4009 // Start the timer for the trailing edge.
4010 timerId = setTimeout(timerExpired, wait);
4011 // Invoke the leading edge.
4012 return leading ? invokeFunc(time) : result;
4013 }
4014
4015 function remainingWait(time) {
4016 var timeSinceLastCall = time - lastCallTime,
4017 timeSinceLastInvoke = time - lastInvokeTime,
4018 timeWaiting = wait - timeSinceLastCall;
4019
4020 return maxing
4021 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4022 : timeWaiting;
4023 }
4024
4025 function shouldInvoke(time) {
4026 var timeSinceLastCall = time - lastCallTime,
4027 timeSinceLastInvoke = time - lastInvokeTime;
4028
4029 // Either this is the first call, activity has stopped and we're at the
4030 // trailing edge, the system time has gone backwards and we're treating
4031 // it as the trailing edge, or we've hit the `maxWait` limit.
4032 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4033 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4034 }
4035
4036 function timerExpired() {
4037 var time = now();
4038 if (shouldInvoke(time)) {
4039 return trailingEdge(time);
4040 }
4041 // Restart the timer.
4042 timerId = setTimeout(timerExpired, remainingWait(time));
4043 }
4044
4045 function trailingEdge(time) {
4046 timerId = undefined;
4047
4048 // Only invoke if we have `lastArgs` which means `func` has been
4049 // debounced at least once.
4050 if (trailing && lastArgs) {
4051 return invokeFunc(time);
4052 }
4053 lastArgs = lastThis = undefined;
4054 return result;
4055 }
4056
4057 function cancel() {
4058 if (timerId !== undefined) {
4059 clearTimeout(timerId);
4060 }
4061 lastInvokeTime = 0;
4062 lastArgs = lastCallTime = lastThis = timerId = undefined;
4063 }
4064
4065 function flush() {
4066 return timerId === undefined ? result : trailingEdge(now());
4067 }
4068
4069 function debounced() {
4070 var time = now(),
4071 isInvoking = shouldInvoke(time);
4072
4073 lastArgs = arguments;
4074 lastThis = this;
4075 lastCallTime = time;
4076
4077 if (isInvoking) {
4078 if (timerId === undefined) {
4079 return leadingEdge(lastCallTime);
4080 }
4081 if (maxing) {
4082 // Handle invocations in a tight loop.
4083 clearTimeout(timerId);
4084 timerId = setTimeout(timerExpired, wait);
4085 return invokeFunc(lastCallTime);
4086 }
4087 }
4088 if (timerId === undefined) {
4089 timerId = setTimeout(timerExpired, wait);
4090 }
4091 return result;
4092 }
4093 debounced.cancel = cancel;
4094 debounced.flush = flush;
4095 return debounced;
4096 }
4097
4098 module.exports = debounce;
4099
4100
4101 /***/ }),
4102
4103 /***/ "./node_modules/lodash/isObject.js":
4104 /*!*****************************************!*\
4105 !*** ./node_modules/lodash/isObject.js ***!
4106 \*****************************************/
4107 /***/ ((module) => {
4108
4109 /**
4110 * Checks if `value` is the
4111 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4112 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4113 *
4114 * @static
4115 * @memberOf _
4116 * @since 0.1.0
4117 * @category Lang
4118 * @param {*} value The value to check.
4119 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4120 * @example
4121 *
4122 * _.isObject({});
4123 * // => true
4124 *
4125 * _.isObject([1, 2, 3]);
4126 * // => true
4127 *
4128 * _.isObject(_.noop);
4129 * // => true
4130 *
4131 * _.isObject(null);
4132 * // => false
4133 */
4134 function isObject(value) {
4135 var type = typeof value;
4136 return value != null && (type == 'object' || type == 'function');
4137 }
4138
4139 module.exports = isObject;
4140
4141
4142 /***/ }),
4143
4144 /***/ "./node_modules/lodash/isObjectLike.js":
4145 /*!*********************************************!*\
4146 !*** ./node_modules/lodash/isObjectLike.js ***!
4147 \*********************************************/
4148 /***/ ((module) => {
4149
4150 /**
4151 * Checks if `value` is object-like. A value is object-like if it's not `null`
4152 * and has a `typeof` result of "object".
4153 *
4154 * @static
4155 * @memberOf _
4156 * @since 4.0.0
4157 * @category Lang
4158 * @param {*} value The value to check.
4159 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4160 * @example
4161 *
4162 * _.isObjectLike({});
4163 * // => true
4164 *
4165 * _.isObjectLike([1, 2, 3]);
4166 * // => true
4167 *
4168 * _.isObjectLike(_.noop);
4169 * // => false
4170 *
4171 * _.isObjectLike(null);
4172 * // => false
4173 */
4174 function isObjectLike(value) {
4175 return value != null && typeof value == 'object';
4176 }
4177
4178 module.exports = isObjectLike;
4179
4180
4181 /***/ }),
4182
4183 /***/ "./node_modules/lodash/isSymbol.js":
4184 /*!*****************************************!*\
4185 !*** ./node_modules/lodash/isSymbol.js ***!
4186 \*****************************************/
4187 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4188
4189 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4190 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4191
4192 /** `Object#toString` result references. */
4193 var symbolTag = '[object Symbol]';
4194
4195 /**
4196 * Checks if `value` is classified as a `Symbol` primitive or object.
4197 *
4198 * @static
4199 * @memberOf _
4200 * @since 4.0.0
4201 * @category Lang
4202 * @param {*} value The value to check.
4203 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4204 * @example
4205 *
4206 * _.isSymbol(Symbol.iterator);
4207 * // => true
4208 *
4209 * _.isSymbol('abc');
4210 * // => false
4211 */
4212 function isSymbol(value) {
4213 return typeof value == 'symbol' ||
4214 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4215 }
4216
4217 module.exports = isSymbol;
4218
4219
4220 /***/ }),
4221
4222 /***/ "./node_modules/lodash/now.js":
4223 /*!************************************!*\
4224 !*** ./node_modules/lodash/now.js ***!
4225 \************************************/
4226 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4227
4228 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4229
4230 /**
4231 * Gets the timestamp of the number of milliseconds that have elapsed since
4232 * the Unix epoch (1 January 1970 00:00:00 UTC).
4233 *
4234 * @static
4235 * @memberOf _
4236 * @since 2.4.0
4237 * @category Date
4238 * @returns {number} Returns the timestamp.
4239 * @example
4240 *
4241 * _.defer(function(stamp) {
4242 * console.log(_.now() - stamp);
4243 * }, _.now());
4244 * // => Logs the number of milliseconds it took for the deferred invocation.
4245 */
4246 var now = function() {
4247 return root.Date.now();
4248 };
4249
4250 module.exports = now;
4251
4252
4253 /***/ }),
4254
4255 /***/ "./node_modules/lodash/toNumber.js":
4256 /*!*****************************************!*\
4257 !*** ./node_modules/lodash/toNumber.js ***!
4258 \*****************************************/
4259 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4260
4261 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4262 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4263 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4264
4265 /** Used as references for various `Number` constants. */
4266 var NAN = 0 / 0;
4267
4268 /** Used to detect bad signed hexadecimal string values. */
4269 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4270
4271 /** Used to detect binary string values. */
4272 var reIsBinary = /^0b[01]+$/i;
4273
4274 /** Used to detect octal string values. */
4275 var reIsOctal = /^0o[0-7]+$/i;
4276
4277 /** Built-in method references without a dependency on `root`. */
4278 var freeParseInt = parseInt;
4279
4280 /**
4281 * Converts `value` to a number.
4282 *
4283 * @static
4284 * @memberOf _
4285 * @since 4.0.0
4286 * @category Lang
4287 * @param {*} value The value to process.
4288 * @returns {number} Returns the number.
4289 * @example
4290 *
4291 * _.toNumber(3.2);
4292 * // => 3.2
4293 *
4294 * _.toNumber(Number.MIN_VALUE);
4295 * // => 5e-324
4296 *
4297 * _.toNumber(Infinity);
4298 * // => Infinity
4299 *
4300 * _.toNumber('3.2');
4301 * // => 3.2
4302 */
4303 function toNumber(value) {
4304 if (typeof value == 'number') {
4305 return value;
4306 }
4307 if (isSymbol(value)) {
4308 return NAN;
4309 }
4310 if (isObject(value)) {
4311 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4312 value = isObject(other) ? (other + '') : other;
4313 }
4314 if (typeof value != 'string') {
4315 return value === 0 ? value : +value;
4316 }
4317 value = baseTrim(value);
4318 var isBinary = reIsBinary.test(value);
4319 return (isBinary || reIsOctal.test(value))
4320 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4321 : (reIsBadHex.test(value) ? NAN : +value);
4322 }
4323
4324 module.exports = toNumber;
4325
4326
4327 /***/ }),
4328
4329 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4330 /*!**********************************************************!*\
4331 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4332 \**********************************************************/
4333 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4334
4335 "use strict";
4336 __webpack_require__.r(__webpack_exports__);
4337 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4338 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4339 /* harmony export */ });
4340 var safeIsNaN = Number.isNaN ||
4341 function ponyfill(value) {
4342 return typeof value === 'number' && value !== value;
4343 };
4344 function isEqual(first, second) {
4345 if (first === second) {
4346 return true;
4347 }
4348 if (safeIsNaN(first) && safeIsNaN(second)) {
4349 return true;
4350 }
4351 return false;
4352 }
4353 function areInputsEqual(newInputs, lastInputs) {
4354 if (newInputs.length !== lastInputs.length) {
4355 return false;
4356 }
4357 for (var i = 0; i < newInputs.length; i++) {
4358 if (!isEqual(newInputs[i], lastInputs[i])) {
4359 return false;
4360 }
4361 }
4362 return true;
4363 }
4364
4365 function memoizeOne(resultFn, isEqual) {
4366 if (isEqual === void 0) { isEqual = areInputsEqual; }
4367 var lastThis;
4368 var lastArgs = [];
4369 var lastResult;
4370 var calledOnce = false;
4371 function memoized() {
4372 var newArgs = [];
4373 for (var _i = 0; _i < arguments.length; _i++) {
4374 newArgs[_i] = arguments[_i];
4375 }
4376 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4377 return lastResult;
4378 }
4379 lastResult = resultFn.apply(this, newArgs);
4380 calledOnce = true;
4381 lastThis = this;
4382 lastArgs = newArgs;
4383 return lastResult;
4384 }
4385 return memoized;
4386 }
4387
4388 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4389
4390
4391 /***/ }),
4392
4393 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4394 /*!*******************************************************!*\
4395 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4396 \*******************************************************/
4397 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4398
4399 "use strict";
4400 __webpack_require__.r(__webpack_exports__);
4401 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4402 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4403 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4404 /* harmony export */ "merge": () => (/* binding */ merge)
4405 /* harmony export */ });
4406 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4407
4408
4409 /*! *****************************************************************************
4410 Copyright (c) Microsoft Corporation. All rights reserved.
4411 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4412 this file except in compliance with the License. You may obtain a copy of the
4413 License at http://www.apache.org/licenses/LICENSE-2.0
4414
4415 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4416 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4417 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4418 MERCHANTABLITY OR NON-INFRINGEMENT.
4419
4420 See the Apache Version 2.0 License for specific language governing permissions
4421 and limitations under the License.
4422 ***************************************************************************** */
4423
4424 function __spreadArrays() {
4425 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4426 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4427 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4428 r[k] = a[j];
4429 return r;
4430 }
4431
4432 function assignProp(carry, key, newVal, originalObject) {
4433 var propType = originalObject.propertyIsEnumerable(key)
4434 ? 'enumerable'
4435 : 'nonenumerable';
4436 if (propType === 'enumerable')
4437 carry[key] = newVal;
4438 if (propType === 'nonenumerable') {
4439 Object.defineProperty(carry, key, {
4440 value: newVal,
4441 enumerable: false,
4442 writable: true,
4443 configurable: true
4444 });
4445 }
4446 }
4447 function mergeRecursively(origin, newComer, extensions) {
4448 // work directly on newComer if its not an object
4449 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4450 // extend merge rules
4451 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4452 extensions.forEach(function (extend) {
4453 newComer = extend(origin, newComer);
4454 });
4455 }
4456 return newComer;
4457 }
4458 // define newObject to merge all values upon
4459 var newObject = {};
4460 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4461 var props_1 = Object.getOwnPropertyNames(origin);
4462 var symbols_1 = Object.getOwnPropertySymbols(origin);
4463 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4464 // @ts-ignore
4465 var targetVal = origin[key];
4466 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4467 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4468 assignProp(carry, key, targetVal, origin);
4469 }
4470 return carry;
4471 }, {});
4472 }
4473 var props = Object.getOwnPropertyNames(newComer);
4474 var symbols = Object.getOwnPropertySymbols(newComer);
4475 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4476 // re-define the origin and newComer as targetVal and newVal
4477 var newVal = newComer[key];
4478 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4479 // @ts-ignore
4480 ? origin[key]
4481 : undefined;
4482 // extend merge rules
4483 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4484 extensions.forEach(function (extend) {
4485 newVal = extend(targetVal, newVal);
4486 });
4487 }
4488 // When newVal is an object do the merge recursively
4489 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4490 newVal = mergeRecursively(targetVal, newVal, extensions);
4491 }
4492 assignProp(carry, key, newVal, newComer);
4493 return carry;
4494 }, newObject);
4495 return result;
4496 }
4497 /**
4498 * Merge anything recursively.
4499 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4500 * Basic types overwrite objects or other basic types.
4501 *
4502 * @param {(IConfig | any)} origin
4503 * @param {...any[]} newComers
4504 * @returns the result
4505 */
4506 function merge(origin) {
4507 var newComers = [];
4508 for (var _i = 1; _i < arguments.length; _i++) {
4509 newComers[_i - 1] = arguments[_i];
4510 }
4511 var extensions = null;
4512 var base = origin;
4513 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4514 base = {};
4515 extensions = origin.extensions;
4516 }
4517 return newComers.reduce(function (result, newComer) {
4518 return mergeRecursively(result, newComer, extensions);
4519 }, base);
4520 }
4521
4522 function concatArrays(originVal, newVal) {
4523 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4524 // concat logic
4525 return originVal.concat(newVal);
4526 }
4527 return newVal; // always return newVal as fallback!!
4528 }
4529
4530 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4531
4532
4533
4534 /***/ }),
4535
4536 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4537 /*!****************************************************************************************************************************************************************************************!*\
4538 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4539 \****************************************************************************************************************************************************************************************/
4540 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4541
4542 "use strict";
4543 __webpack_require__.r(__webpack_exports__);
4544 // extracted by mini-css-extract-plugin
4545
4546
4547 /***/ }),
4548
4549 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4550 /*!*******************************************************************************************************************************************************************************!*\
4551 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4552 \*******************************************************************************************************************************************************************************/
4553 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4554
4555 "use strict";
4556 __webpack_require__.r(__webpack_exports__);
4557 // extracted by mini-css-extract-plugin
4558
4559
4560 /***/ }),
4561
4562 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4563 /*!************************************************************************************************************************************************************************************!*\
4564 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4565 \************************************************************************************************************************************************************************************/
4566 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4567
4568 "use strict";
4569 __webpack_require__.r(__webpack_exports__);
4570 // extracted by mini-css-extract-plugin
4571
4572
4573 /***/ }),
4574
4575 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4576 /*!***********************************************************************************************************************************************************************************!*\
4577 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4578 \***********************************************************************************************************************************************************************************/
4579 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4580
4581 "use strict";
4582 __webpack_require__.r(__webpack_exports__);
4583 // extracted by mini-css-extract-plugin
4584
4585
4586 /***/ }),
4587
4588 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4589 /*!************************************************************************************************************************************************************************************!*\
4590 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4591 \************************************************************************************************************************************************************************************/
4592 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4593
4594 "use strict";
4595 __webpack_require__.r(__webpack_exports__);
4596 // extracted by mini-css-extract-plugin
4597
4598
4599 /***/ }),
4600
4601 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4602 /*!******************************************************************************************************************************************************************************************!*\
4603 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4604 \******************************************************************************************************************************************************************************************/
4605 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4606
4607 "use strict";
4608 __webpack_require__.r(__webpack_exports__);
4609 // extracted by mini-css-extract-plugin
4610
4611
4612 /***/ }),
4613
4614 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4615 /*!**************************************************************************************************************************************************************************************!*\
4616 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4617 \**************************************************************************************************************************************************************************************/
4618 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4619
4620 "use strict";
4621 __webpack_require__.r(__webpack_exports__);
4622 // extracted by mini-css-extract-plugin
4623
4624
4625 /***/ }),
4626
4627 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4628 /*!************************************************************************************************************************************************************************************!*\
4629 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4630 \************************************************************************************************************************************************************************************/
4631 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4632
4633 "use strict";
4634 __webpack_require__.r(__webpack_exports__);
4635 // extracted by mini-css-extract-plugin
4636
4637
4638 /***/ }),
4639
4640 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4641 /*!***************************************************************************************************************************************************************************************!*\
4642 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4643 \***************************************************************************************************************************************************************************************/
4644 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4645
4646 "use strict";
4647 __webpack_require__.r(__webpack_exports__);
4648 // extracted by mini-css-extract-plugin
4649
4650
4651 /***/ }),
4652
4653 /***/ "./node_modules/object-assign/index.js":
4654 /*!*********************************************!*\
4655 !*** ./node_modules/object-assign/index.js ***!
4656 \*********************************************/
4657 /***/ ((module) => {
4658
4659 "use strict";
4660 /*
4661 object-assign
4662 (c) Sindre Sorhus
4663 @license MIT
4664 */
4665
4666
4667 /* eslint-disable no-unused-vars */
4668 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4669 var hasOwnProperty = Object.prototype.hasOwnProperty;
4670 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4671
4672 function toObject(val) {
4673 if (val === null || val === undefined) {
4674 throw new TypeError('Object.assign cannot be called with null or undefined');
4675 }
4676
4677 return Object(val);
4678 }
4679
4680 function shouldUseNative() {
4681 try {
4682 if (!Object.assign) {
4683 return false;
4684 }
4685
4686 // Detect buggy property enumeration order in older V8 versions.
4687
4688 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4689 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4690 test1[5] = 'de';
4691 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4692 return false;
4693 }
4694
4695 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4696 var test2 = {};
4697 for (var i = 0; i < 10; i++) {
4698 test2['_' + String.fromCharCode(i)] = i;
4699 }
4700 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4701 return test2[n];
4702 });
4703 if (order2.join('') !== '0123456789') {
4704 return false;
4705 }
4706
4707 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4708 var test3 = {};
4709 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4710 test3[letter] = letter;
4711 });
4712 if (Object.keys(Object.assign({}, test3)).join('') !==
4713 'abcdefghijklmnopqrst') {
4714 return false;
4715 }
4716
4717 return true;
4718 } catch (err) {
4719 // We don't expect any of the above to throw, but better to be safe.
4720 return false;
4721 }
4722 }
4723
4724 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4725 var from;
4726 var to = toObject(target);
4727 var symbols;
4728
4729 for (var s = 1; s < arguments.length; s++) {
4730 from = Object(arguments[s]);
4731
4732 for (var key in from) {
4733 if (hasOwnProperty.call(from, key)) {
4734 to[key] = from[key];
4735 }
4736 }
4737
4738 if (getOwnPropertySymbols) {
4739 symbols = getOwnPropertySymbols(from);
4740 for (var i = 0; i < symbols.length; i++) {
4741 if (propIsEnumerable.call(from, symbols[i])) {
4742 to[symbols[i]] = from[symbols[i]];
4743 }
4744 }
4745 }
4746 }
4747
4748 return to;
4749 };
4750
4751
4752 /***/ }),
4753
4754 /***/ "./node_modules/prop-types/checkPropTypes.js":
4755 /*!***************************************************!*\
4756 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4757 \***************************************************/
4758 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4759
4760 "use strict";
4761 /**
4762 * Copyright (c) 2013-present, Facebook, Inc.
4763 *
4764 * This source code is licensed under the MIT license found in the
4765 * LICENSE file in the root directory of this source tree.
4766 */
4767
4768
4769
4770 var printWarning = function() {};
4771
4772 if (true) {
4773 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4774 var loggedTypeFailures = {};
4775 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4776
4777 printWarning = function(text) {
4778 var message = 'Warning: ' + text;
4779 if (typeof console !== 'undefined') {
4780 console.error(message);
4781 }
4782 try {
4783 // --- Welcome to debugging React ---
4784 // This error was thrown as a convenience so that you can use this stack
4785 // to find the callsite that caused this warning to fire.
4786 throw new Error(message);
4787 } catch (x) { /**/ }
4788 };
4789 }
4790
4791 /**
4792 * Assert that the values match with the type specs.
4793 * Error messages are memorized and will only be shown once.
4794 *
4795 * @param {object} typeSpecs Map of name to a ReactPropType
4796 * @param {object} values Runtime values that need to be type-checked
4797 * @param {string} location e.g. "prop", "context", "child context"
4798 * @param {string} componentName Name of the component for error messages.
4799 * @param {?Function} getStack Returns the component stack.
4800 * @private
4801 */
4802 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4803 if (true) {
4804 for (var typeSpecName in typeSpecs) {
4805 if (has(typeSpecs, typeSpecName)) {
4806 var error;
4807 // Prop type validation may throw. In case they do, we don't want to
4808 // fail the render phase where it didn't fail before. So we log it.
4809 // After these have been cleaned up, we'll let them throw.
4810 try {
4811 // This is intentionally an invariant that gets caught. It's the same
4812 // behavior as without this statement except with a better message.
4813 if (typeof typeSpecs[typeSpecName] !== 'function') {
4814 var err = Error(
4815 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4816 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4817 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4818 );
4819 err.name = 'Invariant Violation';
4820 throw err;
4821 }
4822 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4823 } catch (ex) {
4824 error = ex;
4825 }
4826 if (error && !(error instanceof Error)) {
4827 printWarning(
4828 (componentName || 'React class') + ': type specification of ' +
4829 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4830 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4831 'You may have forgotten to pass an argument to the type checker ' +
4832 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4833 'shape all require an argument).'
4834 );
4835 }
4836 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4837 // Only monitor this failure once because there tends to be a lot of the
4838 // same error.
4839 loggedTypeFailures[error.message] = true;
4840
4841 var stack = getStack ? getStack() : '';
4842
4843 printWarning(
4844 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4845 );
4846 }
4847 }
4848 }
4849 }
4850 }
4851
4852 /**
4853 * Resets warning cache when testing.
4854 *
4855 * @private
4856 */
4857 checkPropTypes.resetWarningCache = function() {
4858 if (true) {
4859 loggedTypeFailures = {};
4860 }
4861 }
4862
4863 module.exports = checkPropTypes;
4864
4865
4866 /***/ }),
4867
4868 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4869 /*!************************************************************!*\
4870 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4871 \************************************************************/
4872 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4873
4874 "use strict";
4875 /**
4876 * Copyright (c) 2013-present, Facebook, Inc.
4877 *
4878 * This source code is licensed under the MIT license found in the
4879 * LICENSE file in the root directory of this source tree.
4880 */
4881
4882
4883
4884 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4885 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4886
4887 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4888 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4889 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4890
4891 var printWarning = function() {};
4892
4893 if (true) {
4894 printWarning = function(text) {
4895 var message = 'Warning: ' + text;
4896 if (typeof console !== 'undefined') {
4897 console.error(message);
4898 }
4899 try {
4900 // --- Welcome to debugging React ---
4901 // This error was thrown as a convenience so that you can use this stack
4902 // to find the callsite that caused this warning to fire.
4903 throw new Error(message);
4904 } catch (x) {}
4905 };
4906 }
4907
4908 function emptyFunctionThatReturnsNull() {
4909 return null;
4910 }
4911
4912 module.exports = function(isValidElement, throwOnDirectAccess) {
4913 /* global Symbol */
4914 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4915 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4916
4917 /**
4918 * Returns the iterator method function contained on the iterable object.
4919 *
4920 * Be sure to invoke the function with the iterable as context:
4921 *
4922 * var iteratorFn = getIteratorFn(myIterable);
4923 * if (iteratorFn) {
4924 * var iterator = iteratorFn.call(myIterable);
4925 * ...
4926 * }
4927 *
4928 * @param {?object} maybeIterable
4929 * @return {?function}
4930 */
4931 function getIteratorFn(maybeIterable) {
4932 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4933 if (typeof iteratorFn === 'function') {
4934 return iteratorFn;
4935 }
4936 }
4937
4938 /**
4939 * Collection of methods that allow declaration and validation of props that are
4940 * supplied to React components. Example usage:
4941 *
4942 * var Props = require('ReactPropTypes');
4943 * var MyArticle = React.createClass({
4944 * propTypes: {
4945 * // An optional string prop named "description".
4946 * description: Props.string,
4947 *
4948 * // A required enum prop named "category".
4949 * category: Props.oneOf(['News','Photos']).isRequired,
4950 *
4951 * // A prop named "dialog" that requires an instance of Dialog.
4952 * dialog: Props.instanceOf(Dialog).isRequired
4953 * },
4954 * render: function() { ... }
4955 * });
4956 *
4957 * A more formal specification of how these methods are used:
4958 *
4959 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4960 * decl := ReactPropTypes.{type}(.isRequired)?
4961 *
4962 * Each and every declaration produces a function with the same signature. This
4963 * allows the creation of custom validation functions. For example:
4964 *
4965 * var MyLink = React.createClass({
4966 * propTypes: {
4967 * // An optional string or URI prop named "href".
4968 * href: function(props, propName, componentName) {
4969 * var propValue = props[propName];
4970 * if (propValue != null && typeof propValue !== 'string' &&
4971 * !(propValue instanceof URI)) {
4972 * return new Error(
4973 * 'Expected a string or an URI for ' + propName + ' in ' +
4974 * componentName
4975 * );
4976 * }
4977 * }
4978 * },
4979 * render: function() {...}
4980 * });
4981 *
4982 * @internal
4983 */
4984
4985 var ANONYMOUS = '<<anonymous>>';
4986
4987 // Important!
4988 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4989 var ReactPropTypes = {
4990 array: createPrimitiveTypeChecker('array'),
4991 bigint: createPrimitiveTypeChecker('bigint'),
4992 bool: createPrimitiveTypeChecker('boolean'),
4993 func: createPrimitiveTypeChecker('function'),
4994 number: createPrimitiveTypeChecker('number'),
4995 object: createPrimitiveTypeChecker('object'),
4996 string: createPrimitiveTypeChecker('string'),
4997 symbol: createPrimitiveTypeChecker('symbol'),
4998
4999 any: createAnyTypeChecker(),
5000 arrayOf: createArrayOfTypeChecker,
5001 element: createElementTypeChecker(),
5002 elementType: createElementTypeTypeChecker(),
5003 instanceOf: createInstanceTypeChecker,
5004 node: createNodeChecker(),
5005 objectOf: createObjectOfTypeChecker,
5006 oneOf: createEnumTypeChecker,
5007 oneOfType: createUnionTypeChecker,
5008 shape: createShapeTypeChecker,
5009 exact: createStrictShapeTypeChecker,
5010 };
5011
5012 /**
5013 * inlined Object.is polyfill to avoid requiring consumers ship their own
5014 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5015 */
5016 /*eslint-disable no-self-compare*/
5017 function is(x, y) {
5018 // SameValue algorithm
5019 if (x === y) {
5020 // Steps 1-5, 7-10
5021 // Steps 6.b-6.e: +0 != -0
5022 return x !== 0 || 1 / x === 1 / y;
5023 } else {
5024 // Step 6.a: NaN == NaN
5025 return x !== x && y !== y;
5026 }
5027 }
5028 /*eslint-enable no-self-compare*/
5029
5030 /**
5031 * We use an Error-like object for backward compatibility as people may call
5032 * PropTypes directly and inspect their output. However, we don't use real
5033 * Errors anymore. We don't inspect their stack anyway, and creating them
5034 * is prohibitively expensive if they are created too often, such as what
5035 * happens in oneOfType() for any type before the one that matched.
5036 */
5037 function PropTypeError(message, data) {
5038 this.message = message;
5039 this.data = data && typeof data === 'object' ? data: {};
5040 this.stack = '';
5041 }
5042 // Make `instanceof Error` still work for returned errors.
5043 PropTypeError.prototype = Error.prototype;
5044
5045 function createChainableTypeChecker(validate) {
5046 if (true) {
5047 var manualPropTypeCallCache = {};
5048 var manualPropTypeWarningCount = 0;
5049 }
5050 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5051 componentName = componentName || ANONYMOUS;
5052 propFullName = propFullName || propName;
5053
5054 if (secret !== ReactPropTypesSecret) {
5055 if (throwOnDirectAccess) {
5056 // New behavior only for users of `prop-types` package
5057 var err = new Error(
5058 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5059 'Use `PropTypes.checkPropTypes()` to call them. ' +
5060 'Read more at http://fb.me/use-check-prop-types'
5061 );
5062 err.name = 'Invariant Violation';
5063 throw err;
5064 } else if ( true && typeof console !== 'undefined') {
5065 // Old behavior for people using React.PropTypes
5066 var cacheKey = componentName + ':' + propName;
5067 if (
5068 !manualPropTypeCallCache[cacheKey] &&
5069 // Avoid spamming the console because they are often not actionable except for lib authors
5070 manualPropTypeWarningCount < 3
5071 ) {
5072 printWarning(
5073 'You are manually calling a React.PropTypes validation ' +
5074 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5075 'and will throw in the standalone `prop-types` package. ' +
5076 'You may be seeing this warning due to a third-party PropTypes ' +
5077 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5078 );
5079 manualPropTypeCallCache[cacheKey] = true;
5080 manualPropTypeWarningCount++;
5081 }
5082 }
5083 }
5084 if (props[propName] == null) {
5085 if (isRequired) {
5086 if (props[propName] === null) {
5087 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5088 }
5089 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5090 }
5091 return null;
5092 } else {
5093 return validate(props, propName, componentName, location, propFullName);
5094 }
5095 }
5096
5097 var chainedCheckType = checkType.bind(null, false);
5098 chainedCheckType.isRequired = checkType.bind(null, true);
5099
5100 return chainedCheckType;
5101 }
5102
5103 function createPrimitiveTypeChecker(expectedType) {
5104 function validate(props, propName, componentName, location, propFullName, secret) {
5105 var propValue = props[propName];
5106 var propType = getPropType(propValue);
5107 if (propType !== expectedType) {
5108 // `propValue` being instance of, say, date/regexp, pass the 'object'
5109 // check, but we can offer a more precise error message here rather than
5110 // 'of type `object`'.
5111 var preciseType = getPreciseType(propValue);
5112
5113 return new PropTypeError(
5114 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5115 {expectedType: expectedType}
5116 );
5117 }
5118 return null;
5119 }
5120 return createChainableTypeChecker(validate);
5121 }
5122
5123 function createAnyTypeChecker() {
5124 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5125 }
5126
5127 function createArrayOfTypeChecker(typeChecker) {
5128 function validate(props, propName, componentName, location, propFullName) {
5129 if (typeof typeChecker !== 'function') {
5130 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5131 }
5132 var propValue = props[propName];
5133 if (!Array.isArray(propValue)) {
5134 var propType = getPropType(propValue);
5135 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5136 }
5137 for (var i = 0; i < propValue.length; i++) {
5138 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5139 if (error instanceof Error) {
5140 return error;
5141 }
5142 }
5143 return null;
5144 }
5145 return createChainableTypeChecker(validate);
5146 }
5147
5148 function createElementTypeChecker() {
5149 function validate(props, propName, componentName, location, propFullName) {
5150 var propValue = props[propName];
5151 if (!isValidElement(propValue)) {
5152 var propType = getPropType(propValue);
5153 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5154 }
5155 return null;
5156 }
5157 return createChainableTypeChecker(validate);
5158 }
5159
5160 function createElementTypeTypeChecker() {
5161 function validate(props, propName, componentName, location, propFullName) {
5162 var propValue = props[propName];
5163 if (!ReactIs.isValidElementType(propValue)) {
5164 var propType = getPropType(propValue);
5165 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5166 }
5167 return null;
5168 }
5169 return createChainableTypeChecker(validate);
5170 }
5171
5172 function createInstanceTypeChecker(expectedClass) {
5173 function validate(props, propName, componentName, location, propFullName) {
5174 if (!(props[propName] instanceof expectedClass)) {
5175 var expectedClassName = expectedClass.name || ANONYMOUS;
5176 var actualClassName = getClassName(props[propName]);
5177 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5178 }
5179 return null;
5180 }
5181 return createChainableTypeChecker(validate);
5182 }
5183
5184 function createEnumTypeChecker(expectedValues) {
5185 if (!Array.isArray(expectedValues)) {
5186 if (true) {
5187 if (arguments.length > 1) {
5188 printWarning(
5189 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5190 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5191 );
5192 } else {
5193 printWarning('Invalid argument supplied to oneOf, expected an array.');
5194 }
5195 }
5196 return emptyFunctionThatReturnsNull;
5197 }
5198
5199 function validate(props, propName, componentName, location, propFullName) {
5200 var propValue = props[propName];
5201 for (var i = 0; i < expectedValues.length; i++) {
5202 if (is(propValue, expectedValues[i])) {
5203 return null;
5204 }
5205 }
5206
5207 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5208 var type = getPreciseType(value);
5209 if (type === 'symbol') {
5210 return String(value);
5211 }
5212 return value;
5213 });
5214 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5215 }
5216 return createChainableTypeChecker(validate);
5217 }
5218
5219 function createObjectOfTypeChecker(typeChecker) {
5220 function validate(props, propName, componentName, location, propFullName) {
5221 if (typeof typeChecker !== 'function') {
5222 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5223 }
5224 var propValue = props[propName];
5225 var propType = getPropType(propValue);
5226 if (propType !== 'object') {
5227 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5228 }
5229 for (var key in propValue) {
5230 if (has(propValue, key)) {
5231 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5232 if (error instanceof Error) {
5233 return error;
5234 }
5235 }
5236 }
5237 return null;
5238 }
5239 return createChainableTypeChecker(validate);
5240 }
5241
5242 function createUnionTypeChecker(arrayOfTypeCheckers) {
5243 if (!Array.isArray(arrayOfTypeCheckers)) {
5244 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5245 return emptyFunctionThatReturnsNull;
5246 }
5247
5248 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5249 var checker = arrayOfTypeCheckers[i];
5250 if (typeof checker !== 'function') {
5251 printWarning(
5252 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5253 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5254 );
5255 return emptyFunctionThatReturnsNull;
5256 }
5257 }
5258
5259 function validate(props, propName, componentName, location, propFullName) {
5260 var expectedTypes = [];
5261 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5262 var checker = arrayOfTypeCheckers[i];
5263 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5264 if (checkerResult == null) {
5265 return null;
5266 }
5267 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5268 expectedTypes.push(checkerResult.data.expectedType);
5269 }
5270 }
5271 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5272 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5273 }
5274 return createChainableTypeChecker(validate);
5275 }
5276
5277 function createNodeChecker() {
5278 function validate(props, propName, componentName, location, propFullName) {
5279 if (!isNode(props[propName])) {
5280 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5281 }
5282 return null;
5283 }
5284 return createChainableTypeChecker(validate);
5285 }
5286
5287 function invalidValidatorError(componentName, location, propFullName, key, type) {
5288 return new PropTypeError(
5289 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5290 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5291 );
5292 }
5293
5294 function createShapeTypeChecker(shapeTypes) {
5295 function validate(props, propName, componentName, location, propFullName) {
5296 var propValue = props[propName];
5297 var propType = getPropType(propValue);
5298 if (propType !== 'object') {
5299 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5300 }
5301 for (var key in shapeTypes) {
5302 var checker = shapeTypes[key];
5303 if (typeof checker !== 'function') {
5304 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5305 }
5306 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5307 if (error) {
5308 return error;
5309 }
5310 }
5311 return null;
5312 }
5313 return createChainableTypeChecker(validate);
5314 }
5315
5316 function createStrictShapeTypeChecker(shapeTypes) {
5317 function validate(props, propName, componentName, location, propFullName) {
5318 var propValue = props[propName];
5319 var propType = getPropType(propValue);
5320 if (propType !== 'object') {
5321 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5322 }
5323 // We need to check all keys in case some are required but missing from props.
5324 var allKeys = assign({}, props[propName], shapeTypes);
5325 for (var key in allKeys) {
5326 var checker = shapeTypes[key];
5327 if (has(shapeTypes, key) && typeof checker !== 'function') {
5328 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5329 }
5330 if (!checker) {
5331 return new PropTypeError(
5332 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5333 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5334 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5335 );
5336 }
5337 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5338 if (error) {
5339 return error;
5340 }
5341 }
5342 return null;
5343 }
5344
5345 return createChainableTypeChecker(validate);
5346 }
5347
5348 function isNode(propValue) {
5349 switch (typeof propValue) {
5350 case 'number':
5351 case 'string':
5352 case 'undefined':
5353 return true;
5354 case 'boolean':
5355 return !propValue;
5356 case 'object':
5357 if (Array.isArray(propValue)) {
5358 return propValue.every(isNode);
5359 }
5360 if (propValue === null || isValidElement(propValue)) {
5361 return true;
5362 }
5363
5364 var iteratorFn = getIteratorFn(propValue);
5365 if (iteratorFn) {
5366 var iterator = iteratorFn.call(propValue);
5367 var step;
5368 if (iteratorFn !== propValue.entries) {
5369 while (!(step = iterator.next()).done) {
5370 if (!isNode(step.value)) {
5371 return false;
5372 }
5373 }
5374 } else {
5375 // Iterator will provide entry [k,v] tuples rather than values.
5376 while (!(step = iterator.next()).done) {
5377 var entry = step.value;
5378 if (entry) {
5379 if (!isNode(entry[1])) {
5380 return false;
5381 }
5382 }
5383 }
5384 }
5385 } else {
5386 return false;
5387 }
5388
5389 return true;
5390 default:
5391 return false;
5392 }
5393 }
5394
5395 function isSymbol(propType, propValue) {
5396 // Native Symbol.
5397 if (propType === 'symbol') {
5398 return true;
5399 }
5400
5401 // falsy value can't be a Symbol
5402 if (!propValue) {
5403 return false;
5404 }
5405
5406 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5407 if (propValue['@@toStringTag'] === 'Symbol') {
5408 return true;
5409 }
5410
5411 // Fallback for non-spec compliant Symbols which are polyfilled.
5412 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5413 return true;
5414 }
5415
5416 return false;
5417 }
5418
5419 // Equivalent of `typeof` but with special handling for array and regexp.
5420 function getPropType(propValue) {
5421 var propType = typeof propValue;
5422 if (Array.isArray(propValue)) {
5423 return 'array';
5424 }
5425 if (propValue instanceof RegExp) {
5426 // Old webkits (at least until Android 4.0) return 'function' rather than
5427 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5428 // passes PropTypes.object.
5429 return 'object';
5430 }
5431 if (isSymbol(propType, propValue)) {
5432 return 'symbol';
5433 }
5434 return propType;
5435 }
5436
5437 // This handles more types than `getPropType`. Only used for error messages.
5438 // See `createPrimitiveTypeChecker`.
5439 function getPreciseType(propValue) {
5440 if (typeof propValue === 'undefined' || propValue === null) {
5441 return '' + propValue;
5442 }
5443 var propType = getPropType(propValue);
5444 if (propType === 'object') {
5445 if (propValue instanceof Date) {
5446 return 'date';
5447 } else if (propValue instanceof RegExp) {
5448 return 'regexp';
5449 }
5450 }
5451 return propType;
5452 }
5453
5454 // Returns a string that is postfixed to a warning about an invalid type.
5455 // For example, "undefined" or "of type array"
5456 function getPostfixForTypeWarning(value) {
5457 var type = getPreciseType(value);
5458 switch (type) {
5459 case 'array':
5460 case 'object':
5461 return 'an ' + type;
5462 case 'boolean':
5463 case 'date':
5464 case 'regexp':
5465 return 'a ' + type;
5466 default:
5467 return type;
5468 }
5469 }
5470
5471 // Returns class name of the object, if any.
5472 function getClassName(propValue) {
5473 if (!propValue.constructor || !propValue.constructor.name) {
5474 return ANONYMOUS;
5475 }
5476 return propValue.constructor.name;
5477 }
5478
5479 ReactPropTypes.checkPropTypes = checkPropTypes;
5480 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5481 ReactPropTypes.PropTypes = ReactPropTypes;
5482
5483 return ReactPropTypes;
5484 };
5485
5486
5487 /***/ }),
5488
5489 /***/ "./node_modules/prop-types/index.js":
5490 /*!******************************************!*\
5491 !*** ./node_modules/prop-types/index.js ***!
5492 \******************************************/
5493 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5494
5495 /**
5496 * Copyright (c) 2013-present, Facebook, Inc.
5497 *
5498 * This source code is licensed under the MIT license found in the
5499 * LICENSE file in the root directory of this source tree.
5500 */
5501
5502 if (true) {
5503 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5504
5505 // By explicitly using `prop-types` you are opting into new development behavior.
5506 // http://fb.me/prop-types-in-prod
5507 var throwOnDirectAccess = true;
5508 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5509 } else {}
5510
5511
5512 /***/ }),
5513
5514 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5515 /*!*************************************************************!*\
5516 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5517 \*************************************************************/
5518 /***/ ((module) => {
5519
5520 "use strict";
5521 /**
5522 * Copyright (c) 2013-present, Facebook, Inc.
5523 *
5524 * This source code is licensed under the MIT license found in the
5525 * LICENSE file in the root directory of this source tree.
5526 */
5527
5528
5529
5530 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5531
5532 module.exports = ReactPropTypesSecret;
5533
5534
5535 /***/ }),
5536
5537 /***/ "./node_modules/prop-types/lib/has.js":
5538 /*!********************************************!*\
5539 !*** ./node_modules/prop-types/lib/has.js ***!
5540 \********************************************/
5541 /***/ ((module) => {
5542
5543 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5544
5545
5546 /***/ }),
5547
5548 /***/ "./node_modules/raven-js/src/configError.js":
5549 /*!**************************************************!*\
5550 !*** ./node_modules/raven-js/src/configError.js ***!
5551 \**************************************************/
5552 /***/ ((module) => {
5553
5554 function RavenConfigError(message) {
5555 this.name = 'RavenConfigError';
5556 this.message = message;
5557 }
5558 RavenConfigError.prototype = new Error();
5559 RavenConfigError.prototype.constructor = RavenConfigError;
5560
5561 module.exports = RavenConfigError;
5562
5563
5564 /***/ }),
5565
5566 /***/ "./node_modules/raven-js/src/console.js":
5567 /*!**********************************************!*\
5568 !*** ./node_modules/raven-js/src/console.js ***!
5569 \**********************************************/
5570 /***/ ((module) => {
5571
5572 var wrapMethod = function(console, level, callback) {
5573 var originalConsoleLevel = console[level];
5574 var originalConsole = console;
5575
5576 if (!(level in console)) {
5577 return;
5578 }
5579
5580 var sentryLevel = level === 'warn' ? 'warning' : level;
5581
5582 console[level] = function() {
5583 var args = [].slice.call(arguments);
5584
5585 var msg = '' + args.join(' ');
5586 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5587
5588 if (level === 'assert') {
5589 if (args[0] === false) {
5590 // Default browsers message
5591 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5592 data.extra.arguments = args.slice(1);
5593 callback && callback(msg, data);
5594 }
5595 } else {
5596 callback && callback(msg, data);
5597 }
5598
5599 // this fails for some browsers. :(
5600 if (originalConsoleLevel) {
5601 // IE9 doesn't allow calling apply on console functions directly
5602 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5603 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5604 }
5605 };
5606 };
5607
5608 module.exports = {
5609 wrapMethod: wrapMethod
5610 };
5611
5612
5613 /***/ }),
5614
5615 /***/ "./node_modules/raven-js/src/raven.js":
5616 /*!********************************************!*\
5617 !*** ./node_modules/raven-js/src/raven.js ***!
5618 \********************************************/
5619 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5620
5621 /*global XDomainRequest:false */
5622
5623 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5624 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5625 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5626
5627 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5628 var isError = utils.isError;
5629 var isObject = utils.isObject;
5630 var isObject = utils.isObject;
5631 var isErrorEvent = utils.isErrorEvent;
5632 var isUndefined = utils.isUndefined;
5633 var isFunction = utils.isFunction;
5634 var isString = utils.isString;
5635 var isEmptyObject = utils.isEmptyObject;
5636 var each = utils.each;
5637 var objectMerge = utils.objectMerge;
5638 var truncate = utils.truncate;
5639 var objectFrozen = utils.objectFrozen;
5640 var hasKey = utils.hasKey;
5641 var joinRegExp = utils.joinRegExp;
5642 var urlencode = utils.urlencode;
5643 var uuid4 = utils.uuid4;
5644 var htmlTreeAsString = utils.htmlTreeAsString;
5645 var isSameException = utils.isSameException;
5646 var isSameStacktrace = utils.isSameStacktrace;
5647 var parseUrl = utils.parseUrl;
5648 var fill = utils.fill;
5649
5650 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5651
5652 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5653 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5654
5655 function now() {
5656 return +new Date();
5657 }
5658
5659 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5660 var _window =
5661 typeof window !== 'undefined'
5662 ? window
5663 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5664 var _document = _window.document;
5665 var _navigator = _window.navigator;
5666
5667 function keepOriginalCallback(original, callback) {
5668 return isFunction(callback)
5669 ? function(data) {
5670 return callback(data, original);
5671 }
5672 : callback;
5673 }
5674
5675 // First, check for JSON support
5676 // If there is no JSON, we no-op the core features of Raven
5677 // since JSON is required to encode the payload
5678 function Raven() {
5679 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5680 // Raven can run in contexts where there's no document (react-native)
5681 this._hasDocument = !isUndefined(_document);
5682 this._hasNavigator = !isUndefined(_navigator);
5683 this._lastCapturedException = null;
5684 this._lastData = null;
5685 this._lastEventId = null;
5686 this._globalServer = null;
5687 this._globalKey = null;
5688 this._globalProject = null;
5689 this._globalContext = {};
5690 this._globalOptions = {
5691 logger: 'javascript',
5692 ignoreErrors: [],
5693 ignoreUrls: [],
5694 whitelistUrls: [],
5695 includePaths: [],
5696 collectWindowErrors: true,
5697 maxMessageLength: 0,
5698
5699 // By default, truncates URL values to 250 chars
5700 maxUrlLength: 250,
5701 stackTraceLimit: 50,
5702 autoBreadcrumbs: true,
5703 instrument: true,
5704 sampleRate: 1
5705 };
5706 this._ignoreOnError = 0;
5707 this._isRavenInstalled = false;
5708 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5709 // capture references to window.console *and* all its methods first
5710 // before the console plugin has a chance to monkey patch
5711 this._originalConsole = _window.console || {};
5712 this._originalConsoleMethods = {};
5713 this._plugins = [];
5714 this._startTime = now();
5715 this._wrappedBuiltIns = [];
5716 this._breadcrumbs = [];
5717 this._lastCapturedEvent = null;
5718 this._keypressTimeout;
5719 this._location = _window.location;
5720 this._lastHref = this._location && this._location.href;
5721 this._resetBackoff();
5722
5723 // eslint-disable-next-line guard-for-in
5724 for (var method in this._originalConsole) {
5725 this._originalConsoleMethods[method] = this._originalConsole[method];
5726 }
5727 }
5728
5729 /*
5730 * The core Raven singleton
5731 *
5732 * @this {Raven}
5733 */
5734
5735 Raven.prototype = {
5736 // Hardcode version string so that raven source can be loaded directly via
5737 // webpack (using a build step causes webpack #1617). Grunt verifies that
5738 // this value matches package.json during build.
5739 // See: https://github.com/getsentry/raven-js/issues/465
5740 VERSION: '3.19.1',
5741
5742 debug: false,
5743
5744 TraceKit: TraceKit, // alias to TraceKit
5745
5746 /*
5747 * Configure Raven with a DSN and extra options
5748 *
5749 * @param {string} dsn The public Sentry DSN
5750 * @param {object} options Set of global options [optional]
5751 * @return {Raven}
5752 */
5753 config: function(dsn, options) {
5754 var self = this;
5755
5756 if (self._globalServer) {
5757 this._logDebug('error', 'Error: Raven has already been configured');
5758 return self;
5759 }
5760 if (!dsn) return self;
5761
5762 var globalOptions = self._globalOptions;
5763
5764 // merge in options
5765 if (options) {
5766 each(options, function(key, value) {
5767 // tags and extra are special and need to be put into context
5768 if (key === 'tags' || key === 'extra' || key === 'user') {
5769 self._globalContext[key] = value;
5770 } else {
5771 globalOptions[key] = value;
5772 }
5773 });
5774 }
5775
5776 self.setDSN(dsn);
5777
5778 // "Script error." is hard coded into browsers for errors that it can't read.
5779 // this is the result of a script being pulled in from an external domain and CORS.
5780 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5781 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5782
5783 // join regexp rules into one big rule
5784 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5785 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5786 ? joinRegExp(globalOptions.ignoreUrls)
5787 : false;
5788 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5789 ? joinRegExp(globalOptions.whitelistUrls)
5790 : false;
5791 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5792 globalOptions.maxBreadcrumbs = Math.max(
5793 0,
5794 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5795 ); // default and hard limit is 100
5796
5797 var autoBreadcrumbDefaults = {
5798 xhr: true,
5799 console: true,
5800 dom: true,
5801 location: true
5802 };
5803
5804 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5805 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5806 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5807 } else if (autoBreadcrumbs !== false) {
5808 autoBreadcrumbs = autoBreadcrumbDefaults;
5809 }
5810 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5811
5812 var instrumentDefaults = {
5813 tryCatch: true
5814 };
5815
5816 var instrument = globalOptions.instrument;
5817 if ({}.toString.call(instrument) === '[object Object]') {
5818 instrument = objectMerge(instrumentDefaults, instrument);
5819 } else if (instrument !== false) {
5820 instrument = instrumentDefaults;
5821 }
5822 globalOptions.instrument = instrument;
5823
5824 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5825
5826 // return for chaining
5827 return self;
5828 },
5829
5830 /*
5831 * Installs a global window.onerror error handler
5832 * to capture and report uncaught exceptions.
5833 * At this point, install() is required to be called due
5834 * to the way TraceKit is set up.
5835 *
5836 * @return {Raven}
5837 */
5838 install: function() {
5839 var self = this;
5840 if (self.isSetup() && !self._isRavenInstalled) {
5841 TraceKit.report.subscribe(function() {
5842 self._handleOnErrorStackInfo.apply(self, arguments);
5843 });
5844 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5845 self._instrumentTryCatch();
5846 }
5847
5848 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5849
5850 // Install all of the plugins
5851 self._drainPlugins();
5852
5853 self._isRavenInstalled = true;
5854 }
5855
5856 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5857 return this;
5858 },
5859
5860 /*
5861 * Set the DSN (can be called multiple time unlike config)
5862 *
5863 * @param {string} dsn The public Sentry DSN
5864 */
5865 setDSN: function(dsn) {
5866 var self = this,
5867 uri = self._parseDSN(dsn),
5868 lastSlash = uri.path.lastIndexOf('/'),
5869 path = uri.path.substr(1, lastSlash);
5870
5871 self._dsn = dsn;
5872 self._globalKey = uri.user;
5873 self._globalSecret = uri.pass && uri.pass.substr(1);
5874 self._globalProject = uri.path.substr(lastSlash + 1);
5875
5876 self._globalServer = self._getGlobalServer(uri);
5877
5878 self._globalEndpoint =
5879 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5880
5881 // Reset backoff state since we may be pointing at a
5882 // new project/server
5883 this._resetBackoff();
5884 },
5885
5886 /*
5887 * Wrap code within a context so Raven can capture errors
5888 * reliably across domains that is executed immediately.
5889 *
5890 * @param {object} options A specific set of options for this context [optional]
5891 * @param {function} func The callback to be immediately executed within the context
5892 * @param {array} args An array of arguments to be called with the callback [optional]
5893 */
5894 context: function(options, func, args) {
5895 if (isFunction(options)) {
5896 args = func || [];
5897 func = options;
5898 options = undefined;
5899 }
5900
5901 return this.wrap(options, func).apply(this, args);
5902 },
5903
5904 /*
5905 * Wrap code within a context and returns back a new function to be executed
5906 *
5907 * @param {object} options A specific set of options for this context [optional]
5908 * @param {function} func The function to be wrapped in a new context
5909 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5910 * @return {function} The newly wrapped functions with a context
5911 */
5912 wrap: function(options, func, _before) {
5913 var self = this;
5914 // 1 argument has been passed, and it's not a function
5915 // so just return it
5916 if (isUndefined(func) && !isFunction(options)) {
5917 return options;
5918 }
5919
5920 // options is optional
5921 if (isFunction(options)) {
5922 func = options;
5923 options = undefined;
5924 }
5925
5926 // At this point, we've passed along 2 arguments, and the second one
5927 // is not a function either, so we'll just return the second argument.
5928 if (!isFunction(func)) {
5929 return func;
5930 }
5931
5932 // We don't wanna wrap it twice!
5933 try {
5934 if (func.__raven__) {
5935 return func;
5936 }
5937
5938 // If this has already been wrapped in the past, return that
5939 if (func.__raven_wrapper__) {
5940 return func.__raven_wrapper__;
5941 }
5942 } catch (e) {
5943 // Just accessing custom props in some Selenium environments
5944 // can cause a "Permission denied" exception (see raven-js#495).
5945 // Bail on wrapping and return the function as-is (defers to window.onerror).
5946 return func;
5947 }
5948
5949 function wrapped() {
5950 var args = [],
5951 i = arguments.length,
5952 deep = !options || (options && options.deep !== false);
5953
5954 if (_before && isFunction(_before)) {
5955 _before.apply(this, arguments);
5956 }
5957
5958 // Recursively wrap all of a function's arguments that are
5959 // functions themselves.
5960 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5961
5962 try {
5963 // Attempt to invoke user-land function
5964 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5965 // means Raven caught an error invoking your application code. This is
5966 // expected behavior and NOT indicative of a bug with Raven.js.
5967 return func.apply(this, args);
5968 } catch (e) {
5969 self._ignoreNextOnError();
5970 self.captureException(e, options);
5971 throw e;
5972 }
5973 }
5974
5975 // copy over properties of the old function
5976 for (var property in func) {
5977 if (hasKey(func, property)) {
5978 wrapped[property] = func[property];
5979 }
5980 }
5981 wrapped.prototype = func.prototype;
5982
5983 func.__raven_wrapper__ = wrapped;
5984 // Signal that this function has been wrapped already
5985 // for both debugging and to prevent it to being wrapped twice
5986 wrapped.__raven__ = true;
5987 wrapped.__inner__ = func;
5988
5989 return wrapped;
5990 },
5991
5992 /*
5993 * Uninstalls the global error handler.
5994 *
5995 * @return {Raven}
5996 */
5997 uninstall: function() {
5998 TraceKit.report.uninstall();
5999
6000 this._restoreBuiltIns();
6001
6002 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6003 this._isRavenInstalled = false;
6004
6005 return this;
6006 },
6007
6008 /*
6009 * Manually capture an exception and send it over to Sentry
6010 *
6011 * @param {error} ex An exception to be logged
6012 * @param {object} options A specific set of options for this error [optional]
6013 * @return {Raven}
6014 */
6015 captureException: function(ex, options) {
6016 // Cases for sending ex as a message, rather than an exception
6017 var isNotError = !isError(ex);
6018 var isNotErrorEvent = !isErrorEvent(ex);
6019 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6020
6021 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6022 return this.captureMessage(
6023 ex,
6024 objectMerge(
6025 {
6026 trimHeadFrames: 1,
6027 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6028 },
6029 options
6030 )
6031 );
6032 }
6033
6034 // Get actual Error from ErrorEvent
6035 if (isErrorEvent(ex)) ex = ex.error;
6036
6037 // Store the raw exception object for potential debugging and introspection
6038 this._lastCapturedException = ex;
6039
6040 // TraceKit.report will re-raise any exception passed to it,
6041 // which means you have to wrap it in try/catch. Instead, we
6042 // can wrap it here and only re-raise if TraceKit.report
6043 // raises an exception different from the one we asked to
6044 // report on.
6045 try {
6046 var stack = TraceKit.computeStackTrace(ex);
6047 this._handleStackInfo(stack, options);
6048 } catch (ex1) {
6049 if (ex !== ex1) {
6050 throw ex1;
6051 }
6052 }
6053
6054 return this;
6055 },
6056
6057 /*
6058 * Manually send a message to Sentry
6059 *
6060 * @param {string} msg A plain message to be captured in Sentry
6061 * @param {object} options A specific set of options for this message [optional]
6062 * @return {Raven}
6063 */
6064 captureMessage: function(msg, options) {
6065 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6066 // early call; we'll error on the side of logging anything called before configuration since it's
6067 // probably something you should see:
6068 if (
6069 !!this._globalOptions.ignoreErrors.test &&
6070 this._globalOptions.ignoreErrors.test(msg)
6071 ) {
6072 return;
6073 }
6074
6075 options = options || {};
6076
6077 var data = objectMerge(
6078 {
6079 message: msg + '' // Make sure it's actually a string
6080 },
6081 options
6082 );
6083
6084 var ex;
6085 // Generate a "synthetic" stack trace from this point.
6086 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6087 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6088 // or if it catches a thrown object without a "stack" property.
6089 try {
6090 throw new Error(msg);
6091 } catch (ex1) {
6092 ex = ex1;
6093 }
6094
6095 // null exception name so `Error` isn't prefixed to msg
6096 ex.name = null;
6097 var stack = TraceKit.computeStackTrace(ex);
6098
6099 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6100 var initialCall = stack.stack[1];
6101
6102 var fileurl = (initialCall && initialCall.url) || '';
6103
6104 if (
6105 !!this._globalOptions.ignoreUrls.test &&
6106 this._globalOptions.ignoreUrls.test(fileurl)
6107 ) {
6108 return;
6109 }
6110
6111 if (
6112 !!this._globalOptions.whitelistUrls.test &&
6113 !this._globalOptions.whitelistUrls.test(fileurl)
6114 ) {
6115 return;
6116 }
6117
6118 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6119 options = objectMerge(
6120 {
6121 // fingerprint on msg, not stack trace (legacy behavior, could be
6122 // revisited)
6123 fingerprint: msg,
6124 // since we know this is a synthetic trace, the top N-most frames
6125 // MUST be from Raven.js, so mark them as in_app later by setting
6126 // trimHeadFrames
6127 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6128 },
6129 options
6130 );
6131
6132 var frames = this._prepareFrames(stack, options);
6133 data.stacktrace = {
6134 // Sentry expects frames oldest to newest
6135 frames: frames.reverse()
6136 };
6137 }
6138
6139 // Fire away!
6140 this._send(data);
6141
6142 return this;
6143 },
6144
6145 captureBreadcrumb: function(obj) {
6146 var crumb = objectMerge(
6147 {
6148 timestamp: now() / 1000
6149 },
6150 obj
6151 );
6152
6153 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6154 var result = this._globalOptions.breadcrumbCallback(crumb);
6155
6156 if (isObject(result) && !isEmptyObject(result)) {
6157 crumb = result;
6158 } else if (result === false) {
6159 return this;
6160 }
6161 }
6162
6163 this._breadcrumbs.push(crumb);
6164 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6165 this._breadcrumbs.shift();
6166 }
6167 return this;
6168 },
6169
6170 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6171 var pluginArgs = [].slice.call(arguments, 1);
6172
6173 this._plugins.push([plugin, pluginArgs]);
6174 if (this._isRavenInstalled) {
6175 this._drainPlugins();
6176 }
6177
6178 return this;
6179 },
6180
6181 /*
6182 * Set/clear a user to be sent along with the payload.
6183 *
6184 * @param {object} user An object representing user data [optional]
6185 * @return {Raven}
6186 */
6187 setUserContext: function(user) {
6188 // Intentionally do not merge here since that's an unexpected behavior.
6189 this._globalContext.user = user;
6190
6191 return this;
6192 },
6193
6194 /*
6195 * Merge extra attributes to be sent along with the payload.
6196 *
6197 * @param {object} extra An object representing extra data [optional]
6198 * @return {Raven}
6199 */
6200 setExtraContext: function(extra) {
6201 this._mergeContext('extra', extra);
6202
6203 return this;
6204 },
6205
6206 /*
6207 * Merge tags to be sent along with the payload.
6208 *
6209 * @param {object} tags An object representing tags [optional]
6210 * @return {Raven}
6211 */
6212 setTagsContext: function(tags) {
6213 this._mergeContext('tags', tags);
6214
6215 return this;
6216 },
6217
6218 /*
6219 * Clear all of the context.
6220 *
6221 * @return {Raven}
6222 */
6223 clearContext: function() {
6224 this._globalContext = {};
6225
6226 return this;
6227 },
6228
6229 /*
6230 * Get a copy of the current context. This cannot be mutated.
6231 *
6232 * @return {object} copy of context
6233 */
6234 getContext: function() {
6235 // lol javascript
6236 return JSON.parse(stringify(this._globalContext));
6237 },
6238
6239 /*
6240 * Set environment of application
6241 *
6242 * @param {string} environment Typically something like 'production'.
6243 * @return {Raven}
6244 */
6245 setEnvironment: function(environment) {
6246 this._globalOptions.environment = environment;
6247
6248 return this;
6249 },
6250
6251 /*
6252 * Set release version of application
6253 *
6254 * @param {string} release Typically something like a git SHA to identify version
6255 * @return {Raven}
6256 */
6257 setRelease: function(release) {
6258 this._globalOptions.release = release;
6259
6260 return this;
6261 },
6262
6263 /*
6264 * Set the dataCallback option
6265 *
6266 * @param {function} callback The callback to run which allows the
6267 * data blob to be mutated before sending
6268 * @return {Raven}
6269 */
6270 setDataCallback: function(callback) {
6271 var original = this._globalOptions.dataCallback;
6272 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6273 return this;
6274 },
6275
6276 /*
6277 * Set the breadcrumbCallback option
6278 *
6279 * @param {function} callback The callback to run which allows filtering
6280 * or mutating breadcrumbs
6281 * @return {Raven}
6282 */
6283 setBreadcrumbCallback: function(callback) {
6284 var original = this._globalOptions.breadcrumbCallback;
6285 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6286 return this;
6287 },
6288
6289 /*
6290 * Set the shouldSendCallback option
6291 *
6292 * @param {function} callback The callback to run which allows
6293 * introspecting the blob before sending
6294 * @return {Raven}
6295 */
6296 setShouldSendCallback: function(callback) {
6297 var original = this._globalOptions.shouldSendCallback;
6298 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6299 return this;
6300 },
6301
6302 /**
6303 * Override the default HTTP transport mechanism that transmits data
6304 * to the Sentry server.
6305 *
6306 * @param {function} transport Function invoked instead of the default
6307 * `makeRequest` handler.
6308 *
6309 * @return {Raven}
6310 */
6311 setTransport: function(transport) {
6312 this._globalOptions.transport = transport;
6313
6314 return this;
6315 },
6316
6317 /*
6318 * Get the latest raw exception that was captured by Raven.
6319 *
6320 * @return {error}
6321 */
6322 lastException: function() {
6323 return this._lastCapturedException;
6324 },
6325
6326 /*
6327 * Get the last event id
6328 *
6329 * @return {string}
6330 */
6331 lastEventId: function() {
6332 return this._lastEventId;
6333 },
6334
6335 /*
6336 * Determine if Raven is setup and ready to go.
6337 *
6338 * @return {boolean}
6339 */
6340 isSetup: function() {
6341 if (!this._hasJSON) return false; // needs JSON support
6342 if (!this._globalServer) {
6343 if (!this.ravenNotConfiguredError) {
6344 this.ravenNotConfiguredError = true;
6345 this._logDebug('error', 'Error: Raven has not been configured.');
6346 }
6347 return false;
6348 }
6349 return true;
6350 },
6351
6352 afterLoad: function() {
6353 // TODO: remove window dependence?
6354
6355 // Attempt to initialize Raven on load
6356 var RavenConfig = _window.RavenConfig;
6357 if (RavenConfig) {
6358 this.config(RavenConfig.dsn, RavenConfig.config).install();
6359 }
6360 },
6361
6362 showReportDialog: function(options) {
6363 if (
6364 !_document // doesn't work without a document (React native)
6365 )
6366 return;
6367
6368 options = options || {};
6369
6370 var lastEventId = options.eventId || this.lastEventId();
6371 if (!lastEventId) {
6372 throw new RavenConfigError('Missing eventId');
6373 }
6374
6375 var dsn = options.dsn || this._dsn;
6376 if (!dsn) {
6377 throw new RavenConfigError('Missing DSN');
6378 }
6379
6380 var encode = encodeURIComponent;
6381 var qs = '';
6382 qs += '?eventId=' + encode(lastEventId);
6383 qs += '&dsn=' + encode(dsn);
6384
6385 var user = options.user || this._globalContext.user;
6386 if (user) {
6387 if (user.name) qs += '&name=' + encode(user.name);
6388 if (user.email) qs += '&email=' + encode(user.email);
6389 }
6390
6391 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6392
6393 var script = _document.createElement('script');
6394 script.async = true;
6395 script.src = globalServer + '/api/embed/error-page/' + qs;
6396 (_document.head || _document.body).appendChild(script);
6397 },
6398
6399 /**** Private functions ****/
6400 _ignoreNextOnError: function() {
6401 var self = this;
6402 this._ignoreOnError += 1;
6403 setTimeout(function() {
6404 // onerror should trigger before setTimeout
6405 self._ignoreOnError -= 1;
6406 });
6407 },
6408
6409 _triggerEvent: function(eventType, options) {
6410 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6411 var evt, key;
6412
6413 if (!this._hasDocument) return;
6414
6415 options = options || {};
6416
6417 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6418
6419 if (_document.createEvent) {
6420 evt = _document.createEvent('HTMLEvents');
6421 evt.initEvent(eventType, true, true);
6422 } else {
6423 evt = _document.createEventObject();
6424 evt.eventType = eventType;
6425 }
6426
6427 for (key in options)
6428 if (hasKey(options, key)) {
6429 evt[key] = options[key];
6430 }
6431
6432 if (_document.createEvent) {
6433 // IE9 if standards
6434 _document.dispatchEvent(evt);
6435 } else {
6436 // IE8 regardless of Quirks or Standards
6437 // IE9 if quirks
6438 try {
6439 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6440 } catch (e) {
6441 // Do nothing
6442 }
6443 }
6444 },
6445
6446 /**
6447 * Wraps addEventListener to capture UI breadcrumbs
6448 * @param evtName the event name (e.g. "click")
6449 * @returns {Function}
6450 * @private
6451 */
6452 _breadcrumbEventHandler: function(evtName) {
6453 var self = this;
6454 return function(evt) {
6455 // reset keypress timeout; e.g. triggering a 'click' after
6456 // a 'keypress' will reset the keypress debounce so that a new
6457 // set of keypresses can be recorded
6458 self._keypressTimeout = null;
6459
6460 // It's possible this handler might trigger multiple times for the same
6461 // event (e.g. event propagation through node ancestors). Ignore if we've
6462 // already captured the event.
6463 if (self._lastCapturedEvent === evt) return;
6464
6465 self._lastCapturedEvent = evt;
6466
6467 // try/catch both:
6468 // - accessing evt.target (see getsentry/raven-js#838, #768)
6469 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6470 // can throw an exception in some circumstances.
6471 var target;
6472 try {
6473 target = htmlTreeAsString(evt.target);
6474 } catch (e) {
6475 target = '<unknown>';
6476 }
6477
6478 self.captureBreadcrumb({
6479 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6480 message: target
6481 });
6482 };
6483 },
6484
6485 /**
6486 * Wraps addEventListener to capture keypress UI events
6487 * @returns {Function}
6488 * @private
6489 */
6490 _keypressEventHandler: function() {
6491 var self = this,
6492 debounceDuration = 1000; // milliseconds
6493
6494 // TODO: if somehow user switches keypress target before
6495 // debounce timeout is triggered, we will only capture
6496 // a single breadcrumb from the FIRST target (acceptable?)
6497 return function(evt) {
6498 var target;
6499 try {
6500 target = evt.target;
6501 } catch (e) {
6502 // just accessing event properties can throw an exception in some rare circumstances
6503 // see: https://github.com/getsentry/raven-js/issues/838
6504 return;
6505 }
6506 var tagName = target && target.tagName;
6507
6508 // only consider keypress events on actual input elements
6509 // this will disregard keypresses targeting body (e.g. tabbing
6510 // through elements, hotkeys, etc)
6511 if (
6512 !tagName ||
6513 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6514 )
6515 return;
6516
6517 // record first keypress in a series, but ignore subsequent
6518 // keypresses until debounce clears
6519 var timeout = self._keypressTimeout;
6520 if (!timeout) {
6521 self._breadcrumbEventHandler('input')(evt);
6522 }
6523 clearTimeout(timeout);
6524 self._keypressTimeout = setTimeout(function() {
6525 self._keypressTimeout = null;
6526 }, debounceDuration);
6527 };
6528 },
6529
6530 /**
6531 * Captures a breadcrumb of type "navigation", normalizing input URLs
6532 * @param to the originating URL
6533 * @param from the target URL
6534 * @private
6535 */
6536 _captureUrlChange: function(from, to) {
6537 var parsedLoc = parseUrl(this._location.href);
6538 var parsedTo = parseUrl(to);
6539 var parsedFrom = parseUrl(from);
6540
6541 // because onpopstate only tells you the "new" (to) value of location.href, and
6542 // not the previous (from) value, we need to track the value of the current URL
6543 // state ourselves
6544 this._lastHref = to;
6545
6546 // Use only the path component of the URL if the URL matches the current
6547 // document (almost all the time when using pushState)
6548 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6549 to = parsedTo.relative;
6550 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6551 from = parsedFrom.relative;
6552
6553 this.captureBreadcrumb({
6554 category: 'navigation',
6555 data: {
6556 to: to,
6557 from: from
6558 }
6559 });
6560 },
6561
6562 /**
6563 * Wrap timer functions and event targets to catch errors and provide
6564 * better metadata.
6565 */
6566 _instrumentTryCatch: function() {
6567 var self = this;
6568
6569 var wrappedBuiltIns = self._wrappedBuiltIns;
6570
6571 function wrapTimeFn(orig) {
6572 return function(fn, t) {
6573 // preserve arity
6574 // Make a copy of the arguments to prevent deoptimization
6575 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6576 var args = new Array(arguments.length);
6577 for (var i = 0; i < args.length; ++i) {
6578 args[i] = arguments[i];
6579 }
6580 var originalCallback = args[0];
6581 if (isFunction(originalCallback)) {
6582 args[0] = self.wrap(originalCallback);
6583 }
6584
6585 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6586 // also supports only two arguments and doesn't care what this is, so we
6587 // can just call the original function directly.
6588 if (orig.apply) {
6589 return orig.apply(this, args);
6590 } else {
6591 return orig(args[0], args[1]);
6592 }
6593 };
6594 }
6595
6596 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6597
6598 function wrapEventTarget(global) {
6599 var proto = _window[global] && _window[global].prototype;
6600 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6601 fill(
6602 proto,
6603 'addEventListener',
6604 function(orig) {
6605 return function(evtName, fn, capture, secure) {
6606 // preserve arity
6607 try {
6608 if (fn && fn.handleEvent) {
6609 fn.handleEvent = self.wrap(fn.handleEvent);
6610 }
6611 } catch (err) {
6612 // can sometimes get 'Permission denied to access property "handle Event'
6613 }
6614
6615 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6616 // so that we don't have more than one wrapper function
6617 var before, clickHandler, keypressHandler;
6618
6619 if (
6620 autoBreadcrumbs &&
6621 autoBreadcrumbs.dom &&
6622 (global === 'EventTarget' || global === 'Node')
6623 ) {
6624 // NOTE: generating multiple handlers per addEventListener invocation, should
6625 // revisit and verify we can just use one (almost certainly)
6626 clickHandler = self._breadcrumbEventHandler('click');
6627 keypressHandler = self._keypressEventHandler();
6628 before = function(evt) {
6629 // need to intercept every DOM event in `before` argument, in case that
6630 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6631 // see #724
6632 if (!evt) return;
6633
6634 var eventType;
6635 try {
6636 eventType = evt.type;
6637 } catch (e) {
6638 // just accessing event properties can throw an exception in some rare circumstances
6639 // see: https://github.com/getsentry/raven-js/issues/838
6640 return;
6641 }
6642 if (eventType === 'click') return clickHandler(evt);
6643 else if (eventType === 'keypress') return keypressHandler(evt);
6644 };
6645 }
6646 return orig.call(
6647 this,
6648 evtName,
6649 self.wrap(fn, undefined, before),
6650 capture,
6651 secure
6652 );
6653 };
6654 },
6655 wrappedBuiltIns
6656 );
6657 fill(
6658 proto,
6659 'removeEventListener',
6660 function(orig) {
6661 return function(evt, fn, capture, secure) {
6662 try {
6663 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6664 } catch (e) {
6665 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6666 }
6667 return orig.call(this, evt, fn, capture, secure);
6668 };
6669 },
6670 wrappedBuiltIns
6671 );
6672 }
6673 }
6674
6675 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6676 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6677 if (_window.requestAnimationFrame) {
6678 fill(
6679 _window,
6680 'requestAnimationFrame',
6681 function(orig) {
6682 return function(cb) {
6683 return orig(self.wrap(cb));
6684 };
6685 },
6686 wrappedBuiltIns
6687 );
6688 }
6689
6690 // event targets borrowed from bugsnag-js:
6691 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6692 var eventTargets = [
6693 'EventTarget',
6694 'Window',
6695 'Node',
6696 'ApplicationCache',
6697 'AudioTrackList',
6698 'ChannelMergerNode',
6699 'CryptoOperation',
6700 'EventSource',
6701 'FileReader',
6702 'HTMLUnknownElement',
6703 'IDBDatabase',
6704 'IDBRequest',
6705 'IDBTransaction',
6706 'KeyOperation',
6707 'MediaController',
6708 'MessagePort',
6709 'ModalWindow',
6710 'Notification',
6711 'SVGElementInstance',
6712 'Screen',
6713 'TextTrack',
6714 'TextTrackCue',
6715 'TextTrackList',
6716 'WebSocket',
6717 'WebSocketWorker',
6718 'Worker',
6719 'XMLHttpRequest',
6720 'XMLHttpRequestEventTarget',
6721 'XMLHttpRequestUpload'
6722 ];
6723 for (var i = 0; i < eventTargets.length; i++) {
6724 wrapEventTarget(eventTargets[i]);
6725 }
6726 },
6727
6728 /**
6729 * Instrument browser built-ins w/ breadcrumb capturing
6730 * - XMLHttpRequests
6731 * - DOM interactions (click/typing)
6732 * - window.location changes
6733 * - console
6734 *
6735 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6736 */
6737 _instrumentBreadcrumbs: function() {
6738 var self = this;
6739 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6740
6741 var wrappedBuiltIns = self._wrappedBuiltIns;
6742
6743 function wrapProp(prop, xhr) {
6744 if (prop in xhr && isFunction(xhr[prop])) {
6745 fill(xhr, prop, function(orig) {
6746 return self.wrap(orig);
6747 }); // intentionally don't track filled methods on XHR instances
6748 }
6749 }
6750
6751 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6752 var xhrproto = XMLHttpRequest.prototype;
6753 fill(
6754 xhrproto,
6755 'open',
6756 function(origOpen) {
6757 return function(method, url) {
6758 // preserve arity
6759
6760 // if Sentry key appears in URL, don't capture
6761 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6762 this.__raven_xhr = {
6763 method: method,
6764 url: url,
6765 status_code: null
6766 };
6767 }
6768
6769 return origOpen.apply(this, arguments);
6770 };
6771 },
6772 wrappedBuiltIns
6773 );
6774
6775 fill(
6776 xhrproto,
6777 'send',
6778 function(origSend) {
6779 return function(data) {
6780 // preserve arity
6781 var xhr = this;
6782
6783 function onreadystatechangeHandler() {
6784 if (xhr.__raven_xhr && xhr.readyState === 4) {
6785 try {
6786 // touching statusCode in some platforms throws
6787 // an exception
6788 xhr.__raven_xhr.status_code = xhr.status;
6789 } catch (e) {
6790 /* do nothing */
6791 }
6792
6793 self.captureBreadcrumb({
6794 type: 'http',
6795 category: 'xhr',
6796 data: xhr.__raven_xhr
6797 });
6798 }
6799 }
6800
6801 var props = ['onload', 'onerror', 'onprogress'];
6802 for (var j = 0; j < props.length; j++) {
6803 wrapProp(props[j], xhr);
6804 }
6805
6806 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6807 fill(
6808 xhr,
6809 'onreadystatechange',
6810 function(orig) {
6811 return self.wrap(orig, undefined, onreadystatechangeHandler);
6812 } /* intentionally don't track this instrumentation */
6813 );
6814 } else {
6815 // if onreadystatechange wasn't actually set by the page on this xhr, we
6816 // are free to set our own and capture the breadcrumb
6817 xhr.onreadystatechange = onreadystatechangeHandler;
6818 }
6819
6820 return origSend.apply(this, arguments);
6821 };
6822 },
6823 wrappedBuiltIns
6824 );
6825 }
6826
6827 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6828 fill(
6829 _window,
6830 'fetch',
6831 function(origFetch) {
6832 return function(fn, t) {
6833 // preserve arity
6834 // Make a copy of the arguments to prevent deoptimization
6835 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6836 var args = new Array(arguments.length);
6837 for (var i = 0; i < args.length; ++i) {
6838 args[i] = arguments[i];
6839 }
6840
6841 var fetchInput = args[0];
6842 var method = 'GET';
6843 var url;
6844
6845 if (typeof fetchInput === 'string') {
6846 url = fetchInput;
6847 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6848 url = fetchInput.url;
6849 if (fetchInput.method) {
6850 method = fetchInput.method;
6851 }
6852 } else {
6853 url = '' + fetchInput;
6854 }
6855
6856 if (args[1] && args[1].method) {
6857 method = args[1].method;
6858 }
6859
6860 var fetchData = {
6861 method: method,
6862 url: url,
6863 status_code: null
6864 };
6865
6866 self.captureBreadcrumb({
6867 type: 'http',
6868 category: 'fetch',
6869 data: fetchData
6870 });
6871
6872 return origFetch.apply(this, args).then(function(response) {
6873 fetchData.status_code = response.status;
6874
6875 return response;
6876 });
6877 };
6878 },
6879 wrappedBuiltIns
6880 );
6881 }
6882
6883 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6884 // to the document. Do this before we instrument addEventListener.
6885 if (autoBreadcrumbs.dom && this._hasDocument) {
6886 if (_document.addEventListener) {
6887 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6888 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6889 } else {
6890 // IE8 Compatibility
6891 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6892 _document.attachEvent('onkeypress', self._keypressEventHandler());
6893 }
6894 }
6895
6896 // record navigation (URL) changes
6897 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6898 // a try/catch block*, will cause Chrome to output an error to console.error
6899 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6900 var chrome = _window.chrome;
6901 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6902 var hasPushAndReplaceState =
6903 !isChromePackagedApp &&
6904 _window.history &&
6905 history.pushState &&
6906 history.replaceState;
6907 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6908 // TODO: remove onpopstate handler on uninstall()
6909 var oldOnPopState = _window.onpopstate;
6910 _window.onpopstate = function() {
6911 var currentHref = self._location.href;
6912 self._captureUrlChange(self._lastHref, currentHref);
6913
6914 if (oldOnPopState) {
6915 return oldOnPopState.apply(this, arguments);
6916 }
6917 };
6918
6919 var historyReplacementFunction = function(origHistFunction) {
6920 // note history.pushState.length is 0; intentionally not declaring
6921 // params to preserve 0 arity
6922 return function(/* state, title, url */) {
6923 var url = arguments.length > 2 ? arguments[2] : undefined;
6924
6925 // url argument is optional
6926 if (url) {
6927 // coerce to string (this is what pushState does)
6928 self._captureUrlChange(self._lastHref, url + '');
6929 }
6930
6931 return origHistFunction.apply(this, arguments);
6932 };
6933 };
6934
6935 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6936 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6937 }
6938
6939 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6940 // console
6941 var consoleMethodCallback = function(msg, data) {
6942 self.captureBreadcrumb({
6943 message: msg,
6944 level: data.level,
6945 category: 'console'
6946 });
6947 };
6948
6949 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6950 wrapConsoleMethod(console, level, consoleMethodCallback);
6951 });
6952 }
6953 },
6954
6955 _restoreBuiltIns: function() {
6956 // restore any wrapped builtins
6957 var builtin;
6958 while (this._wrappedBuiltIns.length) {
6959 builtin = this._wrappedBuiltIns.shift();
6960
6961 var obj = builtin[0],
6962 name = builtin[1],
6963 orig = builtin[2];
6964
6965 obj[name] = orig;
6966 }
6967 },
6968
6969 _drainPlugins: function() {
6970 var self = this;
6971
6972 // FIX ME TODO
6973 each(this._plugins, function(_, plugin) {
6974 var installer = plugin[0];
6975 var args = plugin[1];
6976 installer.apply(self, [self].concat(args));
6977 });
6978 },
6979
6980 _parseDSN: function(str) {
6981 var m = dsnPattern.exec(str),
6982 dsn = {},
6983 i = 7;
6984
6985 try {
6986 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6987 } catch (e) {
6988 throw new RavenConfigError('Invalid DSN: ' + str);
6989 }
6990
6991 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6992 throw new RavenConfigError(
6993 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6994 );
6995 }
6996
6997 return dsn;
6998 },
6999
7000 _getGlobalServer: function(uri) {
7001 // assemble the endpoint from the uri pieces
7002 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7003
7004 if (uri.protocol) {
7005 globalServer = uri.protocol + ':' + globalServer;
7006 }
7007 return globalServer;
7008 },
7009
7010 _handleOnErrorStackInfo: function() {
7011 // if we are intentionally ignoring errors via onerror, bail out
7012 if (!this._ignoreOnError) {
7013 this._handleStackInfo.apply(this, arguments);
7014 }
7015 },
7016
7017 _handleStackInfo: function(stackInfo, options) {
7018 var frames = this._prepareFrames(stackInfo, options);
7019
7020 this._triggerEvent('handle', {
7021 stackInfo: stackInfo,
7022 options: options
7023 });
7024
7025 this._processException(
7026 stackInfo.name,
7027 stackInfo.message,
7028 stackInfo.url,
7029 stackInfo.lineno,
7030 frames,
7031 options
7032 );
7033 },
7034
7035 _prepareFrames: function(stackInfo, options) {
7036 var self = this;
7037 var frames = [];
7038 if (stackInfo.stack && stackInfo.stack.length) {
7039 each(stackInfo.stack, function(i, stack) {
7040 var frame = self._normalizeFrame(stack, stackInfo.url);
7041 if (frame) {
7042 frames.push(frame);
7043 }
7044 });
7045
7046 // e.g. frames captured via captureMessage throw
7047 if (options && options.trimHeadFrames) {
7048 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7049 frames[j].in_app = false;
7050 }
7051 }
7052 }
7053 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7054 return frames;
7055 },
7056
7057 _normalizeFrame: function(frame, stackInfoUrl) {
7058 // normalize the frames data
7059 var normalized = {
7060 filename: frame.url,
7061 lineno: frame.line,
7062 colno: frame.column,
7063 function: frame.func || '?'
7064 };
7065
7066 // Case when we don't have any information about the error
7067 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7068 // Generating synthetic error doesn't add any value here
7069 //
7070 // We should probably somehow let a user know that they should fix their code
7071 if (!frame.url) {
7072 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7073 }
7074
7075 normalized.in_app = !// determine if an exception came from outside of our app
7076 // first we check the global includePaths list.
7077 (
7078 (!!this._globalOptions.includePaths.test &&
7079 !this._globalOptions.includePaths.test(normalized.filename)) ||
7080 // Now we check for fun, if the function name is Raven or TraceKit
7081 /(Raven|TraceKit)\./.test(normalized['function']) ||
7082 // finally, we do a last ditch effort and check for raven.min.js
7083 /raven\.(min\.)?js$/.test(normalized.filename)
7084 );
7085
7086 return normalized;
7087 },
7088
7089 _processException: function(type, message, fileurl, lineno, frames, options) {
7090 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7091 if (
7092 !!this._globalOptions.ignoreErrors.test &&
7093 (this._globalOptions.ignoreErrors.test(message) ||
7094 this._globalOptions.ignoreErrors.test(prefixedMessage))
7095 ) {
7096 return;
7097 }
7098
7099 var stacktrace;
7100
7101 if (frames && frames.length) {
7102 fileurl = frames[0].filename || fileurl;
7103 // Sentry expects frames oldest to newest
7104 // and JS sends them as newest to oldest
7105 frames.reverse();
7106 stacktrace = {frames: frames};
7107 } else if (fileurl) {
7108 stacktrace = {
7109 frames: [
7110 {
7111 filename: fileurl,
7112 lineno: lineno,
7113 in_app: true
7114 }
7115 ]
7116 };
7117 }
7118
7119 if (
7120 !!this._globalOptions.ignoreUrls.test &&
7121 this._globalOptions.ignoreUrls.test(fileurl)
7122 ) {
7123 return;
7124 }
7125
7126 if (
7127 !!this._globalOptions.whitelistUrls.test &&
7128 !this._globalOptions.whitelistUrls.test(fileurl)
7129 ) {
7130 return;
7131 }
7132
7133 var data = objectMerge(
7134 {
7135 // sentry.interfaces.Exception
7136 exception: {
7137 values: [
7138 {
7139 type: type,
7140 value: message,
7141 stacktrace: stacktrace
7142 }
7143 ]
7144 },
7145 culprit: fileurl
7146 },
7147 options
7148 );
7149
7150 // Fire away!
7151 this._send(data);
7152 },
7153
7154 _trimPacket: function(data) {
7155 // For now, we only want to truncate the two different messages
7156 // but this could/should be expanded to just trim everything
7157 var max = this._globalOptions.maxMessageLength;
7158 if (data.message) {
7159 data.message = truncate(data.message, max);
7160 }
7161 if (data.exception) {
7162 var exception = data.exception.values[0];
7163 exception.value = truncate(exception.value, max);
7164 }
7165
7166 var request = data.request;
7167 if (request) {
7168 if (request.url) {
7169 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7170 }
7171 if (request.Referer) {
7172 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7173 }
7174 }
7175
7176 if (data.breadcrumbs && data.breadcrumbs.values)
7177 this._trimBreadcrumbs(data.breadcrumbs);
7178
7179 return data;
7180 },
7181
7182 /**
7183 * Truncate breadcrumb values (right now just URLs)
7184 */
7185 _trimBreadcrumbs: function(breadcrumbs) {
7186 // known breadcrumb properties with urls
7187 // TODO: also consider arbitrary prop values that start with (https?)?://
7188 var urlProps = ['to', 'from', 'url'],
7189 urlProp,
7190 crumb,
7191 data;
7192
7193 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7194 crumb = breadcrumbs.values[i];
7195 if (
7196 !crumb.hasOwnProperty('data') ||
7197 !isObject(crumb.data) ||
7198 objectFrozen(crumb.data)
7199 )
7200 continue;
7201
7202 data = objectMerge({}, crumb.data);
7203 for (var j = 0; j < urlProps.length; ++j) {
7204 urlProp = urlProps[j];
7205 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7206 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7207 }
7208 }
7209 breadcrumbs.values[i].data = data;
7210 }
7211 },
7212
7213 _getHttpData: function() {
7214 if (!this._hasNavigator && !this._hasDocument) return;
7215 var httpData = {};
7216
7217 if (this._hasNavigator && _navigator.userAgent) {
7218 httpData.headers = {
7219 'User-Agent': navigator.userAgent
7220 };
7221 }
7222
7223 if (this._hasDocument) {
7224 if (_document.location && _document.location.href) {
7225 httpData.url = _document.location.href;
7226 }
7227 if (_document.referrer) {
7228 if (!httpData.headers) httpData.headers = {};
7229 httpData.headers.Referer = _document.referrer;
7230 }
7231 }
7232
7233 return httpData;
7234 },
7235
7236 _resetBackoff: function() {
7237 this._backoffDuration = 0;
7238 this._backoffStart = null;
7239 },
7240
7241 _shouldBackoff: function() {
7242 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7243 },
7244
7245 /**
7246 * Returns true if the in-process data payload matches the signature
7247 * of the previously-sent data
7248 *
7249 * NOTE: This has to be done at this level because TraceKit can generate
7250 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7251 * other old browsers). This can take the form of an "exception"
7252 * data object with a single frame (derived from the onerror args).
7253 */
7254 _isRepeatData: function(current) {
7255 var last = this._lastData;
7256
7257 if (
7258 !last ||
7259 current.message !== last.message || // defined for captureMessage
7260 current.culprit !== last.culprit // defined for captureException/onerror
7261 )
7262 return false;
7263
7264 // Stacktrace interface (i.e. from captureMessage)
7265 if (current.stacktrace || last.stacktrace) {
7266 return isSameStacktrace(current.stacktrace, last.stacktrace);
7267 } else if (current.exception || last.exception) {
7268 // Exception interface (i.e. from captureException/onerror)
7269 return isSameException(current.exception, last.exception);
7270 }
7271
7272 return true;
7273 },
7274
7275 _setBackoffState: function(request) {
7276 // If we are already in a backoff state, don't change anything
7277 if (this._shouldBackoff()) {
7278 return;
7279 }
7280
7281 var status = request.status;
7282
7283 // 400 - project_id doesn't exist or some other fatal
7284 // 401 - invalid/revoked dsn
7285 // 429 - too many requests
7286 if (!(status === 400 || status === 401 || status === 429)) return;
7287
7288 var retry;
7289 try {
7290 // If Retry-After is not in Access-Control-Expose-Headers, most
7291 // browsers will throw an exception trying to access it
7292 retry = request.getResponseHeader('Retry-After');
7293 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7294 } catch (e) {
7295 /* eslint no-empty:0 */
7296 }
7297
7298 this._backoffDuration = retry
7299 ? // If Sentry server returned a Retry-After value, use it
7300 retry
7301 : // Otherwise, double the last backoff duration (starts at 1 sec)
7302 this._backoffDuration * 2 || 1000;
7303
7304 this._backoffStart = now();
7305 },
7306
7307 _send: function(data) {
7308 var globalOptions = this._globalOptions;
7309
7310 var baseData = {
7311 project: this._globalProject,
7312 logger: globalOptions.logger,
7313 platform: 'javascript'
7314 },
7315 httpData = this._getHttpData();
7316
7317 if (httpData) {
7318 baseData.request = httpData;
7319 }
7320
7321 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7322 if (data.trimHeadFrames) delete data.trimHeadFrames;
7323
7324 data = objectMerge(baseData, data);
7325
7326 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7327 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7328 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7329
7330 // Send along our own collected metadata with extra
7331 data.extra['session:duration'] = now() - this._startTime;
7332
7333 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7334 // intentionally make shallow copy so that additions
7335 // to breadcrumbs aren't accidentally sent in this request
7336 data.breadcrumbs = {
7337 values: [].slice.call(this._breadcrumbs, 0)
7338 };
7339 }
7340
7341 // If there are no tags/extra, strip the key from the payload alltogther.
7342 if (isEmptyObject(data.tags)) delete data.tags;
7343
7344 if (this._globalContext.user) {
7345 // sentry.interfaces.User
7346 data.user = this._globalContext.user;
7347 }
7348
7349 // Include the environment if it's defined in globalOptions
7350 if (globalOptions.environment) data.environment = globalOptions.environment;
7351
7352 // Include the release if it's defined in globalOptions
7353 if (globalOptions.release) data.release = globalOptions.release;
7354
7355 // Include server_name if it's defined in globalOptions
7356 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7357
7358 if (isFunction(globalOptions.dataCallback)) {
7359 data = globalOptions.dataCallback(data) || data;
7360 }
7361
7362 // Why??????????
7363 if (!data || isEmptyObject(data)) {
7364 return;
7365 }
7366
7367 // Check if the request should be filtered or not
7368 if (
7369 isFunction(globalOptions.shouldSendCallback) &&
7370 !globalOptions.shouldSendCallback(data)
7371 ) {
7372 return;
7373 }
7374
7375 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7376 // so drop requests until "cool-off" period has elapsed.
7377 if (this._shouldBackoff()) {
7378 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7379 return;
7380 }
7381
7382 if (typeof globalOptions.sampleRate === 'number') {
7383 if (Math.random() < globalOptions.sampleRate) {
7384 this._sendProcessedPayload(data);
7385 }
7386 } else {
7387 this._sendProcessedPayload(data);
7388 }
7389 },
7390
7391 _getUuid: function() {
7392 return uuid4();
7393 },
7394
7395 _sendProcessedPayload: function(data, callback) {
7396 var self = this;
7397 var globalOptions = this._globalOptions;
7398
7399 if (!this.isSetup()) return;
7400
7401 // Try and clean up the packet before sending by truncating long values
7402 data = this._trimPacket(data);
7403
7404 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7405 // but this would require copying an un-truncated copy of the data packet, which can be
7406 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7407 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7408 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7409 return;
7410 }
7411
7412 // Send along an event_id if not explicitly passed.
7413 // This event_id can be used to reference the error within Sentry itself.
7414 // Set lastEventId after we know the error should actually be sent
7415 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7416
7417 // Store outbound payload after trim
7418 this._lastData = data;
7419
7420 this._logDebug('debug', 'Raven about to send:', data);
7421
7422 var auth = {
7423 sentry_version: '7',
7424 sentry_client: 'raven-js/' + this.VERSION,
7425 sentry_key: this._globalKey
7426 };
7427
7428 if (this._globalSecret) {
7429 auth.sentry_secret = this._globalSecret;
7430 }
7431
7432 var exception = data.exception && data.exception.values[0];
7433 this.captureBreadcrumb({
7434 category: 'sentry',
7435 message: exception
7436 ? (exception.type ? exception.type + ': ' : '') + exception.value
7437 : data.message,
7438 event_id: data.event_id,
7439 level: data.level || 'error' // presume error unless specified
7440 });
7441
7442 var url = this._globalEndpoint;
7443 (globalOptions.transport || this._makeRequest).call(this, {
7444 url: url,
7445 auth: auth,
7446 data: data,
7447 options: globalOptions,
7448 onSuccess: function success() {
7449 self._resetBackoff();
7450
7451 self._triggerEvent('success', {
7452 data: data,
7453 src: url
7454 });
7455 callback && callback();
7456 },
7457 onError: function failure(error) {
7458 self._logDebug('error', 'Raven transport failed to send: ', error);
7459
7460 if (error.request) {
7461 self._setBackoffState(error.request);
7462 }
7463
7464 self._triggerEvent('failure', {
7465 data: data,
7466 src: url
7467 });
7468 error = error || new Error('Raven send failed (no additional details provided)');
7469 callback && callback(error);
7470 }
7471 });
7472 },
7473
7474 _makeRequest: function(opts) {
7475 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7476 if (!request) return;
7477
7478 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7479 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7480
7481 if (!hasCORS) return;
7482
7483 var url = opts.url;
7484
7485 if ('withCredentials' in request) {
7486 request.onreadystatechange = function() {
7487 if (request.readyState !== 4) {
7488 return;
7489 } else if (request.status === 200) {
7490 opts.onSuccess && opts.onSuccess();
7491 } else if (opts.onError) {
7492 var err = new Error('Sentry error code: ' + request.status);
7493 err.request = request;
7494 opts.onError(err);
7495 }
7496 };
7497 } else {
7498 request = new XDomainRequest();
7499 // xdomainrequest cannot go http -> https (or vice versa),
7500 // so always use protocol relative
7501 url = url.replace(/^https?:/, '');
7502
7503 // onreadystatechange not supported by XDomainRequest
7504 if (opts.onSuccess) {
7505 request.onload = opts.onSuccess;
7506 }
7507 if (opts.onError) {
7508 request.onerror = function() {
7509 var err = new Error('Sentry error code: XDomainRequest');
7510 err.request = request;
7511 opts.onError(err);
7512 };
7513 }
7514 }
7515
7516 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7517 // HTTP header) so as to avoid preflight CORS requests
7518 request.open('POST', url + '?' + urlencode(opts.auth));
7519 request.send(stringify(opts.data));
7520 },
7521
7522 _logDebug: function(level) {
7523 if (this._originalConsoleMethods[level] && this.debug) {
7524 // In IE<10 console methods do not have their own 'apply' method
7525 Function.prototype.apply.call(
7526 this._originalConsoleMethods[level],
7527 this._originalConsole,
7528 [].slice.call(arguments, 1)
7529 );
7530 }
7531 },
7532
7533 _mergeContext: function(key, context) {
7534 if (isUndefined(context)) {
7535 delete this._globalContext[key];
7536 } else {
7537 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7538 }
7539 }
7540 };
7541
7542 // Deprecations
7543 Raven.prototype.setUser = Raven.prototype.setUserContext;
7544 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7545
7546 module.exports = Raven;
7547
7548
7549 /***/ }),
7550
7551 /***/ "./node_modules/raven-js/src/singleton.js":
7552 /*!************************************************!*\
7553 !*** ./node_modules/raven-js/src/singleton.js ***!
7554 \************************************************/
7555 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7556
7557 /**
7558 * Enforces a single instance of the Raven client, and the
7559 * main entry point for Raven. If you are a consumer of the
7560 * Raven library, you SHOULD load this file (vs raven.js).
7561 **/
7562
7563 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7564
7565 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7566 var _window =
7567 typeof window !== 'undefined'
7568 ? window
7569 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7570 var _Raven = _window.Raven;
7571
7572 var Raven = new RavenConstructor();
7573
7574 /*
7575 * Allow multiple versions of Raven to be installed.
7576 * Strip Raven from the global context and returns the instance.
7577 *
7578 * @return {Raven}
7579 */
7580 Raven.noConflict = function() {
7581 _window.Raven = _Raven;
7582 return Raven;
7583 };
7584
7585 Raven.afterLoad();
7586
7587 module.exports = Raven;
7588
7589
7590 /***/ }),
7591
7592 /***/ "./node_modules/raven-js/src/utils.js":
7593 /*!********************************************!*\
7594 !*** ./node_modules/raven-js/src/utils.js ***!
7595 \********************************************/
7596 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7597
7598 var _window =
7599 typeof window !== 'undefined'
7600 ? window
7601 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7602
7603 function isObject(what) {
7604 return typeof what === 'object' && what !== null;
7605 }
7606
7607 // Yanked from https://git.io/vS8DV re-used under CC0
7608 // with some tiny modifications
7609 function isError(value) {
7610 switch ({}.toString.call(value)) {
7611 case '[object Error]':
7612 return true;
7613 case '[object Exception]':
7614 return true;
7615 case '[object DOMException]':
7616 return true;
7617 default:
7618 return value instanceof Error;
7619 }
7620 }
7621
7622 function isErrorEvent(value) {
7623 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7624 }
7625
7626 function isUndefined(what) {
7627 return what === void 0;
7628 }
7629
7630 function isFunction(what) {
7631 return typeof what === 'function';
7632 }
7633
7634 function isString(what) {
7635 return Object.prototype.toString.call(what) === '[object String]';
7636 }
7637
7638 function isEmptyObject(what) {
7639 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7640 return true;
7641 }
7642
7643 function supportsErrorEvent() {
7644 try {
7645 new ErrorEvent(''); // eslint-disable-line no-new
7646 return true;
7647 } catch (e) {
7648 return false;
7649 }
7650 }
7651
7652 function wrappedCallback(callback) {
7653 function dataCallback(data, original) {
7654 var normalizedData = callback(data) || data;
7655 if (original) {
7656 return original(normalizedData) || normalizedData;
7657 }
7658 return normalizedData;
7659 }
7660
7661 return dataCallback;
7662 }
7663
7664 function each(obj, callback) {
7665 var i, j;
7666
7667 if (isUndefined(obj.length)) {
7668 for (i in obj) {
7669 if (hasKey(obj, i)) {
7670 callback.call(null, i, obj[i]);
7671 }
7672 }
7673 } else {
7674 j = obj.length;
7675 if (j) {
7676 for (i = 0; i < j; i++) {
7677 callback.call(null, i, obj[i]);
7678 }
7679 }
7680 }
7681 }
7682
7683 function objectMerge(obj1, obj2) {
7684 if (!obj2) {
7685 return obj1;
7686 }
7687 each(obj2, function(key, value) {
7688 obj1[key] = value;
7689 });
7690 return obj1;
7691 }
7692
7693 /**
7694 * This function is only used for react-native.
7695 * react-native freezes object that have already been sent over the
7696 * js bridge. We need this function in order to check if the object is frozen.
7697 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7698 * supported because it's not relevant for other "platforms". See related issue:
7699 * https://github.com/getsentry/react-native-sentry/issues/57
7700 */
7701 function objectFrozen(obj) {
7702 if (!Object.isFrozen) {
7703 return false;
7704 }
7705 return Object.isFrozen(obj);
7706 }
7707
7708 function truncate(str, max) {
7709 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7710 }
7711
7712 /**
7713 * hasKey, a better form of hasOwnProperty
7714 * Example: hasKey(MainHostObject, property) === true/false
7715 *
7716 * @param {Object} host object to check property
7717 * @param {string} key to check
7718 */
7719 function hasKey(object, key) {
7720 return Object.prototype.hasOwnProperty.call(object, key);
7721 }
7722
7723 function joinRegExp(patterns) {
7724 // Combine an array of regular expressions and strings into one large regexp
7725 // Be mad.
7726 var sources = [],
7727 i = 0,
7728 len = patterns.length,
7729 pattern;
7730
7731 for (; i < len; i++) {
7732 pattern = patterns[i];
7733 if (isString(pattern)) {
7734 // If it's a string, we need to escape it
7735 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7736 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7737 } else if (pattern && pattern.source) {
7738 // If it's a regexp already, we want to extract the source
7739 sources.push(pattern.source);
7740 }
7741 // Intentionally skip other cases
7742 }
7743 return new RegExp(sources.join('|'), 'i');
7744 }
7745
7746 function urlencode(o) {
7747 var pairs = [];
7748 each(o, function(key, value) {
7749 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7750 });
7751 return pairs.join('&');
7752 }
7753
7754 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7755 // intentionally using regex and not <a/> href parsing trick because React Native and other
7756 // environments where DOM might not be available
7757 function parseUrl(url) {
7758 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7759 if (!match) return {};
7760
7761 // coerce to undefined values to empty string so we don't get 'undefined'
7762 var query = match[6] || '';
7763 var fragment = match[8] || '';
7764 return {
7765 protocol: match[2],
7766 host: match[4],
7767 path: match[5],
7768 relative: match[5] + query + fragment // everything minus origin
7769 };
7770 }
7771 function uuid4() {
7772 var crypto = _window.crypto || _window.msCrypto;
7773
7774 if (!isUndefined(crypto) && crypto.getRandomValues) {
7775 // Use window.crypto API if available
7776 // eslint-disable-next-line no-undef
7777 var arr = new Uint16Array(8);
7778 crypto.getRandomValues(arr);
7779
7780 // set 4 in byte 7
7781 arr[3] = (arr[3] & 0xfff) | 0x4000;
7782 // set 2 most significant bits of byte 9 to '10'
7783 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7784
7785 var pad = function(num) {
7786 var v = num.toString(16);
7787 while (v.length < 4) {
7788 v = '0' + v;
7789 }
7790 return v;
7791 };
7792
7793 return (
7794 pad(arr[0]) +
7795 pad(arr[1]) +
7796 pad(arr[2]) +
7797 pad(arr[3]) +
7798 pad(arr[4]) +
7799 pad(arr[5]) +
7800 pad(arr[6]) +
7801 pad(arr[7])
7802 );
7803 } else {
7804 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7805 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7806 var r = (Math.random() * 16) | 0,
7807 v = c === 'x' ? r : (r & 0x3) | 0x8;
7808 return v.toString(16);
7809 });
7810 }
7811 }
7812
7813 /**
7814 * Given a child DOM element, returns a query-selector statement describing that
7815 * and its ancestors
7816 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7817 * @param elem
7818 * @returns {string}
7819 */
7820 function htmlTreeAsString(elem) {
7821 /* eslint no-extra-parens:0*/
7822 var MAX_TRAVERSE_HEIGHT = 5,
7823 MAX_OUTPUT_LEN = 80,
7824 out = [],
7825 height = 0,
7826 len = 0,
7827 separator = ' > ',
7828 sepLength = separator.length,
7829 nextStr;
7830
7831 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7832 nextStr = htmlElementAsString(elem);
7833 // bail out if
7834 // - nextStr is the 'html' element
7835 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7836 // (ignore this limit if we are on the first iteration)
7837 if (
7838 nextStr === 'html' ||
7839 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7840 ) {
7841 break;
7842 }
7843
7844 out.push(nextStr);
7845
7846 len += nextStr.length;
7847 elem = elem.parentNode;
7848 }
7849
7850 return out.reverse().join(separator);
7851 }
7852
7853 /**
7854 * Returns a simple, query-selector representation of a DOM element
7855 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7856 * @param HTMLElement
7857 * @returns {string}
7858 */
7859 function htmlElementAsString(elem) {
7860 var out = [],
7861 className,
7862 classes,
7863 key,
7864 attr,
7865 i;
7866
7867 if (!elem || !elem.tagName) {
7868 return '';
7869 }
7870
7871 out.push(elem.tagName.toLowerCase());
7872 if (elem.id) {
7873 out.push('#' + elem.id);
7874 }
7875
7876 className = elem.className;
7877 if (className && isString(className)) {
7878 classes = className.split(/\s+/);
7879 for (i = 0; i < classes.length; i++) {
7880 out.push('.' + classes[i]);
7881 }
7882 }
7883 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7884 for (i = 0; i < attrWhitelist.length; i++) {
7885 key = attrWhitelist[i];
7886 attr = elem.getAttribute(key);
7887 if (attr) {
7888 out.push('[' + key + '="' + attr + '"]');
7889 }
7890 }
7891 return out.join('');
7892 }
7893
7894 /**
7895 * Returns true if either a OR b is truthy, but not both
7896 */
7897 function isOnlyOneTruthy(a, b) {
7898 return !!(!!a ^ !!b);
7899 }
7900
7901 /**
7902 * Returns true if the two input exception interfaces have the same content
7903 */
7904 function isSameException(ex1, ex2) {
7905 if (isOnlyOneTruthy(ex1, ex2)) return false;
7906
7907 ex1 = ex1.values[0];
7908 ex2 = ex2.values[0];
7909
7910 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7911
7912 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7913 }
7914
7915 /**
7916 * Returns true if the two input stack trace interfaces have the same content
7917 */
7918 function isSameStacktrace(stack1, stack2) {
7919 if (isOnlyOneTruthy(stack1, stack2)) return false;
7920
7921 var frames1 = stack1.frames;
7922 var frames2 = stack2.frames;
7923
7924 // Exit early if frame count differs
7925 if (frames1.length !== frames2.length) return false;
7926
7927 // Iterate through every frame; bail out if anything differs
7928 var a, b;
7929 for (var i = 0; i < frames1.length; i++) {
7930 a = frames1[i];
7931 b = frames2[i];
7932 if (
7933 a.filename !== b.filename ||
7934 a.lineno !== b.lineno ||
7935 a.colno !== b.colno ||
7936 a['function'] !== b['function']
7937 )
7938 return false;
7939 }
7940 return true;
7941 }
7942
7943 /**
7944 * Polyfill a method
7945 * @param obj object e.g. `document`
7946 * @param name method name present on object e.g. `addEventListener`
7947 * @param replacement replacement function
7948 * @param track {optional} record instrumentation to an array
7949 */
7950 function fill(obj, name, replacement, track) {
7951 var orig = obj[name];
7952 obj[name] = replacement(orig);
7953 if (track) {
7954 track.push([obj, name, orig]);
7955 }
7956 }
7957
7958 module.exports = {
7959 isObject: isObject,
7960 isError: isError,
7961 isErrorEvent: isErrorEvent,
7962 isUndefined: isUndefined,
7963 isFunction: isFunction,
7964 isString: isString,
7965 isEmptyObject: isEmptyObject,
7966 supportsErrorEvent: supportsErrorEvent,
7967 wrappedCallback: wrappedCallback,
7968 each: each,
7969 objectMerge: objectMerge,
7970 truncate: truncate,
7971 objectFrozen: objectFrozen,
7972 hasKey: hasKey,
7973 joinRegExp: joinRegExp,
7974 urlencode: urlencode,
7975 uuid4: uuid4,
7976 htmlTreeAsString: htmlTreeAsString,
7977 htmlElementAsString: htmlElementAsString,
7978 isSameException: isSameException,
7979 isSameStacktrace: isSameStacktrace,
7980 parseUrl: parseUrl,
7981 fill: fill
7982 };
7983
7984
7985 /***/ }),
7986
7987 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7988 /*!***********************************************************!*\
7989 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7990 \***********************************************************/
7991 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7992
7993 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7994
7995 /*
7996 TraceKit - Cross brower stack traces
7997
7998 This was originally forked from github.com/occ/TraceKit, but has since been
7999 largely re-written and is now maintained as part of raven-js. Tests for
8000 this are in test/vendor.
8001
8002 MIT license
8003 */
8004
8005 var TraceKit = {
8006 collectWindowErrors: true,
8007 debug: false
8008 };
8009
8010 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8011 var _window =
8012 typeof window !== 'undefined'
8013 ? window
8014 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8015
8016 // global reference to slice
8017 var _slice = [].slice;
8018 var UNKNOWN_FUNCTION = '?';
8019
8020 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8021 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8022
8023 function getLocationHref() {
8024 if (typeof document === 'undefined' || document.location == null) return '';
8025
8026 return document.location.href;
8027 }
8028
8029 /**
8030 * TraceKit.report: cross-browser processing of unhandled exceptions
8031 *
8032 * Syntax:
8033 * TraceKit.report.subscribe(function(stackInfo) { ... })
8034 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8035 * TraceKit.report(exception)
8036 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8037 *
8038 * Supports:
8039 * - Firefox: full stack trace with line numbers, plus column number
8040 * on top frame; column number is not guaranteed
8041 * - Opera: full stack trace with line and column numbers
8042 * - Chrome: full stack trace with line and column numbers
8043 * - Safari: line and column number for the top frame only; some frames
8044 * may be missing, and column number is not guaranteed
8045 * - IE: line and column number for the top frame only; some frames
8046 * may be missing, and column number is not guaranteed
8047 *
8048 * In theory, TraceKit should work on all of the following versions:
8049 * - IE5.5+ (only 8.0 tested)
8050 * - Firefox 0.9+ (only 3.5+ tested)
8051 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8052 * Exceptions Have Stacktrace to be enabled in opera:config)
8053 * - Safari 3+ (only 4+ tested)
8054 * - Chrome 1+ (only 5+ tested)
8055 * - Konqueror 3.5+ (untested)
8056 *
8057 * Requires TraceKit.computeStackTrace.
8058 *
8059 * Tries to catch all unhandled exceptions and report them to the
8060 * subscribed handlers. Please note that TraceKit.report will rethrow the
8061 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8062 * If the exception does not reach the top of the browser, you will only
8063 * get a stack trace from the point where TraceKit.report was called.
8064 *
8065 * Handlers receive a stackInfo object as described in the
8066 * TraceKit.computeStackTrace docs.
8067 */
8068 TraceKit.report = (function reportModuleWrapper() {
8069 var handlers = [],
8070 lastArgs = null,
8071 lastException = null,
8072 lastExceptionStack = null;
8073
8074 /**
8075 * Add a crash handler.
8076 * @param {Function} handler
8077 */
8078 function subscribe(handler) {
8079 installGlobalHandler();
8080 handlers.push(handler);
8081 }
8082
8083 /**
8084 * Remove a crash handler.
8085 * @param {Function} handler
8086 */
8087 function unsubscribe(handler) {
8088 for (var i = handlers.length - 1; i >= 0; --i) {
8089 if (handlers[i] === handler) {
8090 handlers.splice(i, 1);
8091 }
8092 }
8093 }
8094
8095 /**
8096 * Remove all crash handlers.
8097 */
8098 function unsubscribeAll() {
8099 uninstallGlobalHandler();
8100 handlers = [];
8101 }
8102
8103 /**
8104 * Dispatch stack information to all handlers.
8105 * @param {Object.<string, *>} stack
8106 */
8107 function notifyHandlers(stack, isWindowError) {
8108 var exception = null;
8109 if (isWindowError && !TraceKit.collectWindowErrors) {
8110 return;
8111 }
8112 for (var i in handlers) {
8113 if (handlers.hasOwnProperty(i)) {
8114 try {
8115 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8116 } catch (inner) {
8117 exception = inner;
8118 }
8119 }
8120 }
8121
8122 if (exception) {
8123 throw exception;
8124 }
8125 }
8126
8127 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8128
8129 /**
8130 * Ensures all global unhandled exceptions are recorded.
8131 * Supported by Gecko and IE.
8132 * @param {string} message Error message.
8133 * @param {string} url URL of script that generated the exception.
8134 * @param {(number|string)} lineNo The line number at which the error
8135 * occurred.
8136 * @param {?(number|string)} colNo The column number at which the error
8137 * occurred.
8138 * @param {?Error} ex The actual Error object.
8139 */
8140 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8141 var stack = null;
8142
8143 if (lastExceptionStack) {
8144 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8145 lastExceptionStack,
8146 url,
8147 lineNo,
8148 message
8149 );
8150 processLastException();
8151 } else if (ex && utils.isError(ex)) {
8152 // non-string `ex` arg; attempt to extract stack trace
8153
8154 // New chrome and blink send along a real error object
8155 // Let's just report that like a normal error.
8156 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8157 stack = TraceKit.computeStackTrace(ex);
8158 notifyHandlers(stack, true);
8159 } else {
8160 var location = {
8161 url: url,
8162 line: lineNo,
8163 column: colNo
8164 };
8165
8166 var name = undefined;
8167 var msg = message; // must be new var or will modify original `arguments`
8168 var groups;
8169 if ({}.toString.call(message) === '[object String]') {
8170 var groups = message.match(ERROR_TYPES_RE);
8171 if (groups) {
8172 name = groups[1];
8173 msg = groups[2];
8174 }
8175 }
8176
8177 location.func = UNKNOWN_FUNCTION;
8178
8179 stack = {
8180 name: name,
8181 message: msg,
8182 url: getLocationHref(),
8183 stack: [location]
8184 };
8185 notifyHandlers(stack, true);
8186 }
8187
8188 if (_oldOnerrorHandler) {
8189 return _oldOnerrorHandler.apply(this, arguments);
8190 }
8191
8192 return false;
8193 }
8194
8195 function installGlobalHandler() {
8196 if (_onErrorHandlerInstalled) {
8197 return;
8198 }
8199 _oldOnerrorHandler = _window.onerror;
8200 _window.onerror = traceKitWindowOnError;
8201 _onErrorHandlerInstalled = true;
8202 }
8203
8204 function uninstallGlobalHandler() {
8205 if (!_onErrorHandlerInstalled) {
8206 return;
8207 }
8208 _window.onerror = _oldOnerrorHandler;
8209 _onErrorHandlerInstalled = false;
8210 _oldOnerrorHandler = undefined;
8211 }
8212
8213 function processLastException() {
8214 var _lastExceptionStack = lastExceptionStack,
8215 _lastArgs = lastArgs;
8216 lastArgs = null;
8217 lastExceptionStack = null;
8218 lastException = null;
8219 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8220 }
8221
8222 /**
8223 * Reports an unhandled Error to TraceKit.
8224 * @param {Error} ex
8225 * @param {?boolean} rethrow If false, do not re-throw the exception.
8226 * Only used for window.onerror to not cause an infinite loop of
8227 * rethrowing.
8228 */
8229 function report(ex, rethrow) {
8230 var args = _slice.call(arguments, 1);
8231 if (lastExceptionStack) {
8232 if (lastException === ex) {
8233 return; // already caught by an inner catch block, ignore
8234 } else {
8235 processLastException();
8236 }
8237 }
8238
8239 var stack = TraceKit.computeStackTrace(ex);
8240 lastExceptionStack = stack;
8241 lastException = ex;
8242 lastArgs = args;
8243
8244 // If the stack trace is incomplete, wait for 2 seconds for
8245 // slow slow IE to see if onerror occurs or not before reporting
8246 // this exception; otherwise, we will end up with an incomplete
8247 // stack trace
8248 setTimeout(function() {
8249 if (lastException === ex) {
8250 processLastException();
8251 }
8252 }, stack.incomplete ? 2000 : 0);
8253
8254 if (rethrow !== false) {
8255 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8256 }
8257 }
8258
8259 report.subscribe = subscribe;
8260 report.unsubscribe = unsubscribe;
8261 report.uninstall = unsubscribeAll;
8262 return report;
8263 })();
8264
8265 /**
8266 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8267 *
8268 * Syntax:
8269 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8270 * Returns:
8271 * s.name - exception name
8272 * s.message - exception message
8273 * s.stack[i].url - JavaScript or HTML file URL
8274 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8275 * s.stack[i].args - arguments passed to the function, if known
8276 * s.stack[i].line - line number, if known
8277 * s.stack[i].column - column number, if known
8278 *
8279 * Supports:
8280 * - Firefox: full stack trace with line numbers and unreliable column
8281 * number on top frame
8282 * - Opera 10: full stack trace with line and column numbers
8283 * - Opera 9-: full stack trace with line numbers
8284 * - Chrome: full stack trace with line and column numbers
8285 * - Safari: line and column number for the topmost stacktrace element
8286 * only
8287 * - IE: no line numbers whatsoever
8288 *
8289 * Tries to guess names of anonymous functions by looking for assignments
8290 * in the source code. In IE and Safari, we have to guess source file names
8291 * by searching for function bodies inside all page scripts. This will not
8292 * work for scripts that are loaded cross-domain.
8293 * Here be dragons: some function names may be guessed incorrectly, and
8294 * duplicate functions may be mismatched.
8295 *
8296 * TraceKit.computeStackTrace should only be used for tracing purposes.
8297 * Logging of unhandled exceptions should be done with TraceKit.report,
8298 * which builds on top of TraceKit.computeStackTrace and provides better
8299 * IE support by utilizing the window.onerror event to retrieve information
8300 * about the top of the stack.
8301 *
8302 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8303 * so computeStackTrace instead walks its *own* chain of callers.
8304 * This means that:
8305 * * in Safari, some methods may be missing from the stack trace;
8306 * * in IE, the topmost function in the stack trace will always be the
8307 * caller of computeStackTrace.
8308 *
8309 * This is okay for tracing (because you are likely to be calling
8310 * computeStackTrace from the function you want to be the topmost element
8311 * of the stack trace anyway), but not okay for logging unhandled
8312 * exceptions (because your catch block will likely be far away from the
8313 * inner function that actually caused the exception).
8314 *
8315 */
8316 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8317 // Contents of Exception in various browsers.
8318 //
8319 // SAFARI:
8320 // ex.message = Can't find variable: qq
8321 // ex.line = 59
8322 // ex.sourceId = 580238192
8323 // ex.sourceURL = http://...
8324 // ex.expressionBeginOffset = 96
8325 // ex.expressionCaretOffset = 98
8326 // ex.expressionEndOffset = 98
8327 // ex.name = ReferenceError
8328 //
8329 // FIREFOX:
8330 // ex.message = qq is not defined
8331 // ex.fileName = http://...
8332 // ex.lineNumber = 59
8333 // ex.columnNumber = 69
8334 // ex.stack = ...stack trace... (see the example below)
8335 // ex.name = ReferenceError
8336 //
8337 // CHROME:
8338 // ex.message = qq is not defined
8339 // ex.name = ReferenceError
8340 // ex.type = not_defined
8341 // ex.arguments = ['aa']
8342 // ex.stack = ...stack trace...
8343 //
8344 // INTERNET EXPLORER:
8345 // ex.message = ...
8346 // ex.name = ReferenceError
8347 //
8348 // OPERA:
8349 // ex.message = ...message... (see the example below)
8350 // ex.name = ReferenceError
8351 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8352 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8353
8354 /**
8355 * Computes stack trace information from the stack property.
8356 * Chrome and Gecko use this property.
8357 * @param {Error} ex
8358 * @return {?Object.<string, *>} Stack trace information.
8359 */
8360 function computeStackTraceFromStackProp(ex) {
8361 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8362
8363 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8364 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8365 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8366 // Used to additionally parse URL/line/column from eval frames
8367 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8368 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8369 lines = ex.stack.split('\n'),
8370 stack = [],
8371 submatch,
8372 parts,
8373 element,
8374 reference = /^(.*) is undefined$/.exec(ex.message);
8375
8376 for (var i = 0, j = lines.length; i < j; ++i) {
8377 if ((parts = chrome.exec(lines[i]))) {
8378 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8379 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8380 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8381 // throw out eval line/column and use top-most line/column number
8382 parts[2] = submatch[1]; // url
8383 parts[3] = submatch[2]; // line
8384 parts[4] = submatch[3]; // column
8385 }
8386 element = {
8387 url: !isNative ? parts[2] : null,
8388 func: parts[1] || UNKNOWN_FUNCTION,
8389 args: isNative ? [parts[2]] : [],
8390 line: parts[3] ? +parts[3] : null,
8391 column: parts[4] ? +parts[4] : null
8392 };
8393 } else if ((parts = winjs.exec(lines[i]))) {
8394 element = {
8395 url: parts[2],
8396 func: parts[1] || UNKNOWN_FUNCTION,
8397 args: [],
8398 line: +parts[3],
8399 column: parts[4] ? +parts[4] : null
8400 };
8401 } else if ((parts = gecko.exec(lines[i]))) {
8402 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8403 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8404 // throw out eval line/column and use top-most line number
8405 parts[3] = submatch[1];
8406 parts[4] = submatch[2];
8407 parts[5] = null; // no column when eval
8408 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8409 // FireFox uses this awesome columnNumber property for its top frame
8410 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8411 // so adding 1
8412 // NOTE: this hack doesn't work if top-most frame is eval
8413 stack[0].column = ex.columnNumber + 1;
8414 }
8415 element = {
8416 url: parts[3],
8417 func: parts[1] || UNKNOWN_FUNCTION,
8418 args: parts[2] ? parts[2].split(',') : [],
8419 line: parts[4] ? +parts[4] : null,
8420 column: parts[5] ? +parts[5] : null
8421 };
8422 } else {
8423 continue;
8424 }
8425
8426 if (!element.func && element.line) {
8427 element.func = UNKNOWN_FUNCTION;
8428 }
8429
8430 stack.push(element);
8431 }
8432
8433 if (!stack.length) {
8434 return null;
8435 }
8436
8437 return {
8438 name: ex.name,
8439 message: ex.message,
8440 url: getLocationHref(),
8441 stack: stack
8442 };
8443 }
8444
8445 /**
8446 * Adds information about the first frame to incomplete stack traces.
8447 * Safari and IE require this to get complete data on the first frame.
8448 * @param {Object.<string, *>} stackInfo Stack trace information from
8449 * one of the compute* methods.
8450 * @param {string} url The URL of the script that caused an error.
8451 * @param {(number|string)} lineNo The line number of the script that
8452 * caused an error.
8453 * @param {string=} message The error generated by the browser, which
8454 * hopefully contains the name of the object that caused the error.
8455 * @return {boolean} Whether or not the stack information was
8456 * augmented.
8457 */
8458 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8459 var initial = {
8460 url: url,
8461 line: lineNo
8462 };
8463
8464 if (initial.url && initial.line) {
8465 stackInfo.incomplete = false;
8466
8467 if (!initial.func) {
8468 initial.func = UNKNOWN_FUNCTION;
8469 }
8470
8471 if (stackInfo.stack.length > 0) {
8472 if (stackInfo.stack[0].url === initial.url) {
8473 if (stackInfo.stack[0].line === initial.line) {
8474 return false; // already in stack trace
8475 } else if (
8476 !stackInfo.stack[0].line &&
8477 stackInfo.stack[0].func === initial.func
8478 ) {
8479 stackInfo.stack[0].line = initial.line;
8480 return false;
8481 }
8482 }
8483 }
8484
8485 stackInfo.stack.unshift(initial);
8486 stackInfo.partial = true;
8487 return true;
8488 } else {
8489 stackInfo.incomplete = true;
8490 }
8491
8492 return false;
8493 }
8494
8495 /**
8496 * Computes stack trace information by walking the arguments.caller
8497 * chain at the time the exception occurred. This will cause earlier
8498 * frames to be missed but is the only way to get any stack trace in
8499 * Safari and IE. The top frame is restored by
8500 * {@link augmentStackTraceWithInitialElement}.
8501 * @param {Error} ex
8502 * @return {?Object.<string, *>} Stack trace information.
8503 */
8504 function computeStackTraceByWalkingCallerChain(ex, depth) {
8505 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8506 stack = [],
8507 funcs = {},
8508 recursion = false,
8509 parts,
8510 item,
8511 source;
8512
8513 for (
8514 var curr = computeStackTraceByWalkingCallerChain.caller;
8515 curr && !recursion;
8516 curr = curr.caller
8517 ) {
8518 if (curr === computeStackTrace || curr === TraceKit.report) {
8519 // console.log('skipping internal function');
8520 continue;
8521 }
8522
8523 item = {
8524 url: null,
8525 func: UNKNOWN_FUNCTION,
8526 line: null,
8527 column: null
8528 };
8529
8530 if (curr.name) {
8531 item.func = curr.name;
8532 } else if ((parts = functionName.exec(curr.toString()))) {
8533 item.func = parts[1];
8534 }
8535
8536 if (typeof item.func === 'undefined') {
8537 try {
8538 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8539 } catch (e) {}
8540 }
8541
8542 if (funcs['' + curr]) {
8543 recursion = true;
8544 } else {
8545 funcs['' + curr] = true;
8546 }
8547
8548 stack.push(item);
8549 }
8550
8551 if (depth) {
8552 // console.log('depth is ' + depth);
8553 // console.log('stack is ' + stack.length);
8554 stack.splice(0, depth);
8555 }
8556
8557 var result = {
8558 name: ex.name,
8559 message: ex.message,
8560 url: getLocationHref(),
8561 stack: stack
8562 };
8563 augmentStackTraceWithInitialElement(
8564 result,
8565 ex.sourceURL || ex.fileName,
8566 ex.line || ex.lineNumber,
8567 ex.message || ex.description
8568 );
8569 return result;
8570 }
8571
8572 /**
8573 * Computes a stack trace for an exception.
8574 * @param {Error} ex
8575 * @param {(string|number)=} depth
8576 */
8577 function computeStackTrace(ex, depth) {
8578 var stack = null;
8579 depth = depth == null ? 0 : +depth;
8580
8581 try {
8582 stack = computeStackTraceFromStackProp(ex);
8583 if (stack) {
8584 return stack;
8585 }
8586 } catch (e) {
8587 if (TraceKit.debug) {
8588 throw e;
8589 }
8590 }
8591
8592 try {
8593 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8594 if (stack) {
8595 return stack;
8596 }
8597 } catch (e) {
8598 if (TraceKit.debug) {
8599 throw e;
8600 }
8601 }
8602 return {
8603 name: ex.name,
8604 message: ex.message,
8605 url: getLocationHref()
8606 };
8607 }
8608
8609 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8610 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8611
8612 return computeStackTrace;
8613 })();
8614
8615 module.exports = TraceKit;
8616
8617
8618 /***/ }),
8619
8620 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8621 /*!***********************************************************************!*\
8622 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8623 \***********************************************************************/
8624 /***/ ((module, exports) => {
8625
8626 /*
8627 json-stringify-safe
8628 Like JSON.stringify, but doesn't throw on circular references.
8629
8630 Originally forked from https://github.com/isaacs/json-stringify-safe
8631 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8632 and IE8 compatibility. Tests for this are in test/vendor.
8633
8634 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8635 */
8636
8637 exports = module.exports = stringify;
8638 exports.getSerialize = serializer;
8639
8640 function indexOf(haystack, needle) {
8641 for (var i = 0; i < haystack.length; ++i) {
8642 if (haystack[i] === needle) return i;
8643 }
8644 return -1;
8645 }
8646
8647 function stringify(obj, replacer, spaces, cycleReplacer) {
8648 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8649 }
8650
8651 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8652 function stringifyError(value) {
8653 var err = {
8654 // These properties are implemented as magical getters and don't show up in for in
8655 stack: value.stack,
8656 message: value.message,
8657 name: value.name
8658 };
8659
8660 for (var i in value) {
8661 if (Object.prototype.hasOwnProperty.call(value, i)) {
8662 err[i] = value[i];
8663 }
8664 }
8665
8666 return err;
8667 }
8668
8669 function serializer(replacer, cycleReplacer) {
8670 var stack = [];
8671 var keys = [];
8672
8673 if (cycleReplacer == null) {
8674 cycleReplacer = function(key, value) {
8675 if (stack[0] === value) {
8676 return '[Circular ~]';
8677 }
8678 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8679 };
8680 }
8681
8682 return function(key, value) {
8683 if (stack.length > 0) {
8684 var thisPos = indexOf(stack, this);
8685 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8686 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8687
8688 if (~indexOf(stack, value)) {
8689 value = cycleReplacer.call(this, key, value);
8690 }
8691 } else {
8692 stack.push(value);
8693 }
8694
8695 return replacer == null
8696 ? value instanceof Error ? stringifyError(value) : value
8697 : replacer.call(this, key, value);
8698 };
8699 }
8700
8701
8702 /***/ }),
8703
8704 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8705 /*!***********************************************************!*\
8706 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8707 \***********************************************************/
8708 /***/ ((__unused_webpack_module, exports) => {
8709
8710 "use strict";
8711 /** @license React v16.13.1
8712 * react-is.development.js
8713 *
8714 * Copyright (c) Facebook, Inc. and its affiliates.
8715 *
8716 * This source code is licensed under the MIT license found in the
8717 * LICENSE file in the root directory of this source tree.
8718 */
8719
8720
8721
8722
8723
8724 if (true) {
8725 (function() {
8726 'use strict';
8727
8728 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8729 // nor polyfill, then a plain number is used for performance.
8730 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8731 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8732 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8733 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8734 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8735 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8736 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8737 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8738 // (unstable) APIs that have been removed. Can we remove the symbols?
8739
8740 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8741 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8742 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8743 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8744 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8745 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8746 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8747 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8748 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8749 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8750 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8751
8752 function isValidElementType(type) {
8753 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8754 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);
8755 }
8756
8757 function typeOf(object) {
8758 if (typeof object === 'object' && object !== null) {
8759 var $$typeof = object.$$typeof;
8760
8761 switch ($$typeof) {
8762 case REACT_ELEMENT_TYPE:
8763 var type = object.type;
8764
8765 switch (type) {
8766 case REACT_ASYNC_MODE_TYPE:
8767 case REACT_CONCURRENT_MODE_TYPE:
8768 case REACT_FRAGMENT_TYPE:
8769 case REACT_PROFILER_TYPE:
8770 case REACT_STRICT_MODE_TYPE:
8771 case REACT_SUSPENSE_TYPE:
8772 return type;
8773
8774 default:
8775 var $$typeofType = type && type.$$typeof;
8776
8777 switch ($$typeofType) {
8778 case REACT_CONTEXT_TYPE:
8779 case REACT_FORWARD_REF_TYPE:
8780 case REACT_LAZY_TYPE:
8781 case REACT_MEMO_TYPE:
8782 case REACT_PROVIDER_TYPE:
8783 return $$typeofType;
8784
8785 default:
8786 return $$typeof;
8787 }
8788
8789 }
8790
8791 case REACT_PORTAL_TYPE:
8792 return $$typeof;
8793 }
8794 }
8795
8796 return undefined;
8797 } // AsyncMode is deprecated along with isAsyncMode
8798
8799 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8800 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8801 var ContextConsumer = REACT_CONTEXT_TYPE;
8802 var ContextProvider = REACT_PROVIDER_TYPE;
8803 var Element = REACT_ELEMENT_TYPE;
8804 var ForwardRef = REACT_FORWARD_REF_TYPE;
8805 var Fragment = REACT_FRAGMENT_TYPE;
8806 var Lazy = REACT_LAZY_TYPE;
8807 var Memo = REACT_MEMO_TYPE;
8808 var Portal = REACT_PORTAL_TYPE;
8809 var Profiler = REACT_PROFILER_TYPE;
8810 var StrictMode = REACT_STRICT_MODE_TYPE;
8811 var Suspense = REACT_SUSPENSE_TYPE;
8812 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8813
8814 function isAsyncMode(object) {
8815 {
8816 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8817 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8818
8819 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.');
8820 }
8821 }
8822
8823 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8824 }
8825 function isConcurrentMode(object) {
8826 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8827 }
8828 function isContextConsumer(object) {
8829 return typeOf(object) === REACT_CONTEXT_TYPE;
8830 }
8831 function isContextProvider(object) {
8832 return typeOf(object) === REACT_PROVIDER_TYPE;
8833 }
8834 function isElement(object) {
8835 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8836 }
8837 function isForwardRef(object) {
8838 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8839 }
8840 function isFragment(object) {
8841 return typeOf(object) === REACT_FRAGMENT_TYPE;
8842 }
8843 function isLazy(object) {
8844 return typeOf(object) === REACT_LAZY_TYPE;
8845 }
8846 function isMemo(object) {
8847 return typeOf(object) === REACT_MEMO_TYPE;
8848 }
8849 function isPortal(object) {
8850 return typeOf(object) === REACT_PORTAL_TYPE;
8851 }
8852 function isProfiler(object) {
8853 return typeOf(object) === REACT_PROFILER_TYPE;
8854 }
8855 function isStrictMode(object) {
8856 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8857 }
8858 function isSuspense(object) {
8859 return typeOf(object) === REACT_SUSPENSE_TYPE;
8860 }
8861
8862 exports.AsyncMode = AsyncMode;
8863 exports.ConcurrentMode = ConcurrentMode;
8864 exports.ContextConsumer = ContextConsumer;
8865 exports.ContextProvider = ContextProvider;
8866 exports.Element = Element;
8867 exports.ForwardRef = ForwardRef;
8868 exports.Fragment = Fragment;
8869 exports.Lazy = Lazy;
8870 exports.Memo = Memo;
8871 exports.Portal = Portal;
8872 exports.Profiler = Profiler;
8873 exports.StrictMode = StrictMode;
8874 exports.Suspense = Suspense;
8875 exports.isAsyncMode = isAsyncMode;
8876 exports.isConcurrentMode = isConcurrentMode;
8877 exports.isContextConsumer = isContextConsumer;
8878 exports.isContextProvider = isContextProvider;
8879 exports.isElement = isElement;
8880 exports.isForwardRef = isForwardRef;
8881 exports.isFragment = isFragment;
8882 exports.isLazy = isLazy;
8883 exports.isMemo = isMemo;
8884 exports.isPortal = isPortal;
8885 exports.isProfiler = isProfiler;
8886 exports.isStrictMode = isStrictMode;
8887 exports.isSuspense = isSuspense;
8888 exports.isValidElementType = isValidElementType;
8889 exports.typeOf = typeOf;
8890 })();
8891 }
8892
8893
8894 /***/ }),
8895
8896 /***/ "./node_modules/react-is/index.js":
8897 /*!****************************************!*\
8898 !*** ./node_modules/react-is/index.js ***!
8899 \****************************************/
8900 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8901
8902 "use strict";
8903
8904
8905 if (false) {} else {
8906 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8907 }
8908
8909
8910 /***/ }),
8911
8912 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8913 /*!*****************************************************************!*\
8914 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8915 \*****************************************************************/
8916 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8917
8918 "use strict";
8919 /** @license React v17.0.2
8920 * react-jsx-runtime.development.js
8921 *
8922 * Copyright (c) Facebook, Inc. and its affiliates.
8923 *
8924 * This source code is licensed under the MIT license found in the
8925 * LICENSE file in the root directory of this source tree.
8926 */
8927
8928
8929
8930 if (true) {
8931 (function() {
8932 'use strict';
8933
8934 var React = __webpack_require__(/*! react */ "react");
8935 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8936
8937 // ATTENTION
8938 // When adding new symbols to this file,
8939 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8940 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8941 // nor polyfill, then a plain number is used for performance.
8942 var REACT_ELEMENT_TYPE = 0xeac7;
8943 var REACT_PORTAL_TYPE = 0xeaca;
8944 exports.Fragment = 0xeacb;
8945 var REACT_STRICT_MODE_TYPE = 0xeacc;
8946 var REACT_PROFILER_TYPE = 0xead2;
8947 var REACT_PROVIDER_TYPE = 0xeacd;
8948 var REACT_CONTEXT_TYPE = 0xeace;
8949 var REACT_FORWARD_REF_TYPE = 0xead0;
8950 var REACT_SUSPENSE_TYPE = 0xead1;
8951 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8952 var REACT_MEMO_TYPE = 0xead3;
8953 var REACT_LAZY_TYPE = 0xead4;
8954 var REACT_BLOCK_TYPE = 0xead9;
8955 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8956 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8957 var REACT_SCOPE_TYPE = 0xead7;
8958 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8959 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8960 var REACT_OFFSCREEN_TYPE = 0xeae2;
8961 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8962
8963 if (typeof Symbol === 'function' && Symbol.for) {
8964 var symbolFor = Symbol.for;
8965 REACT_ELEMENT_TYPE = symbolFor('react.element');
8966 REACT_PORTAL_TYPE = symbolFor('react.portal');
8967 exports.Fragment = symbolFor('react.fragment');
8968 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8969 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8970 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8971 REACT_CONTEXT_TYPE = symbolFor('react.context');
8972 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8973 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8974 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8975 REACT_MEMO_TYPE = symbolFor('react.memo');
8976 REACT_LAZY_TYPE = symbolFor('react.lazy');
8977 REACT_BLOCK_TYPE = symbolFor('react.block');
8978 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8979 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8980 REACT_SCOPE_TYPE = symbolFor('react.scope');
8981 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8982 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8983 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8984 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8985 }
8986
8987 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8988 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8989 function getIteratorFn(maybeIterable) {
8990 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8991 return null;
8992 }
8993
8994 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8995
8996 if (typeof maybeIterator === 'function') {
8997 return maybeIterator;
8998 }
8999
9000 return null;
9001 }
9002
9003 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9004
9005 function error(format) {
9006 {
9007 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9008 args[_key2 - 1] = arguments[_key2];
9009 }
9010
9011 printWarning('error', format, args);
9012 }
9013 }
9014
9015 function printWarning(level, format, args) {
9016 // When changing this logic, you might want to also
9017 // update consoleWithStackDev.www.js as well.
9018 {
9019 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9020 var stack = ReactDebugCurrentFrame.getStackAddendum();
9021
9022 if (stack !== '') {
9023 format += '%s';
9024 args = args.concat([stack]);
9025 }
9026
9027 var argsWithFormat = args.map(function (item) {
9028 return '' + item;
9029 }); // Careful: RN currently depends on this prefix
9030
9031 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9032 // breaks IE9: https://github.com/facebook/react/issues/13610
9033 // eslint-disable-next-line react-internal/no-production-logging
9034
9035 Function.prototype.apply.call(console[level], console, argsWithFormat);
9036 }
9037 }
9038
9039 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9040
9041 var enableScopeAPI = false; // Experimental Create Event Handle API.
9042
9043 function isValidElementType(type) {
9044 if (typeof type === 'string' || typeof type === 'function') {
9045 return true;
9046 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9047
9048
9049 if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
9050 return true;
9051 }
9052
9053 if (typeof type === 'object' && type !== null) {
9054 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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
9055 return true;
9056 }
9057 }
9058
9059 return false;
9060 }
9061
9062 function getWrappedName(outerType, innerType, wrapperName) {
9063 var functionName = innerType.displayName || innerType.name || '';
9064 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9065 }
9066
9067 function getContextName(type) {
9068 return type.displayName || 'Context';
9069 }
9070
9071 function getComponentName(type) {
9072 if (type == null) {
9073 // Host root, text node or just invalid type.
9074 return null;
9075 }
9076
9077 {
9078 if (typeof type.tag === 'number') {
9079 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9080 }
9081 }
9082
9083 if (typeof type === 'function') {
9084 return type.displayName || type.name || null;
9085 }
9086
9087 if (typeof type === 'string') {
9088 return type;
9089 }
9090
9091 switch (type) {
9092 case exports.Fragment:
9093 return 'Fragment';
9094
9095 case REACT_PORTAL_TYPE:
9096 return 'Portal';
9097
9098 case REACT_PROFILER_TYPE:
9099 return 'Profiler';
9100
9101 case REACT_STRICT_MODE_TYPE:
9102 return 'StrictMode';
9103
9104 case REACT_SUSPENSE_TYPE:
9105 return 'Suspense';
9106
9107 case REACT_SUSPENSE_LIST_TYPE:
9108 return 'SuspenseList';
9109 }
9110
9111 if (typeof type === 'object') {
9112 switch (type.$$typeof) {
9113 case REACT_CONTEXT_TYPE:
9114 var context = type;
9115 return getContextName(context) + '.Consumer';
9116
9117 case REACT_PROVIDER_TYPE:
9118 var provider = type;
9119 return getContextName(provider._context) + '.Provider';
9120
9121 case REACT_FORWARD_REF_TYPE:
9122 return getWrappedName(type, type.render, 'ForwardRef');
9123
9124 case REACT_MEMO_TYPE:
9125 return getComponentName(type.type);
9126
9127 case REACT_BLOCK_TYPE:
9128 return getComponentName(type._render);
9129
9130 case REACT_LAZY_TYPE:
9131 {
9132 var lazyComponent = type;
9133 var payload = lazyComponent._payload;
9134 var init = lazyComponent._init;
9135
9136 try {
9137 return getComponentName(init(payload));
9138 } catch (x) {
9139 return null;
9140 }
9141 }
9142 }
9143 }
9144
9145 return null;
9146 }
9147
9148 // Helpers to patch console.logs to avoid logging during side-effect free
9149 // replaying on render function. This currently only patches the object
9150 // lazily which won't cover if the log function was extracted eagerly.
9151 // We could also eagerly patch the method.
9152 var disabledDepth = 0;
9153 var prevLog;
9154 var prevInfo;
9155 var prevWarn;
9156 var prevError;
9157 var prevGroup;
9158 var prevGroupCollapsed;
9159 var prevGroupEnd;
9160
9161 function disabledLog() {}
9162
9163 disabledLog.__reactDisabledLog = true;
9164 function disableLogs() {
9165 {
9166 if (disabledDepth === 0) {
9167 /* eslint-disable react-internal/no-production-logging */
9168 prevLog = console.log;
9169 prevInfo = console.info;
9170 prevWarn = console.warn;
9171 prevError = console.error;
9172 prevGroup = console.group;
9173 prevGroupCollapsed = console.groupCollapsed;
9174 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9175
9176 var props = {
9177 configurable: true,
9178 enumerable: true,
9179 value: disabledLog,
9180 writable: true
9181 }; // $FlowFixMe Flow thinks console is immutable.
9182
9183 Object.defineProperties(console, {
9184 info: props,
9185 log: props,
9186 warn: props,
9187 error: props,
9188 group: props,
9189 groupCollapsed: props,
9190 groupEnd: props
9191 });
9192 /* eslint-enable react-internal/no-production-logging */
9193 }
9194
9195 disabledDepth++;
9196 }
9197 }
9198 function reenableLogs() {
9199 {
9200 disabledDepth--;
9201
9202 if (disabledDepth === 0) {
9203 /* eslint-disable react-internal/no-production-logging */
9204 var props = {
9205 configurable: true,
9206 enumerable: true,
9207 writable: true
9208 }; // $FlowFixMe Flow thinks console is immutable.
9209
9210 Object.defineProperties(console, {
9211 log: _assign({}, props, {
9212 value: prevLog
9213 }),
9214 info: _assign({}, props, {
9215 value: prevInfo
9216 }),
9217 warn: _assign({}, props, {
9218 value: prevWarn
9219 }),
9220 error: _assign({}, props, {
9221 value: prevError
9222 }),
9223 group: _assign({}, props, {
9224 value: prevGroup
9225 }),
9226 groupCollapsed: _assign({}, props, {
9227 value: prevGroupCollapsed
9228 }),
9229 groupEnd: _assign({}, props, {
9230 value: prevGroupEnd
9231 })
9232 });
9233 /* eslint-enable react-internal/no-production-logging */
9234 }
9235
9236 if (disabledDepth < 0) {
9237 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9238 }
9239 }
9240 }
9241
9242 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9243 var prefix;
9244 function describeBuiltInComponentFrame(name, source, ownerFn) {
9245 {
9246 if (prefix === undefined) {
9247 // Extract the VM specific prefix used by each line.
9248 try {
9249 throw Error();
9250 } catch (x) {
9251 var match = x.stack.trim().match(/\n( *(at )?)/);
9252 prefix = match && match[1] || '';
9253 }
9254 } // We use the prefix to ensure our stacks line up with native stack frames.
9255
9256
9257 return '\n' + prefix + name;
9258 }
9259 }
9260 var reentry = false;
9261 var componentFrameCache;
9262
9263 {
9264 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9265 componentFrameCache = new PossiblyWeakMap();
9266 }
9267
9268 function describeNativeComponentFrame(fn, construct) {
9269 // If something asked for a stack inside a fake render, it should get ignored.
9270 if (!fn || reentry) {
9271 return '';
9272 }
9273
9274 {
9275 var frame = componentFrameCache.get(fn);
9276
9277 if (frame !== undefined) {
9278 return frame;
9279 }
9280 }
9281
9282 var control;
9283 reentry = true;
9284 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9285
9286 Error.prepareStackTrace = undefined;
9287 var previousDispatcher;
9288
9289 {
9290 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9291 // for warnings.
9292
9293 ReactCurrentDispatcher.current = null;
9294 disableLogs();
9295 }
9296
9297 try {
9298 // This should throw.
9299 if (construct) {
9300 // Something should be setting the props in the constructor.
9301 var Fake = function () {
9302 throw Error();
9303 }; // $FlowFixMe
9304
9305
9306 Object.defineProperty(Fake.prototype, 'props', {
9307 set: function () {
9308 // We use a throwing setter instead of frozen or non-writable props
9309 // because that won't throw in a non-strict mode function.
9310 throw Error();
9311 }
9312 });
9313
9314 if (typeof Reflect === 'object' && Reflect.construct) {
9315 // We construct a different control for this case to include any extra
9316 // frames added by the construct call.
9317 try {
9318 Reflect.construct(Fake, []);
9319 } catch (x) {
9320 control = x;
9321 }
9322
9323 Reflect.construct(fn, [], Fake);
9324 } else {
9325 try {
9326 Fake.call();
9327 } catch (x) {
9328 control = x;
9329 }
9330
9331 fn.call(Fake.prototype);
9332 }
9333 } else {
9334 try {
9335 throw Error();
9336 } catch (x) {
9337 control = x;
9338 }
9339
9340 fn();
9341 }
9342 } catch (sample) {
9343 // This is inlined manually because closure doesn't do it for us.
9344 if (sample && control && typeof sample.stack === 'string') {
9345 // This extracts the first frame from the sample that isn't also in the control.
9346 // Skipping one frame that we assume is the frame that calls the two.
9347 var sampleLines = sample.stack.split('\n');
9348 var controlLines = control.stack.split('\n');
9349 var s = sampleLines.length - 1;
9350 var c = controlLines.length - 1;
9351
9352 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9353 // We expect at least one stack frame to be shared.
9354 // Typically this will be the root most one. However, stack frames may be
9355 // cut off due to maximum stack limits. In this case, one maybe cut off
9356 // earlier than the other. We assume that the sample is longer or the same
9357 // and there for cut off earlier. So we should find the root most frame in
9358 // the sample somewhere in the control.
9359 c--;
9360 }
9361
9362 for (; s >= 1 && c >= 0; s--, c--) {
9363 // Next we find the first one that isn't the same which should be the
9364 // frame that called our sample function and the control.
9365 if (sampleLines[s] !== controlLines[c]) {
9366 // In V8, the first line is describing the message but other VMs don't.
9367 // If we're about to return the first line, and the control is also on the same
9368 // line, that's a pretty good indicator that our sample threw at same line as
9369 // the control. I.e. before we entered the sample frame. So we ignore this result.
9370 // This can happen if you passed a class to function component, or non-function.
9371 if (s !== 1 || c !== 1) {
9372 do {
9373 s--;
9374 c--; // We may still have similar intermediate frames from the construct call.
9375 // The next one that isn't the same should be our match though.
9376
9377 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9378 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9379 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9380
9381 {
9382 if (typeof fn === 'function') {
9383 componentFrameCache.set(fn, _frame);
9384 }
9385 } // Return the line we found.
9386
9387
9388 return _frame;
9389 }
9390 } while (s >= 1 && c >= 0);
9391 }
9392
9393 break;
9394 }
9395 }
9396 }
9397 } finally {
9398 reentry = false;
9399
9400 {
9401 ReactCurrentDispatcher.current = previousDispatcher;
9402 reenableLogs();
9403 }
9404
9405 Error.prepareStackTrace = previousPrepareStackTrace;
9406 } // Fallback to just using the name if we couldn't make it throw.
9407
9408
9409 var name = fn ? fn.displayName || fn.name : '';
9410 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9411
9412 {
9413 if (typeof fn === 'function') {
9414 componentFrameCache.set(fn, syntheticFrame);
9415 }
9416 }
9417
9418 return syntheticFrame;
9419 }
9420 function describeFunctionComponentFrame(fn, source, ownerFn) {
9421 {
9422 return describeNativeComponentFrame(fn, false);
9423 }
9424 }
9425
9426 function shouldConstruct(Component) {
9427 var prototype = Component.prototype;
9428 return !!(prototype && prototype.isReactComponent);
9429 }
9430
9431 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9432
9433 if (type == null) {
9434 return '';
9435 }
9436
9437 if (typeof type === 'function') {
9438 {
9439 return describeNativeComponentFrame(type, shouldConstruct(type));
9440 }
9441 }
9442
9443 if (typeof type === 'string') {
9444 return describeBuiltInComponentFrame(type);
9445 }
9446
9447 switch (type) {
9448 case REACT_SUSPENSE_TYPE:
9449 return describeBuiltInComponentFrame('Suspense');
9450
9451 case REACT_SUSPENSE_LIST_TYPE:
9452 return describeBuiltInComponentFrame('SuspenseList');
9453 }
9454
9455 if (typeof type === 'object') {
9456 switch (type.$$typeof) {
9457 case REACT_FORWARD_REF_TYPE:
9458 return describeFunctionComponentFrame(type.render);
9459
9460 case REACT_MEMO_TYPE:
9461 // Memo may contain any component type so we recursively resolve it.
9462 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9463
9464 case REACT_BLOCK_TYPE:
9465 return describeFunctionComponentFrame(type._render);
9466
9467 case REACT_LAZY_TYPE:
9468 {
9469 var lazyComponent = type;
9470 var payload = lazyComponent._payload;
9471 var init = lazyComponent._init;
9472
9473 try {
9474 // Lazy may contain any component type so we recursively resolve it.
9475 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9476 } catch (x) {}
9477 }
9478 }
9479 }
9480
9481 return '';
9482 }
9483
9484 var loggedTypeFailures = {};
9485 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9486
9487 function setCurrentlyValidatingElement(element) {
9488 {
9489 if (element) {
9490 var owner = element._owner;
9491 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9492 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9493 } else {
9494 ReactDebugCurrentFrame.setExtraStackFrame(null);
9495 }
9496 }
9497 }
9498
9499 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9500 {
9501 // $FlowFixMe This is okay but Flow doesn't know it.
9502 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9503
9504 for (var typeSpecName in typeSpecs) {
9505 if (has(typeSpecs, typeSpecName)) {
9506 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9507 // fail the render phase where it didn't fail before. So we log it.
9508 // After these have been cleaned up, we'll let them throw.
9509
9510 try {
9511 // This is intentionally an invariant that gets caught. It's the same
9512 // behavior as without this statement except with a better message.
9513 if (typeof typeSpecs[typeSpecName] !== 'function') {
9514 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`.');
9515 err.name = 'Invariant Violation';
9516 throw err;
9517 }
9518
9519 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9520 } catch (ex) {
9521 error$1 = ex;
9522 }
9523
9524 if (error$1 && !(error$1 instanceof Error)) {
9525 setCurrentlyValidatingElement(element);
9526
9527 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);
9528
9529 setCurrentlyValidatingElement(null);
9530 }
9531
9532 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9533 // Only monitor this failure once because there tends to be a lot of the
9534 // same error.
9535 loggedTypeFailures[error$1.message] = true;
9536 setCurrentlyValidatingElement(element);
9537
9538 error('Failed %s type: %s', location, error$1.message);
9539
9540 setCurrentlyValidatingElement(null);
9541 }
9542 }
9543 }
9544 }
9545 }
9546
9547 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9548 var hasOwnProperty = Object.prototype.hasOwnProperty;
9549 var RESERVED_PROPS = {
9550 key: true,
9551 ref: true,
9552 __self: true,
9553 __source: true
9554 };
9555 var specialPropKeyWarningShown;
9556 var specialPropRefWarningShown;
9557 var didWarnAboutStringRefs;
9558
9559 {
9560 didWarnAboutStringRefs = {};
9561 }
9562
9563 function hasValidRef(config) {
9564 {
9565 if (hasOwnProperty.call(config, 'ref')) {
9566 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9567
9568 if (getter && getter.isReactWarning) {
9569 return false;
9570 }
9571 }
9572 }
9573
9574 return config.ref !== undefined;
9575 }
9576
9577 function hasValidKey(config) {
9578 {
9579 if (hasOwnProperty.call(config, 'key')) {
9580 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9581
9582 if (getter && getter.isReactWarning) {
9583 return false;
9584 }
9585 }
9586 }
9587
9588 return config.key !== undefined;
9589 }
9590
9591 function warnIfStringRefCannotBeAutoConverted(config, self) {
9592 {
9593 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9594 var componentName = getComponentName(ReactCurrentOwner.current.type);
9595
9596 if (!didWarnAboutStringRefs[componentName]) {
9597 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', getComponentName(ReactCurrentOwner.current.type), config.ref);
9598
9599 didWarnAboutStringRefs[componentName] = true;
9600 }
9601 }
9602 }
9603 }
9604
9605 function defineKeyPropWarningGetter(props, displayName) {
9606 {
9607 var warnAboutAccessingKey = function () {
9608 if (!specialPropKeyWarningShown) {
9609 specialPropKeyWarningShown = true;
9610
9611 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);
9612 }
9613 };
9614
9615 warnAboutAccessingKey.isReactWarning = true;
9616 Object.defineProperty(props, 'key', {
9617 get: warnAboutAccessingKey,
9618 configurable: true
9619 });
9620 }
9621 }
9622
9623 function defineRefPropWarningGetter(props, displayName) {
9624 {
9625 var warnAboutAccessingRef = function () {
9626 if (!specialPropRefWarningShown) {
9627 specialPropRefWarningShown = true;
9628
9629 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);
9630 }
9631 };
9632
9633 warnAboutAccessingRef.isReactWarning = true;
9634 Object.defineProperty(props, 'ref', {
9635 get: warnAboutAccessingRef,
9636 configurable: true
9637 });
9638 }
9639 }
9640 /**
9641 * Factory method to create a new React element. This no longer adheres to
9642 * the class pattern, so do not use new to call it. Also, instanceof check
9643 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9644 * if something is a React Element.
9645 *
9646 * @param {*} type
9647 * @param {*} props
9648 * @param {*} key
9649 * @param {string|object} ref
9650 * @param {*} owner
9651 * @param {*} self A *temporary* helper to detect places where `this` is
9652 * different from the `owner` when React.createElement is called, so that we
9653 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9654 * functions, and as long as `this` and owner are the same, there will be no
9655 * change in behavior.
9656 * @param {*} source An annotation object (added by a transpiler or otherwise)
9657 * indicating filename, line number, and/or other information.
9658 * @internal
9659 */
9660
9661
9662 var ReactElement = function (type, key, ref, self, source, owner, props) {
9663 var element = {
9664 // This tag allows us to uniquely identify this as a React Element
9665 $$typeof: REACT_ELEMENT_TYPE,
9666 // Built-in properties that belong on the element
9667 type: type,
9668 key: key,
9669 ref: ref,
9670 props: props,
9671 // Record the component responsible for creating this element.
9672 _owner: owner
9673 };
9674
9675 {
9676 // The validation flag is currently mutative. We put it on
9677 // an external backing store so that we can freeze the whole object.
9678 // This can be replaced with a WeakMap once they are implemented in
9679 // commonly used development environments.
9680 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9681 // the validation flag non-enumerable (where possible, which should
9682 // include every environment we run tests in), so the test framework
9683 // ignores it.
9684
9685 Object.defineProperty(element._store, 'validated', {
9686 configurable: false,
9687 enumerable: false,
9688 writable: true,
9689 value: false
9690 }); // self and source are DEV only properties.
9691
9692 Object.defineProperty(element, '_self', {
9693 configurable: false,
9694 enumerable: false,
9695 writable: false,
9696 value: self
9697 }); // Two elements created in two different places should be considered
9698 // equal for testing purposes and therefore we hide it from enumeration.
9699
9700 Object.defineProperty(element, '_source', {
9701 configurable: false,
9702 enumerable: false,
9703 writable: false,
9704 value: source
9705 });
9706
9707 if (Object.freeze) {
9708 Object.freeze(element.props);
9709 Object.freeze(element);
9710 }
9711 }
9712
9713 return element;
9714 };
9715 /**
9716 * https://github.com/reactjs/rfcs/pull/107
9717 * @param {*} type
9718 * @param {object} props
9719 * @param {string} key
9720 */
9721
9722 function jsxDEV(type, config, maybeKey, source, self) {
9723 {
9724 var propName; // Reserved names are extracted
9725
9726 var props = {};
9727 var key = null;
9728 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9729 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9730 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9731 // but as an intermediary step, we will use jsxDEV for everything except
9732 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9733 // key is explicitly declared to be undefined or not.
9734
9735 if (maybeKey !== undefined) {
9736 key = '' + maybeKey;
9737 }
9738
9739 if (hasValidKey(config)) {
9740 key = '' + config.key;
9741 }
9742
9743 if (hasValidRef(config)) {
9744 ref = config.ref;
9745 warnIfStringRefCannotBeAutoConverted(config, self);
9746 } // Remaining properties are added to a new props object
9747
9748
9749 for (propName in config) {
9750 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9751 props[propName] = config[propName];
9752 }
9753 } // Resolve default props
9754
9755
9756 if (type && type.defaultProps) {
9757 var defaultProps = type.defaultProps;
9758
9759 for (propName in defaultProps) {
9760 if (props[propName] === undefined) {
9761 props[propName] = defaultProps[propName];
9762 }
9763 }
9764 }
9765
9766 if (key || ref) {
9767 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9768
9769 if (key) {
9770 defineKeyPropWarningGetter(props, displayName);
9771 }
9772
9773 if (ref) {
9774 defineRefPropWarningGetter(props, displayName);
9775 }
9776 }
9777
9778 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9779 }
9780 }
9781
9782 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9783 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9784
9785 function setCurrentlyValidatingElement$1(element) {
9786 {
9787 if (element) {
9788 var owner = element._owner;
9789 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9790 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9791 } else {
9792 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9793 }
9794 }
9795 }
9796
9797 var propTypesMisspellWarningShown;
9798
9799 {
9800 propTypesMisspellWarningShown = false;
9801 }
9802 /**
9803 * Verifies the object is a ReactElement.
9804 * See https://reactjs.org/docs/react-api.html#isvalidelement
9805 * @param {?object} object
9806 * @return {boolean} True if `object` is a ReactElement.
9807 * @final
9808 */
9809
9810 function isValidElement(object) {
9811 {
9812 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9813 }
9814 }
9815
9816 function getDeclarationErrorAddendum() {
9817 {
9818 if (ReactCurrentOwner$1.current) {
9819 var name = getComponentName(ReactCurrentOwner$1.current.type);
9820
9821 if (name) {
9822 return '\n\nCheck the render method of `' + name + '`.';
9823 }
9824 }
9825
9826 return '';
9827 }
9828 }
9829
9830 function getSourceInfoErrorAddendum(source) {
9831 {
9832 if (source !== undefined) {
9833 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9834 var lineNumber = source.lineNumber;
9835 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9836 }
9837
9838 return '';
9839 }
9840 }
9841 /**
9842 * Warn if there's no key explicitly set on dynamic arrays of children or
9843 * object keys are not valid. This allows us to keep track of children between
9844 * updates.
9845 */
9846
9847
9848 var ownerHasKeyUseWarning = {};
9849
9850 function getCurrentComponentErrorInfo(parentType) {
9851 {
9852 var info = getDeclarationErrorAddendum();
9853
9854 if (!info) {
9855 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9856
9857 if (parentName) {
9858 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9859 }
9860 }
9861
9862 return info;
9863 }
9864 }
9865 /**
9866 * Warn if the element doesn't have an explicit key assigned to it.
9867 * This element is in an array. The array could grow and shrink or be
9868 * reordered. All children that haven't already been validated are required to
9869 * have a "key" property assigned to it. Error statuses are cached so a warning
9870 * will only be shown once.
9871 *
9872 * @internal
9873 * @param {ReactElement} element Element that requires a key.
9874 * @param {*} parentType element's parent's type.
9875 */
9876
9877
9878 function validateExplicitKey(element, parentType) {
9879 {
9880 if (!element._store || element._store.validated || element.key != null) {
9881 return;
9882 }
9883
9884 element._store.validated = true;
9885 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9886
9887 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9888 return;
9889 }
9890
9891 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9892 // property, it may be the creator of the child that's responsible for
9893 // assigning it a key.
9894
9895 var childOwner = '';
9896
9897 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9898 // Give the component that originally created this child.
9899 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9900 }
9901
9902 setCurrentlyValidatingElement$1(element);
9903
9904 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);
9905
9906 setCurrentlyValidatingElement$1(null);
9907 }
9908 }
9909 /**
9910 * Ensure that every element either is passed in a static location, in an
9911 * array with an explicit keys property defined, or in an object literal
9912 * with valid key property.
9913 *
9914 * @internal
9915 * @param {ReactNode} node Statically passed child of any type.
9916 * @param {*} parentType node's parent's type.
9917 */
9918
9919
9920 function validateChildKeys(node, parentType) {
9921 {
9922 if (typeof node !== 'object') {
9923 return;
9924 }
9925
9926 if (Array.isArray(node)) {
9927 for (var i = 0; i < node.length; i++) {
9928 var child = node[i];
9929
9930 if (isValidElement(child)) {
9931 validateExplicitKey(child, parentType);
9932 }
9933 }
9934 } else if (isValidElement(node)) {
9935 // This element was passed in a valid location.
9936 if (node._store) {
9937 node._store.validated = true;
9938 }
9939 } else if (node) {
9940 var iteratorFn = getIteratorFn(node);
9941
9942 if (typeof iteratorFn === 'function') {
9943 // Entry iterators used to provide implicit keys,
9944 // but now we print a separate warning for them later.
9945 if (iteratorFn !== node.entries) {
9946 var iterator = iteratorFn.call(node);
9947 var step;
9948
9949 while (!(step = iterator.next()).done) {
9950 if (isValidElement(step.value)) {
9951 validateExplicitKey(step.value, parentType);
9952 }
9953 }
9954 }
9955 }
9956 }
9957 }
9958 }
9959 /**
9960 * Given an element, validate that its props follow the propTypes definition,
9961 * provided by the type.
9962 *
9963 * @param {ReactElement} element
9964 */
9965
9966
9967 function validatePropTypes(element) {
9968 {
9969 var type = element.type;
9970
9971 if (type === null || type === undefined || typeof type === 'string') {
9972 return;
9973 }
9974
9975 var propTypes;
9976
9977 if (typeof type === 'function') {
9978 propTypes = type.propTypes;
9979 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9980 // Inner props are checked in the reconciler.
9981 type.$$typeof === REACT_MEMO_TYPE)) {
9982 propTypes = type.propTypes;
9983 } else {
9984 return;
9985 }
9986
9987 if (propTypes) {
9988 // Intentionally inside to avoid triggering lazy initializers:
9989 var name = getComponentName(type);
9990 checkPropTypes(propTypes, element.props, 'prop', name, element);
9991 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9992 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9993
9994 var _name = getComponentName(type);
9995
9996 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9997 }
9998
9999 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
10000 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
10001 }
10002 }
10003 }
10004 /**
10005 * Given a fragment, validate that it can only be provided with fragment props
10006 * @param {ReactElement} fragment
10007 */
10008
10009
10010 function validateFragmentProps(fragment) {
10011 {
10012 var keys = Object.keys(fragment.props);
10013
10014 for (var i = 0; i < keys.length; i++) {
10015 var key = keys[i];
10016
10017 if (key !== 'children' && key !== 'key') {
10018 setCurrentlyValidatingElement$1(fragment);
10019
10020 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10021
10022 setCurrentlyValidatingElement$1(null);
10023 break;
10024 }
10025 }
10026
10027 if (fragment.ref !== null) {
10028 setCurrentlyValidatingElement$1(fragment);
10029
10030 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10031
10032 setCurrentlyValidatingElement$1(null);
10033 }
10034 }
10035 }
10036
10037 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10038 {
10039 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10040 // succeed and there will likely be errors in render.
10041
10042 if (!validType) {
10043 var info = '';
10044
10045 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10046 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.";
10047 }
10048
10049 var sourceInfo = getSourceInfoErrorAddendum(source);
10050
10051 if (sourceInfo) {
10052 info += sourceInfo;
10053 } else {
10054 info += getDeclarationErrorAddendum();
10055 }
10056
10057 var typeString;
10058
10059 if (type === null) {
10060 typeString = 'null';
10061 } else if (Array.isArray(type)) {
10062 typeString = 'array';
10063 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10064 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10065 info = ' Did you accidentally export a JSX literal instead of a component?';
10066 } else {
10067 typeString = typeof type;
10068 }
10069
10070 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);
10071 }
10072
10073 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10074 // TODO: Drop this when these are no longer allowed as the type argument.
10075
10076 if (element == null) {
10077 return element;
10078 } // Skip key warning if the type isn't valid since our key validation logic
10079 // doesn't expect a non-string/function type and can throw confusing errors.
10080 // We don't want exception behavior to differ between dev and prod.
10081 // (Rendering will throw with a helpful message and as soon as the type is
10082 // fixed, the key warnings will appear.)
10083
10084
10085 if (validType) {
10086 var children = props.children;
10087
10088 if (children !== undefined) {
10089 if (isStaticChildren) {
10090 if (Array.isArray(children)) {
10091 for (var i = 0; i < children.length; i++) {
10092 validateChildKeys(children[i], type);
10093 }
10094
10095 if (Object.freeze) {
10096 Object.freeze(children);
10097 }
10098 } else {
10099 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.');
10100 }
10101 } else {
10102 validateChildKeys(children, type);
10103 }
10104 }
10105 }
10106
10107 if (type === exports.Fragment) {
10108 validateFragmentProps(element);
10109 } else {
10110 validatePropTypes(element);
10111 }
10112
10113 return element;
10114 }
10115 } // These two functions exist to still get child warnings in dev
10116 // even with the prod transform. This means that jsxDEV is purely
10117 // opt-in behavior for better messages but that we won't stop
10118 // giving you warnings if you use production apis.
10119
10120 function jsxWithValidationStatic(type, props, key) {
10121 {
10122 return jsxWithValidation(type, props, key, true);
10123 }
10124 }
10125 function jsxWithValidationDynamic(type, props, key) {
10126 {
10127 return jsxWithValidation(type, props, key, false);
10128 }
10129 }
10130
10131 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10132 // for now we can ship identical prod functions
10133
10134 var jsxs = jsxWithValidationStatic ;
10135
10136 exports.jsx = jsx;
10137 exports.jsxs = jsxs;
10138 })();
10139 }
10140
10141
10142 /***/ }),
10143
10144 /***/ "./node_modules/react/jsx-runtime.js":
10145 /*!*******************************************!*\
10146 !*** ./node_modules/react/jsx-runtime.js ***!
10147 \*******************************************/
10148 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10149
10150 "use strict";
10151
10152
10153 if (false) {} else {
10154 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10155 }
10156
10157
10158 /***/ }),
10159
10160 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10161 /*!******************************************************************************!*\
10162 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10163 \******************************************************************************/
10164 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10165
10166 "use strict";
10167 __webpack_require__.r(__webpack_exports__);
10168 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10169 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10170 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10171 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10172 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10173 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10174 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10175 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10176 /* 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),
10177 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10178 /* harmony export */ "css": () => (/* binding */ css),
10179 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10180 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10181 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10182 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10183 /* harmony export */ });
10184 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10185 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10186 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10187 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10188 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10189 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10190 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10191 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10192 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10193 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10194 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10195 /* 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");
10196 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207 //
10208
10209 var interleave = (function (strings, interpolations) {
10210 var result = [strings[0]];
10211
10212 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10213 result.push(interpolations[i], strings[i + 1]);
10214 }
10215
10216 return result;
10217 });
10218
10219 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10220 return typeof obj;
10221 } : function (obj) {
10222 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10223 };
10224
10225 var classCallCheck = function (instance, Constructor) {
10226 if (!(instance instanceof Constructor)) {
10227 throw new TypeError("Cannot call a class as a function");
10228 }
10229 };
10230
10231 var createClass = function () {
10232 function defineProperties(target, props) {
10233 for (var i = 0; i < props.length; i++) {
10234 var descriptor = props[i];
10235 descriptor.enumerable = descriptor.enumerable || false;
10236 descriptor.configurable = true;
10237 if ("value" in descriptor) descriptor.writable = true;
10238 Object.defineProperty(target, descriptor.key, descriptor);
10239 }
10240 }
10241
10242 return function (Constructor, protoProps, staticProps) {
10243 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10244 if (staticProps) defineProperties(Constructor, staticProps);
10245 return Constructor;
10246 };
10247 }();
10248
10249 var _extends = Object.assign || function (target) {
10250 for (var i = 1; i < arguments.length; i++) {
10251 var source = arguments[i];
10252
10253 for (var key in source) {
10254 if (Object.prototype.hasOwnProperty.call(source, key)) {
10255 target[key] = source[key];
10256 }
10257 }
10258 }
10259
10260 return target;
10261 };
10262
10263 var inherits = function (subClass, superClass) {
10264 if (typeof superClass !== "function" && superClass !== null) {
10265 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10266 }
10267
10268 subClass.prototype = Object.create(superClass && superClass.prototype, {
10269 constructor: {
10270 value: subClass,
10271 enumerable: false,
10272 writable: true,
10273 configurable: true
10274 }
10275 });
10276 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10277 };
10278
10279 var objectWithoutProperties = function (obj, keys) {
10280 var target = {};
10281
10282 for (var i in obj) {
10283 if (keys.indexOf(i) >= 0) continue;
10284 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10285 target[i] = obj[i];
10286 }
10287
10288 return target;
10289 };
10290
10291 var possibleConstructorReturn = function (self, call) {
10292 if (!self) {
10293 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10294 }
10295
10296 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10297 };
10298
10299 //
10300 var isPlainObject = (function (x) {
10301 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10302 });
10303
10304 //
10305 var EMPTY_ARRAY = Object.freeze([]);
10306 var EMPTY_OBJECT = Object.freeze({});
10307
10308 //
10309 function isFunction(test) {
10310 return typeof test === 'function';
10311 }
10312
10313 //
10314
10315 function getComponentName(target) {
10316 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10317 }
10318
10319 //
10320 function isStatelessFunction(test) {
10321 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10322 }
10323
10324 //
10325 function isStyledComponent(target) {
10326 return target && typeof target.styledComponentId === 'string';
10327 }
10328
10329 //
10330
10331 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10332
10333 var SC_VERSION_ATTR = 'data-styled-version';
10334
10335 var SC_STREAM_ATTR = 'data-styled-streamed';
10336
10337 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10338
10339 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';
10340
10341 // Shared empty execution context when generating static styles
10342 var STATIC_EXECUTION_CONTEXT = {};
10343
10344 //
10345
10346
10347 /**
10348 * Parse errors.md and turn it into a simple hash of code: message
10349 */
10350 var ERRORS = true ? {
10351 "1": "Cannot create styled-component for component: %s.\n\n",
10352 "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",
10353 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10354 "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",
10355 "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",
10356 "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",
10357 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10358 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10359 "9": "Missing document `<head>`\n\n",
10360 "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",
10361 "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",
10362 "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",
10363 "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"
10364 } : 0;
10365
10366 /**
10367 * super basic version of sprintf
10368 */
10369 function format() {
10370 var a = arguments.length <= 0 ? undefined : arguments[0];
10371 var b = [];
10372
10373 for (var c = 1, len = arguments.length; c < len; c += 1) {
10374 b.push(arguments.length <= c ? undefined : arguments[c]);
10375 }
10376
10377 b.forEach(function (d) {
10378 a = a.replace(/%[a-z]/, d);
10379 });
10380
10381 return a;
10382 }
10383
10384 /**
10385 * Create an error file out of errors.md for development and a simple web link to the full errors
10386 * in production mode.
10387 */
10388
10389 var StyledComponentsError = function (_Error) {
10390 inherits(StyledComponentsError, _Error);
10391
10392 function StyledComponentsError(code) {
10393 classCallCheck(this, StyledComponentsError);
10394
10395 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10396 interpolations[_key - 1] = arguments[_key];
10397 }
10398
10399 if (false) { var _this; } else {
10400 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10401 }
10402 return possibleConstructorReturn(_this);
10403 }
10404
10405 return StyledComponentsError;
10406 }(Error);
10407
10408 //
10409 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10410
10411 var extractComps = (function (maybeCSS) {
10412 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10413 var existingComponents = [];
10414 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10415 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10416 return match;
10417 });
10418 return existingComponents.map(function (_ref, i) {
10419 var componentId = _ref.componentId,
10420 matchIndex = _ref.matchIndex;
10421
10422 var nextComp = existingComponents[i + 1];
10423 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10424 return { componentId: componentId, cssFromDOM: cssFromDOM };
10425 });
10426 });
10427
10428 //
10429
10430 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10431
10432 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10433 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10434 global: false,
10435 cascade: true,
10436 keyframe: false,
10437 prefix: false,
10438 compress: false,
10439 semicolon: true
10440 });
10441
10442 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10443 global: false,
10444 cascade: true,
10445 keyframe: false,
10446 prefix: true,
10447 compress: false,
10448 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10449 });
10450
10451 // Wrap `insertRulePlugin to build a list of rules,
10452 // and then make our own plugin to return the rules. This
10453 // makes it easier to hook into the existing SSR architecture
10454
10455 var parsingRules = [];
10456
10457 // eslint-disable-next-line consistent-return
10458 var returnRulesPlugin = function returnRulesPlugin(context) {
10459 if (context === -2) {
10460 var parsedRules = parsingRules;
10461 parsingRules = [];
10462 return parsedRules;
10463 }
10464 };
10465
10466 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10467 parsingRules.push(rule);
10468 });
10469
10470 var _componentId = void 0;
10471 var _selector = void 0;
10472 var _selectorRegexp = void 0;
10473
10474 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10475 if (
10476 // the first self-ref is always untouched
10477 offset > 0 &&
10478 // there should be at least two self-refs to do a replacement (.b > .b)
10479 string.slice(0, offset).indexOf(_selector) !== -1 &&
10480 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10481 string.slice(offset - _selector.length, offset) !== _selector) {
10482 return '.' + _componentId;
10483 }
10484
10485 return match;
10486 };
10487
10488 /**
10489 * When writing a style like
10490 *
10491 * & + & {
10492 * color: red;
10493 * }
10494 *
10495 * The second ampersand should be a reference to the static component class. stylis
10496 * has no knowledge of static class so we have to intelligently replace the base selector.
10497 */
10498 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10499 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10500 // eslint-disable-next-line no-param-reassign
10501 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10502 }
10503 };
10504
10505 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10506 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10507
10508 var splitByRules = function splitByRules(css) {
10509 return stylisSplitter('', css);
10510 };
10511
10512 function stringifyRules(rules, selector, prefix) {
10513 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10514
10515 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10516
10517 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10518
10519 // stylis has no concept of state to be passed to plugins
10520 // but since JS is single=threaded, we can rely on that to ensure
10521 // these properties stay in sync with the current stylis run
10522 _componentId = componentId;
10523 _selector = selector;
10524 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10525
10526 return stylis(prefix || !selector ? '' : selector, cssStr);
10527 }
10528
10529 //
10530 /* eslint-disable camelcase, no-undef */
10531
10532 var getNonce = (function () {
10533 return true ? __webpack_require__.nc : 0;
10534 });
10535
10536 //
10537 /* These are helpers for the StyleTags to keep track of the injected
10538 * rule names for each (component) ID that they're keeping track of.
10539 * They're crucial for detecting whether a name has already been
10540 * injected.
10541 * (This excludes rehydrated names) */
10542
10543 /* adds a new ID:name pairing to a names dictionary */
10544 var addNameForId = function addNameForId(names, id, name) {
10545 if (name) {
10546 // eslint-disable-next-line no-param-reassign
10547 var namesForId = names[id] || (names[id] = Object.create(null));
10548 namesForId[name] = true;
10549 }
10550 };
10551
10552 /* resets an ID entirely by overwriting it in the dictionary */
10553 var resetIdNames = function resetIdNames(names, id) {
10554 // eslint-disable-next-line no-param-reassign
10555 names[id] = Object.create(null);
10556 };
10557
10558 /* factory for a names dictionary checking the existance of an ID:name pairing */
10559 var hasNameForId = function hasNameForId(names) {
10560 return function (id, name) {
10561 return names[id] !== undefined && names[id][name];
10562 };
10563 };
10564
10565 /* stringifies names for the html/element output */
10566 var stringifyNames = function stringifyNames(names) {
10567 var str = '';
10568 // eslint-disable-next-line guard-for-in
10569 for (var id in names) {
10570 str += Object.keys(names[id]).join(' ') + ' ';
10571 }
10572 return str.trim();
10573 };
10574
10575 /* clones the nested names dictionary */
10576 var cloneNames = function cloneNames(names) {
10577 var clone = Object.create(null);
10578 // eslint-disable-next-line guard-for-in
10579 for (var id in names) {
10580 clone[id] = _extends({}, names[id]);
10581 }
10582 return clone;
10583 };
10584
10585 //
10586
10587 /* These are helpers that deal with the insertRule (aka speedy) API
10588 * They are used in the StyleTags and specifically the speedy tag
10589 */
10590
10591 /* retrieve a sheet for a given style tag */
10592 var sheetForTag = function sheetForTag(tag) {
10593 // $FlowFixMe
10594 if (tag.sheet) return tag.sheet;
10595
10596 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10597 var size = tag.ownerDocument.styleSheets.length;
10598 for (var i = 0; i < size; i += 1) {
10599 var sheet = tag.ownerDocument.styleSheets[i];
10600 // $FlowFixMe
10601 if (sheet.ownerNode === tag) return sheet;
10602 }
10603
10604 /* we should always be able to find a tag */
10605 throw new StyledComponentsError(10);
10606 };
10607
10608 /* insert a rule safely and return whether it was actually injected */
10609 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10610 /* abort early if cssRule string is falsy */
10611 if (!cssRule) return false;
10612
10613 var maxIndex = sheet.cssRules.length;
10614
10615 try {
10616 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10617 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10618 } catch (err) {
10619 /* any error indicates an invalid rule */
10620 return false;
10621 }
10622
10623 return true;
10624 };
10625
10626 /* deletes `size` rules starting from `removalIndex` */
10627 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10628 var lowerBound = removalIndex - size;
10629 for (var i = removalIndex; i > lowerBound; i -= 1) {
10630 sheet.deleteRule(i);
10631 }
10632 };
10633
10634 //
10635
10636 /* this marker separates component styles and is important for rehydration */
10637 var makeTextMarker = function makeTextMarker(id) {
10638 return '\n/* sc-component-id: ' + id + ' */\n';
10639 };
10640
10641 /* add up all numbers in array up until and including the index */
10642 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10643 var totalUpToIndex = 0;
10644 for (var i = 0; i <= index; i += 1) {
10645 totalUpToIndex += sizes[i];
10646 }
10647
10648 return totalUpToIndex;
10649 };
10650
10651 /* create a new style tag after lastEl */
10652 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10653 var targetDocument = document;
10654 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10655
10656 var el = targetDocument.createElement('style');
10657 el.setAttribute(SC_ATTR, '');
10658 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10659
10660 var nonce = getNonce();
10661 if (nonce) {
10662 el.setAttribute('nonce', nonce);
10663 }
10664
10665 /* Work around insertRule quirk in EdgeHTML */
10666 el.appendChild(targetDocument.createTextNode(''));
10667
10668 if (target && !tagEl) {
10669 /* Append to target when no previous element was passed */
10670 target.appendChild(el);
10671 } else {
10672 if (!tagEl || !target || !tagEl.parentNode) {
10673 throw new StyledComponentsError(6);
10674 }
10675
10676 /* Insert new style tag after the previous one */
10677 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10678 }
10679
10680 return el;
10681 };
10682
10683 /* takes a css factory function and outputs an html styled tag factory */
10684 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10685 return function (additionalAttrs) {
10686 var nonce = getNonce();
10687 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10688
10689 var htmlAttr = attrs.filter(Boolean).join(' ');
10690 return '<style ' + htmlAttr + '>' + css() + '</style>';
10691 };
10692 };
10693
10694 /* takes a css factory function and outputs an element factory */
10695 var wrapAsElement = function wrapAsElement(css, names) {
10696 return function () {
10697 var _props;
10698
10699 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10700
10701 var nonce = getNonce();
10702 if (nonce) {
10703 // $FlowFixMe
10704 props.nonce = nonce;
10705 }
10706
10707 // eslint-disable-next-line react/no-danger
10708 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10709 };
10710 };
10711
10712 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10713 return function () {
10714 return Object.keys(markers);
10715 };
10716 };
10717
10718 /* speedy tags utilise insertRule */
10719 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10720 var names = Object.create(null);
10721 var markers = Object.create(null);
10722 var sizes = [];
10723
10724 var extractImport = getImportRuleTag !== undefined;
10725 /* indicates whether getImportRuleTag was called */
10726 var usedImportRuleTag = false;
10727
10728 var insertMarker = function insertMarker(id) {
10729 var prev = markers[id];
10730 if (prev !== undefined) {
10731 return prev;
10732 }
10733
10734 markers[id] = sizes.length;
10735 sizes.push(0);
10736 resetIdNames(names, id);
10737
10738 return markers[id];
10739 };
10740
10741 var insertRules = function insertRules(id, cssRules, name) {
10742 var marker = insertMarker(id);
10743 var sheet = sheetForTag(el);
10744 var insertIndex = addUpUntilIndex(sizes, marker);
10745
10746 var injectedRules = 0;
10747 var importRules = [];
10748 var cssRulesSize = cssRules.length;
10749
10750 for (var i = 0; i < cssRulesSize; i += 1) {
10751 var cssRule = cssRules[i];
10752 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10753 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10754 importRules.push(cssRule);
10755 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10756 mayHaveImport = false;
10757 injectedRules += 1;
10758 }
10759 }
10760
10761 if (extractImport && importRules.length > 0) {
10762 usedImportRuleTag = true;
10763 // $FlowFixMe
10764 getImportRuleTag().insertRules(id + '-import', importRules);
10765 }
10766
10767 sizes[marker] += injectedRules; /* add up no of injected rules */
10768 addNameForId(names, id, name);
10769 };
10770
10771 var removeRules = function removeRules(id) {
10772 var marker = markers[id];
10773 if (marker === undefined) return;
10774 // $FlowFixMe
10775 if (el.isConnected === false) return;
10776
10777 var size = sizes[marker];
10778 var sheet = sheetForTag(el);
10779 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10780 deleteRules(sheet, removalIndex, size);
10781 sizes[marker] = 0;
10782 resetIdNames(names, id);
10783
10784 if (extractImport && usedImportRuleTag) {
10785 // $FlowFixMe
10786 getImportRuleTag().removeRules(id + '-import');
10787 }
10788 };
10789
10790 var css = function css() {
10791 var _sheetForTag = sheetForTag(el),
10792 cssRules = _sheetForTag.cssRules;
10793
10794 var str = '';
10795
10796 // eslint-disable-next-line guard-for-in
10797 for (var id in markers) {
10798 str += makeTextMarker(id);
10799 var marker = markers[id];
10800 var end = addUpUntilIndex(sizes, marker);
10801 var size = sizes[marker];
10802 for (var i = end - size; i < end; i += 1) {
10803 var rule = cssRules[i];
10804 if (rule !== undefined) {
10805 str += rule.cssText;
10806 }
10807 }
10808 }
10809
10810 return str;
10811 };
10812
10813 return {
10814 clone: function clone() {
10815 throw new StyledComponentsError(5);
10816 },
10817
10818 css: css,
10819 getIds: getIdsFromMarkersFactory(markers),
10820 hasNameForId: hasNameForId(names),
10821 insertMarker: insertMarker,
10822 insertRules: insertRules,
10823 removeRules: removeRules,
10824 sealed: false,
10825 styleTag: el,
10826 toElement: wrapAsElement(css, names),
10827 toHTML: wrapAsHtmlTag(css, names)
10828 };
10829 };
10830
10831 var makeTextNode = function makeTextNode(targetDocument, id) {
10832 return targetDocument.createTextNode(makeTextMarker(id));
10833 };
10834
10835 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10836 var names = Object.create(null);
10837 var markers = Object.create(null);
10838
10839 var extractImport = getImportRuleTag !== undefined;
10840
10841 /* indicates whether getImportRuleTag was called */
10842 var usedImportRuleTag = false;
10843
10844 var insertMarker = function insertMarker(id) {
10845 var prev = markers[id];
10846 if (prev !== undefined) {
10847 return prev;
10848 }
10849
10850 markers[id] = makeTextNode(el.ownerDocument, id);
10851 el.appendChild(markers[id]);
10852 names[id] = Object.create(null);
10853
10854 return markers[id];
10855 };
10856
10857 var insertRules = function insertRules(id, cssRules, name) {
10858 var marker = insertMarker(id);
10859 var importRules = [];
10860 var cssRulesSize = cssRules.length;
10861
10862 for (var i = 0; i < cssRulesSize; i += 1) {
10863 var rule = cssRules[i];
10864 var mayHaveImport = extractImport;
10865 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10866 importRules.push(rule);
10867 } else {
10868 mayHaveImport = false;
10869 var separator = i === cssRulesSize - 1 ? '' : ' ';
10870 marker.appendData('' + rule + separator);
10871 }
10872 }
10873
10874 addNameForId(names, id, name);
10875
10876 if (extractImport && importRules.length > 0) {
10877 usedImportRuleTag = true;
10878 // $FlowFixMe
10879 getImportRuleTag().insertRules(id + '-import', importRules);
10880 }
10881 };
10882
10883 var removeRules = function removeRules(id) {
10884 var marker = markers[id];
10885 if (marker === undefined) return;
10886
10887 /* create new empty text node and replace the current one */
10888 var newMarker = makeTextNode(el.ownerDocument, id);
10889 el.replaceChild(newMarker, marker);
10890 markers[id] = newMarker;
10891 resetIdNames(names, id);
10892
10893 if (extractImport && usedImportRuleTag) {
10894 // $FlowFixMe
10895 getImportRuleTag().removeRules(id + '-import');
10896 }
10897 };
10898
10899 var css = function css() {
10900 var str = '';
10901
10902 // eslint-disable-next-line guard-for-in
10903 for (var id in markers) {
10904 str += markers[id].data;
10905 }
10906
10907 return str;
10908 };
10909
10910 return {
10911 clone: function clone() {
10912 throw new StyledComponentsError(5);
10913 },
10914
10915 css: css,
10916 getIds: getIdsFromMarkersFactory(markers),
10917 hasNameForId: hasNameForId(names),
10918 insertMarker: insertMarker,
10919 insertRules: insertRules,
10920 removeRules: removeRules,
10921 sealed: false,
10922 styleTag: el,
10923 toElement: wrapAsElement(css, names),
10924 toHTML: wrapAsHtmlTag(css, names)
10925 };
10926 };
10927
10928 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10929 var names = namesArg === undefined ? Object.create(null) : namesArg;
10930 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10931
10932 var insertMarker = function insertMarker(id) {
10933 var prev = markers[id];
10934 if (prev !== undefined) {
10935 return prev;
10936 }
10937
10938 return markers[id] = [''];
10939 };
10940
10941 var insertRules = function insertRules(id, cssRules, name) {
10942 var marker = insertMarker(id);
10943 marker[0] += cssRules.join(' ');
10944 addNameForId(names, id, name);
10945 };
10946
10947 var removeRules = function removeRules(id) {
10948 var marker = markers[id];
10949 if (marker === undefined) return;
10950 marker[0] = '';
10951 resetIdNames(names, id);
10952 };
10953
10954 var css = function css() {
10955 var str = '';
10956 // eslint-disable-next-line guard-for-in
10957 for (var id in markers) {
10958 var cssForId = markers[id][0];
10959 if (cssForId) {
10960 str += makeTextMarker(id) + cssForId;
10961 }
10962 }
10963 return str;
10964 };
10965
10966 var clone = function clone() {
10967 var namesClone = cloneNames(names);
10968 var markersClone = Object.create(null);
10969
10970 // eslint-disable-next-line guard-for-in
10971 for (var id in markers) {
10972 markersClone[id] = [markers[id][0]];
10973 }
10974
10975 return makeServerTag(namesClone, markersClone);
10976 };
10977
10978 var tag = {
10979 clone: clone,
10980 css: css,
10981 getIds: getIdsFromMarkersFactory(markers),
10982 hasNameForId: hasNameForId(names),
10983 insertMarker: insertMarker,
10984 insertRules: insertRules,
10985 removeRules: removeRules,
10986 sealed: false,
10987 styleTag: null,
10988 toElement: wrapAsElement(css, names),
10989 toHTML: wrapAsHtmlTag(css, names)
10990 };
10991
10992 return tag;
10993 };
10994
10995 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10996 if (IS_BROWSER && !forceServer) {
10997 var el = makeStyleTag(target, tagEl, insertBefore);
10998
10999 if (DISABLE_SPEEDY) {
11000 return makeBrowserTag(el, getImportRuleTag);
11001 } else {
11002 return makeSpeedyTag(el, getImportRuleTag);
11003 }
11004 }
11005
11006 return makeServerTag();
11007 };
11008
11009 var rehydrate = function rehydrate(tag, els, extracted) {
11010 /* add all extracted components to the new tag */
11011 for (var i = 0, len = extracted.length; i < len; i += 1) {
11012 var _extracted$i = extracted[i],
11013 componentId = _extracted$i.componentId,
11014 cssFromDOM = _extracted$i.cssFromDOM;
11015
11016 var cssRules = splitByRules(cssFromDOM);
11017 tag.insertRules(componentId, cssRules);
11018 }
11019
11020 /* remove old HTMLStyleElements, since they have been rehydrated */
11021 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11022 var el = els[_i];
11023 if (el.parentNode) {
11024 el.parentNode.removeChild(el);
11025 }
11026 }
11027 };
11028
11029 //
11030
11031 var SPLIT_REGEX = /\s+/;
11032
11033 /* determine the maximum number of components before tags are sharded */
11034 var MAX_SIZE = void 0;
11035 if (IS_BROWSER) {
11036 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11037 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11038 } else {
11039 /* for servers we do not need to shard at all */
11040 MAX_SIZE = -1;
11041 }
11042
11043 var sheetRunningId = 0;
11044 var master = void 0;
11045
11046 var StyleSheet = function () {
11047
11048 /* a map from ids to tags */
11049
11050 /* deferred rules for a given id */
11051
11052 /* this is used for not reinjecting rules via hasNameForId() */
11053
11054 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11055
11056 /* a list of tags belonging to this StyleSheet */
11057
11058 /* a tag for import rules */
11059
11060 /* current capacity until a new tag must be created */
11061
11062 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11063
11064 function StyleSheet() {
11065 var _this = this;
11066
11067 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11068 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11069 classCallCheck(this, StyleSheet);
11070
11071 this.getImportRuleTag = function () {
11072 var importRuleTag = _this.importRuleTag;
11073
11074 if (importRuleTag !== undefined) {
11075 return importRuleTag;
11076 }
11077
11078 var firstTag = _this.tags[0];
11079 var insertBefore = true;
11080
11081 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11082 };
11083
11084 sheetRunningId += 1;
11085 this.id = sheetRunningId;
11086 this.forceServer = forceServer;
11087 this.target = forceServer ? null : target;
11088 this.tagMap = {};
11089 this.deferred = {};
11090 this.rehydratedNames = {};
11091 this.ignoreRehydratedNames = {};
11092 this.tags = [];
11093 this.capacity = 1;
11094 this.clones = [];
11095 }
11096
11097 /* rehydrate all SSR'd style tags */
11098
11099
11100 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11101 if (!IS_BROWSER || this.forceServer) return this;
11102
11103 var els = [];
11104 var extracted = [];
11105 var isStreamed = false;
11106
11107 /* retrieve all of our SSR style elements from the DOM */
11108 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11109
11110 var nodesSize = nodes.length;
11111
11112 /* abort rehydration if no previous style tags were found */
11113 if (!nodesSize) return this;
11114
11115 for (var i = 0; i < nodesSize; i += 1) {
11116 var el = nodes[i];
11117
11118 /* check if style tag is a streamed tag */
11119 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11120
11121 /* retrieve all component names */
11122 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11123 var elNamesSize = elNames.length;
11124 for (var j = 0, name; j < elNamesSize; j += 1) {
11125 name = elNames[j];
11126 /* add rehydrated name to sheet to avoid re-adding styles */
11127 this.rehydratedNames[name] = true;
11128 }
11129
11130 /* extract all components and their CSS */
11131 extracted.push.apply(extracted, extractComps(el.textContent));
11132
11133 /* store original HTMLStyleElement */
11134 els.push(el);
11135 }
11136
11137 /* abort rehydration if nothing was extracted */
11138 var extractedSize = extracted.length;
11139 if (!extractedSize) return this;
11140
11141 /* create a tag to be used for rehydration */
11142 var tag = this.makeTag(null);
11143
11144 rehydrate(tag, els, extracted);
11145
11146 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11147 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11148 this.tags.push(tag);
11149
11150 /* retrieve all component ids */
11151 for (var _j = 0; _j < extractedSize; _j += 1) {
11152 this.tagMap[extracted[_j].componentId] = tag;
11153 }
11154
11155 return this;
11156 };
11157
11158 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11159 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11160 * StyleSheetManager's context */
11161
11162
11163 /* reset the internal "master" instance */
11164 StyleSheet.reset = function reset() {
11165 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11166
11167 master = new StyleSheet(undefined, forceServer).rehydrate();
11168 };
11169
11170 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11171 * while their own rules do not affect the parent */
11172
11173
11174 StyleSheet.prototype.clone = function clone() {
11175 var sheet = new StyleSheet(this.target, this.forceServer);
11176
11177 /* add to clone array */
11178 this.clones.push(sheet);
11179
11180 /* clone all tags */
11181 sheet.tags = this.tags.map(function (tag) {
11182 var ids = tag.getIds();
11183 var newTag = tag.clone();
11184
11185 /* reconstruct tagMap */
11186 for (var i = 0; i < ids.length; i += 1) {
11187 sheet.tagMap[ids[i]] = newTag;
11188 }
11189
11190 return newTag;
11191 });
11192
11193 /* clone other maps */
11194 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11195 sheet.deferred = _extends({}, this.deferred);
11196
11197 return sheet;
11198 };
11199
11200 /* force StyleSheet to create a new tag on the next injection */
11201
11202
11203 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11204 this.capacity = 1;
11205
11206 this.tags.forEach(function (tag) {
11207 // eslint-disable-next-line no-param-reassign
11208 tag.sealed = true;
11209 });
11210 };
11211
11212 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11213 var lastEl = tag ? tag.styleTag : null;
11214 var insertBefore = false;
11215
11216 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11217 };
11218
11219 /* get a tag for a given componentId, assign the componentId to one, or shard */
11220 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11221 /* simply return a tag, when the componentId was already assigned one */
11222 var prev = this.tagMap[id];
11223 if (prev !== undefined && !prev.sealed) {
11224 return prev;
11225 }
11226
11227 var tag = this.tags[this.tags.length - 1];
11228
11229 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11230 this.capacity -= 1;
11231
11232 if (this.capacity === 0) {
11233 this.capacity = MAX_SIZE;
11234 tag = this.makeTag(tag);
11235 this.tags.push(tag);
11236 }
11237
11238 return this.tagMap[id] = tag;
11239 };
11240
11241 /* mainly for createGlobalStyle to check for its id */
11242
11243
11244 StyleSheet.prototype.hasId = function hasId(id) {
11245 return this.tagMap[id] !== undefined;
11246 };
11247
11248 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11249
11250
11251 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11252 /* exception for rehydrated names which are checked separately */
11253 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11254 return true;
11255 }
11256
11257 var tag = this.tagMap[id];
11258 return tag !== undefined && tag.hasNameForId(id, name);
11259 };
11260
11261 /* registers a componentId and registers it on its tag */
11262
11263
11264 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11265 /* don't inject when the id is already registered */
11266 if (this.tagMap[id] !== undefined) return;
11267
11268 var clones = this.clones;
11269
11270 for (var i = 0; i < clones.length; i += 1) {
11271 clones[i].deferredInject(id, cssRules);
11272 }
11273
11274 this.getTagForId(id).insertMarker(id);
11275 this.deferred[id] = cssRules;
11276 };
11277
11278 /* injects rules for a given id with a name that will need to be cached */
11279
11280
11281 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11282 var clones = this.clones;
11283
11284
11285 for (var i = 0; i < clones.length; i += 1) {
11286 clones[i].inject(id, cssRules, name);
11287 }
11288
11289 var tag = this.getTagForId(id);
11290
11291 /* add deferred rules for component */
11292 if (this.deferred[id] !== undefined) {
11293 // Combine passed cssRules with previously deferred CSS rules
11294 // NOTE: We cannot mutate the deferred array itself as all clones
11295 // do the same (see clones[i].inject)
11296 var rules = this.deferred[id].concat(cssRules);
11297 tag.insertRules(id, rules, name);
11298
11299 this.deferred[id] = undefined;
11300 } else {
11301 tag.insertRules(id, cssRules, name);
11302 }
11303 };
11304
11305 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11306
11307
11308 StyleSheet.prototype.remove = function remove(id) {
11309 var tag = this.tagMap[id];
11310 if (tag === undefined) return;
11311
11312 var clones = this.clones;
11313
11314 for (var i = 0; i < clones.length; i += 1) {
11315 clones[i].remove(id);
11316 }
11317
11318 /* remove all rules from the tag */
11319 tag.removeRules(id);
11320
11321 /* ignore possible rehydrated names */
11322 this.ignoreRehydratedNames[id] = true;
11323
11324 /* delete possible deferred rules */
11325 this.deferred[id] = undefined;
11326 };
11327
11328 StyleSheet.prototype.toHTML = function toHTML() {
11329 return this.tags.map(function (tag) {
11330 return tag.toHTML();
11331 }).join('');
11332 };
11333
11334 StyleSheet.prototype.toReactElements = function toReactElements() {
11335 var id = this.id;
11336
11337
11338 return this.tags.map(function (tag, i) {
11339 var key = 'sc-' + id + '-' + i;
11340 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11341 });
11342 };
11343
11344 createClass(StyleSheet, null, [{
11345 key: 'master',
11346 get: function get$$1() {
11347 return master || (master = new StyleSheet().rehydrate());
11348 }
11349
11350 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11351
11352 }, {
11353 key: 'instance',
11354 get: function get$$1() {
11355 return StyleSheet.master;
11356 }
11357 }]);
11358 return StyleSheet;
11359 }();
11360
11361 //
11362
11363 var Keyframes = function () {
11364 function Keyframes(name, rules) {
11365 var _this = this;
11366
11367 classCallCheck(this, Keyframes);
11368
11369 this.inject = function (styleSheet) {
11370 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11371 styleSheet.inject(_this.id, _this.rules, _this.name);
11372 }
11373 };
11374
11375 this.toString = function () {
11376 throw new StyledComponentsError(12, String(_this.name));
11377 };
11378
11379 this.name = name;
11380 this.rules = rules;
11381
11382 this.id = 'sc-keyframes-' + name;
11383 }
11384
11385 Keyframes.prototype.getName = function getName() {
11386 return this.name;
11387 };
11388
11389 return Keyframes;
11390 }();
11391
11392 //
11393
11394 /**
11395 * inlined version of
11396 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11397 */
11398
11399 var uppercasePattern = /([A-Z])/g;
11400 var msPattern = /^ms-/;
11401
11402 /**
11403 * Hyphenates a camelcased CSS property name, for example:
11404 *
11405 * > hyphenateStyleName('backgroundColor')
11406 * < "background-color"
11407 * > hyphenateStyleName('MozTransition')
11408 * < "-moz-transition"
11409 * > hyphenateStyleName('msTransition')
11410 * < "-ms-transition"
11411 *
11412 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11413 * is converted to `-ms-`.
11414 *
11415 * @param {string} string
11416 * @return {string}
11417 */
11418 function hyphenateStyleName(string) {
11419 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11420 }
11421
11422 //
11423
11424 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11425 function addUnitIfNeeded(name, value) {
11426 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11427 // $FlowFixMe
11428 if (value == null || typeof value === 'boolean' || value === '') {
11429 return '';
11430 }
11431
11432 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11433 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11434 }
11435
11436 return String(value).trim();
11437 }
11438
11439 //
11440
11441 /**
11442 * It's falsish not falsy because 0 is allowed.
11443 */
11444 var isFalsish = function isFalsish(chunk) {
11445 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11446 };
11447
11448 var objToCssArray = function objToCssArray(obj, prevKey) {
11449 var rules = [];
11450 var keys = Object.keys(obj);
11451
11452 keys.forEach(function (key) {
11453 if (!isFalsish(obj[key])) {
11454 if (isPlainObject(obj[key])) {
11455 rules.push.apply(rules, objToCssArray(obj[key], key));
11456
11457 return rules;
11458 } else if (isFunction(obj[key])) {
11459 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11460
11461 return rules;
11462 }
11463 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11464 }
11465 return rules;
11466 });
11467
11468 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11469 };
11470
11471 function flatten(chunk, executionContext, styleSheet) {
11472 if (Array.isArray(chunk)) {
11473 var ruleSet = [];
11474
11475 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11476 result = flatten(chunk[i], executionContext, styleSheet);
11477
11478 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11479 }
11480
11481 return ruleSet;
11482 }
11483
11484 if (isFalsish(chunk)) {
11485 return null;
11486 }
11487
11488 /* Handle other components */
11489 if (isStyledComponent(chunk)) {
11490 return '.' + chunk.styledComponentId;
11491 }
11492
11493 /* Either execute or defer the function */
11494 if (isFunction(chunk)) {
11495 if (isStatelessFunction(chunk) && executionContext) {
11496 var _result = chunk(executionContext);
11497
11498 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11499 // eslint-disable-next-line no-console
11500 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.');
11501 }
11502
11503 return flatten(_result, executionContext, styleSheet);
11504 } else return chunk;
11505 }
11506
11507 if (chunk instanceof Keyframes) {
11508 if (styleSheet) {
11509 chunk.inject(styleSheet);
11510 return chunk.getName();
11511 } else return chunk;
11512 }
11513
11514 /* Handle objects */
11515 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11516 }
11517
11518 //
11519
11520 function css(styles) {
11521 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11522 interpolations[_key - 1] = arguments[_key];
11523 }
11524
11525 if (isFunction(styles) || isPlainObject(styles)) {
11526 // $FlowFixMe
11527 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11528 }
11529
11530 // $FlowFixMe
11531 return flatten(interleave(styles, interpolations));
11532 }
11533
11534 //
11535
11536 function constructWithOptions(componentConstructor, tag) {
11537 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11538
11539 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11540 throw new StyledComponentsError(1, String(tag));
11541 }
11542
11543 /* This is callable directly as a template function */
11544 // $FlowFixMe: Not typed to avoid destructuring arguments
11545 var templateFunction = function templateFunction() {
11546 return componentConstructor(tag, options, css.apply(undefined, arguments));
11547 };
11548
11549 /* If config methods are called, wrap up a new template function and merge options */
11550 templateFunction.withConfig = function (config) {
11551 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11552 };
11553
11554 /* Modify/inject new props at runtime */
11555 templateFunction.attrs = function (attrs) {
11556 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11557 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11558 }));
11559 };
11560
11561 return templateFunction;
11562 }
11563
11564 //
11565 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11566 function murmurhash(c) {
11567 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11568 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;
11569 }
11570 switch (e) {
11571 case 3:
11572 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11573 case 2:
11574 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11575 case 1:
11576 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11577 }
11578 a ^= a >>> 13;
11579 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11580 return (a ^ a >>> 15) >>> 0;
11581 }
11582
11583 //
11584 /* eslint-disable no-bitwise */
11585
11586 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11587 * counterparts */
11588 var charsLength = 52;
11589
11590 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11591 var getAlphabeticChar = function getAlphabeticChar(code) {
11592 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11593 };
11594
11595 /* input a number, usually a hash and convert it to base-52 */
11596 function generateAlphabeticName(code) {
11597 var name = '';
11598 var x = void 0;
11599
11600 /* get a char and divide by alphabet-length */
11601 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11602 name = getAlphabeticChar(x % charsLength) + name;
11603 }
11604
11605 return getAlphabeticChar(x % charsLength) + name;
11606 }
11607
11608 //
11609
11610 function hasFunctionObjectKey(obj) {
11611 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11612 for (var key in obj) {
11613 if (isFunction(obj[key])) {
11614 return true;
11615 }
11616 }
11617
11618 return false;
11619 }
11620
11621 function isStaticRules(rules, attrs) {
11622 for (var i = 0; i < rules.length; i += 1) {
11623 var rule = rules[i];
11624
11625 // recursive case
11626 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11627 return false;
11628 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11629 // functions are allowed to be static if they're just being
11630 // used to get the classname of a nested styled component
11631 return false;
11632 }
11633 }
11634
11635 if (attrs.some(function (x) {
11636 return isFunction(x) || hasFunctionObjectKey(x);
11637 })) return false;
11638
11639 return true;
11640 }
11641
11642 //
11643
11644 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11645 var hasher = function hasher(str) {
11646 return generateAlphabeticName(murmurhash(str));
11647 };
11648
11649 /*
11650 ComponentStyle is all the CSS-specific stuff, not
11651 the React-specific stuff.
11652 */
11653
11654 var ComponentStyle = function () {
11655 function ComponentStyle(rules, attrs, componentId) {
11656 classCallCheck(this, ComponentStyle);
11657
11658 this.rules = rules;
11659 this.isStatic = false && 0;
11660 this.componentId = componentId;
11661
11662 if (!StyleSheet.master.hasId(componentId)) {
11663 StyleSheet.master.deferredInject(componentId, []);
11664 }
11665 }
11666
11667 /*
11668 * Flattens a rule set into valid CSS
11669 * Hashes it, wraps the whole chunk in a .hash1234 {}
11670 * Returns the hash to be injected on render()
11671 * */
11672
11673
11674 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11675 var isStatic = this.isStatic,
11676 componentId = this.componentId,
11677 lastClassName = this.lastClassName;
11678
11679 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11680 return lastClassName;
11681 }
11682
11683 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11684 var name = hasher(this.componentId + flatCSS.join(''));
11685 if (!styleSheet.hasNameForId(componentId, name)) {
11686 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11687 }
11688
11689 this.lastClassName = name;
11690 return name;
11691 };
11692
11693 ComponentStyle.generateName = function generateName(str) {
11694 return hasher(str);
11695 };
11696
11697 return ComponentStyle;
11698 }();
11699
11700 //
11701
11702 var LIMIT = 200;
11703
11704 var createWarnTooManyClasses = (function (displayName) {
11705 var generatedClasses = {};
11706 var warningSeen = false;
11707
11708 return function (className) {
11709 if (!warningSeen) {
11710 generatedClasses[className] = true;
11711 if (Object.keys(generatedClasses).length >= LIMIT) {
11712 // Unable to find latestRule in test environment.
11713 /* eslint-disable no-console, prefer-template */
11714 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 />');
11715 warningSeen = true;
11716 generatedClasses = {};
11717 }
11718 }
11719 };
11720 });
11721
11722 //
11723
11724 var determineTheme = (function (props, fallbackTheme) {
11725 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11726
11727 // Props should take precedence over ThemeProvider, which should take precedence over
11728 // defaultProps, but React automatically puts defaultProps on props.
11729
11730 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11731 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11732 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11733 /* eslint-enable */
11734
11735 return theme;
11736 });
11737
11738 //
11739 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11740 var dashesAtEnds = /(^-|-$)/g;
11741
11742 /**
11743 * TODO: Explore using CSS.escape when it becomes more available
11744 * in evergreen browsers.
11745 */
11746 function escape(str) {
11747 return str
11748 // Replace all possible CSS selectors
11749 .replace(escapeRegex, '-')
11750
11751 // Remove extraneous hyphens at the start and end
11752 .replace(dashesAtEnds, '');
11753 }
11754
11755 //
11756
11757 function isTag(target) {
11758 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11759 }
11760
11761 //
11762
11763 function generateDisplayName(target) {
11764 // $FlowFixMe
11765 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11766 }
11767
11768 var _TYPE_STATICS;
11769
11770 var REACT_STATICS = {
11771 childContextTypes: true,
11772 contextTypes: true,
11773 defaultProps: true,
11774 displayName: true,
11775 getDerivedStateFromProps: true,
11776 propTypes: true,
11777 type: true
11778 };
11779
11780 var KNOWN_STATICS = {
11781 name: true,
11782 length: true,
11783 prototype: true,
11784 caller: true,
11785 callee: true,
11786 arguments: true,
11787 arity: true
11788 };
11789
11790 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11791 $$typeof: true,
11792 render: true
11793 }, _TYPE_STATICS);
11794
11795 var defineProperty$1 = Object.defineProperty,
11796 getOwnPropertyNames = Object.getOwnPropertyNames,
11797 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11798 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11799 return [];
11800 } : _Object$getOwnPropert,
11801 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11802 getPrototypeOf = Object.getPrototypeOf,
11803 objectPrototype = Object.prototype;
11804 var arrayPrototype = Array.prototype;
11805
11806
11807 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11808 if (typeof sourceComponent !== 'string') {
11809 // don't hoist over string (html) components
11810
11811 var inheritedComponent = getPrototypeOf(sourceComponent);
11812
11813 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11814 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11815 }
11816
11817 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11818 // $FlowFixMe
11819 getOwnPropertySymbols(sourceComponent));
11820
11821 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11822
11823 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11824
11825 var i = keys.length;
11826 var descriptor = void 0;
11827 var key = void 0;
11828
11829 // eslint-disable-next-line no-plusplus
11830 while (i--) {
11831 key = keys[i];
11832
11833 if (
11834 // $FlowFixMe
11835 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11836 // $FlowFixMe
11837 !(targetStatics && targetStatics[key])) {
11838 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11839
11840 if (descriptor) {
11841 try {
11842 // Avoid failures from read-only properties
11843 defineProperty$1(targetComponent, key, descriptor);
11844 } catch (e) {
11845 /* fail silently */
11846 }
11847 }
11848 }
11849 }
11850
11851 return targetComponent;
11852 }
11853
11854 return targetComponent;
11855 }
11856
11857 //
11858 function isDerivedReactComponent(fn) {
11859 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11860 }
11861
11862 //
11863 // Helper to call a given function, only once
11864 var once = (function (cb) {
11865 var called = false;
11866
11867 return function () {
11868 if (!called) {
11869 called = true;
11870 cb.apply(undefined, arguments);
11871 }
11872 };
11873 });
11874
11875 //
11876
11877 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11878
11879 var ThemeConsumer = ThemeContext.Consumer;
11880
11881 /**
11882 * Provide a theme to an entire react component tree via context
11883 */
11884
11885 var ThemeProvider = function (_Component) {
11886 inherits(ThemeProvider, _Component);
11887
11888 function ThemeProvider(props) {
11889 classCallCheck(this, ThemeProvider);
11890
11891 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11892
11893 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11894 _this.renderInner = _this.renderInner.bind(_this);
11895 return _this;
11896 }
11897
11898 ThemeProvider.prototype.render = function render() {
11899 if (!this.props.children) return null;
11900
11901 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11902 ThemeContext.Consumer,
11903 null,
11904 this.renderInner
11905 );
11906 };
11907
11908 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11909 var context = this.getContext(this.props.theme, outerTheme);
11910
11911 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11912 ThemeContext.Provider,
11913 { value: context },
11914 this.props.children
11915 );
11916 };
11917
11918 /**
11919 * Get the theme from the props, supporting both (outerTheme) => {}
11920 * as well as object notation
11921 */
11922
11923
11924 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11925 if (isFunction(theme)) {
11926 var mergedTheme = theme(outerTheme);
11927
11928 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11929 throw new StyledComponentsError(7);
11930 }
11931
11932 return mergedTheme;
11933 }
11934
11935 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11936 throw new StyledComponentsError(8);
11937 }
11938
11939 return _extends({}, outerTheme, theme);
11940 };
11941
11942 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11943 return this.getTheme(theme, outerTheme);
11944 };
11945
11946 return ThemeProvider;
11947 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11948
11949 //
11950
11951 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11952
11953 var ServerStyleSheet = function () {
11954 function ServerStyleSheet() {
11955 classCallCheck(this, ServerStyleSheet);
11956
11957 /* The master sheet might be reset, so keep a reference here */
11958 this.masterSheet = StyleSheet.master;
11959 this.instance = this.masterSheet.clone();
11960 this.sealed = false;
11961 }
11962
11963 /**
11964 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11965 * StyleSheet singleton.
11966 */
11967
11968
11969 ServerStyleSheet.prototype.seal = function seal() {
11970 if (!this.sealed) {
11971 /* Remove sealed StyleSheets from the master sheet */
11972 var index = this.masterSheet.clones.indexOf(this.instance);
11973 this.masterSheet.clones.splice(index, 1);
11974 this.sealed = true;
11975 }
11976 };
11977
11978 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11979 if (this.sealed) {
11980 throw new StyledComponentsError(2);
11981 }
11982
11983 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11984 StyleSheetManager,
11985 { sheet: this.instance },
11986 children
11987 );
11988 };
11989
11990 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11991 this.seal();
11992 return this.instance.toHTML();
11993 };
11994
11995 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11996 this.seal();
11997 return this.instance.toReactElements();
11998 };
11999
12000 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
12001 var _this = this;
12002
12003 {
12004 throw new StyledComponentsError(3);
12005 }
12006
12007 /* the tag index keeps track of which tags have already been emitted */
12008 var instance = this.instance;
12009
12010 var instanceTagIndex = 0;
12011
12012 var streamAttr = SC_STREAM_ATTR + '="true"';
12013
12014 var transformer = new stream.Transform({
12015 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12016 var tags = instance.tags;
12017
12018 var html = '';
12019
12020 /* retrieve html for each new style tag */
12021 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12022 var tag = tags[instanceTagIndex];
12023 html += tag.toHTML(streamAttr);
12024 }
12025
12026 /* force our StyleSheets to emit entirely new tags */
12027 instance.sealAllTags();
12028
12029 var renderedHtml = chunk.toString();
12030
12031 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12032 if (CLOSING_TAG_R.test(renderedHtml)) {
12033 var endOfClosingTag = renderedHtml.indexOf('>');
12034
12035 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12036 } else this.push(html + renderedHtml);
12037
12038 callback();
12039 }
12040 });
12041
12042 readableStream.on('end', function () {
12043 return _this.seal();
12044 });
12045
12046 readableStream.on('error', function (err) {
12047 _this.seal();
12048
12049 // forward the error to the transform stream
12050 transformer.emit('error', err);
12051 });
12052
12053 return readableStream.pipe(transformer);
12054 };
12055
12056 return ServerStyleSheet;
12057 }();
12058
12059 //
12060
12061 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12062 var StyleSheetConsumer = StyleSheetContext.Consumer;
12063
12064 var StyleSheetManager = function (_Component) {
12065 inherits(StyleSheetManager, _Component);
12066
12067 function StyleSheetManager(props) {
12068 classCallCheck(this, StyleSheetManager);
12069
12070 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12071
12072 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12073 return _this;
12074 }
12075
12076 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12077 if (sheet) {
12078 return sheet;
12079 } else if (target) {
12080 return new StyleSheet(target);
12081 } else {
12082 throw new StyledComponentsError(4);
12083 }
12084 };
12085
12086 StyleSheetManager.prototype.render = function render() {
12087 var _props = this.props,
12088 children = _props.children,
12089 sheet = _props.sheet,
12090 target = _props.target;
12091
12092
12093 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12094 StyleSheetContext.Provider,
12095 { value: this.getContext(sheet, target) },
12096 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12097 );
12098 };
12099
12100 return StyleSheetManager;
12101 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12102 true ? StyleSheetManager.propTypes = {
12103 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)]),
12104
12105 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12106 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12107 })
12108 } : 0;
12109
12110 //
12111
12112 var identifiers = {};
12113
12114 /* We depend on components having unique IDs */
12115 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12116 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12117
12118 /**
12119 * This ensures uniqueness if two components happen to share
12120 * the same displayName.
12121 */
12122 var nr = (identifiers[displayName] || 0) + 1;
12123 identifiers[displayName] = nr;
12124
12125 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12126
12127 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12128 }
12129
12130 // $FlowFixMe
12131
12132 var StyledComponent = function (_Component) {
12133 inherits(StyledComponent, _Component);
12134
12135 function StyledComponent() {
12136 classCallCheck(this, StyledComponent);
12137
12138 var _this = possibleConstructorReturn(this, _Component.call(this));
12139
12140 _this.attrs = {};
12141
12142 _this.renderOuter = _this.renderOuter.bind(_this);
12143 _this.renderInner = _this.renderInner.bind(_this);
12144
12145 if (true) {
12146 _this.warnInnerRef = once(function (displayName) {
12147 return (
12148 // eslint-disable-next-line no-console
12149 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 + '".')
12150 );
12151 });
12152
12153 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12154 return (
12155 // eslint-disable-next-line no-console
12156 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)
12157 );
12158 });
12159
12160 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12161 return (
12162 // eslint-disable-next-line no-console
12163 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 }'))
12164 );
12165 });
12166 }
12167 return _this;
12168 }
12169
12170 StyledComponent.prototype.render = function render() {
12171 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12172 StyleSheetConsumer,
12173 null,
12174 this.renderOuter
12175 );
12176 };
12177
12178 StyledComponent.prototype.renderOuter = function renderOuter() {
12179 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12180
12181 this.styleSheet = styleSheet;
12182
12183 // No need to subscribe a static component to theme changes, it won't change anything
12184 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12185
12186 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12187 ThemeConsumer,
12188 null,
12189 this.renderInner
12190 );
12191 };
12192
12193 StyledComponent.prototype.renderInner = function renderInner(theme) {
12194 var _props$forwardedCompo = this.props.forwardedComponent,
12195 componentStyle = _props$forwardedCompo.componentStyle,
12196 defaultProps = _props$forwardedCompo.defaultProps,
12197 displayName = _props$forwardedCompo.displayName,
12198 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12199 styledComponentId = _props$forwardedCompo.styledComponentId,
12200 target = _props$forwardedCompo.target;
12201
12202
12203 var generatedClassName = void 0;
12204 if (componentStyle.isStatic) {
12205 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12206 } else {
12207 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12208 }
12209
12210 var elementToBeCreated = this.props.as || this.attrs.as || target;
12211 var isTargetTag = isTag(elementToBeCreated);
12212
12213 var propsForElement = {};
12214 var computedProps = _extends({}, this.props, this.attrs);
12215
12216 var key = void 0;
12217 // eslint-disable-next-line guard-for-in
12218 for (key in computedProps) {
12219 if ( true && key === 'innerRef' && isTargetTag) {
12220 this.warnInnerRef(displayName);
12221 }
12222
12223 if (key === 'forwardedComponent' || key === 'as') {
12224 continue;
12225 } 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)) {
12226 // Don't pass through non HTML tags through to HTML elements
12227 propsForElement[key] = computedProps[key];
12228 }
12229 }
12230
12231 if (this.props.style && this.attrs.style) {
12232 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12233 }
12234
12235 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12236
12237 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12238 };
12239
12240 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12241 var _this2 = this;
12242
12243 var context = _extends({}, props, { theme: theme });
12244
12245 if (!attrs.length) return context;
12246
12247 this.attrs = {};
12248
12249 attrs.forEach(function (attrDef) {
12250 var resolvedAttrDef = attrDef;
12251 var attrDefWasFn = false;
12252 var attr = void 0;
12253 var key = void 0;
12254
12255 if (isFunction(resolvedAttrDef)) {
12256 // $FlowFixMe
12257 resolvedAttrDef = resolvedAttrDef(context);
12258 attrDefWasFn = true;
12259 }
12260
12261 /* eslint-disable guard-for-in */
12262 // $FlowFixMe
12263 for (key in resolvedAttrDef) {
12264 attr = resolvedAttrDef[key];
12265
12266 if (!attrDefWasFn) {
12267 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12268 if (true) {
12269 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12270 }
12271
12272 attr = attr(context);
12273
12274 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12275 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12276 }
12277 }
12278 }
12279
12280 _this2.attrs[key] = attr;
12281 context[key] = attr;
12282 }
12283 /* eslint-enable */
12284 });
12285
12286 return context;
12287 };
12288
12289 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12290 var _props$forwardedCompo2 = props.forwardedComponent,
12291 attrs = _props$forwardedCompo2.attrs,
12292 componentStyle = _props$forwardedCompo2.componentStyle,
12293 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12294
12295 // statically styled-components don't need to build an execution context object,
12296 // and shouldn't be increasing the number of class names
12297
12298 if (componentStyle.isStatic && !attrs.length) {
12299 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12300 }
12301
12302 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12303
12304 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12305
12306 return className;
12307 };
12308
12309 return StyledComponent;
12310 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12311
12312 function createStyledComponent(target, options, rules) {
12313 var isTargetStyledComp = isStyledComponent(target);
12314 var isClass = !isTag(target);
12315
12316 var _options$displayName = options.displayName,
12317 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12318 _options$componentId = options.componentId,
12319 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12320 _options$ParentCompon = options.ParentComponent,
12321 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12322 _options$attrs = options.attrs,
12323 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12324
12325
12326 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12327
12328 // fold the underlying StyledComponent attrs up (implicit extend)
12329 var finalAttrs =
12330 // $FlowFixMe
12331 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12332
12333 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12334 // $FlowFixMe
12335 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12336
12337 /**
12338 * forwardRef creates a new interim component, which we'll take advantage of
12339 * instead of extending ParentComponent to create _another_ interim class
12340 */
12341 var WrappedStyledComponent = void 0;
12342 var forwardRef = function forwardRef(props, ref) {
12343 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12344 };
12345 forwardRef.displayName = displayName;
12346 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12347 WrappedStyledComponent.displayName = displayName;
12348
12349 // $FlowFixMe
12350 WrappedStyledComponent.attrs = finalAttrs;
12351 // $FlowFixMe
12352 WrappedStyledComponent.componentStyle = componentStyle;
12353
12354 // $FlowFixMe
12355 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12356 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12357
12358 // $FlowFixMe
12359 WrappedStyledComponent.styledComponentId = styledComponentId;
12360
12361 // fold the underlying StyledComponent target up since we folded the styles
12362 // $FlowFixMe
12363 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12364
12365 // $FlowFixMe
12366 WrappedStyledComponent.withComponent = function withComponent(tag) {
12367 var previousComponentId = options.componentId,
12368 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12369
12370
12371 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12372
12373 var newOptions = _extends({}, optionsToCopy, {
12374 attrs: finalAttrs,
12375 componentId: newComponentId,
12376 ParentComponent: ParentComponent
12377 });
12378
12379 return createStyledComponent(tag, newOptions, rules);
12380 };
12381
12382 // $FlowFixMe
12383 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12384 get: function get$$1() {
12385 return this._foldedDefaultProps;
12386 },
12387 set: function set$$1(obj) {
12388 // $FlowFixMe
12389 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12390 }
12391 });
12392
12393 if (true) {
12394 // $FlowFixMe
12395 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12396 }
12397
12398 // $FlowFixMe
12399 WrappedStyledComponent.toString = function () {
12400 return '.' + WrappedStyledComponent.styledComponentId;
12401 };
12402
12403 if (isClass) {
12404 hoistNonReactStatics(WrappedStyledComponent, target, {
12405 // all SC-specific things should not be hoisted
12406 attrs: true,
12407 componentStyle: true,
12408 displayName: true,
12409 foldedComponentIds: true,
12410 styledComponentId: true,
12411 target: true,
12412 withComponent: true
12413 });
12414 }
12415
12416 return WrappedStyledComponent;
12417 }
12418
12419 //
12420 // Thanks to ReactDOMFactories for this handy list!
12421
12422 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',
12423
12424 // SVG
12425 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12426
12427 //
12428
12429 var styled = function styled(tag) {
12430 return constructWithOptions(createStyledComponent, tag);
12431 };
12432
12433 // Shorthands for all valid HTML Elements
12434 domElements.forEach(function (domElement) {
12435 styled[domElement] = styled(domElement);
12436 });
12437
12438 //
12439
12440 var GlobalStyle = function () {
12441 function GlobalStyle(rules, componentId) {
12442 classCallCheck(this, GlobalStyle);
12443
12444 this.rules = rules;
12445 this.componentId = componentId;
12446 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12447
12448 if (!StyleSheet.master.hasId(componentId)) {
12449 StyleSheet.master.deferredInject(componentId, []);
12450 }
12451 }
12452
12453 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12454 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12455 var css = stringifyRules(flatCSS, '');
12456
12457 styleSheet.inject(this.componentId, css);
12458 };
12459
12460 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12461 var componentId = this.componentId;
12462
12463 if (styleSheet.hasId(componentId)) {
12464 styleSheet.remove(componentId);
12465 }
12466 };
12467
12468 // TODO: overwrite in-place instead of remove+create?
12469
12470
12471 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12472 this.removeStyles(styleSheet);
12473 this.createStyles(executionContext, styleSheet);
12474 };
12475
12476 return GlobalStyle;
12477 }();
12478
12479 //
12480
12481 // place our cache into shared context so it'll persist between HMRs
12482 if (IS_BROWSER) {
12483 window.scCGSHMRCache = {};
12484 }
12485
12486 function createGlobalStyle(strings) {
12487 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12488 interpolations[_key - 1] = arguments[_key];
12489 }
12490
12491 var rules = css.apply(undefined, [strings].concat(interpolations));
12492 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12493 var style = new GlobalStyle(rules, id);
12494
12495 var GlobalStyleComponent = function (_React$Component) {
12496 inherits(GlobalStyleComponent, _React$Component);
12497
12498 function GlobalStyleComponent(props) {
12499 classCallCheck(this, GlobalStyleComponent);
12500
12501 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12502
12503 var _this$constructor = _this.constructor,
12504 globalStyle = _this$constructor.globalStyle,
12505 styledComponentId = _this$constructor.styledComponentId;
12506
12507
12508 if (IS_BROWSER) {
12509 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12510 }
12511
12512 /**
12513 * This fixes HMR compatibility. Don't ask me why, but this combination of
12514 * caching the closure variables via statics and then persisting the statics in
12515 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12516 */
12517 _this.state = {
12518 globalStyle: globalStyle,
12519 styledComponentId: styledComponentId
12520 };
12521 return _this;
12522 }
12523
12524 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12525 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12526 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12527 }
12528 /**
12529 * Depending on the order "render" is called this can cause the styles to be lost
12530 * until the next render pass of the remaining instance, which may
12531 * not be immediate.
12532 */
12533 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12534 this.state.globalStyle.removeStyles(this.styleSheet);
12535 }
12536 };
12537
12538 GlobalStyleComponent.prototype.render = function render() {
12539 var _this2 = this;
12540
12541 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12542 // eslint-disable-next-line no-console
12543 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12544 }
12545
12546 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12547 StyleSheetConsumer,
12548 null,
12549 function (styleSheet) {
12550 _this2.styleSheet = styleSheet || StyleSheet.master;
12551
12552 var globalStyle = _this2.state.globalStyle;
12553
12554
12555 if (globalStyle.isStatic) {
12556 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12557
12558 return null;
12559 } else {
12560 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12561 ThemeConsumer,
12562 null,
12563 function (theme) {
12564 // $FlowFixMe
12565 var defaultProps = _this2.constructor.defaultProps;
12566
12567
12568 var context = _extends({}, _this2.props);
12569
12570 if (typeof theme !== 'undefined') {
12571 context.theme = determineTheme(_this2.props, theme, defaultProps);
12572 }
12573
12574 globalStyle.renderStyles(context, _this2.styleSheet);
12575
12576 return null;
12577 }
12578 );
12579 }
12580 }
12581 );
12582 };
12583
12584 return GlobalStyleComponent;
12585 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12586
12587 GlobalStyleComponent.globalStyle = style;
12588 GlobalStyleComponent.styledComponentId = id;
12589
12590
12591 return GlobalStyleComponent;
12592 }
12593
12594 //
12595
12596 var replaceWhitespace = function replaceWhitespace(str) {
12597 return str.replace(/\s|\\n/g, '');
12598 };
12599
12600 function keyframes(strings) {
12601 /* Warning if you've used keyframes on React Native */
12602 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12603 // eslint-disable-next-line no-console
12604 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12605 }
12606
12607 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12608 interpolations[_key - 1] = arguments[_key];
12609 }
12610
12611 var rules = css.apply(undefined, [strings].concat(interpolations));
12612
12613 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12614
12615 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12616 }
12617
12618 //
12619
12620 var withTheme = (function (Component$$1) {
12621 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12622 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12623 ThemeConsumer,
12624 null,
12625 function (theme) {
12626 // $FlowFixMe
12627 var defaultProps = Component$$1.defaultProps;
12628
12629 var themeProp = determineTheme(props, theme, defaultProps);
12630
12631 if ( true && themeProp === undefined) {
12632 // eslint-disable-next-line no-console
12633 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) + '"');
12634 }
12635
12636 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12637 }
12638 );
12639 });
12640
12641 hoistNonReactStatics(WithTheme, Component$$1);
12642
12643 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12644
12645 return WithTheme;
12646 });
12647
12648 //
12649
12650 /* eslint-disable */
12651 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12652 StyleSheet: StyleSheet
12653 };
12654
12655 //
12656
12657 /* Warning if you've imported this file on React Native */
12658 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12659 // eslint-disable-next-line no-console
12660 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');
12661 }
12662
12663 /* Warning if there are several instances of styled-components */
12664 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12665 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12666
12667 if (window['__styled-components-init__'] === 1) {
12668 // eslint-disable-next-line no-console
12669 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.');
12670 }
12671
12672 window['__styled-components-init__'] += 1;
12673 }
12674
12675 //
12676
12677 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12678
12679 //# sourceMappingURL=styled-components.browser.esm.js.map
12680
12681
12682 /***/ }),
12683
12684 /***/ "./node_modules/stylis-rule-sheet/index.js":
12685 /*!*************************************************!*\
12686 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12687 \*************************************************/
12688 /***/ ((module) => {
12689
12690 (function (factory) {
12691 true ? (module['exports'] = factory()) :
12692 0
12693 }(function () {
12694
12695 'use strict'
12696
12697 return function (insertRule) {
12698 var delimiter = '/*|*/'
12699 var needle = delimiter+'}'
12700
12701 function toSheet (block) {
12702 if (block)
12703 try {
12704 insertRule(block + '}')
12705 } catch (e) {}
12706 }
12707
12708 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12709 switch (context) {
12710 // property
12711 case 1:
12712 // @import
12713 if (depth === 0 && content.charCodeAt(0) === 64)
12714 return insertRule(content+';'), ''
12715 break
12716 // selector
12717 case 2:
12718 if (ns === 0)
12719 return content + delimiter
12720 break
12721 // at-rule
12722 case 3:
12723 switch (ns) {
12724 // @font-face, @page
12725 case 102:
12726 case 112:
12727 return insertRule(selectors[0]+content), ''
12728 default:
12729 return content + (at === 0 ? delimiter : '')
12730 }
12731 case -2:
12732 content.split(needle).forEach(toSheet)
12733 }
12734 }
12735 }
12736 }))
12737
12738
12739 /***/ }),
12740
12741 /***/ "./node_modules/stylis/stylis.min.js":
12742 /*!*******************************************!*\
12743 !*** ./node_modules/stylis/stylis.min.js ***!
12744 \*******************************************/
12745 /***/ ((module) => {
12746
12747 !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});
12748 //# sourceMappingURL=stylis.min.js.map
12749
12750 /***/ }),
12751
12752 /***/ "react":
12753 /*!************************!*\
12754 !*** external "React" ***!
12755 \************************/
12756 /***/ ((module) => {
12757
12758 "use strict";
12759 module.exports = window["React"];
12760
12761 /***/ }),
12762
12763 /***/ "jquery":
12764 /*!*************************!*\
12765 !*** external "jQuery" ***!
12766 \*************************/
12767 /***/ ((module) => {
12768
12769 "use strict";
12770 module.exports = window["jQuery"];
12771
12772 /***/ }),
12773
12774 /***/ "@wordpress/blocks":
12775 /*!********************************!*\
12776 !*** external ["wp","blocks"] ***!
12777 \********************************/
12778 /***/ ((module) => {
12779
12780 "use strict";
12781 module.exports = window["wp"]["blocks"];
12782
12783 /***/ }),
12784
12785 /***/ "@wordpress/components":
12786 /*!************************************!*\
12787 !*** external ["wp","components"] ***!
12788 \************************************/
12789 /***/ ((module) => {
12790
12791 "use strict";
12792 module.exports = window["wp"]["components"];
12793
12794 /***/ }),
12795
12796 /***/ "@wordpress/data":
12797 /*!******************************!*\
12798 !*** external ["wp","data"] ***!
12799 \******************************/
12800 /***/ ((module) => {
12801
12802 "use strict";
12803 module.exports = window["wp"]["data"];
12804
12805 /***/ }),
12806
12807 /***/ "@wordpress/edit-post":
12808 /*!**********************************!*\
12809 !*** external ["wp","editPost"] ***!
12810 \**********************************/
12811 /***/ ((module) => {
12812
12813 "use strict";
12814 module.exports = window["wp"]["editPost"];
12815
12816 /***/ }),
12817
12818 /***/ "@wordpress/element":
12819 /*!*********************************!*\
12820 !*** external ["wp","element"] ***!
12821 \*********************************/
12822 /***/ ((module) => {
12823
12824 "use strict";
12825 module.exports = window["wp"]["element"];
12826
12827 /***/ }),
12828
12829 /***/ "@wordpress/i18n":
12830 /*!******************************!*\
12831 !*** external ["wp","i18n"] ***!
12832 \******************************/
12833 /***/ ((module) => {
12834
12835 "use strict";
12836 module.exports = window["wp"]["i18n"];
12837
12838 /***/ }),
12839
12840 /***/ "@wordpress/plugins":
12841 /*!*********************************!*\
12842 !*** external ["wp","plugins"] ***!
12843 \*********************************/
12844 /***/ ((module) => {
12845
12846 "use strict";
12847 module.exports = window["wp"]["plugins"];
12848
12849 /***/ }),
12850
12851 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12852 /*!****************************************************!*\
12853 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12854 \****************************************************/
12855 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12856
12857 "use strict";
12858 __webpack_require__.r(__webpack_exports__);
12859 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12860 /* harmony export */ "styled": () => (/* binding */ styled_default)
12861 /* harmony export */ });
12862 /* 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");
12863 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12864 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12865 // src/styled.ts
12866
12867
12868
12869 var isCapital = (ch) => ch.toUpperCase() === ch;
12870 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12871 var omit = (obj, keys) => {
12872 const res = {};
12873 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12874 res[key] = obj[key];
12875 });
12876 return res;
12877 };
12878 function filterProps(asIs, props, omitKeys) {
12879 const filteredProps = omit(props, omitKeys);
12880 if (!asIs) {
12881 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"];
12882 Object.keys(filteredProps).forEach((key) => {
12883 if (!interopValidAttr.default(key)) {
12884 delete filteredProps[key];
12885 }
12886 });
12887 }
12888 return filteredProps;
12889 }
12890 var warnIfInvalid = (value, componentName) => {
12891 if (true) {
12892 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12893 return;
12894 }
12895 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12896 console.warn(
12897 `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.`
12898 );
12899 }
12900 };
12901 function styled(tag) {
12902 return (options) => {
12903 if (true) {
12904 if (Array.isArray(options)) {
12905 throw new Error(
12906 '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'
12907 );
12908 }
12909 }
12910 const render = (props, ref) => {
12911 const { as: component = tag, class: className } = props;
12912 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12913 const filteredProps = filterProps(shouldKeepProps, props, [
12914 "as",
12915 "class"
12916 ]);
12917 filteredProps.ref = ref;
12918 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);
12919 const { vars } = options;
12920 if (vars) {
12921 const style = {};
12922 for (const name in vars) {
12923 const variable = vars[name];
12924 const result = variable[0];
12925 const unit = variable[1] || "";
12926 const value = typeof result === "function" ? result(props) : result;
12927 warnIfInvalid(value, options.name);
12928 style[`--${name}`] = `${value}${unit}`;
12929 }
12930 const ownStyle = filteredProps.style || {};
12931 const keys = Object.keys(ownStyle);
12932 if (keys.length > 0) {
12933 keys.forEach((key) => {
12934 style[key] = ownStyle[key];
12935 });
12936 }
12937 filteredProps.style = style;
12938 }
12939 if (tag.__linaria && tag !== component) {
12940 filteredProps.as = component;
12941 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12942 }
12943 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12944 };
12945 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12946 const rest = omit(props, ["innerRef"]);
12947 return render(rest, props.innerRef);
12948 };
12949 Result.displayName = options.name;
12950 Result.__linaria = {
12951 className: options.class,
12952 extends: tag
12953 };
12954 return Result;
12955 };
12956 }
12957 var styled_default = true ? new Proxy(styled, {
12958 get(o, prop) {
12959 return o(prop);
12960 }
12961 }) : 0;
12962
12963 //# sourceMappingURL=index.mjs.map
12964
12965 /***/ }),
12966
12967 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12968 /*!*******************************************************************************!*\
12969 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12970 \*******************************************************************************/
12971 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12972
12973 "use strict";
12974 __webpack_require__.r(__webpack_exports__);
12975 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12976 /* harmony export */ "css": () => (/* binding */ css_default),
12977 /* harmony export */ "cx": () => (/* binding */ cx_default)
12978 /* harmony export */ });
12979 // src/css.ts
12980 var css = () => {
12981 throw new Error(
12982 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12983 );
12984 };
12985 var css_default = css;
12986
12987 // src/cx.ts
12988 var cx = function cx2() {
12989 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12990 const atomicClasses = {};
12991 const nonAtomicClasses = [];
12992 presentClassNames.forEach((arg) => {
12993 const individualClassNames = arg ? arg.split(" ") : [];
12994 individualClassNames.forEach((className) => {
12995 if (className.startsWith("atm_")) {
12996 const [, keyHash] = className.split("_");
12997 atomicClasses[keyHash] = className;
12998 } else {
12999 nonAtomicClasses.push(className);
13000 }
13001 });
13002 });
13003 const result = [];
13004 for (const keyHash in atomicClasses) {
13005 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13006 result.push(atomicClasses[keyHash]);
13007 }
13008 }
13009 result.push(...nonAtomicClasses);
13010 return result.join(" ");
13011 };
13012 var cx_default = cx;
13013
13014 //# sourceMappingURL=index.mjs.map
13015
13016 /***/ })
13017
13018 /******/ });
13019 /************************************************************************/
13020 /******/ // The module cache
13021 /******/ var __webpack_module_cache__ = {};
13022 /******/
13023 /******/ // The require function
13024 /******/ function __webpack_require__(moduleId) {
13025 /******/ // Check if module is in cache
13026 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13027 /******/ if (cachedModule !== undefined) {
13028 /******/ return cachedModule.exports;
13029 /******/ }
13030 /******/ // Create a new module (and put it into the cache)
13031 /******/ var module = __webpack_module_cache__[moduleId] = {
13032 /******/ // no module.id needed
13033 /******/ // no module.loaded needed
13034 /******/ exports: {}
13035 /******/ };
13036 /******/
13037 /******/ // Execute the module function
13038 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13039 /******/
13040 /******/ // Return the exports of the module
13041 /******/ return module.exports;
13042 /******/ }
13043 /******/
13044 /************************************************************************/
13045 /******/ /* webpack/runtime/compat get default export */
13046 /******/ (() => {
13047 /******/ // getDefaultExport function for compatibility with non-harmony modules
13048 /******/ __webpack_require__.n = (module) => {
13049 /******/ var getter = module && module.__esModule ?
13050 /******/ () => (module['default']) :
13051 /******/ () => (module);
13052 /******/ __webpack_require__.d(getter, { a: getter });
13053 /******/ return getter;
13054 /******/ };
13055 /******/ })();
13056 /******/
13057 /******/ /* webpack/runtime/define property getters */
13058 /******/ (() => {
13059 /******/ // define getter functions for harmony exports
13060 /******/ __webpack_require__.d = (exports, definition) => {
13061 /******/ for(var key in definition) {
13062 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13063 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13064 /******/ }
13065 /******/ }
13066 /******/ };
13067 /******/ })();
13068 /******/
13069 /******/ /* webpack/runtime/global */
13070 /******/ (() => {
13071 /******/ __webpack_require__.g = (function() {
13072 /******/ if (typeof globalThis === 'object') return globalThis;
13073 /******/ try {
13074 /******/ return this || new Function('return this')();
13075 /******/ } catch (e) {
13076 /******/ if (typeof window === 'object') return window;
13077 /******/ }
13078 /******/ })();
13079 /******/ })();
13080 /******/
13081 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13082 /******/ (() => {
13083 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13084 /******/ })();
13085 /******/
13086 /******/ /* webpack/runtime/make namespace object */
13087 /******/ (() => {
13088 /******/ // define __esModule on exports
13089 /******/ __webpack_require__.r = (exports) => {
13090 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13091 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13092 /******/ }
13093 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13094 /******/ };
13095 /******/ })();
13096 /******/
13097 /******/ /* webpack/runtime/nonce */
13098 /******/ (() => {
13099 /******/ __webpack_require__.nc = undefined;
13100 /******/ })();
13101 /******/
13102 /************************************************************************/
13103 var __webpack_exports__ = {};
13104 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13105 (() => {
13106 "use strict";
13107 /*!**************************************!*\
13108 !*** ./scripts/entries/gutenberg.ts ***!
13109 \**************************************/
13110 __webpack_require__.r(__webpack_exports__);
13111 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13112 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13113 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13114 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13115
13116
13117
13118
13119 (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]);
13120 })();
13121
13122 /******/ })()
13123 ;
13124 //# sourceMappingURL=gutenberg.js.map