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

13,122 lines 500.0 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 */ "requiresContentEmbedScope": () => (/* binding */ requiresContentEmbedScope),
265 /* harmony export */ "restNonce": () => (/* binding */ restNonce),
266 /* harmony export */ "restUrl": () => (/* binding */ restUrl),
267 /* harmony export */ "reviewSkippedDate": () => (/* binding */ reviewSkippedDate),
268 /* harmony export */ "theme": () => (/* binding */ theme),
269 /* harmony export */ "trackConsent": () => (/* binding */ trackConsent),
270 /* harmony export */ "wpVersion": () => (/* binding */ wpVersion)
271 /* harmony export */ });
272 var _window$leadinConfig = window.leadinConfig,
273 accountName = _window$leadinConfig.accountName,
274 adminUrl = _window$leadinConfig.adminUrl,
275 activationTime = _window$leadinConfig.activationTime,
276 connectionStatus = _window$leadinConfig.connectionStatus,
277 deviceId = _window$leadinConfig.deviceId,
278 didDisconnect = _window$leadinConfig.didDisconnect,
279 env = _window$leadinConfig.env,
280 formsScript = _window$leadinConfig.formsScript,
281 meetingsScript = _window$leadinConfig.meetingsScript,
282 formsScriptPayload = _window$leadinConfig.formsScriptPayload,
283 hublet = _window$leadinConfig.hublet,
284 hubspotBaseUrl = _window$leadinConfig.hubspotBaseUrl,
285 hubspotNonce = _window$leadinConfig.hubspotNonce,
286 iframeUrl = _window$leadinConfig.iframeUrl,
287 impactLink = _window$leadinConfig.impactLink,
288 lastAuthorizeTime = _window$leadinConfig.lastAuthorizeTime,
289 lastDeauthorizeTime = _window$leadinConfig.lastDeauthorizeTime,
290 lastDisconnectTime = _window$leadinConfig.lastDisconnectTime,
291 leadinPluginVersion = _window$leadinConfig.leadinPluginVersion,
292 leadinQueryParams = _window$leadinConfig.leadinQueryParams,
293 locale = _window$leadinConfig.locale,
294 loginUrl = _window$leadinConfig.loginUrl,
295 phpVersion = _window$leadinConfig.phpVersion,
296 pluginPath = _window$leadinConfig.pluginPath,
297 plugins = _window$leadinConfig.plugins,
298 portalDomain = _window$leadinConfig.portalDomain,
299 portalEmail = _window$leadinConfig.portalEmail,
300 portalId = _window$leadinConfig.portalId,
301 redirectNonce = _window$leadinConfig.redirectNonce,
302 restNonce = _window$leadinConfig.restNonce,
303 restUrl = _window$leadinConfig.restUrl,
304 refreshToken = _window$leadinConfig.refreshToken,
305 reviewSkippedDate = _window$leadinConfig.reviewSkippedDate,
306 theme = _window$leadinConfig.theme,
307 trackConsent = _window$leadinConfig.trackConsent,
308 wpVersion = _window$leadinConfig.wpVersion,
309 contentEmbed = _window$leadinConfig.contentEmbed,
310 requiresContentEmbedScope = _window$leadinConfig.requiresContentEmbedScope;
311
312
313 /***/ }),
314
315 /***/ "./scripts/gutenberg/Common/CalendarIcon.tsx":
316 /*!***************************************************!*\
317 !*** ./scripts/gutenberg/Common/CalendarIcon.tsx ***!
318 \***************************************************/
319 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
320
321 "use strict";
322 __webpack_require__.r(__webpack_exports__);
323 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
324 /* harmony export */ "default": () => (/* binding */ CalendarIcon)
325 /* harmony export */ });
326 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
327
328 function CalendarIcon() {
329 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
330 width: "18",
331 height: "18",
332 viewBox: "0 0 18 18",
333 fill: "none",
334 xmlns: "http://www.w3.org/2000/svg",
335 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
336 clipPath: "url(#clip0_903_1965)",
337 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
338 fillRule: "evenodd",
339 clipRule: "evenodd",
340 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",
341 fill: "#FF7A59"
342 })
343 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
344 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath", {
345 id: "clip0_903_1965",
346 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect", {
347 width: "18",
348 height: "18",
349 fill: "white"
350 })
351 })
352 })]
353 });
354 }
355
356 /***/ }),
357
358 /***/ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx":
359 /*!**********************************************************!*\
360 !*** ./scripts/gutenberg/Common/SidebarSprocketIcon.tsx ***!
361 \**********************************************************/
362 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
363
364 "use strict";
365 __webpack_require__.r(__webpack_exports__);
366 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
367 /* harmony export */ "default": () => (/* binding */ SidebarSprocketIcon)
368 /* harmony export */ });
369 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
370
371 function SidebarSprocketIcon() {
372 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", {
373 width: "20px",
374 height: "20px",
375 version: "1.1",
376 viewBox: "0 0 40 42",
377 xmlns: "http://www.w3.org/2000/svg",
378 xmlnsXlink: "http://www.w3.org/1999/xlink",
379 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
380 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",
381 id: "Fill-1",
382 fillRule: "evenodd"
383 })
384 });
385 }
386
387 /***/ }),
388
389 /***/ "./scripts/gutenberg/Common/SprocketIcon.tsx":
390 /*!***************************************************!*\
391 !*** ./scripts/gutenberg/Common/SprocketIcon.tsx ***!
392 \***************************************************/
393 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
394
395 "use strict";
396 __webpack_require__.r(__webpack_exports__);
397 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
398 /* harmony export */ "default": () => (/* binding */ SprocketIcon)
399 /* harmony export */ });
400 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
401
402 function SprocketIcon() {
403 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
404 width: "40px",
405 height: "42px",
406 viewBox: "0 0 40 42",
407 version: "1.1",
408 xmlns: "http://www.w3.org/2000/svg",
409 xmlnsXlink: "http://www.w3.org/1999/xlink",
410 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs", {
411 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("polygon", {
412 id: "path-1",
413 points: "0.000123751494 0 39.7808917 0 39.7808917 41.6871084 0.000123751494 41.6871084"
414 })
415 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
416 id: "Page-1",
417 stroke: "none",
418 strokeWidth: "1",
419 fill: "none",
420 fillRule: "evenodd",
421 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("g", {
422 id: "HubSpot-Sprocket---Full-Color",
423 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("mask", {
424 id: "mask-2",
425 fill: "white",
426 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("use", {
427 xlinkHref: "#path-1"
428 })
429 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g", {
430 id: "path-1"
431 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path", {
432 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",
433 id: "Fill-1",
434 fill: "#F3785B",
435 fillRule: "nonzero",
436 mask: "url(#mask-2)"
437 })]
438 })
439 })]
440 });
441 }
442
443 /***/ }),
444
445 /***/ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx":
446 /*!*******************************************************!*\
447 !*** ./scripts/gutenberg/FormBlock/FormBlockSave.tsx ***!
448 \*******************************************************/
449 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
450
451 "use strict";
452 __webpack_require__.r(__webpack_exports__);
453 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
454 /* harmony export */ "default": () => (/* binding */ FormSaveBlock)
455 /* harmony export */ });
456 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
457 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
458 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
459
460
461 function FormSaveBlock(_ref) {
462 var attributes = _ref.attributes;
463 var portalId = attributes.portalId,
464 formId = attributes.formId;
465
466 if (portalId && formId) {
467 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
468 className: "wp-block-leadin-hubspot-form-block",
469 children: "[hubspot portal=\"".concat(portalId, "\" id=\"").concat(formId, "\" type=\"form\"]")
470 });
471 }
472
473 return null;
474 }
475
476 /***/ }),
477
478 /***/ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx":
479 /*!**************************************************************!*\
480 !*** ./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx ***!
481 \**************************************************************/
482 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
483
484 "use strict";
485 __webpack_require__.r(__webpack_exports__);
486 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
487 /* harmony export */ "default": () => (/* binding */ FormGutenbergPreview)
488 /* harmony export */ });
489 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
490 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
491 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
492 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
493 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
494
495
496
497
498 function FormGutenbergPreview() {
499 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
500 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
501 alt: "Create a new Hubspot Form",
502 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-form.png")
503 })
504 });
505 }
506
507 /***/ }),
508
509 /***/ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx":
510 /*!***********************************************************!*\
511 !*** ./scripts/gutenberg/FormBlock/registerFormBlock.tsx ***!
512 \***********************************************************/
513 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
514
515 "use strict";
516 __webpack_require__.r(__webpack_exports__);
517 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
518 /* harmony export */ "default": () => (/* binding */ registerFormBlock)
519 /* harmony export */ });
520 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
521 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
522 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
523 /* harmony import */ var _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/SprocketIcon */ "./scripts/gutenberg/Common/SprocketIcon.tsx");
524 /* harmony import */ var _FormBlockSave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FormBlockSave */ "./scripts/gutenberg/FormBlock/FormBlockSave.tsx");
525 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
526 /* harmony import */ var _FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormGutenbergPreview */ "./scripts/gutenberg/FormBlock/FormGutenbergPreview.tsx");
527 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
528 /* harmony import */ var _shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Form/FormEdit */ "./scripts/shared/Form/FormEdit.tsx");
529 /* harmony import */ var _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../shared/enums/connectionStatus */ "./scripts/shared/enums/connectionStatus.ts");
530 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
531 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
532 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
533 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; }
534
535 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; }
536
537 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; }
538
539
540
541
542
543
544
545
546
547
548
549
550 function registerFormBlock() {
551 var editComponent = function editComponent(props) {
552 if (props.attributes.preview) {
553 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormGutenbergPreview__WEBPACK_IMPORTED_MODULE_5__["default"], {});
554 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.connectionStatus === _shared_enums_connectionStatus__WEBPACK_IMPORTED_MODULE_8__["default"].Connected) {
555 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Form_FormEdit__WEBPACK_IMPORTED_MODULE_7__["default"], _objectSpread(_objectSpread({}, props), {}, {
556 origin: "gutenberg",
557 preview: true
558 }));
559 } else {
560 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_6__["default"], {
561 status: 401
562 });
563 }
564 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
565
566
567 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_10__.isFullSiteEditor)()) {
568 return null;
569 }
570
571 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-form-block', {
572 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('HubSpot Form', 'leadin'),
573 description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Select and embed a HubSpot form', 'leadin'),
574 icon: _Common_SprocketIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
575 category: 'leadin-blocks',
576 attributes: {
577 portalId: {
578 type: 'string',
579 "default": ''
580 },
581 formId: {
582 type: 'string'
583 },
584 formName: {
585 type: 'string'
586 },
587 preview: {
588 type: 'boolean',
589 "default": false
590 }
591 },
592 example: {
593 attributes: {
594 preview: true
595 }
596 },
597 edit: editComponent,
598 save: function save(props) {
599 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormBlockSave__WEBPACK_IMPORTED_MODULE_3__["default"], _objectSpread({}, props));
600 }
601 });
602 }
603
604 /***/ }),
605
606 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx":
607 /*!*********************************************************************!*\
608 !*** ./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx ***!
609 \*********************************************************************/
610 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
611
612 "use strict";
613 __webpack_require__.r(__webpack_exports__);
614 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
615 /* harmony export */ "default": () => (/* binding */ MeetingGutenbergPreview)
616 /* harmony export */ });
617 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
618 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
619 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
620 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
621 /* harmony import */ var _UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UIImage */ "./scripts/gutenberg/UIComponents/UIImage.ts");
622
623
624
625
626 function MeetingGutenbergPreview() {
627 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
628 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIImage__WEBPACK_IMPORTED_MODULE_3__["default"], {
629 alt: "Create a new Hubspot Meeting",
630 width: "100%",
631 src: "".concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath, "/public/assets/images/hubspot-meetings.png")
632 })
633 });
634 }
635
636 /***/ }),
637
638 /***/ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx":
639 /*!**************************************************************!*\
640 !*** ./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx ***!
641 \**************************************************************/
642 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
643
644 "use strict";
645 __webpack_require__.r(__webpack_exports__);
646 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
647 /* harmony export */ "default": () => (/* binding */ MeetingSaveBlock)
648 /* harmony export */ });
649 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
650 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
651 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
652
653
654 function MeetingSaveBlock(_ref) {
655 var attributes = _ref.attributes;
656 var url = attributes.url;
657
658 if (url) {
659 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, {
660 className: "wp-block-leadin-hubspot-meeting-block",
661 children: "[hubspot url=\"".concat(url, "\" type=\"meeting\"]")
662 });
663 }
664
665 return null;
666 }
667
668 /***/ }),
669
670 /***/ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx":
671 /*!******************************************************************!*\
672 !*** ./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx ***!
673 \******************************************************************/
674 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
675
676 "use strict";
677 __webpack_require__.r(__webpack_exports__);
678 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
679 /* harmony export */ "default": () => (/* binding */ registerMeetingBlock)
680 /* harmony export */ });
681 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
682 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
683 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
684 /* harmony import */ var _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/CalendarIcon */ "./scripts/gutenberg/Common/CalendarIcon.tsx");
685 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
686 /* harmony import */ var _MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingGutenbergPreview */ "./scripts/gutenberg/MeetingsBlock/MeetingGutenbergPreview.tsx");
687 /* harmony import */ var _MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MeetingSaveBlock */ "./scripts/gutenberg/MeetingsBlock/MeetingSaveBlock.tsx");
688 /* harmony import */ var _shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/Meeting/MeetingEdit */ "./scripts/shared/Meeting/MeetingEdit.tsx");
689 /* harmony import */ var _shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../shared/Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
690 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
691 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__);
692 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
693 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; }
694
695 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; }
696
697 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; }
698
699
700
701
702
703
704
705
706
707
708
709 var ConnectionStatus = {
710 Connected: 'Connected',
711 NotConnected: 'NotConnected'
712 };
713 function registerMeetingBlock() {
714 var editComponent = function editComponent(props) {
715 if (props.attributes.preview) {
716 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingGutenbergPreview__WEBPACK_IMPORTED_MODULE_4__["default"], {});
717 } else if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.connectionStatus === ConnectionStatus.Connected) {
718 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Meeting_MeetingEdit__WEBPACK_IMPORTED_MODULE_6__["default"], _objectSpread(_objectSpread({}, props), {}, {
719 preview: true,
720 origin: "gutenberg"
721 }));
722 } else {
723 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_shared_Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__["default"], {
724 status: 401
725 });
726 }
727 }; // We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
728
729
730 if (!_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ || (0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_9__.isFullSiteEditor)()) {
731 return null;
732 }
733
734 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType('leadin/hubspot-meeting-block', {
735 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_8__.__)('Hubspot Meetings Scheduler', 'leadin'),
736 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'),
737 icon: _Common_CalendarIcon__WEBPACK_IMPORTED_MODULE_2__["default"],
738 category: 'leadin-blocks',
739 attributes: {
740 url: {
741 type: 'string',
742 "default": ''
743 },
744 preview: {
745 type: 'boolean',
746 "default": false
747 }
748 },
749 example: {
750 attributes: {
751 preview: true
752 }
753 },
754 edit: editComponent,
755 save: function save(props) {
756 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSaveBlock__WEBPACK_IMPORTED_MODULE_5__["default"], _objectSpread({}, props));
757 }
758 });
759 }
760
761 /***/ }),
762
763 /***/ "./scripts/gutenberg/Sidebar/contentType.tsx":
764 /*!***************************************************!*\
765 !*** ./scripts/gutenberg/Sidebar/contentType.tsx ***!
766 \***************************************************/
767 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
768
769 "use strict";
770 __webpack_require__.r(__webpack_exports__);
771 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
772 /* harmony export */ "registerHubspotSidebar": () => (/* binding */ registerHubspotSidebar)
773 /* harmony export */ });
774 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
775 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins");
776 /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__);
777 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post");
778 /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__);
779 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
780 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
781 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
782 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);
783 /* harmony import */ var _UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../UIComponents/UISidebarSelectControl */ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx");
784 /* harmony import */ var _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/SidebarSprocketIcon */ "./scripts/gutenberg/Common/SidebarSprocketIcon.tsx");
785 /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! styled-components */ "./node_modules/styled-components/dist/styled-components.browser.esm.js");
786 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
787 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
788 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
789 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
790 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
791 var _templateObject;
792
793 function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
794
795
796
797
798
799
800
801
802
803
804
805
806
807 function registerHubspotSidebar() {
808 var ContentTypeLabelStyle = styled_components__WEBPACK_IMPORTED_MODULE_11__["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: normal;\n text-transform: none;\n "])));
809
810 var ContentTypeLabel = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ContentTypeLabelStyle, {
811 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Select the content type HubSpot Analytics uses to track this page', 'leadin')
812 });
813
814 var LeadinPluginSidebar = function LeadinPluginSidebar(_ref) {
815 var postType = _ref.postType;
816 return postType ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, {
817 name: "leadin",
818 title: "HubSpot",
819 icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Icon, {
820 className: "hs-plugin-sidebar-sprocket",
821 icon: (0,_Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"])()
822 }),
823 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, {
824 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('HubSpot Analytics', 'leadin'),
825 initialOpen: true,
826 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_8__.BackgroudAppContext.Provider, {
827 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_10__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_9__.refreshToken),
828 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISidebarSelectControl__WEBPACK_IMPORTED_MODULE_5__["default"], {
829 metaKey: "content-type",
830 className: "select-content-type",
831 label: ContentTypeLabel,
832 options: [{
833 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Detect Automatically', 'leadin'),
834 value: ''
835 }, {
836 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Blog Post', 'leadin'),
837 value: 'blog-post'
838 }, {
839 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Knowledge Article', 'leadin'),
840 value: 'knowledge-article'
841 }, {
842 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Landing Page', 'leadin'),
843 value: 'landing-page'
844 }, {
845 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Listing Page', 'leadin'),
846 value: 'listing-page'
847 }, {
848 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__.__)('Standard Page', 'leadin'),
849 value: 'standard-page'
850 }]
851 })
852 })
853 })
854 }) : null;
855 };
856
857 var LeadinPluginSidebarWrapper = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select) {
858 var data = select('core/editor');
859 return {
860 postType: data && data.getCurrentPostType() && data.getEditedPostAttribute('meta')
861 };
862 })(LeadinPluginSidebar);
863
864 if (_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__) {
865 _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin('leadin', {
866 render: LeadinPluginSidebarWrapper,
867 icon: _Common_SidebarSprocketIcon__WEBPACK_IMPORTED_MODULE_6__["default"]
868 });
869 }
870 }
871
872 /***/ }),
873
874 /***/ "./scripts/gutenberg/UIComponents/UIImage.ts":
875 /*!***************************************************!*\
876 !*** ./scripts/gutenberg/UIComponents/UIImage.ts ***!
877 \***************************************************/
878 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
879
880 "use strict";
881 __webpack_require__.r(__webpack_exports__);
882 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
883 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
884 /* harmony export */ });
885 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
886
887
888 var _exp = /*#__PURE__*/function _exp() {
889 return function (props) {
890 return props.height ? props.height : 'auto';
891 };
892 };
893
894 var _exp2 = /*#__PURE__*/function _exp2() {
895 return function (props) {
896 return props.width ? props.width : 'auto';
897 };
898 };
899
900 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('img')({
901 name: "UIImage0",
902 "class": "ump7xqy",
903 propsAsIs: false,
904 vars: {
905 "ump7xqy-0": [_exp()],
906 "ump7xqy-1": [_exp2()]
907 }
908 }));
909
910 __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");
911
912 /***/ }),
913
914 /***/ "./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx":
915 /*!*******************************************************************!*\
916 !*** ./scripts/gutenberg/UIComponents/UISidebarSelectControl.tsx ***!
917 \*******************************************************************/
918 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
919
920 "use strict";
921 __webpack_require__.r(__webpack_exports__);
922 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
923 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
924 /* harmony export */ });
925 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
926 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
927 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
928 /* harmony import */ var _utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/withMetaData */ "./scripts/utils/withMetaData.ts");
929 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
930 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
931 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; }
932
933 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; }
934
935 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; }
936
937
938
939
940
941
942
943 var UISidebarSelectControl = function UISidebarSelectControl(props) {
944 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.useBackgroundAppContext)();
945 var monitorSidebarMetaChange = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_3__.usePostBackgroundMessage)();
946 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, _objectSpread({
947 value: props.metaValue,
948 onChange: function onChange(content) {
949 if (props.setMetaValue) {
950 props.setMetaValue(content);
951 }
952
953 isBackgroundAppReady && monitorSidebarMetaChange({
954 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.TrackSidebarMetaChange,
955 payload: {
956 metaKey: props.metaKey
957 }
958 });
959 }
960 }, props));
961 };
962
963 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_utils_withMetaData__WEBPACK_IMPORTED_MODULE_2__["default"])(UISidebarSelectControl));
964
965 /***/ }),
966
967 /***/ "./scripts/iframe/integratedMessages/core/CoreMessages.ts":
968 /*!****************************************************************!*\
969 !*** ./scripts/iframe/integratedMessages/core/CoreMessages.ts ***!
970 \****************************************************************/
971 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
972
973 "use strict";
974 __webpack_require__.r(__webpack_exports__);
975 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
976 /* harmony export */ "CoreMessages": () => (/* binding */ CoreMessages)
977 /* harmony export */ });
978 var CoreMessages = {
979 HandshakeReceive: 'INTEGRATED_APP_EMBEDDER_HANDSHAKE_RECEIVED',
980 SendRefreshToken: 'INTEGRATED_APP_EMBEDDER_SEND_REFRESH_TOKEN',
981 ReloadParentFrame: 'INTEGRATED_APP_EMBEDDER_RELOAD_PARENT_FRAME',
982 RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
983 SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
984 SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID'
985 };
986
987 /***/ }),
988
989 /***/ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts":
990 /*!******************************************************************!*\
991 !*** ./scripts/iframe/integratedMessages/forms/FormsMessages.ts ***!
992 \******************************************************************/
993 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
994
995 "use strict";
996 __webpack_require__.r(__webpack_exports__);
997 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
998 /* harmony export */ "FormMessages": () => (/* binding */ FormMessages)
999 /* harmony export */ });
1000 var FormMessages = {
1001 CreateFormAppNavigation: 'CREATE_FORM_APP_NAVIGATION'
1002 };
1003
1004 /***/ }),
1005
1006 /***/ "./scripts/iframe/integratedMessages/index.ts":
1007 /*!****************************************************!*\
1008 !*** ./scripts/iframe/integratedMessages/index.ts ***!
1009 \****************************************************/
1010 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1011
1012 "use strict";
1013 __webpack_require__.r(__webpack_exports__);
1014 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1015 /* harmony export */ "CoreMessages": () => (/* reexport safe */ _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__.CoreMessages),
1016 /* harmony export */ "FormMessages": () => (/* reexport safe */ _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__.FormMessages),
1017 /* harmony export */ "LiveChatMessages": () => (/* reexport safe */ _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__.LiveChatMessages),
1018 /* harmony export */ "PluginMessages": () => (/* reexport safe */ _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__.PluginMessages),
1019 /* harmony export */ "ProxyMessages": () => (/* reexport safe */ _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages)
1020 /* harmony export */ });
1021 /* harmony import */ var _core_CoreMessages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/CoreMessages */ "./scripts/iframe/integratedMessages/core/CoreMessages.ts");
1022 /* harmony import */ var _forms_FormsMessages__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./forms/FormsMessages */ "./scripts/iframe/integratedMessages/forms/FormsMessages.ts");
1023 /* harmony import */ var _livechat_LiveChatMessages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./livechat/LiveChatMessages */ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts");
1024 /* harmony import */ var _plugin_PluginMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./plugin/PluginMessages */ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts");
1025 /* harmony import */ var _proxy_ProxyMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./proxy/ProxyMessages */ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts");
1026
1027
1028
1029
1030
1031
1032 /***/ }),
1033
1034 /***/ "./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts":
1035 /*!************************************************************************!*\
1036 !*** ./scripts/iframe/integratedMessages/livechat/LiveChatMessages.ts ***!
1037 \************************************************************************/
1038 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1039
1040 "use strict";
1041 __webpack_require__.r(__webpack_exports__);
1042 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1043 /* harmony export */ "LiveChatMessages": () => (/* binding */ LiveChatMessages)
1044 /* harmony export */ });
1045 var LiveChatMessages = {
1046 CreateLiveChatAppNavigation: 'CREATE_LIVE_CHAT_APP_NAVIGATION'
1047 };
1048
1049 /***/ }),
1050
1051 /***/ "./scripts/iframe/integratedMessages/plugin/PluginMessages.ts":
1052 /*!********************************************************************!*\
1053 !*** ./scripts/iframe/integratedMessages/plugin/PluginMessages.ts ***!
1054 \********************************************************************/
1055 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1056
1057 "use strict";
1058 __webpack_require__.r(__webpack_exports__);
1059 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1060 /* harmony export */ "PluginMessages": () => (/* binding */ PluginMessages)
1061 /* harmony export */ });
1062 var PluginMessages = {
1063 PluginSettingsNavigation: 'PLUGIN_SETTINGS_NAVIGATION',
1064 PluginLeadinConfig: 'PLUGIN_LEADIN_CONFIG',
1065 TrackConsent: 'INTEGRATED_APP_EMBEDDER_TRACK_CONSENT',
1066 InternalTrackingFetchRequest: 'INTEGRATED_TRACKING_FETCH_REQUEST',
1067 InternalTrackingFetchResponse: 'INTEGRATED_TRACKING_FETCH_RESPONSE',
1068 InternalTrackingFetchError: 'INTEGRATED_TRACKING_FETCH_ERROR',
1069 InternalTrackingChangeRequest: 'INTEGRATED_TRACKING_CHANGE_REQUEST',
1070 InternalTrackingChangeError: 'INTEGRATED_TRACKING_CHANGE_ERROR',
1071 BusinessUnitFetchRequest: 'BUSINESS_UNIT_FETCH_REQUEST',
1072 BusinessUnitFetchResponse: 'BUSINESS_UNIT_FETCH_FETCH_RESPONSE',
1073 BusinessUnitFetchError: 'BUSINESS_UNIT_FETCH_FETCH_ERROR',
1074 BusinessUnitChangeRequest: 'BUSINESS_UNIT_CHANGE_REQUEST',
1075 BusinessUnitChangeError: 'BUSINESS_UNIT_CHANGE_ERROR',
1076 SkipReviewRequest: 'SKIP_REVIEW_REQUEST',
1077 SkipReviewResponse: 'SKIP_REVIEW_RESPONSE',
1078 SkipReviewError: 'SKIP_REVIEW_ERROR',
1079 RemoveParentQueryParam: 'REMOVE_PARENT_QUERY_PARAM',
1080 ContentEmbedInstallRequest: 'CONTENT_EMBED_INSTALL_REQUEST',
1081 ContentEmbedInstallResponse: 'CONTENT_EMBED_INSTALL_RESPONSE',
1082 ContentEmbedInstallError: 'CONTENT_EMBED_INSTALL_ERROR',
1083 ContentEmbedActivationRequest: 'CONTENT_EMBED_ACTIVATION_REQUEST',
1084 ContentEmbedActivationResponse: 'CONTENT_EMBED_ACTIVATION_RESPONSE',
1085 ContentEmbedActivationError: 'CONTENT_EMBED_ACTIVATION_ERROR'
1086 };
1087
1088 /***/ }),
1089
1090 /***/ "./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts":
1091 /*!******************************************************************!*\
1092 !*** ./scripts/iframe/integratedMessages/proxy/ProxyMessages.ts ***!
1093 \******************************************************************/
1094 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1095
1096 "use strict";
1097 __webpack_require__.r(__webpack_exports__);
1098 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1099 /* harmony export */ "ProxyMessages": () => (/* binding */ ProxyMessages)
1100 /* harmony export */ });
1101 var ProxyMessages = {
1102 FetchForms: 'FETCH_FORMS',
1103 FetchForm: 'FETCH_FORM',
1104 CreateFormFromTemplate: 'CREATE_FORM_FROM_TEMPLATE',
1105 FetchAuth: 'FETCH_AUTH',
1106 FetchMeetingsAndUsers: 'FETCH_MEETINGS_AND_USERS',
1107 FetchContactsCreateSinceActivation: 'FETCH_CONTACTS_CREATED_SINCE_ACTIVATION',
1108 FetchOrCreateMeetingUser: 'FETCH_OR_CREATE_MEETING_USER',
1109 ConnectMeetingsCalendar: 'CONNECT_MEETINGS_CALENDAR',
1110 TrackFormPreviewRender: 'TRACK_FORM_PREVIEW_RENDER',
1111 TrackFormCreatedFromTemplate: 'TRACK_FORM_CREATED_FROM_TEMPLATE',
1112 TrackFormCreationFailed: 'TRACK_FORM_CREATION_FAILED',
1113 TrackMeetingPreviewRender: 'TRACK_MEETING_PREVIEW_RENDER',
1114 TrackSidebarMetaChange: 'TRACK_SIDEBAR_META_CHANGE',
1115 TrackReviewBannerRender: 'TRACK_REVIEW_BANNER_RENDER',
1116 TrackReviewBannerInteraction: 'TRACK_REVIEW_BANNER_INTERACTION',
1117 TrackReviewBannerDismissed: 'TRACK_REVIEW_BANNER_DISMISSED',
1118 TrackPluginDeactivation: 'TRACK_PLUGIN_DEACTIVATION'
1119 };
1120
1121 /***/ }),
1122
1123 /***/ "./scripts/iframe/useBackgroundApp.ts":
1124 /*!********************************************!*\
1125 !*** ./scripts/iframe/useBackgroundApp.ts ***!
1126 \********************************************/
1127 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1128
1129 "use strict";
1130 __webpack_require__.r(__webpack_exports__);
1131 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1132 /* harmony export */ "BackgroudAppContext": () => (/* binding */ BackgroudAppContext),
1133 /* harmony export */ "useBackgroundAppContext": () => (/* binding */ useBackgroundAppContext),
1134 /* harmony export */ "usePostAsyncBackgroundMessage": () => (/* binding */ usePostAsyncBackgroundMessage),
1135 /* harmony export */ "usePostBackgroundMessage": () => (/* binding */ usePostBackgroundMessage)
1136 /* harmony export */ });
1137 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1138 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1139
1140 var BackgroudAppContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
1141 function useBackgroundAppContext() {
1142 return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(BackgroudAppContext);
1143 }
1144 function usePostBackgroundMessage() {
1145 var app = useBackgroundAppContext();
1146 return function (message) {
1147 app.postMessage(message);
1148 };
1149 }
1150 function usePostAsyncBackgroundMessage() {
1151 var app = useBackgroundAppContext();
1152 return function (message) {
1153 return app.postAsyncMessage(message);
1154 };
1155 }
1156
1157 /***/ }),
1158
1159 /***/ "./scripts/lib/Raven.ts":
1160 /*!******************************!*\
1161 !*** ./scripts/lib/Raven.ts ***!
1162 \******************************/
1163 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1164
1165 "use strict";
1166 __webpack_require__.r(__webpack_exports__);
1167 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1168 /* harmony export */ "configureRaven": () => (/* binding */ configureRaven),
1169 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1170 /* harmony export */ });
1171 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
1172 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_0__);
1173 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1174
1175
1176 function configureRaven() {
1177 if (_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.hubspotBaseUrl.indexOf('app.hubspot.com') === -1) {
1178 return;
1179 }
1180
1181 raven_js__WEBPACK_IMPORTED_MODULE_0___default().config('https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1', {
1182 instrument: {
1183 tryCatch: false
1184 },
1185 release: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion
1186 }).install();
1187 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setTagsContext({
1188 v: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.leadinPluginVersion,
1189 php: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.phpVersion,
1190 wordpress: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.wpVersion
1191 });
1192 raven_js__WEBPACK_IMPORTED_MODULE_0___default().setExtraContext({
1193 hub: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.portalId,
1194 plugins: Object.keys(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins).map(function (name) {
1195 return "".concat(name, "#").concat(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_1__.plugins[name]);
1196 }).join(',')
1197 });
1198 }
1199 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((raven_js__WEBPACK_IMPORTED_MODULE_0___default()));
1200
1201 /***/ }),
1202
1203 /***/ "./scripts/shared/Common/AsyncSelect.tsx":
1204 /*!***********************************************!*\
1205 !*** ./scripts/shared/Common/AsyncSelect.tsx ***!
1206 \***********************************************/
1207 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1208
1209 "use strict";
1210 __webpack_require__.r(__webpack_exports__);
1211 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1212 /* harmony export */ "default": () => (/* binding */ AsyncSelect)
1213 /* harmony export */ });
1214 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1215 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1216 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1217 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1218 /* harmony import */ var _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/colors */ "./scripts/shared/UIComponents/colors.ts");
1219 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1220 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1221 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1222
1223 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."); }
1224
1225 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); }
1226
1227 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; }
1228
1229 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; }
1230
1231 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1232
1233
1234
1235
1236
1237
1238
1239 var Container = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1240 name: "Container",
1241 "class": "c1wxx7eu",
1242 propsAsIs: false
1243 });
1244
1245 var _exp2 = /*#__PURE__*/function _exp2() {
1246 return function (props) {
1247 return props.focused ? '0' : '1px';
1248 };
1249 };
1250
1251 var _exp3 = /*#__PURE__*/function _exp3() {
1252 return function (props) {
1253 return props.focused ? "0 0 0 2px ".concat(_UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM) : 'none';
1254 };
1255 };
1256
1257 var ControlContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1258 name: "ControlContainer",
1259 "class": "c1rgwbep",
1260 propsAsIs: false,
1261 vars: {
1262 "c1rgwbep-0": [_exp2()],
1263 "c1rgwbep-1": [_exp3()]
1264 }
1265 });
1266 var ValueContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1267 name: "ValueContainer",
1268 "class": "v1mdmbaj",
1269 propsAsIs: false
1270 });
1271 var Placeholder = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1272 name: "Placeholder",
1273 "class": "p1gwkvxy",
1274 propsAsIs: false
1275 });
1276 var SingleValue = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1277 name: "SingleValue",
1278 "class": "s1bwlafs",
1279 propsAsIs: false
1280 });
1281 var IndicatorContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1282 name: "IndicatorContainer",
1283 "class": "i196z9y5",
1284 propsAsIs: false
1285 });
1286 var DropdownIndicator = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1287 name: "DropdownIndicator",
1288 "class": "d1dfo5ow",
1289 propsAsIs: false
1290 });
1291 var InputContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1292 name: "InputContainer",
1293 "class": "if3lze",
1294 propsAsIs: false
1295 });
1296 var Input = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('input')({
1297 name: "Input",
1298 "class": "i9kxf50",
1299 propsAsIs: false
1300 });
1301 var InputShadow = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1302 name: "InputShadow",
1303 "class": "igjr3uc",
1304 propsAsIs: false
1305 });
1306 var MenuContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1307 name: "MenuContainer",
1308 "class": "mhb9if7",
1309 propsAsIs: false
1310 });
1311 var MenuList = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1312 name: "MenuList",
1313 "class": "mxaof7s",
1314 propsAsIs: false
1315 });
1316 var MenuGroup = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1317 name: "MenuGroup",
1318 "class": "mw50s5v",
1319 propsAsIs: false
1320 });
1321 var MenuGroupHeader = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1322 name: "MenuGroupHeader",
1323 "class": "m11rzvjw",
1324 propsAsIs: false
1325 });
1326
1327 var _exp5 = /*#__PURE__*/function _exp5() {
1328 return function (props) {
1329 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : 'transparent';
1330 };
1331 };
1332
1333 var _exp6 = /*#__PURE__*/function _exp6() {
1334 return function (props) {
1335 return props.selected ? '#fff' : 'inherit';
1336 };
1337 };
1338
1339 var _exp7 = /*#__PURE__*/function _exp7() {
1340 return function (props) {
1341 return props.selected ? _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_MEDIUM : _UIComponents_colors__WEBPACK_IMPORTED_MODULE_2__.CALYPSO_LIGHT;
1342 };
1343 };
1344
1345 var MenuItem = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_5__.styled)('div')({
1346 name: "MenuItem",
1347 "class": "m1jcdsjv",
1348 propsAsIs: false,
1349 vars: {
1350 "m1jcdsjv-0": [_exp5()],
1351 "m1jcdsjv-1": [_exp6()],
1352 "m1jcdsjv-2": [_exp7()]
1353 }
1354 });
1355 function AsyncSelect(_ref) {
1356 var placeholder = _ref.placeholder,
1357 value = _ref.value,
1358 loadOptions = _ref.loadOptions,
1359 onChange = _ref.onChange,
1360 defaultOptions = _ref.defaultOptions;
1361 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1362 var inputShadowEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1363
1364 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
1365 _useState2 = _slicedToArray(_useState, 2),
1366 isFocused = _useState2[0],
1367 setFocus = _useState2[1];
1368
1369 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded),
1370 _useState4 = _slicedToArray(_useState3, 2),
1371 loadState = _useState4[0],
1372 setLoadState = _useState4[1];
1373
1374 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
1375 _useState6 = _slicedToArray(_useState5, 2),
1376 localValue = _useState6[0],
1377 setLocalValue = _useState6[1];
1378
1379 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultOptions),
1380 _useState8 = _slicedToArray(_useState7, 2),
1381 options = _useState8[0],
1382 setOptions = _useState8[1];
1383
1384 var inputSize = "".concat(inputShadowEl.current ? inputShadowEl.current.clientWidth + 10 : 2, "px");
1385 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1386 if (loadOptions && loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].NotLoaded) {
1387 loadOptions('', function (result) {
1388 setOptions(result);
1389 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1390 });
1391 }
1392 }, [loadOptions, loadState]);
1393
1394 var renderItems = function renderItems() {
1395 var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1396 var parentKey = arguments.length > 1 ? arguments[1] : undefined;
1397 return items.map(function (item, index) {
1398 if (item.options) {
1399 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MenuGroup, {
1400 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuGroupHeader, {
1401 id: "".concat(index, "-heading"),
1402 children: item.label
1403 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
1404 children: renderItems(item.options, index)
1405 })]
1406 }, "async-select-item-".concat(index));
1407 } else {
1408 var key = "async-select-item-".concat(parentKey !== undefined ? "".concat(parentKey, "-").concat(index) : index);
1409 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuItem, {
1410 id: key,
1411 selected: value && item.value === value.value,
1412 onClick: function onClick() {
1413 onChange(item);
1414 setFocus(false);
1415 },
1416 children: item.label
1417 }, key);
1418 }
1419 });
1420 };
1421
1422 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(Container, {
1423 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ControlContainer, {
1424 id: "leadin-async-selector",
1425 focused: isFocused,
1426 onClick: function onClick() {
1427 if (isFocused) {
1428 if (inputEl.current) {
1429 inputEl.current.blur();
1430 }
1431
1432 setFocus(false);
1433 setLocalValue('');
1434 } else {
1435 if (inputEl.current) {
1436 inputEl.current.focus();
1437 }
1438
1439 setFocus(true);
1440 }
1441 },
1442 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(ValueContainer, {
1443 children: [localValue === '' && (!value ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Placeholder, {
1444 children: placeholder
1445 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SingleValue, {
1446 children: value.label
1447 })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(InputContainer, {
1448 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Input, {
1449 ref: inputEl,
1450 onFocus: function onFocus() {
1451 setFocus(true);
1452 },
1453 onChange: function onChange(e) {
1454 setLocalValue(e.target.value);
1455 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Loading);
1456 loadOptions && loadOptions(e.target.value, function (result) {
1457 setOptions(result);
1458 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_4__["default"].Idle);
1459 });
1460 },
1461 value: localValue,
1462 width: inputSize,
1463 id: "asycn-select-input"
1464 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(InputShadow, {
1465 ref: inputShadowEl,
1466 children: localValue
1467 })]
1468 })]
1469 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(IndicatorContainer, {
1470 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, {})]
1471 })]
1472 }), isFocused && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuContainer, {
1473 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MenuList, {
1474 children: renderItems(options)
1475 })
1476 })]
1477 });
1478 }
1479
1480 __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");
1481
1482 /***/ }),
1483
1484 /***/ "./scripts/shared/Common/ErrorHandler.tsx":
1485 /*!************************************************!*\
1486 !*** ./scripts/shared/Common/ErrorHandler.tsx ***!
1487 \************************************************/
1488 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1489
1490 "use strict";
1491 __webpack_require__.r(__webpack_exports__);
1492 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1493 /* harmony export */ "default": () => (/* binding */ ErrorHandler)
1494 /* harmony export */ });
1495 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1496 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
1497 /* harmony import */ var _UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIContainer */ "./scripts/shared/UIComponents/UIContainer.ts");
1498 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1499 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1500 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1501 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__);
1502
1503
1504
1505
1506
1507
1508
1509
1510 function redirectToPlugin() {
1511 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);
1512 }
1513
1514 function ErrorHandler(_ref) {
1515 var status = _ref.status,
1516 resetErrorState = _ref.resetErrorState,
1517 _ref$errorInfo = _ref.errorInfo,
1518 errorInfo = _ref$errorInfo === void 0 ? {
1519 header: '',
1520 message: '',
1521 action: ''
1522 } : _ref$errorInfo;
1523 var isUnauthorized = status === 401 || status === 403;
1524 var errorHeader = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)("Your plugin isn't authorized", 'leadin') : errorInfo.header;
1525 var errorMessage = isUnauthorized ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Reauthorize your plugin to access your free HubSpot tools', 'leadin') : errorInfo.message;
1526 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_3__["default"], {
1527 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_4__.pluginPath,
1528 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_UIComponents_UIContainer__WEBPACK_IMPORTED_MODULE_2__["default"], {
1529 textAlign: "center",
1530 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h4", {
1531 children: errorHeader
1532 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1533 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1534 children: errorMessage
1535 })
1536 }), isUnauthorized ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1537 "data-test-id": "authorize-button",
1538 onClick: redirectToPlugin,
1539 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Go to plugin', 'leadin')
1540 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_1__["default"], {
1541 "data-test-id": "retry-button",
1542 onClick: resetErrorState,
1543 children: errorInfo.action
1544 })]
1545 })
1546 });
1547 }
1548
1549 /***/ }),
1550
1551 /***/ "./scripts/shared/Common/HubspotWrapper.ts":
1552 /*!*************************************************!*\
1553 !*** ./scripts/shared/Common/HubspotWrapper.ts ***!
1554 \*************************************************/
1555 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1556
1557 "use strict";
1558 __webpack_require__.r(__webpack_exports__);
1559 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1560 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1561 /* harmony export */ });
1562 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
1563
1564
1565 var _exp = /*#__PURE__*/function _exp() {
1566 return function (props) {
1567 return "url(".concat(props.pluginPath, "/public/assets/images/hubspot.svg)");
1568 };
1569 };
1570
1571 var _exp2 = /*#__PURE__*/function _exp2() {
1572 return function (props) {
1573 return props.padding || '90px 20% 25px';
1574 };
1575 };
1576
1577 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
1578 name: "HubspotWrapper0",
1579 "class": "h1q5v5ee",
1580 propsAsIs: false,
1581 vars: {
1582 "h1q5v5ee-0": [_exp()],
1583 "h1q5v5ee-1": [_exp2()]
1584 }
1585 }));
1586
1587 __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");
1588
1589 /***/ }),
1590
1591 /***/ "./scripts/shared/Common/LoadingBlock.tsx":
1592 /*!************************************************!*\
1593 !*** ./scripts/shared/Common/LoadingBlock.tsx ***!
1594 \************************************************/
1595 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1596
1597 "use strict";
1598 __webpack_require__.r(__webpack_exports__);
1599 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1600 /* harmony export */ "default": () => (/* binding */ LoadingBlock)
1601 /* harmony export */ });
1602 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1603 /* harmony import */ var _HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1604 /* harmony import */ var _UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UISpinner */ "./scripts/shared/UIComponents/UISpinner.tsx");
1605 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1606
1607
1608
1609
1610 function LoadingBlock() {
1611 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1612 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__.pluginPath,
1613 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UISpinner__WEBPACK_IMPORTED_MODULE_2__["default"], {
1614 size: 50
1615 })
1616 });
1617 }
1618
1619 /***/ }),
1620
1621 /***/ "./scripts/shared/Form/FormEdit.tsx":
1622 /*!******************************************!*\
1623 !*** ./scripts/shared/Form/FormEdit.tsx ***!
1624 \******************************************/
1625 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1626
1627 "use strict";
1628 __webpack_require__.r(__webpack_exports__);
1629 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1630 /* harmony export */ "default": () => (/* binding */ FormEditContainer)
1631 /* harmony export */ });
1632 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1633 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1634 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1635 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1636 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
1637 /* harmony import */ var _PreviewForm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PreviewForm */ "./scripts/shared/Form/PreviewForm.tsx");
1638 /* harmony import */ var _FormSelect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./FormSelect */ "./scripts/shared/Form/FormSelect.tsx");
1639 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1640 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1641 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1642 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
1643 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; }
1644
1645 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; }
1646
1647 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; }
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660 function FormEdit(_ref) {
1661 var attributes = _ref.attributes,
1662 isSelected = _ref.isSelected,
1663 setAttributes = _ref.setAttributes,
1664 _ref$preview = _ref.preview,
1665 preview = _ref$preview === void 0 ? true : _ref$preview,
1666 _ref$origin = _ref.origin,
1667 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1668 var formId = attributes.formId,
1669 formName = attributes.formName;
1670 var formSelected = _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId && formId;
1671 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.useBackgroundAppContext)();
1672 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostBackgroundMessage)();
1673
1674 var handleChange = function handleChange(selectedForm) {
1675 setAttributes({
1676 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1677 formId: selectedForm.value,
1678 formName: selectedForm.label
1679 });
1680 };
1681
1682 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1683 monitorFormPreviewRender({
1684 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.TrackFormPreviewRender,
1685 payload: {
1686 origin: origin
1687 }
1688 });
1689 }, [origin]);
1690 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, {
1691 children: [(isSelected || !formSelected) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelect__WEBPACK_IMPORTED_MODULE_5__["default"], {
1692 formId: formId,
1693 formName: formName,
1694 handleChange: handleChange,
1695 origin: origin
1696 }), formSelected && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1697 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"], {
1698 portalId: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.portalId,
1699 formId: formId
1700 })]
1701 })]
1702 });
1703 }
1704
1705 function FormEditContainer(props) {
1706 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.BackgroudAppContext.Provider, {
1707 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_9__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.refreshToken),
1708 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(FormEdit, _objectSpread({}, props))
1709 });
1710 }
1711
1712 /***/ }),
1713
1714 /***/ "./scripts/shared/Form/FormSelect.tsx":
1715 /*!********************************************!*\
1716 !*** ./scripts/shared/Form/FormSelect.tsx ***!
1717 \********************************************/
1718 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1719
1720 "use strict";
1721 __webpack_require__.r(__webpack_exports__);
1722 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1723 /* harmony export */ "default": () => (/* binding */ FormSelect)
1724 /* harmony export */ });
1725 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1726 /* harmony import */ var _FormSelector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormSelector */ "./scripts/shared/Form/FormSelector.tsx");
1727 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
1728 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1729 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
1730 /* harmony import */ var _hooks_useForms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useForms */ "./scripts/shared/Form/hooks/useForms.ts");
1731 /* harmony import */ var _hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useCreateFormFromTemplate */ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts");
1732 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
1733 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
1734
1735
1736
1737
1738
1739
1740
1741
1742 function FormSelect(_ref) {
1743 var formId = _ref.formId,
1744 formName = _ref.formName,
1745 handleChange = _ref.handleChange,
1746 _ref$origin = _ref.origin,
1747 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
1748
1749 var _useForms = (0,_hooks_useForms__WEBPACK_IMPORTED_MODULE_4__["default"])(),
1750 search = _useForms.search,
1751 formApiError = _useForms.formApiError,
1752 reset = _useForms.reset;
1753
1754 var _useCreateFormFromTem = (0,_hooks_useCreateFormFromTemplate__WEBPACK_IMPORTED_MODULE_5__["default"])(origin),
1755 createFormByTemplate = _useCreateFormFromTem.createFormByTemplate,
1756 createReset = _useCreateFormFromTem.reset,
1757 isCreating = _useCreateFormFromTem.isCreating,
1758 hasError = _useCreateFormFromTem.hasError,
1759 createApiError = _useCreateFormFromTem.formApiError;
1760
1761 var value = formId && formName ? {
1762 label: formName,
1763 value: formId
1764 } : null;
1765
1766 var handleLocalChange = function handleLocalChange(option) {
1767 if ((0,_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_6__.isDefaultForm)(option.value)) {
1768 createFormByTemplate(option.value).then(function (_ref2) {
1769 var guid = _ref2.guid,
1770 name = _ref2.name;
1771 handleChange({
1772 value: guid,
1773 label: name
1774 });
1775 });
1776 } else {
1777 handleChange(option);
1778 }
1779 };
1780
1781 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"], {
1782 status: formApiError ? formApiError.status : createApiError.status,
1783 resetErrorState: function resetErrorState() {
1784 if (hasError) {
1785 createReset();
1786 } else {
1787 reset();
1788 }
1789 },
1790 errorInfo: {
1791 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('There was a problem retrieving your forms', 'leadin'),
1792 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Please refresh your forms or try again in a few minutes', 'leadin'),
1793 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Refresh forms', 'leadin')
1794 }
1795 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FormSelector__WEBPACK_IMPORTED_MODULE_1__["default"], {
1796 loadOptions: search,
1797 onChange: function onChange(option) {
1798 return handleLocalChange(option);
1799 },
1800 value: value
1801 });
1802 }
1803
1804 /***/ }),
1805
1806 /***/ "./scripts/shared/Form/FormSelector.tsx":
1807 /*!**********************************************!*\
1808 !*** ./scripts/shared/Form/FormSelector.tsx ***!
1809 \**********************************************/
1810 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1811
1812 "use strict";
1813 __webpack_require__.r(__webpack_exports__);
1814 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1815 /* harmony export */ "default": () => (/* binding */ FormSelector)
1816 /* harmony export */ });
1817 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1818 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
1819 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1820 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
1821 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1822 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
1823
1824
1825
1826
1827
1828 function FormSelector(_ref) {
1829 var loadOptions = _ref.loadOptions,
1830 onChange = _ref.onChange,
1831 value = _ref.value;
1832 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_1__["default"], {
1833 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.pluginPath,
1834 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
1835 "data-test-id": "leadin-form-select",
1836 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
1837 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select an existing form or create a new one from a template', 'leadin')
1838 })
1839 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_3__["default"], {
1840 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Search for a form', 'leadin'),
1841 value: value,
1842 loadOptions: loadOptions,
1843 onChange: onChange
1844 })]
1845 });
1846 }
1847
1848 /***/ }),
1849
1850 /***/ "./scripts/shared/Form/PreviewForm.tsx":
1851 /*!*********************************************!*\
1852 !*** ./scripts/shared/Form/PreviewForm.tsx ***!
1853 \*********************************************/
1854 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1855
1856 "use strict";
1857 __webpack_require__.r(__webpack_exports__);
1858 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1859 /* harmony export */ "default": () => (/* binding */ PreviewForm)
1860 /* harmony export */ });
1861 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
1862 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
1863 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1864 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
1865 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
1866 /* harmony import */ var _hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useFormsScript */ "./scripts/shared/Form/hooks/useFormsScript.ts");
1867
1868
1869
1870
1871
1872 function PreviewForm(_ref) {
1873 var portalId = _ref.portalId,
1874 formId = _ref.formId;
1875 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
1876 var ready = (0,_hooks_useFormsScript__WEBPACK_IMPORTED_MODULE_4__["default"])();
1877 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
1878 if (!ready) {
1879 return;
1880 }
1881
1882 if (inputEl.current) {
1883 inputEl.current.innerHTML = '';
1884 var embedScript = document.createElement('script');
1885 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, " });");
1886 inputEl.current.appendChild(embedScript);
1887 }
1888 }, [formId, portalId, ready, inputEl]);
1889 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
1890 ref: inputEl
1891 });
1892 }
1893
1894 /***/ }),
1895
1896 /***/ "./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts":
1897 /*!****************************************************************!*\
1898 !*** ./scripts/shared/Form/hooks/useCreateFormFromTemplate.ts ***!
1899 \****************************************************************/
1900 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1901
1902 "use strict";
1903 __webpack_require__.r(__webpack_exports__);
1904 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1905 /* harmony export */ "default": () => (/* binding */ useCreateFormFromTemplate)
1906 /* harmony export */ });
1907 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1908 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1909 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1910 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
1911 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
1912 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1913
1914 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."); }
1915
1916 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); }
1917
1918 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; }
1919
1920 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; }
1921
1922 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1923
1924
1925
1926
1927
1928 function useCreateFormFromTemplate() {
1929 var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'gutenberg';
1930 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
1931 var track = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostBackgroundMessage)();
1932
1933 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle),
1934 _useState2 = _slicedToArray(_useState, 2),
1935 loadState = _useState2[0],
1936 setLoadState = _useState2[1];
1937
1938 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
1939 _useState4 = _slicedToArray(_useState3, 2),
1940 formApiError = _useState4[0],
1941 setFormApiError = _useState4[1];
1942
1943 var createFormByTemplate = function createFormByTemplate(type) {
1944 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
1945 track({
1946 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreatedFromTemplate,
1947 payload: {
1948 type: type,
1949 origin: origin
1950 }
1951 });
1952 return proxy({
1953 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.CreateFormFromTemplate,
1954 payload: type
1955 }).then(function (form) {
1956 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1957 return form;
1958 })["catch"](function (err) {
1959 setFormApiError(err);
1960 track({
1961 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.TrackFormCreationFailed,
1962 payload: {
1963 origin: origin
1964 }
1965 });
1966 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
1967 });
1968 };
1969
1970 return {
1971 isCreating: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading,
1972 hasError: loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed,
1973 formApiError: formApiError,
1974 createFormByTemplate: createFormByTemplate,
1975 reset: function reset() {
1976 return setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
1977 }
1978 };
1979 }
1980
1981 /***/ }),
1982
1983 /***/ "./scripts/shared/Form/hooks/useForms.ts":
1984 /*!***********************************************!*\
1985 !*** ./scripts/shared/Form/hooks/useForms.ts ***!
1986 \***********************************************/
1987 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1988
1989 "use strict";
1990 __webpack_require__.r(__webpack_exports__);
1991 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1992 /* harmony export */ "default": () => (/* binding */ useForms)
1993 /* harmony export */ });
1994 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1995 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1996 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js");
1997 /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
1998 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
1999 /* harmony import */ var _constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../constants/defaultFormOptions */ "./scripts/constants/defaultFormOptions.ts");
2000 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2001 function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2002
2003 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."); }
2004
2005 function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2006
2007 function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2008
2009 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2010
2011 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."); }
2012
2013 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); }
2014
2015 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; }
2016
2017 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; }
2018
2019 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2020
2021
2022
2023
2024
2025
2026 function useForms() {
2027 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_2__.usePostAsyncBackgroundMessage)();
2028
2029 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2030 _useState2 = _slicedToArray(_useState, 2),
2031 formApiError = _useState2[0],
2032 setFormApiError = _useState2[1];
2033
2034 var search = lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(function (search, callback) {
2035 return proxy({
2036 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_4__.ProxyMessages.FetchForms,
2037 payload: {
2038 search: search
2039 }
2040 }).then(function (forms) {
2041 callback([].concat(_toConsumableArray(forms.map(function (form) {
2042 return {
2043 label: form.name,
2044 value: form.guid
2045 };
2046 })), [_constants_defaultFormOptions__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_OPTIONS]));
2047 })["catch"](function (error) {
2048 setFormApiError(error);
2049 });
2050 }, 300, {
2051 trailing: true
2052 });
2053 return {
2054 search: search,
2055 formApiError: formApiError,
2056 reset: function reset() {
2057 return setFormApiError(null);
2058 }
2059 };
2060 }
2061
2062 /***/ }),
2063
2064 /***/ "./scripts/shared/Form/hooks/useFormsScript.ts":
2065 /*!*****************************************************!*\
2066 !*** ./scripts/shared/Form/hooks/useFormsScript.ts ***!
2067 \*****************************************************/
2068 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2069
2070 "use strict";
2071 __webpack_require__.r(__webpack_exports__);
2072 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2073 /* harmony export */ "default": () => (/* binding */ useFormScript)
2074 /* harmony export */ });
2075 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2076 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2077 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2078 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2079 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2080 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2081 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2082
2083 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."); }
2084
2085 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); }
2086
2087 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; }
2088
2089 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; }
2090
2091 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2092
2093
2094
2095
2096
2097 var promise;
2098
2099 function loadFormsScript() {
2100 if (!promise) {
2101 promise = new Promise(function (resolve, reject) {
2102 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.formsScript).done(resolve).fail(reject);
2103 });
2104 }
2105
2106 return promise;
2107 }
2108
2109 function useFormScript() {
2110 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2111 _useState2 = _slicedToArray(_useState, 2),
2112 ready = _useState2[0],
2113 setReady = _useState2[1];
2114
2115 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2116 loadFormsScript().then(function () {
2117 return setReady(true);
2118 })["catch"](function (error) {
2119 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2120 });
2121 }, []);
2122 return ready;
2123 }
2124
2125 /***/ }),
2126
2127 /***/ "./scripts/shared/Meeting/MeetingController.tsx":
2128 /*!******************************************************!*\
2129 !*** ./scripts/shared/Meeting/MeetingController.tsx ***!
2130 \******************************************************/
2131 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2132
2133 "use strict";
2134 __webpack_require__.r(__webpack_exports__);
2135 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2136 /* harmony export */ "default": () => (/* binding */ MeetingController)
2137 /* harmony export */ });
2138 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2139 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2140 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2141 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2142 /* harmony import */ var _MeetingSelector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MeetingSelector */ "./scripts/shared/Meeting/MeetingSelector.tsx");
2143 /* harmony import */ var _MeetingWarning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MeetingWarning */ "./scripts/shared/Meeting/MeetingWarning.tsx");
2144 /* harmony import */ var _hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useMeetings */ "./scripts/shared/Meeting/hooks/useMeetings.ts");
2145 /* harmony import */ var _Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Common/HubspotWrapper */ "./scripts/shared/Common/HubspotWrapper.ts");
2146 /* harmony import */ var _Common_ErrorHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/ErrorHandler */ "./scripts/shared/Common/ErrorHandler.tsx");
2147 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2148 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2149 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
2150 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! raven-js */ "./node_modules/raven-js/src/singleton.js");
2151 /* harmony import */ var raven_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(raven_js__WEBPACK_IMPORTED_MODULE_10__);
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163 function MeetingController(_ref) {
2164 var handleChange = _ref.handleChange,
2165 url = _ref.url;
2166
2167 var _useMeetings = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__["default"])(),
2168 meetings = _useMeetings.mappedMeetings,
2169 loading = _useMeetings.loading,
2170 error = _useMeetings.error,
2171 reload = _useMeetings.reload,
2172 connectCalendar = _useMeetings.connectCalendar;
2173
2174 var selectedMeetingOption = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeeting)(url);
2175 var selectedMeetingCalendar = (0,_hooks_useMeetings__WEBPACK_IMPORTED_MODULE_5__.useSelectedMeetingCalendar)(url);
2176 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2177 if (!url && meetings.length > 0) {
2178 handleChange(meetings[0].value);
2179 }
2180 }, [meetings, url, handleChange]);
2181
2182 var handleLocalChange = function handleLocalChange(option) {
2183 handleChange(option.value);
2184 };
2185
2186 var handleConnectCalendar = function handleConnectCalendar() {
2187 return connectCalendar().then(function () {
2188 reload();
2189 })["catch"](function (error) {
2190 raven_js__WEBPACK_IMPORTED_MODULE_10___default().captureMessage('Unable to connect calendar', {
2191 extra: {
2192 error: error
2193 }
2194 });
2195 });
2196 };
2197
2198 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2199 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"], {
2200 status: error && error.status || error,
2201 resetErrorState: function resetErrorState() {
2202 return reload();
2203 },
2204 errorInfo: {
2205 header: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('There was a problem retrieving your meetings', 'leadin'),
2206 message: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Please refresh your meetings or try again in a few minutes', 'leadin'),
2207 action: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__.__)('Refresh meetings', 'leadin')
2208 }
2209 }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_Common_HubspotWrapper__WEBPACK_IMPORTED_MODULE_6__["default"], {
2210 padding: "90px 32px 24px",
2211 pluginPath: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_8__.pluginPath,
2212 children: [selectedMeetingCalendar && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingWarning__WEBPACK_IMPORTED_MODULE_4__["default"], {
2213 status: selectedMeetingCalendar,
2214 onConnectCalendar: handleConnectCalendar
2215 }), meetings.length > 1 && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingSelector__WEBPACK_IMPORTED_MODULE_3__["default"], {
2216 onChange: handleLocalChange,
2217 options: meetings,
2218 value: selectedMeetingOption
2219 })]
2220 })
2221 });
2222 }
2223
2224 /***/ }),
2225
2226 /***/ "./scripts/shared/Meeting/MeetingEdit.tsx":
2227 /*!************************************************!*\
2228 !*** ./scripts/shared/Meeting/MeetingEdit.tsx ***!
2229 \************************************************/
2230 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2231
2232 "use strict";
2233 __webpack_require__.r(__webpack_exports__);
2234 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2235 /* harmony export */ "default": () => (/* binding */ MeetingsEditContainer)
2236 /* harmony export */ });
2237 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2238 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2239 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2240 /* harmony import */ var _MeetingController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MeetingController */ "./scripts/shared/Meeting/MeetingController.tsx");
2241 /* harmony import */ var _PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreviewMeeting */ "./scripts/shared/Meeting/PreviewMeeting.tsx");
2242 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2243 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2244 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2245 /* harmony import */ var _Common_LoadingBlock__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Common/LoadingBlock */ "./scripts/shared/Common/LoadingBlock.tsx");
2246 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
2247 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; }
2248
2249 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; }
2250
2251 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; }
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263 function MeetingEdit(_ref) {
2264 var url = _ref.attributes.url,
2265 isSelected = _ref.isSelected,
2266 setAttributes = _ref.setAttributes,
2267 _ref$preview = _ref.preview,
2268 preview = _ref$preview === void 0 ? true : _ref$preview,
2269 _ref$origin = _ref.origin,
2270 origin = _ref$origin === void 0 ? 'gutenberg' : _ref$origin;
2271 var isBackgroundAppReady = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.useBackgroundAppContext)();
2272 var monitorFormPreviewRender = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.usePostBackgroundMessage)();
2273
2274 var handleChange = function handleChange(newUrl) {
2275 setAttributes({
2276 url: newUrl
2277 });
2278 };
2279
2280 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2281 monitorFormPreviewRender({
2282 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_6__.ProxyMessages.TrackMeetingPreviewRender,
2283 payload: {
2284 origin: origin
2285 }
2286 });
2287 }, [origin]);
2288 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, {
2289 children: [(isSelected || !url) && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_MeetingController__WEBPACK_IMPORTED_MODULE_2__["default"], {
2290 url: url,
2291 handleChange: handleChange
2292 }), preview && url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewMeeting__WEBPACK_IMPORTED_MODULE_3__["default"], {
2293 url: url
2294 })]
2295 });
2296 }
2297
2298 function MeetingsEditContainer(props) {
2299 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_4__.BackgroudAppContext.Provider, {
2300 value: _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken && (0,_utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_8__.getOrCreateBackgroundApp)(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_5__.refreshToken),
2301 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MeetingEdit, _objectSpread({}, props))
2302 });
2303 }
2304
2305 /***/ }),
2306
2307 /***/ "./scripts/shared/Meeting/MeetingSelector.tsx":
2308 /*!****************************************************!*\
2309 !*** ./scripts/shared/Meeting/MeetingSelector.tsx ***!
2310 \****************************************************/
2311 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2312
2313 "use strict";
2314 __webpack_require__.r(__webpack_exports__);
2315 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2316 /* harmony export */ "default": () => (/* binding */ MeetingSelector)
2317 /* harmony export */ });
2318 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2319 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2320 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2321 /* harmony import */ var _Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Common/AsyncSelect */ "./scripts/shared/Common/AsyncSelect.tsx");
2322 /* harmony import */ var _UIComponents_UISpacer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../UIComponents/UISpacer */ "./scripts/shared/UIComponents/UISpacer.ts");
2323 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2324 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2325
2326
2327
2328
2329
2330 function MeetingSelector(_ref) {
2331 var options = _ref.options,
2332 onChange = _ref.onChange,
2333 value = _ref.value;
2334 var optionsWrapper = [{
2335 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Meeting name', 'leadin'),
2336 options: options
2337 }];
2338 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2339 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", {
2340 "data-test-id": "leadin-meeting-select",
2341 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("b", {
2342 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting scheduling page', 'leadin')
2343 })
2344 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Common_AsyncSelect__WEBPACK_IMPORTED_MODULE_2__["default"], {
2345 defaultOptions: optionsWrapper,
2346 onChange: onChange,
2347 placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Select a meeting', 'leadin'),
2348 value: value
2349 })]
2350 });
2351 }
2352
2353 /***/ }),
2354
2355 /***/ "./scripts/shared/Meeting/MeetingWarning.tsx":
2356 /*!***************************************************!*\
2357 !*** ./scripts/shared/Meeting/MeetingWarning.tsx ***!
2358 \***************************************************/
2359 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2360
2361 "use strict";
2362 __webpack_require__.r(__webpack_exports__);
2363 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2364 /* harmony export */ "default": () => (/* binding */ MeetingWarning)
2365 /* harmony export */ });
2366 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2367 /* harmony import */ var _UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../UIComponents/UIAlert */ "./scripts/shared/UIComponents/UIAlert.tsx");
2368 /* harmony import */ var _UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIButton */ "./scripts/shared/UIComponents/UIButton.ts");
2369 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./scripts/shared/Meeting/constants.ts");
2370 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2371 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
2372
2373
2374
2375
2376
2377 function MeetingWarning(_ref) {
2378 var status = _ref.status,
2379 onConnectCalendar = _ref.onConnectCalendar;
2380 var isMeetingOwner = status === _constants__WEBPACK_IMPORTED_MODULE_3__.CURRENT_USER_CALENDAR_MISSING;
2381 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');
2382 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');
2383 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIAlert__WEBPACK_IMPORTED_MODULE_1__["default"], {
2384 titleText: titleText,
2385 titleMessage: titleMessage,
2386 children: isMeetingOwner && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIButton__WEBPACK_IMPORTED_MODULE_2__["default"], {
2387 use: "tertiary",
2388 id: "meetings-connect-calendar",
2389 onClick: onConnectCalendar,
2390 children: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Connect calendar', 'leadin')
2391 })
2392 });
2393 }
2394
2395 /***/ }),
2396
2397 /***/ "./scripts/shared/Meeting/PreviewMeeting.tsx":
2398 /*!***************************************************!*\
2399 !*** ./scripts/shared/Meeting/PreviewMeeting.tsx ***!
2400 \***************************************************/
2401 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2402
2403 "use strict";
2404 __webpack_require__.r(__webpack_exports__);
2405 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2406 /* harmony export */ "default": () => (/* binding */ PreviewForm)
2407 /* harmony export */ });
2408 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2409 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2410 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2411 /* harmony import */ var _UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../UIComponents/UIOverlay */ "./scripts/shared/UIComponents/UIOverlay.ts");
2412 /* harmony import */ var _hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMeetingsScript */ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts");
2413
2414
2415
2416
2417 function PreviewForm(_ref) {
2418 var url = _ref.url;
2419 var ready = (0,_hooks_useMeetingsScript__WEBPACK_IMPORTED_MODULE_3__["default"])();
2420 var inputEl = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
2421 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2422 if (!ready) {
2423 return;
2424 }
2425
2426 if (inputEl.current) {
2427 inputEl.current.innerHTML = '';
2428 var container = document.createElement('div');
2429 container.dataset.src = "".concat(url, "?embed=true");
2430 container.classList.add('meetings-iframe-container');
2431 inputEl.current.appendChild(container);
2432 var embedScript = document.createElement('script');
2433 embedScript.innerHTML = 'hbspt.meetings.create(".meetings-iframe-container");';
2434 inputEl.current.appendChild(embedScript);
2435 }
2436 }, [url, ready, inputEl]);
2437 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2438 children: url && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UIComponents_UIOverlay__WEBPACK_IMPORTED_MODULE_2__["default"], {
2439 ref: inputEl
2440 })
2441 });
2442 }
2443
2444 /***/ }),
2445
2446 /***/ "./scripts/shared/Meeting/constants.ts":
2447 /*!*********************************************!*\
2448 !*** ./scripts/shared/Meeting/constants.ts ***!
2449 \*********************************************/
2450 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2451
2452 "use strict";
2453 __webpack_require__.r(__webpack_exports__);
2454 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2455 /* harmony export */ "CURRENT_USER_CALENDAR_MISSING": () => (/* binding */ CURRENT_USER_CALENDAR_MISSING),
2456 /* harmony export */ "OTHER_USER_CALENDAR_MISSING": () => (/* binding */ OTHER_USER_CALENDAR_MISSING)
2457 /* harmony export */ });
2458 var OTHER_USER_CALENDAR_MISSING = 'OTHER_USER_CALENDAR_MISSING';
2459 var CURRENT_USER_CALENDAR_MISSING = 'CURRENT_USER_CALENDAR_MISSING';
2460
2461 /***/ }),
2462
2463 /***/ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts":
2464 /*!*************************************************************!*\
2465 !*** ./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts ***!
2466 \*************************************************************/
2467 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2468
2469 "use strict";
2470 __webpack_require__.r(__webpack_exports__);
2471 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2472 /* harmony export */ "default": () => (/* binding */ useCurrentUserFetch)
2473 /* harmony export */ });
2474 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2475 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2476 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2477 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2478 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2479 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2480
2481 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."); }
2482
2483 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); }
2484
2485 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; }
2486
2487 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; }
2488
2489 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2490
2491
2492
2493
2494
2495 var user = null;
2496 function useCurrentUserFetch() {
2497 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2498
2499 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2500 _useState2 = _slicedToArray(_useState, 2),
2501 loadState = _useState2[0],
2502 setLoadState = _useState2[1];
2503
2504 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2505 _useState4 = _slicedToArray(_useState3, 2),
2506 error = _useState4[0],
2507 setError = _useState4[1];
2508
2509 var createUser = function createUser() {
2510 if (!user) {
2511 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2512 }
2513 };
2514
2515 var reload = function reload() {
2516 user = null;
2517 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2518 setError(null);
2519 };
2520
2521 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2522 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && !user) {
2523 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2524 proxy({
2525 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchOrCreateMeetingUser
2526 }).then(function (data) {
2527 user = data;
2528 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Idle);
2529 })["catch"](function (err) {
2530 setError(err);
2531 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2532 });
2533 }
2534 }, [loadState]);
2535 return {
2536 user: user,
2537 loadUserState: loadState,
2538 error: error,
2539 createUser: createUser,
2540 reload: reload
2541 };
2542 }
2543
2544 /***/ }),
2545
2546 /***/ "./scripts/shared/Meeting/hooks/useMeetings.ts":
2547 /*!*****************************************************!*\
2548 !*** ./scripts/shared/Meeting/hooks/useMeetings.ts ***!
2549 \*****************************************************/
2550 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2551
2552 "use strict";
2553 __webpack_require__.r(__webpack_exports__);
2554 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2555 /* harmony export */ "default": () => (/* binding */ useMeetings),
2556 /* harmony export */ "useSelectedMeeting": () => (/* binding */ useSelectedMeeting),
2557 /* harmony export */ "useSelectedMeetingCalendar": () => (/* binding */ useSelectedMeetingCalendar)
2558 /* harmony export */ });
2559 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2560 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2561 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2562 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2563 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./scripts/shared/Meeting/constants.ts");
2564 /* harmony import */ var _useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useMeetingsFetch */ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts");
2565 /* harmony import */ var _useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./useCurrentUserFetch */ "./scripts/shared/Meeting/hooks/useCurrentUserFetch.ts");
2566 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2567 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2568 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2569 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; }
2570
2571 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; }
2572
2573 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; }
2574
2575 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2576
2577 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."); }
2578
2579 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); }
2580
2581 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; }
2582
2583 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; }
2584
2585 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596 function getDefaultMeetingName(meeting, currentUser, meetingUsers) {
2597 var _meeting$meetingsUser = _slicedToArray(meeting.meetingsUserIds, 1),
2598 meetingOwnerId = _meeting$meetingsUser[0];
2599
2600 var result = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Default', 'leadin');
2601
2602 if (currentUser && meetingOwnerId !== currentUser.id && meetingUsers[meetingOwnerId]) {
2603 var user = meetingUsers[meetingOwnerId];
2604 result += " (".concat(user.userProfile.fullName, ")");
2605 }
2606
2607 return result;
2608 }
2609
2610 function hasCalendarObject(user) {
2611 return user && user.meetingsUserBlob && user.meetingsUserBlob.calendarSettings && user.meetingsUserBlob.calendarSettings.email;
2612 }
2613
2614 function useMeetings() {
2615 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_6__.usePostAsyncBackgroundMessage)();
2616
2617 var _useMeetingsFetch = (0,_useMeetingsFetch__WEBPACK_IMPORTED_MODULE_3__["default"])(),
2618 meetings = _useMeetingsFetch.meetings,
2619 meetingUsers = _useMeetingsFetch.meetingUsers,
2620 meetingsError = _useMeetingsFetch.error,
2621 loadMeetingsState = _useMeetingsFetch.loadMeetingsState,
2622 reloadMeetings = _useMeetingsFetch.reload;
2623
2624 var _useCurrentUserFetch = (0,_useCurrentUserFetch__WEBPACK_IMPORTED_MODULE_4__["default"])(),
2625 currentUser = _useCurrentUserFetch.user,
2626 userError = _useCurrentUserFetch.error,
2627 loadUserState = _useCurrentUserFetch.loadUserState,
2628 reloadUser = _useCurrentUserFetch.reload;
2629
2630 var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
2631 reloadUser();
2632 reloadMeetings();
2633 }, [reloadUser, reloadMeetings]);
2634
2635 var connectCalendar = function connectCalendar() {
2636 return proxy({
2637 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_7__.ProxyMessages.ConnectMeetingsCalendar
2638 });
2639 };
2640
2641 return {
2642 mappedMeetings: meetings.map(function (meet) {
2643 return {
2644 label: meet.name || getDefaultMeetingName(meet, currentUser, meetingUsers),
2645 value: meet.link
2646 };
2647 }),
2648 meetings: meetings,
2649 meetingUsers: meetingUsers,
2650 currentUser: currentUser,
2651 error: meetingsError || userError,
2652 loading: loadMeetingsState == _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading || loadUserState === _enums_loadState__WEBPACK_IMPORTED_MODULE_5__["default"].Loading,
2653 reload: reload,
2654 connectCalendar: connectCalendar
2655 };
2656 }
2657 function useSelectedMeeting(url) {
2658 var _useMeetings = useMeetings(),
2659 meetings = _useMeetings.mappedMeetings;
2660
2661 var option = meetings.find(function (_ref) {
2662 var value = _ref.value;
2663 return value === url;
2664 });
2665 return option;
2666 }
2667 function useSelectedMeetingCalendar(url) {
2668 var _useMeetings2 = useMeetings(),
2669 meetings = _useMeetings2.meetings,
2670 meetingUsers = _useMeetings2.meetingUsers,
2671 currentUser = _useMeetings2.currentUser;
2672
2673 var meeting = meetings.find(function (meet) {
2674 return meet.link === url;
2675 });
2676 var mappedMeetingUsersId = meetingUsers.reduce(function (p, c) {
2677 return _objectSpread(_objectSpread({}, p), {}, _defineProperty({}, c.id, c));
2678 }, {});
2679
2680 if (!meeting) {
2681 return null;
2682 } else {
2683 var meetingsUserIds = meeting.meetingsUserIds;
2684
2685 if (currentUser && meetingsUserIds.includes(currentUser.id) && !hasCalendarObject(currentUser)) {
2686 return _constants__WEBPACK_IMPORTED_MODULE_2__.CURRENT_USER_CALENDAR_MISSING;
2687 } else if (meetingsUserIds.map(function (id) {
2688 return mappedMeetingUsersId[id];
2689 }).some(function (user) {
2690 return !hasCalendarObject(user);
2691 })) {
2692 return _constants__WEBPACK_IMPORTED_MODULE_2__.OTHER_USER_CALENDAR_MISSING;
2693 } else {
2694 return null;
2695 }
2696 }
2697 }
2698
2699 /***/ }),
2700
2701 /***/ "./scripts/shared/Meeting/hooks/useMeetingsFetch.ts":
2702 /*!**********************************************************!*\
2703 !*** ./scripts/shared/Meeting/hooks/useMeetingsFetch.ts ***!
2704 \**********************************************************/
2705 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2706
2707 "use strict";
2708 __webpack_require__.r(__webpack_exports__);
2709 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2710 /* harmony export */ "default": () => (/* binding */ useMeetingsFetch)
2711 /* harmony export */ });
2712 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2713 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2714 /* harmony import */ var _iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../iframe/useBackgroundApp */ "./scripts/iframe/useBackgroundApp.ts");
2715 /* harmony import */ var _enums_loadState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../enums/loadState */ "./scripts/shared/enums/loadState.ts");
2716 /* harmony import */ var _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../iframe/integratedMessages */ "./scripts/iframe/integratedMessages/index.ts");
2717 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2718
2719 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."); }
2720
2721 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); }
2722
2723 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; }
2724
2725 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; }
2726
2727 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2728
2729
2730
2731
2732
2733 var meetings = [];
2734 var meetingUsers = [];
2735 function useMeetingsFetch() {
2736 var proxy = (0,_iframe_useBackgroundApp__WEBPACK_IMPORTED_MODULE_1__.usePostAsyncBackgroundMessage)();
2737
2738 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded),
2739 _useState2 = _slicedToArray(_useState, 2),
2740 loadState = _useState2[0],
2741 setLoadState = _useState2[1];
2742
2743 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null),
2744 _useState4 = _slicedToArray(_useState3, 2),
2745 error = _useState4[0],
2746 setError = _useState4[1];
2747
2748 var reload = function reload() {
2749 meetings = [];
2750 setError(null);
2751 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded);
2752 };
2753
2754 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
2755 if (loadState === _enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].NotLoaded && meetings.length === 0) {
2756 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loading);
2757 proxy({
2758 key: _iframe_integratedMessages__WEBPACK_IMPORTED_MODULE_3__.ProxyMessages.FetchMeetingsAndUsers
2759 }).then(function (data) {
2760 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Loaded);
2761 meetings = data && data.meetingLinks;
2762 meetingUsers = data && data.meetingUsers;
2763 })["catch"](function (e) {
2764 setError(e);
2765 setLoadState(_enums_loadState__WEBPACK_IMPORTED_MODULE_2__["default"].Failed);
2766 });
2767 }
2768 }, [loadState]);
2769 return {
2770 meetings: meetings,
2771 meetingUsers: meetingUsers,
2772 loadMeetingsState: loadState,
2773 error: error,
2774 reload: reload
2775 };
2776 }
2777
2778 /***/ }),
2779
2780 /***/ "./scripts/shared/Meeting/hooks/useMeetingsScript.ts":
2781 /*!***********************************************************!*\
2782 !*** ./scripts/shared/Meeting/hooks/useMeetingsScript.ts ***!
2783 \***********************************************************/
2784 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2785
2786 "use strict";
2787 __webpack_require__.r(__webpack_exports__);
2788 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2789 /* harmony export */ "default": () => (/* binding */ useMeetingsScript)
2790 /* harmony export */ });
2791 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
2792 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
2793 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
2794 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
2795 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
2796 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../lib/Raven */ "./scripts/lib/Raven.ts");
2797 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2798
2799 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2800
2801 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); }
2802
2803 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; }
2804
2805 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; }
2806
2807 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2808
2809
2810
2811
2812
2813 var promise;
2814
2815 function loadMeetingsScript() {
2816 if (!promise) {
2817 promise = new Promise(function (resolve, reject) {
2818 return jquery__WEBPACK_IMPORTED_MODULE_0___default().getScript(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_2__.meetingsScript).done(resolve).fail(reject);
2819 });
2820 }
2821
2822 return promise;
2823 }
2824
2825 function useMeetingsScript() {
2826 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
2827 _useState2 = _slicedToArray(_useState, 2),
2828 ready = _useState2[0],
2829 setReady = _useState2[1];
2830
2831 (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
2832 loadMeetingsScript().then(function () {
2833 return setReady(true);
2834 })["catch"](function (error) {
2835 return _lib_Raven__WEBPACK_IMPORTED_MODULE_3__["default"].captureException(error);
2836 });
2837 }, []);
2838 return ready;
2839 }
2840
2841 /***/ }),
2842
2843 /***/ "./scripts/shared/UIComponents/UIAlert.tsx":
2844 /*!*************************************************!*\
2845 !*** ./scripts/shared/UIComponents/UIAlert.tsx ***!
2846 \*************************************************/
2847 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2848
2849 "use strict";
2850 __webpack_require__.r(__webpack_exports__);
2851 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2852 /* harmony export */ "default": () => (/* binding */ UIAlert)
2853 /* harmony export */ });
2854 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
2855 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2856
2857
2858 var AlertContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2859 name: "AlertContainer",
2860 "class": "a1h8m4fo",
2861 propsAsIs: false
2862 });
2863 var Title = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2864 name: "Title",
2865 "class": "tyndzxk",
2866 propsAsIs: false
2867 });
2868 var Message = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('p')({
2869 name: "Message",
2870 "class": "m1m9sbk4",
2871 propsAsIs: false
2872 });
2873 var MessageContainer = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('div')({
2874 name: "MessageContainer",
2875 "class": "mg5o421",
2876 propsAsIs: false
2877 });
2878 function UIAlert(_ref) {
2879 var titleText = _ref.titleText,
2880 titleMessage = _ref.titleMessage,
2881 children = _ref.children;
2882 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(AlertContainer, {
2883 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(MessageContainer, {
2884 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Title, {
2885 children: titleText
2886 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Message, {
2887 children: titleMessage
2888 })]
2889 }), children]
2890 });
2891 }
2892
2893 __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");
2894
2895 /***/ }),
2896
2897 /***/ "./scripts/shared/UIComponents/UIButton.ts":
2898 /*!*************************************************!*\
2899 !*** ./scripts/shared/UIComponents/UIButton.ts ***!
2900 \*************************************************/
2901 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2902
2903 "use strict";
2904 __webpack_require__.r(__webpack_exports__);
2905 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2906 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2907 /* harmony export */ });
2908 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2909 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
2910
2911
2912
2913 var _exp2 = /*#__PURE__*/function _exp2() {
2914 return function (props) {
2915 return props.use === 'tertiary' ? _colors__WEBPACK_IMPORTED_MODULE_0__.HEFFALUMP : _colors__WEBPACK_IMPORTED_MODULE_0__.LORAX;
2916 };
2917 };
2918
2919 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_1__.styled)('button')({
2920 name: "UIButton0",
2921 "class": "ug152ch",
2922 propsAsIs: false,
2923 vars: {
2924 "ug152ch-0": [_exp2()]
2925 }
2926 }));
2927
2928 __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");
2929
2930 /***/ }),
2931
2932 /***/ "./scripts/shared/UIComponents/UIContainer.ts":
2933 /*!****************************************************!*\
2934 !*** ./scripts/shared/UIComponents/UIContainer.ts ***!
2935 \****************************************************/
2936 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2937
2938 "use strict";
2939 __webpack_require__.r(__webpack_exports__);
2940 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2941 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2942 /* harmony export */ });
2943 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2944
2945
2946 var _exp = /*#__PURE__*/function _exp() {
2947 return function (props) {
2948 return props.textAlign ? props.textAlign : 'inherit';
2949 };
2950 };
2951
2952 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2953 name: "UIContainer0",
2954 "class": "ua13n1c",
2955 propsAsIs: false,
2956 vars: {
2957 "ua13n1c-0": [_exp()]
2958 }
2959 }));
2960
2961 __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");
2962
2963 /***/ }),
2964
2965 /***/ "./scripts/shared/UIComponents/UIOverlay.ts":
2966 /*!**************************************************!*\
2967 !*** ./scripts/shared/UIComponents/UIOverlay.ts ***!
2968 \**************************************************/
2969 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2970
2971 "use strict";
2972 __webpack_require__.r(__webpack_exports__);
2973 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2974 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2975 /* harmony export */ });
2976 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
2977
2978 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
2979 name: "UIOverlay0",
2980 "class": "u1q7a48k",
2981 propsAsIs: false
2982 }));
2983
2984 __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");
2985
2986 /***/ }),
2987
2988 /***/ "./scripts/shared/UIComponents/UISpacer.ts":
2989 /*!*************************************************!*\
2990 !*** ./scripts/shared/UIComponents/UISpacer.ts ***!
2991 \*************************************************/
2992 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2993
2994 "use strict";
2995 __webpack_require__.r(__webpack_exports__);
2996 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2997 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2998 /* harmony export */ });
2999 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3000
3001 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_0__.styled)('div')({
3002 name: "UISpacer0",
3003 "class": "u3qxofx",
3004 propsAsIs: false
3005 }));
3006
3007 __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");
3008
3009 /***/ }),
3010
3011 /***/ "./scripts/shared/UIComponents/UISpinner.tsx":
3012 /*!***************************************************!*\
3013 !*** ./scripts/shared/UIComponents/UISpinner.tsx ***!
3014 \***************************************************/
3015 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3016
3017 "use strict";
3018 __webpack_require__.r(__webpack_exports__);
3019 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3020 /* harmony export */ "default": () => (/* binding */ UISpinner)
3021 /* harmony export */ });
3022 /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
3023 /* harmony import */ var _linaria_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/react */ "./node_modules/@linaria/react/dist/index.mjs");
3024 /* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./colors */ "./scripts/shared/UIComponents/colors.ts");
3025
3026
3027
3028 var SpinnerOuter = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3029 name: "SpinnerOuter",
3030 "class": "sxa9zrc",
3031 propsAsIs: false
3032 });
3033 var SpinnerInner = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('div')({
3034 name: "SpinnerInner",
3035 "class": "s14430wa",
3036 propsAsIs: false
3037 });
3038
3039 var _exp = /*#__PURE__*/function _exp() {
3040 return function (props) {
3041 return props.color;
3042 };
3043 };
3044
3045 var Circle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3046 name: "Circle",
3047 "class": "ct87ghk",
3048 propsAsIs: true,
3049 vars: {
3050 "ct87ghk-0": [_exp()]
3051 }
3052 });
3053
3054 var _exp2 = /*#__PURE__*/function _exp2() {
3055 return function (props) {
3056 return props.color;
3057 };
3058 };
3059
3060 var AnimatedCircle = /*#__PURE__*/(0,_linaria_react__WEBPACK_IMPORTED_MODULE_2__.styled)('circle')({
3061 name: "AnimatedCircle",
3062 "class": "avili0h",
3063 propsAsIs: true,
3064 vars: {
3065 "avili0h-0": [_exp2()]
3066 }
3067 });
3068 function UISpinner(_ref) {
3069 var _ref$size = _ref.size,
3070 size = _ref$size === void 0 ? 20 : _ref$size;
3071 return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerOuter, {
3072 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SpinnerInner, {
3073 children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg", {
3074 height: size,
3075 width: size,
3076 viewBox: "0 0 50 50",
3077 children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle, {
3078 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO_MEDIUM,
3079 cx: "25",
3080 cy: "25",
3081 r: "22.5"
3082 }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(AnimatedCircle, {
3083 color: _colors__WEBPACK_IMPORTED_MODULE_1__.CALYPSO,
3084 cx: "25",
3085 cy: "25",
3086 r: "22.5"
3087 })]
3088 })
3089 })
3090 });
3091 }
3092
3093 __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");
3094
3095 /***/ }),
3096
3097 /***/ "./scripts/shared/UIComponents/colors.ts":
3098 /*!***********************************************!*\
3099 !*** ./scripts/shared/UIComponents/colors.ts ***!
3100 \***********************************************/
3101 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3102
3103 "use strict";
3104 __webpack_require__.r(__webpack_exports__);
3105 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3106 /* harmony export */ "CALYPSO": () => (/* binding */ CALYPSO),
3107 /* harmony export */ "CALYPSO_LIGHT": () => (/* binding */ CALYPSO_LIGHT),
3108 /* harmony export */ "CALYPSO_MEDIUM": () => (/* binding */ CALYPSO_MEDIUM),
3109 /* harmony export */ "HEFFALUMP": () => (/* binding */ HEFFALUMP),
3110 /* harmony export */ "LORAX": () => (/* binding */ LORAX),
3111 /* harmony export */ "MARIGOLD_LIGHT": () => (/* binding */ MARIGOLD_LIGHT),
3112 /* harmony export */ "MARIGOLD_MEDIUM": () => (/* binding */ MARIGOLD_MEDIUM),
3113 /* harmony export */ "OBSIDIAN": () => (/* binding */ OBSIDIAN),
3114 /* harmony export */ "OLAF": () => (/* binding */ OLAF)
3115 /* harmony export */ });
3116 var CALYPSO = '#00a4bd';
3117 var CALYPSO_MEDIUM = '#7fd1de';
3118 var CALYPSO_LIGHT = '#e5f5f8';
3119 var LORAX = '#ff7a59';
3120 var OLAF = '#ffffff';
3121 var HEFFALUMP = '#425b76';
3122 var MARIGOLD_LIGHT = '#fef8f0';
3123 var MARIGOLD_MEDIUM = '#fae0b5';
3124 var OBSIDIAN = '#33475b';
3125
3126 /***/ }),
3127
3128 /***/ "./scripts/shared/enums/connectionStatus.ts":
3129 /*!**************************************************!*\
3130 !*** ./scripts/shared/enums/connectionStatus.ts ***!
3131 \**************************************************/
3132 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3133
3134 "use strict";
3135 __webpack_require__.r(__webpack_exports__);
3136 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3137 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3138 /* harmony export */ });
3139 var ConnectionStatus = {
3140 Connected: 'Connected',
3141 NotConnected: 'NotConnected'
3142 };
3143 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConnectionStatus);
3144
3145 /***/ }),
3146
3147 /***/ "./scripts/shared/enums/loadState.ts":
3148 /*!*******************************************!*\
3149 !*** ./scripts/shared/enums/loadState.ts ***!
3150 \*******************************************/
3151 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3152
3153 "use strict";
3154 __webpack_require__.r(__webpack_exports__);
3155 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3156 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3157 /* harmony export */ });
3158 var LoadState = {
3159 NotLoaded: 'NotLoaded',
3160 Loading: 'Loading',
3161 Loaded: 'Loaded',
3162 Idle: 'Idle',
3163 Failed: 'Failed'
3164 };
3165 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LoadState);
3166
3167 /***/ }),
3168
3169 /***/ "./scripts/utils/appUtils.ts":
3170 /*!***********************************!*\
3171 !*** ./scripts/utils/appUtils.ts ***!
3172 \***********************************/
3173 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3174
3175 "use strict";
3176 __webpack_require__.r(__webpack_exports__);
3177 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3178 /* harmony export */ "initApp": () => (/* binding */ initApp),
3179 /* harmony export */ "initAppOnReady": () => (/* binding */ initAppOnReady)
3180 /* harmony export */ });
3181 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
3182 /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
3183 /* harmony import */ var _lib_Raven__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/Raven */ "./scripts/lib/Raven.ts");
3184
3185
3186 function initApp(initFn) {
3187 (0,_lib_Raven__WEBPACK_IMPORTED_MODULE_1__.configureRaven)();
3188 _lib_Raven__WEBPACK_IMPORTED_MODULE_1__["default"].context(initFn);
3189 }
3190 function initAppOnReady(initFn) {
3191 function main() {
3192 jquery__WEBPACK_IMPORTED_MODULE_0___default()(initFn);
3193 }
3194
3195 initApp(main);
3196 }
3197
3198 /***/ }),
3199
3200 /***/ "./scripts/utils/backgroundAppUtils.ts":
3201 /*!*********************************************!*\
3202 !*** ./scripts/utils/backgroundAppUtils.ts ***!
3203 \*********************************************/
3204 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3205
3206 "use strict";
3207 __webpack_require__.r(__webpack_exports__);
3208 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3209 /* harmony export */ "getOrCreateBackgroundApp": () => (/* binding */ getOrCreateBackgroundApp),
3210 /* harmony export */ "initBackgroundApp": () => (/* binding */ initBackgroundApp)
3211 /* harmony export */ });
3212 /* harmony import */ var _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/leadinConfig */ "./scripts/constants/leadinConfig.ts");
3213 /* harmony import */ var _appUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./appUtils */ "./scripts/utils/appUtils.ts");
3214
3215
3216 function initBackgroundApp(initFn) {
3217 function main() {
3218 if (Array.isArray(initFn)) {
3219 initFn.forEach(function (callback) {
3220 return callback();
3221 });
3222 } else {
3223 initFn();
3224 }
3225 }
3226
3227 (0,_appUtils__WEBPACK_IMPORTED_MODULE_1__.initApp)(main);
3228 }
3229 var getOrCreateBackgroundApp = function getOrCreateBackgroundApp(refreshToken) {
3230 if (window.LeadinBackgroundApp) {
3231 return window.LeadinBackgroundApp;
3232 }
3233
3234 var _window = window,
3235 IntegratedAppEmbedder = _window.IntegratedAppEmbedder,
3236 IntegratedAppOptions = _window.IntegratedAppOptions;
3237 var options = new IntegratedAppOptions().setLocale(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.locale).setDeviceId(_constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.deviceId).setRefreshToken(refreshToken);
3238 var embedder = new IntegratedAppEmbedder('integrated-plugin-proxy', _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.portalId, _constants_leadinConfig__WEBPACK_IMPORTED_MODULE_0__.hubspotBaseUrl, function () {}).setOptions(options);
3239 embedder.attachTo(document.body, false);
3240 embedder.postStartAppMessage(); // lets the app know all all data has been passed to it
3241
3242 window.LeadinBackgroundApp = embedder;
3243 return window.LeadinBackgroundApp;
3244 };
3245
3246 /***/ }),
3247
3248 /***/ "./scripts/utils/withMetaData.ts":
3249 /*!***************************************!*\
3250 !*** ./scripts/utils/withMetaData.ts ***!
3251 \***************************************/
3252 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3253
3254 "use strict";
3255 __webpack_require__.r(__webpack_exports__);
3256 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3257 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3258 /* harmony export */ "isFullSiteEditor": () => (/* binding */ isFullSiteEditor)
3259 /* harmony export */ });
3260 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
3261 /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);
3262 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; }
3263
3264 // from answer here: https://github.com/WordPress/gutenberg/issues/44477#issuecomment-1263026599
3265
3266 var isFullSiteEditor = function isFullSiteEditor() {
3267 return _wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select && !!(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.select)('core/edit-site');
3268 };
3269 var applyWithSelect = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withSelect)(function (select, props) {
3270 return {
3271 metaValue: select('core/editor').getEditedPostAttribute('meta')[props.metaKey]
3272 };
3273 });
3274 var applyWithDispatch = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_0__.withDispatch)(function (dispatch, props) {
3275 return {
3276 setMetaValue: function setMetaValue(value) {
3277 dispatch('core/editor').editPost({
3278 meta: _defineProperty({}, props.metaKey, value)
3279 });
3280 }
3281 };
3282 });
3283
3284 function apply(el) {
3285 return applyWithSelect(applyWithDispatch(el));
3286 }
3287
3288 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (apply);
3289
3290 /***/ }),
3291
3292 /***/ "./node_modules/is-what/dist/index.esm.js":
3293 /*!************************************************!*\
3294 !*** ./node_modules/is-what/dist/index.esm.js ***!
3295 \************************************************/
3296 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3297
3298 "use strict";
3299 __webpack_require__.r(__webpack_exports__);
3300 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3301 /* harmony export */ "getType": () => (/* binding */ getType),
3302 /* harmony export */ "isAnyObject": () => (/* binding */ isAnyObject),
3303 /* harmony export */ "isArray": () => (/* binding */ isArray),
3304 /* harmony export */ "isBlob": () => (/* binding */ isBlob),
3305 /* harmony export */ "isBoolean": () => (/* binding */ isBoolean),
3306 /* harmony export */ "isDate": () => (/* binding */ isDate),
3307 /* harmony export */ "isEmptyArray": () => (/* binding */ isEmptyArray),
3308 /* harmony export */ "isEmptyObject": () => (/* binding */ isEmptyObject),
3309 /* harmony export */ "isEmptyString": () => (/* binding */ isEmptyString),
3310 /* harmony export */ "isError": () => (/* binding */ isError),
3311 /* harmony export */ "isFile": () => (/* binding */ isFile),
3312 /* harmony export */ "isFullArray": () => (/* binding */ isFullArray),
3313 /* harmony export */ "isFullObject": () => (/* binding */ isFullObject),
3314 /* harmony export */ "isFullString": () => (/* binding */ isFullString),
3315 /* harmony export */ "isFunction": () => (/* binding */ isFunction),
3316 /* harmony export */ "isMap": () => (/* binding */ isMap),
3317 /* harmony export */ "isNaNValue": () => (/* binding */ isNaNValue),
3318 /* harmony export */ "isNull": () => (/* binding */ isNull),
3319 /* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined),
3320 /* harmony export */ "isNumber": () => (/* binding */ isNumber),
3321 /* harmony export */ "isObject": () => (/* binding */ isObject),
3322 /* harmony export */ "isObjectLike": () => (/* binding */ isObjectLike),
3323 /* harmony export */ "isOneOf": () => (/* binding */ isOneOf),
3324 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
3325 /* harmony export */ "isPrimitive": () => (/* binding */ isPrimitive),
3326 /* harmony export */ "isPromise": () => (/* binding */ isPromise),
3327 /* harmony export */ "isRegExp": () => (/* binding */ isRegExp),
3328 /* harmony export */ "isSet": () => (/* binding */ isSet),
3329 /* harmony export */ "isString": () => (/* binding */ isString),
3330 /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
3331 /* harmony export */ "isType": () => (/* binding */ isType),
3332 /* harmony export */ "isUndefined": () => (/* binding */ isUndefined),
3333 /* harmony export */ "isWeakMap": () => (/* binding */ isWeakMap),
3334 /* harmony export */ "isWeakSet": () => (/* binding */ isWeakSet)
3335 /* harmony export */ });
3336 /**
3337 * Returns the object type of the given payload
3338 *
3339 * @param {*} payload
3340 * @returns {string}
3341 */
3342 function getType(payload) {
3343 return Object.prototype.toString.call(payload).slice(8, -1);
3344 }
3345 /**
3346 * Returns whether the payload is undefined
3347 *
3348 * @param {*} payload
3349 * @returns {payload is undefined}
3350 */
3351 function isUndefined(payload) {
3352 return getType(payload) === 'Undefined';
3353 }
3354 /**
3355 * Returns whether the payload is null
3356 *
3357 * @param {*} payload
3358 * @returns {payload is null}
3359 */
3360 function isNull(payload) {
3361 return getType(payload) === 'Null';
3362 }
3363 /**
3364 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3365 *
3366 * @param {*} payload
3367 * @returns {payload is PlainObject}
3368 */
3369 function isPlainObject(payload) {
3370 if (getType(payload) !== 'Object')
3371 return false;
3372 return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3373 }
3374 /**
3375 * Returns whether the payload is a plain JavaScript object (excluding special classes or objects with other prototypes)
3376 *
3377 * @param {*} payload
3378 * @returns {payload is PlainObject}
3379 */
3380 function isObject(payload) {
3381 return isPlainObject(payload);
3382 }
3383 /**
3384 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3385 *
3386 * @param {*} payload
3387 * @returns {payload is { [K in any]: never }}
3388 */
3389 function isEmptyObject(payload) {
3390 return isPlainObject(payload) && Object.keys(payload).length === 0;
3391 }
3392 /**
3393 * Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
3394 *
3395 * @param {*} payload
3396 * @returns {payload is PlainObject}
3397 */
3398 function isFullObject(payload) {
3399 return isPlainObject(payload) && Object.keys(payload).length > 0;
3400 }
3401 /**
3402 * Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
3403 *
3404 * @param {*} payload
3405 * @returns {payload is PlainObject}
3406 */
3407 function isAnyObject(payload) {
3408 return getType(payload) === 'Object';
3409 }
3410 /**
3411 * Returns whether the payload is an object like a type passed in < >
3412 *
3413 * Usage: isObjectLike<{id: any}>(payload) // will make sure it's an object and has an `id` prop.
3414 *
3415 * @template T this must be passed in < >
3416 * @param {*} payload
3417 * @returns {payload is T}
3418 */
3419 function isObjectLike(payload) {
3420 return isAnyObject(payload);
3421 }
3422 /**
3423 * Returns whether the payload is a function (regular or async)
3424 *
3425 * @param {*} payload
3426 * @returns {payload is AnyFunction}
3427 */
3428 function isFunction(payload) {
3429 return typeof payload === 'function';
3430 }
3431 /**
3432 * Returns whether the payload is an array
3433 *
3434 * @param {any} payload
3435 * @returns {payload is any[]}
3436 */
3437 function isArray(payload) {
3438 return getType(payload) === 'Array';
3439 }
3440 /**
3441 * Returns whether the payload is a an array with at least 1 item
3442 *
3443 * @param {*} payload
3444 * @returns {payload is any[]}
3445 */
3446 function isFullArray(payload) {
3447 return isArray(payload) && payload.length > 0;
3448 }
3449 /**
3450 * Returns whether the payload is a an empty array
3451 *
3452 * @param {*} payload
3453 * @returns {payload is []}
3454 */
3455 function isEmptyArray(payload) {
3456 return isArray(payload) && payload.length === 0;
3457 }
3458 /**
3459 * Returns whether the payload is a string
3460 *
3461 * @param {*} payload
3462 * @returns {payload is string}
3463 */
3464 function isString(payload) {
3465 return getType(payload) === 'String';
3466 }
3467 /**
3468 * Returns whether the payload is a string, BUT returns false for ''
3469 *
3470 * @param {*} payload
3471 * @returns {payload is string}
3472 */
3473 function isFullString(payload) {
3474 return isString(payload) && payload !== '';
3475 }
3476 /**
3477 * Returns whether the payload is ''
3478 *
3479 * @param {*} payload
3480 * @returns {payload is string}
3481 */
3482 function isEmptyString(payload) {
3483 return payload === '';
3484 }
3485 /**
3486 * Returns whether the payload is a number (but not NaN)
3487 *
3488 * This will return `false` for `NaN`!!
3489 *
3490 * @param {*} payload
3491 * @returns {payload is number}
3492 */
3493 function isNumber(payload) {
3494 return getType(payload) === 'Number' && !isNaN(payload);
3495 }
3496 /**
3497 * Returns whether the payload is a boolean
3498 *
3499 * @param {*} payload
3500 * @returns {payload is boolean}
3501 */
3502 function isBoolean(payload) {
3503 return getType(payload) === 'Boolean';
3504 }
3505 /**
3506 * Returns whether the payload is a regular expression (RegExp)
3507 *
3508 * @param {*} payload
3509 * @returns {payload is RegExp}
3510 */
3511 function isRegExp(payload) {
3512 return getType(payload) === 'RegExp';
3513 }
3514 /**
3515 * Returns whether the payload is a Map
3516 *
3517 * @param {*} payload
3518 * @returns {payload is Map<any, any>}
3519 */
3520 function isMap(payload) {
3521 return getType(payload) === 'Map';
3522 }
3523 /**
3524 * Returns whether the payload is a WeakMap
3525 *
3526 * @param {*} payload
3527 * @returns {payload is WeakMap<any, any>}
3528 */
3529 function isWeakMap(payload) {
3530 return getType(payload) === 'WeakMap';
3531 }
3532 /**
3533 * Returns whether the payload is a Set
3534 *
3535 * @param {*} payload
3536 * @returns {payload is Set<any>}
3537 */
3538 function isSet(payload) {
3539 return getType(payload) === 'Set';
3540 }
3541 /**
3542 * Returns whether the payload is a WeakSet
3543 *
3544 * @param {*} payload
3545 * @returns {payload is WeakSet<any>}
3546 */
3547 function isWeakSet(payload) {
3548 return getType(payload) === 'WeakSet';
3549 }
3550 /**
3551 * Returns whether the payload is a Symbol
3552 *
3553 * @param {*} payload
3554 * @returns {payload is symbol}
3555 */
3556 function isSymbol(payload) {
3557 return getType(payload) === 'Symbol';
3558 }
3559 /**
3560 * Returns whether the payload is a Date, and that the date is valid
3561 *
3562 * @param {*} payload
3563 * @returns {payload is Date}
3564 */
3565 function isDate(payload) {
3566 return getType(payload) === 'Date' && !isNaN(payload);
3567 }
3568 /**
3569 * Returns whether the payload is a Blob
3570 *
3571 * @param {*} payload
3572 * @returns {payload is Blob}
3573 */
3574 function isBlob(payload) {
3575 return getType(payload) === 'Blob';
3576 }
3577 /**
3578 * Returns whether the payload is a File
3579 *
3580 * @param {*} payload
3581 * @returns {payload is File}
3582 */
3583 function isFile(payload) {
3584 return getType(payload) === 'File';
3585 }
3586 /**
3587 * Returns whether the payload is a Promise
3588 *
3589 * @param {*} payload
3590 * @returns {payload is Promise<any>}
3591 */
3592 function isPromise(payload) {
3593 return getType(payload) === 'Promise';
3594 }
3595 /**
3596 * Returns whether the payload is an Error
3597 *
3598 * @param {*} payload
3599 * @returns {payload is Error}
3600 */
3601 function isError(payload) {
3602 return getType(payload) === 'Error';
3603 }
3604 /**
3605 * Returns whether the payload is literally the value `NaN` (it's `NaN` and also a `number`)
3606 *
3607 * @param {*} payload
3608 * @returns {payload is typeof NaN}
3609 */
3610 function isNaNValue(payload) {
3611 return getType(payload) === 'Number' && isNaN(payload);
3612 }
3613 /**
3614 * Returns whether the payload is a primitive type (eg. Boolean | Null | Undefined | Number | String | Symbol)
3615 *
3616 * @param {*} payload
3617 * @returns {(payload is boolean | null | undefined | number | string | symbol)}
3618 */
3619 function isPrimitive(payload) {
3620 return (isBoolean(payload) ||
3621 isNull(payload) ||
3622 isUndefined(payload) ||
3623 isNumber(payload) ||
3624 isString(payload) ||
3625 isSymbol(payload));
3626 }
3627 /**
3628 * Returns true whether the payload is null or undefined
3629 *
3630 * @param {*} payload
3631 * @returns {(payload is null | undefined)}
3632 */
3633 var isNullOrUndefined = isOneOf(isNull, isUndefined);
3634 function isOneOf(a, b, c, d, e) {
3635 return function (value) {
3636 return a(value) || b(value) || (!!c && c(value)) || (!!d && d(value)) || (!!e && e(value));
3637 };
3638 }
3639 /**
3640 * Does a generic check to check that the given payload is of a given type.
3641 * In cases like Number, it will return true for NaN as NaN is a Number (thanks javascript!);
3642 * It will, however, differentiate between object and null
3643 *
3644 * @template T
3645 * @param {*} payload
3646 * @param {T} type
3647 * @throws {TypeError} Will throw type error if type is an invalid type
3648 * @returns {payload is T}
3649 */
3650 function isType(payload, type) {
3651 if (!(type instanceof Function)) {
3652 throw new TypeError('Type must be a function');
3653 }
3654 if (!Object.prototype.hasOwnProperty.call(type, 'prototype')) {
3655 throw new TypeError('Type is not a class');
3656 }
3657 // Classes usually have names (as functions usually have names)
3658 var name = type.name;
3659 return getType(payload) === name || Boolean(payload && payload.constructor === type);
3660 }
3661
3662
3663
3664
3665 /***/ }),
3666
3667 /***/ "./node_modules/lodash/_Symbol.js":
3668 /*!****************************************!*\
3669 !*** ./node_modules/lodash/_Symbol.js ***!
3670 \****************************************/
3671 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3672
3673 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
3674
3675 /** Built-in value references. */
3676 var Symbol = root.Symbol;
3677
3678 module.exports = Symbol;
3679
3680
3681 /***/ }),
3682
3683 /***/ "./node_modules/lodash/_baseGetTag.js":
3684 /*!********************************************!*\
3685 !*** ./node_modules/lodash/_baseGetTag.js ***!
3686 \********************************************/
3687 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3688
3689 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
3690 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
3691 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
3692
3693 /** `Object#toString` result references. */
3694 var nullTag = '[object Null]',
3695 undefinedTag = '[object Undefined]';
3696
3697 /** Built-in value references. */
3698 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3699
3700 /**
3701 * The base implementation of `getTag` without fallbacks for buggy environments.
3702 *
3703 * @private
3704 * @param {*} value The value to query.
3705 * @returns {string} Returns the `toStringTag`.
3706 */
3707 function baseGetTag(value) {
3708 if (value == null) {
3709 return value === undefined ? undefinedTag : nullTag;
3710 }
3711 return (symToStringTag && symToStringTag in Object(value))
3712 ? getRawTag(value)
3713 : objectToString(value);
3714 }
3715
3716 module.exports = baseGetTag;
3717
3718
3719 /***/ }),
3720
3721 /***/ "./node_modules/lodash/_baseTrim.js":
3722 /*!******************************************!*\
3723 !*** ./node_modules/lodash/_baseTrim.js ***!
3724 \******************************************/
3725 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3726
3727 var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js");
3728
3729 /** Used to match leading whitespace. */
3730 var reTrimStart = /^\s+/;
3731
3732 /**
3733 * The base implementation of `_.trim`.
3734 *
3735 * @private
3736 * @param {string} string The string to trim.
3737 * @returns {string} Returns the trimmed string.
3738 */
3739 function baseTrim(string) {
3740 return string
3741 ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
3742 : string;
3743 }
3744
3745 module.exports = baseTrim;
3746
3747
3748 /***/ }),
3749
3750 /***/ "./node_modules/lodash/_freeGlobal.js":
3751 /*!********************************************!*\
3752 !*** ./node_modules/lodash/_freeGlobal.js ***!
3753 \********************************************/
3754 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3755
3756 /** Detect free variable `global` from Node.js. */
3757 var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
3758
3759 module.exports = freeGlobal;
3760
3761
3762 /***/ }),
3763
3764 /***/ "./node_modules/lodash/_getRawTag.js":
3765 /*!*******************************************!*\
3766 !*** ./node_modules/lodash/_getRawTag.js ***!
3767 \*******************************************/
3768 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3769
3770 var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
3771
3772 /** Used for built-in method references. */
3773 var objectProto = Object.prototype;
3774
3775 /** Used to check objects for own properties. */
3776 var hasOwnProperty = objectProto.hasOwnProperty;
3777
3778 /**
3779 * Used to resolve the
3780 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3781 * of values.
3782 */
3783 var nativeObjectToString = objectProto.toString;
3784
3785 /** Built-in value references. */
3786 var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3787
3788 /**
3789 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3790 *
3791 * @private
3792 * @param {*} value The value to query.
3793 * @returns {string} Returns the raw `toStringTag`.
3794 */
3795 function getRawTag(value) {
3796 var isOwn = hasOwnProperty.call(value, symToStringTag),
3797 tag = value[symToStringTag];
3798
3799 try {
3800 value[symToStringTag] = undefined;
3801 var unmasked = true;
3802 } catch (e) {}
3803
3804 var result = nativeObjectToString.call(value);
3805 if (unmasked) {
3806 if (isOwn) {
3807 value[symToStringTag] = tag;
3808 } else {
3809 delete value[symToStringTag];
3810 }
3811 }
3812 return result;
3813 }
3814
3815 module.exports = getRawTag;
3816
3817
3818 /***/ }),
3819
3820 /***/ "./node_modules/lodash/_objectToString.js":
3821 /*!************************************************!*\
3822 !*** ./node_modules/lodash/_objectToString.js ***!
3823 \************************************************/
3824 /***/ ((module) => {
3825
3826 /** Used for built-in method references. */
3827 var objectProto = Object.prototype;
3828
3829 /**
3830 * Used to resolve the
3831 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3832 * of values.
3833 */
3834 var nativeObjectToString = objectProto.toString;
3835
3836 /**
3837 * Converts `value` to a string using `Object.prototype.toString`.
3838 *
3839 * @private
3840 * @param {*} value The value to convert.
3841 * @returns {string} Returns the converted string.
3842 */
3843 function objectToString(value) {
3844 return nativeObjectToString.call(value);
3845 }
3846
3847 module.exports = objectToString;
3848
3849
3850 /***/ }),
3851
3852 /***/ "./node_modules/lodash/_root.js":
3853 /*!**************************************!*\
3854 !*** ./node_modules/lodash/_root.js ***!
3855 \**************************************/
3856 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3857
3858 var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
3859
3860 /** Detect free variable `self`. */
3861 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
3862
3863 /** Used as a reference to the global object. */
3864 var root = freeGlobal || freeSelf || Function('return this')();
3865
3866 module.exports = root;
3867
3868
3869 /***/ }),
3870
3871 /***/ "./node_modules/lodash/_trimmedEndIndex.js":
3872 /*!*************************************************!*\
3873 !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
3874 \*************************************************/
3875 /***/ ((module) => {
3876
3877 /** Used to match a single whitespace character. */
3878 var reWhitespace = /\s/;
3879
3880 /**
3881 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
3882 * character of `string`.
3883 *
3884 * @private
3885 * @param {string} string The string to inspect.
3886 * @returns {number} Returns the index of the last non-whitespace character.
3887 */
3888 function trimmedEndIndex(string) {
3889 var index = string.length;
3890
3891 while (index-- && reWhitespace.test(string.charAt(index))) {}
3892 return index;
3893 }
3894
3895 module.exports = trimmedEndIndex;
3896
3897
3898 /***/ }),
3899
3900 /***/ "./node_modules/lodash/debounce.js":
3901 /*!*****************************************!*\
3902 !*** ./node_modules/lodash/debounce.js ***!
3903 \*****************************************/
3904 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3905
3906 var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
3907 now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"),
3908 toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
3909
3910 /** Error message constants. */
3911 var FUNC_ERROR_TEXT = 'Expected a function';
3912
3913 /* Built-in method references for those with the same name as other `lodash` methods. */
3914 var nativeMax = Math.max,
3915 nativeMin = Math.min;
3916
3917 /**
3918 * Creates a debounced function that delays invoking `func` until after `wait`
3919 * milliseconds have elapsed since the last time the debounced function was
3920 * invoked. The debounced function comes with a `cancel` method to cancel
3921 * delayed `func` invocations and a `flush` method to immediately invoke them.
3922 * Provide `options` to indicate whether `func` should be invoked on the
3923 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3924 * with the last arguments provided to the debounced function. Subsequent
3925 * calls to the debounced function return the result of the last `func`
3926 * invocation.
3927 *
3928 * **Note:** If `leading` and `trailing` options are `true`, `func` is
3929 * invoked on the trailing edge of the timeout only if the debounced function
3930 * is invoked more than once during the `wait` timeout.
3931 *
3932 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
3933 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
3934 *
3935 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3936 * for details over the differences between `_.debounce` and `_.throttle`.
3937 *
3938 * @static
3939 * @memberOf _
3940 * @since 0.1.0
3941 * @category Function
3942 * @param {Function} func The function to debounce.
3943 * @param {number} [wait=0] The number of milliseconds to delay.
3944 * @param {Object} [options={}] The options object.
3945 * @param {boolean} [options.leading=false]
3946 * Specify invoking on the leading edge of the timeout.
3947 * @param {number} [options.maxWait]
3948 * The maximum time `func` is allowed to be delayed before it's invoked.
3949 * @param {boolean} [options.trailing=true]
3950 * Specify invoking on the trailing edge of the timeout.
3951 * @returns {Function} Returns the new debounced function.
3952 * @example
3953 *
3954 * // Avoid costly calculations while the window size is in flux.
3955 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3956 *
3957 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
3958 * jQuery(element).on('click', _.debounce(sendMail, 300, {
3959 * 'leading': true,
3960 * 'trailing': false
3961 * }));
3962 *
3963 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3964 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3965 * var source = new EventSource('/stream');
3966 * jQuery(source).on('message', debounced);
3967 *
3968 * // Cancel the trailing debounced invocation.
3969 * jQuery(window).on('popstate', debounced.cancel);
3970 */
3971 function debounce(func, wait, options) {
3972 var lastArgs,
3973 lastThis,
3974 maxWait,
3975 result,
3976 timerId,
3977 lastCallTime,
3978 lastInvokeTime = 0,
3979 leading = false,
3980 maxing = false,
3981 trailing = true;
3982
3983 if (typeof func != 'function') {
3984 throw new TypeError(FUNC_ERROR_TEXT);
3985 }
3986 wait = toNumber(wait) || 0;
3987 if (isObject(options)) {
3988 leading = !!options.leading;
3989 maxing = 'maxWait' in options;
3990 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
3991 trailing = 'trailing' in options ? !!options.trailing : trailing;
3992 }
3993
3994 function invokeFunc(time) {
3995 var args = lastArgs,
3996 thisArg = lastThis;
3997
3998 lastArgs = lastThis = undefined;
3999 lastInvokeTime = time;
4000 result = func.apply(thisArg, args);
4001 return result;
4002 }
4003
4004 function leadingEdge(time) {
4005 // Reset any `maxWait` timer.
4006 lastInvokeTime = time;
4007 // Start the timer for the trailing edge.
4008 timerId = setTimeout(timerExpired, wait);
4009 // Invoke the leading edge.
4010 return leading ? invokeFunc(time) : result;
4011 }
4012
4013 function remainingWait(time) {
4014 var timeSinceLastCall = time - lastCallTime,
4015 timeSinceLastInvoke = time - lastInvokeTime,
4016 timeWaiting = wait - timeSinceLastCall;
4017
4018 return maxing
4019 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
4020 : timeWaiting;
4021 }
4022
4023 function shouldInvoke(time) {
4024 var timeSinceLastCall = time - lastCallTime,
4025 timeSinceLastInvoke = time - lastInvokeTime;
4026
4027 // Either this is the first call, activity has stopped and we're at the
4028 // trailing edge, the system time has gone backwards and we're treating
4029 // it as the trailing edge, or we've hit the `maxWait` limit.
4030 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
4031 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
4032 }
4033
4034 function timerExpired() {
4035 var time = now();
4036 if (shouldInvoke(time)) {
4037 return trailingEdge(time);
4038 }
4039 // Restart the timer.
4040 timerId = setTimeout(timerExpired, remainingWait(time));
4041 }
4042
4043 function trailingEdge(time) {
4044 timerId = undefined;
4045
4046 // Only invoke if we have `lastArgs` which means `func` has been
4047 // debounced at least once.
4048 if (trailing && lastArgs) {
4049 return invokeFunc(time);
4050 }
4051 lastArgs = lastThis = undefined;
4052 return result;
4053 }
4054
4055 function cancel() {
4056 if (timerId !== undefined) {
4057 clearTimeout(timerId);
4058 }
4059 lastInvokeTime = 0;
4060 lastArgs = lastCallTime = lastThis = timerId = undefined;
4061 }
4062
4063 function flush() {
4064 return timerId === undefined ? result : trailingEdge(now());
4065 }
4066
4067 function debounced() {
4068 var time = now(),
4069 isInvoking = shouldInvoke(time);
4070
4071 lastArgs = arguments;
4072 lastThis = this;
4073 lastCallTime = time;
4074
4075 if (isInvoking) {
4076 if (timerId === undefined) {
4077 return leadingEdge(lastCallTime);
4078 }
4079 if (maxing) {
4080 // Handle invocations in a tight loop.
4081 clearTimeout(timerId);
4082 timerId = setTimeout(timerExpired, wait);
4083 return invokeFunc(lastCallTime);
4084 }
4085 }
4086 if (timerId === undefined) {
4087 timerId = setTimeout(timerExpired, wait);
4088 }
4089 return result;
4090 }
4091 debounced.cancel = cancel;
4092 debounced.flush = flush;
4093 return debounced;
4094 }
4095
4096 module.exports = debounce;
4097
4098
4099 /***/ }),
4100
4101 /***/ "./node_modules/lodash/isObject.js":
4102 /*!*****************************************!*\
4103 !*** ./node_modules/lodash/isObject.js ***!
4104 \*****************************************/
4105 /***/ ((module) => {
4106
4107 /**
4108 * Checks if `value` is the
4109 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
4110 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4111 *
4112 * @static
4113 * @memberOf _
4114 * @since 0.1.0
4115 * @category Lang
4116 * @param {*} value The value to check.
4117 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
4118 * @example
4119 *
4120 * _.isObject({});
4121 * // => true
4122 *
4123 * _.isObject([1, 2, 3]);
4124 * // => true
4125 *
4126 * _.isObject(_.noop);
4127 * // => true
4128 *
4129 * _.isObject(null);
4130 * // => false
4131 */
4132 function isObject(value) {
4133 var type = typeof value;
4134 return value != null && (type == 'object' || type == 'function');
4135 }
4136
4137 module.exports = isObject;
4138
4139
4140 /***/ }),
4141
4142 /***/ "./node_modules/lodash/isObjectLike.js":
4143 /*!*********************************************!*\
4144 !*** ./node_modules/lodash/isObjectLike.js ***!
4145 \*********************************************/
4146 /***/ ((module) => {
4147
4148 /**
4149 * Checks if `value` is object-like. A value is object-like if it's not `null`
4150 * and has a `typeof` result of "object".
4151 *
4152 * @static
4153 * @memberOf _
4154 * @since 4.0.0
4155 * @category Lang
4156 * @param {*} value The value to check.
4157 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
4158 * @example
4159 *
4160 * _.isObjectLike({});
4161 * // => true
4162 *
4163 * _.isObjectLike([1, 2, 3]);
4164 * // => true
4165 *
4166 * _.isObjectLike(_.noop);
4167 * // => false
4168 *
4169 * _.isObjectLike(null);
4170 * // => false
4171 */
4172 function isObjectLike(value) {
4173 return value != null && typeof value == 'object';
4174 }
4175
4176 module.exports = isObjectLike;
4177
4178
4179 /***/ }),
4180
4181 /***/ "./node_modules/lodash/isSymbol.js":
4182 /*!*****************************************!*\
4183 !*** ./node_modules/lodash/isSymbol.js ***!
4184 \*****************************************/
4185 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4186
4187 var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
4188 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
4189
4190 /** `Object#toString` result references. */
4191 var symbolTag = '[object Symbol]';
4192
4193 /**
4194 * Checks if `value` is classified as a `Symbol` primitive or object.
4195 *
4196 * @static
4197 * @memberOf _
4198 * @since 4.0.0
4199 * @category Lang
4200 * @param {*} value The value to check.
4201 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
4202 * @example
4203 *
4204 * _.isSymbol(Symbol.iterator);
4205 * // => true
4206 *
4207 * _.isSymbol('abc');
4208 * // => false
4209 */
4210 function isSymbol(value) {
4211 return typeof value == 'symbol' ||
4212 (isObjectLike(value) && baseGetTag(value) == symbolTag);
4213 }
4214
4215 module.exports = isSymbol;
4216
4217
4218 /***/ }),
4219
4220 /***/ "./node_modules/lodash/now.js":
4221 /*!************************************!*\
4222 !*** ./node_modules/lodash/now.js ***!
4223 \************************************/
4224 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4225
4226 var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
4227
4228 /**
4229 * Gets the timestamp of the number of milliseconds that have elapsed since
4230 * the Unix epoch (1 January 1970 00:00:00 UTC).
4231 *
4232 * @static
4233 * @memberOf _
4234 * @since 2.4.0
4235 * @category Date
4236 * @returns {number} Returns the timestamp.
4237 * @example
4238 *
4239 * _.defer(function(stamp) {
4240 * console.log(_.now() - stamp);
4241 * }, _.now());
4242 * // => Logs the number of milliseconds it took for the deferred invocation.
4243 */
4244 var now = function() {
4245 return root.Date.now();
4246 };
4247
4248 module.exports = now;
4249
4250
4251 /***/ }),
4252
4253 /***/ "./node_modules/lodash/toNumber.js":
4254 /*!*****************************************!*\
4255 !*** ./node_modules/lodash/toNumber.js ***!
4256 \*****************************************/
4257 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4258
4259 var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"),
4260 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
4261 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
4262
4263 /** Used as references for various `Number` constants. */
4264 var NAN = 0 / 0;
4265
4266 /** Used to detect bad signed hexadecimal string values. */
4267 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
4268
4269 /** Used to detect binary string values. */
4270 var reIsBinary = /^0b[01]+$/i;
4271
4272 /** Used to detect octal string values. */
4273 var reIsOctal = /^0o[0-7]+$/i;
4274
4275 /** Built-in method references without a dependency on `root`. */
4276 var freeParseInt = parseInt;
4277
4278 /**
4279 * Converts `value` to a number.
4280 *
4281 * @static
4282 * @memberOf _
4283 * @since 4.0.0
4284 * @category Lang
4285 * @param {*} value The value to process.
4286 * @returns {number} Returns the number.
4287 * @example
4288 *
4289 * _.toNumber(3.2);
4290 * // => 3.2
4291 *
4292 * _.toNumber(Number.MIN_VALUE);
4293 * // => 5e-324
4294 *
4295 * _.toNumber(Infinity);
4296 * // => Infinity
4297 *
4298 * _.toNumber('3.2');
4299 * // => 3.2
4300 */
4301 function toNumber(value) {
4302 if (typeof value == 'number') {
4303 return value;
4304 }
4305 if (isSymbol(value)) {
4306 return NAN;
4307 }
4308 if (isObject(value)) {
4309 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
4310 value = isObject(other) ? (other + '') : other;
4311 }
4312 if (typeof value != 'string') {
4313 return value === 0 ? value : +value;
4314 }
4315 value = baseTrim(value);
4316 var isBinary = reIsBinary.test(value);
4317 return (isBinary || reIsOctal.test(value))
4318 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
4319 : (reIsBadHex.test(value) ? NAN : +value);
4320 }
4321
4322 module.exports = toNumber;
4323
4324
4325 /***/ }),
4326
4327 /***/ "./node_modules/memoize-one/dist/memoize-one.esm.js":
4328 /*!**********************************************************!*\
4329 !*** ./node_modules/memoize-one/dist/memoize-one.esm.js ***!
4330 \**********************************************************/
4331 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4332
4333 "use strict";
4334 __webpack_require__.r(__webpack_exports__);
4335 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4336 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4337 /* harmony export */ });
4338 var safeIsNaN = Number.isNaN ||
4339 function ponyfill(value) {
4340 return typeof value === 'number' && value !== value;
4341 };
4342 function isEqual(first, second) {
4343 if (first === second) {
4344 return true;
4345 }
4346 if (safeIsNaN(first) && safeIsNaN(second)) {
4347 return true;
4348 }
4349 return false;
4350 }
4351 function areInputsEqual(newInputs, lastInputs) {
4352 if (newInputs.length !== lastInputs.length) {
4353 return false;
4354 }
4355 for (var i = 0; i < newInputs.length; i++) {
4356 if (!isEqual(newInputs[i], lastInputs[i])) {
4357 return false;
4358 }
4359 }
4360 return true;
4361 }
4362
4363 function memoizeOne(resultFn, isEqual) {
4364 if (isEqual === void 0) { isEqual = areInputsEqual; }
4365 var lastThis;
4366 var lastArgs = [];
4367 var lastResult;
4368 var calledOnce = false;
4369 function memoized() {
4370 var newArgs = [];
4371 for (var _i = 0; _i < arguments.length; _i++) {
4372 newArgs[_i] = arguments[_i];
4373 }
4374 if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
4375 return lastResult;
4376 }
4377 lastResult = resultFn.apply(this, newArgs);
4378 calledOnce = true;
4379 lastThis = this;
4380 lastArgs = newArgs;
4381 return lastResult;
4382 }
4383 return memoized;
4384 }
4385
4386 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoizeOne);
4387
4388
4389 /***/ }),
4390
4391 /***/ "./node_modules/merge-anything/dist/index.esm.js":
4392 /*!*******************************************************!*\
4393 !*** ./node_modules/merge-anything/dist/index.esm.js ***!
4394 \*******************************************************/
4395 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4396
4397 "use strict";
4398 __webpack_require__.r(__webpack_exports__);
4399 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4400 /* harmony export */ "concatArrays": () => (/* binding */ concatArrays),
4401 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
4402 /* harmony export */ "merge": () => (/* binding */ merge)
4403 /* harmony export */ });
4404 /* harmony import */ var is_what__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-what */ "./node_modules/is-what/dist/index.esm.js");
4405
4406
4407 /*! *****************************************************************************
4408 Copyright (c) Microsoft Corporation. All rights reserved.
4409 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4410 this file except in compliance with the License. You may obtain a copy of the
4411 License at http://www.apache.org/licenses/LICENSE-2.0
4412
4413 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
4414 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
4415 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
4416 MERCHANTABLITY OR NON-INFRINGEMENT.
4417
4418 See the Apache Version 2.0 License for specific language governing permissions
4419 and limitations under the License.
4420 ***************************************************************************** */
4421
4422 function __spreadArrays() {
4423 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4424 for (var r = Array(s), k = 0, i = 0; i < il; i++)
4425 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4426 r[k] = a[j];
4427 return r;
4428 }
4429
4430 function assignProp(carry, key, newVal, originalObject) {
4431 var propType = originalObject.propertyIsEnumerable(key)
4432 ? 'enumerable'
4433 : 'nonenumerable';
4434 if (propType === 'enumerable')
4435 carry[key] = newVal;
4436 if (propType === 'nonenumerable') {
4437 Object.defineProperty(carry, key, {
4438 value: newVal,
4439 enumerable: false,
4440 writable: true,
4441 configurable: true
4442 });
4443 }
4444 }
4445 function mergeRecursively(origin, newComer, extensions) {
4446 // work directly on newComer if its not an object
4447 if (!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newComer)) {
4448 // extend merge rules
4449 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4450 extensions.forEach(function (extend) {
4451 newComer = extend(origin, newComer);
4452 });
4453 }
4454 return newComer;
4455 }
4456 // define newObject to merge all values upon
4457 var newObject = {};
4458 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin)) {
4459 var props_1 = Object.getOwnPropertyNames(origin);
4460 var symbols_1 = Object.getOwnPropertySymbols(origin);
4461 newObject = __spreadArrays(props_1, symbols_1).reduce(function (carry, key) {
4462 // @ts-ignore
4463 var targetVal = origin[key];
4464 if ((!(0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertyNames(newComer).includes(key)) ||
4465 ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) && !Object.getOwnPropertySymbols(newComer).includes(key))) {
4466 assignProp(carry, key, targetVal, origin);
4467 }
4468 return carry;
4469 }, {});
4470 }
4471 var props = Object.getOwnPropertyNames(newComer);
4472 var symbols = Object.getOwnPropertySymbols(newComer);
4473 var result = __spreadArrays(props, symbols).reduce(function (carry, key) {
4474 // re-define the origin and newComer as targetVal and newVal
4475 var newVal = newComer[key];
4476 var targetVal = ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin))
4477 // @ts-ignore
4478 ? origin[key]
4479 : undefined;
4480 // extend merge rules
4481 if (extensions && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(extensions)) {
4482 extensions.forEach(function (extend) {
4483 newVal = extend(targetVal, newVal);
4484 });
4485 }
4486 // When newVal is an object do the merge recursively
4487 if (targetVal !== undefined && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(newVal)) {
4488 newVal = mergeRecursively(targetVal, newVal, extensions);
4489 }
4490 assignProp(carry, key, newVal, newComer);
4491 return carry;
4492 }, newObject);
4493 return result;
4494 }
4495 /**
4496 * Merge anything recursively.
4497 * Objects get merged, special objects (classes etc.) are re-assigned "as is".
4498 * Basic types overwrite objects or other basic types.
4499 *
4500 * @param {(IConfig | any)} origin
4501 * @param {...any[]} newComers
4502 * @returns the result
4503 */
4504 function merge(origin) {
4505 var newComers = [];
4506 for (var _i = 1; _i < arguments.length; _i++) {
4507 newComers[_i - 1] = arguments[_i];
4508 }
4509 var extensions = null;
4510 var base = origin;
4511 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isPlainObject)(origin) && origin.extensions && Object.keys(origin).length === 1) {
4512 base = {};
4513 extensions = origin.extensions;
4514 }
4515 return newComers.reduce(function (result, newComer) {
4516 return mergeRecursively(result, newComer, extensions);
4517 }, base);
4518 }
4519
4520 function concatArrays(originVal, newVal) {
4521 if ((0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(originVal) && (0,is_what__WEBPACK_IMPORTED_MODULE_0__.isArray)(newVal)) {
4522 // concat logic
4523 return originVal.concat(newVal);
4524 }
4525 return newVal; // always return newVal as fallback!!
4526 }
4527
4528 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (merge);
4529
4530
4531
4532 /***/ }),
4533
4534 /***/ "./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts":
4535 /*!****************************************************************************************************************************************************************************************!*\
4536 !*** ./scripts/gutenberg/UIComponents/UIImage.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/gutenberg/UIComponents/UIImage.ts ***!
4537 \****************************************************************************************************************************************************************************************/
4538 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4539
4540 "use strict";
4541 __webpack_require__.r(__webpack_exports__);
4542 // extracted by mini-css-extract-plugin
4543
4544
4545 /***/ }),
4546
4547 /***/ "./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx":
4548 /*!*******************************************************************************************************************************************************************************!*\
4549 !*** ./scripts/shared/Common/AsyncSelect.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/AsyncSelect.tsx ***!
4550 \*******************************************************************************************************************************************************************************/
4551 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4552
4553 "use strict";
4554 __webpack_require__.r(__webpack_exports__);
4555 // extracted by mini-css-extract-plugin
4556
4557
4558 /***/ }),
4559
4560 /***/ "./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts":
4561 /*!************************************************************************************************************************************************************************************!*\
4562 !*** ./scripts/shared/Common/HubspotWrapper.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/Common/HubspotWrapper.ts ***!
4563 \************************************************************************************************************************************************************************************/
4564 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4565
4566 "use strict";
4567 __webpack_require__.r(__webpack_exports__);
4568 // extracted by mini-css-extract-plugin
4569
4570
4571 /***/ }),
4572
4573 /***/ "./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx":
4574 /*!***********************************************************************************************************************************************************************************!*\
4575 !*** ./scripts/shared/UIComponents/UIAlert.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIAlert.tsx ***!
4576 \***********************************************************************************************************************************************************************************/
4577 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4578
4579 "use strict";
4580 __webpack_require__.r(__webpack_exports__);
4581 // extracted by mini-css-extract-plugin
4582
4583
4584 /***/ }),
4585
4586 /***/ "./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts":
4587 /*!************************************************************************************************************************************************************************************!*\
4588 !*** ./scripts/shared/UIComponents/UIButton.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIButton.ts ***!
4589 \************************************************************************************************************************************************************************************/
4590 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4591
4592 "use strict";
4593 __webpack_require__.r(__webpack_exports__);
4594 // extracted by mini-css-extract-plugin
4595
4596
4597 /***/ }),
4598
4599 /***/ "./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts":
4600 /*!******************************************************************************************************************************************************************************************!*\
4601 !*** ./scripts/shared/UIComponents/UIContainer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIContainer.ts ***!
4602 \******************************************************************************************************************************************************************************************/
4603 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4604
4605 "use strict";
4606 __webpack_require__.r(__webpack_exports__);
4607 // extracted by mini-css-extract-plugin
4608
4609
4610 /***/ }),
4611
4612 /***/ "./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts":
4613 /*!**************************************************************************************************************************************************************************************!*\
4614 !*** ./scripts/shared/UIComponents/UIOverlay.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UIOverlay.ts ***!
4615 \**************************************************************************************************************************************************************************************/
4616 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4617
4618 "use strict";
4619 __webpack_require__.r(__webpack_exports__);
4620 // extracted by mini-css-extract-plugin
4621
4622
4623 /***/ }),
4624
4625 /***/ "./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts":
4626 /*!************************************************************************************************************************************************************************************!*\
4627 !*** ./scripts/shared/UIComponents/UISpacer.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpacer.ts ***!
4628 \************************************************************************************************************************************************************************************/
4629 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4630
4631 "use strict";
4632 __webpack_require__.r(__webpack_exports__);
4633 // extracted by mini-css-extract-plugin
4634
4635
4636 /***/ }),
4637
4638 /***/ "./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx":
4639 /*!***************************************************************************************************************************************************************************************!*\
4640 !*** ./scripts/shared/UIComponents/UISpinner.linaria.css!=!./node_modules/@linaria/webpack5-loader/lib/outputCssLoader.js?cacheProvider=!./scripts/shared/UIComponents/UISpinner.tsx ***!
4641 \***************************************************************************************************************************************************************************************/
4642 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4643
4644 "use strict";
4645 __webpack_require__.r(__webpack_exports__);
4646 // extracted by mini-css-extract-plugin
4647
4648
4649 /***/ }),
4650
4651 /***/ "./node_modules/object-assign/index.js":
4652 /*!*********************************************!*\
4653 !*** ./node_modules/object-assign/index.js ***!
4654 \*********************************************/
4655 /***/ ((module) => {
4656
4657 "use strict";
4658 /*
4659 object-assign
4660 (c) Sindre Sorhus
4661 @license MIT
4662 */
4663
4664
4665 /* eslint-disable no-unused-vars */
4666 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4667 var hasOwnProperty = Object.prototype.hasOwnProperty;
4668 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4669
4670 function toObject(val) {
4671 if (val === null || val === undefined) {
4672 throw new TypeError('Object.assign cannot be called with null or undefined');
4673 }
4674
4675 return Object(val);
4676 }
4677
4678 function shouldUseNative() {
4679 try {
4680 if (!Object.assign) {
4681 return false;
4682 }
4683
4684 // Detect buggy property enumeration order in older V8 versions.
4685
4686 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4687 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4688 test1[5] = 'de';
4689 if (Object.getOwnPropertyNames(test1)[0] === '5') {
4690 return false;
4691 }
4692
4693 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4694 var test2 = {};
4695 for (var i = 0; i < 10; i++) {
4696 test2['_' + String.fromCharCode(i)] = i;
4697 }
4698 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4699 return test2[n];
4700 });
4701 if (order2.join('') !== '0123456789') {
4702 return false;
4703 }
4704
4705 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4706 var test3 = {};
4707 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4708 test3[letter] = letter;
4709 });
4710 if (Object.keys(Object.assign({}, test3)).join('') !==
4711 'abcdefghijklmnopqrst') {
4712 return false;
4713 }
4714
4715 return true;
4716 } catch (err) {
4717 // We don't expect any of the above to throw, but better to be safe.
4718 return false;
4719 }
4720 }
4721
4722 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
4723 var from;
4724 var to = toObject(target);
4725 var symbols;
4726
4727 for (var s = 1; s < arguments.length; s++) {
4728 from = Object(arguments[s]);
4729
4730 for (var key in from) {
4731 if (hasOwnProperty.call(from, key)) {
4732 to[key] = from[key];
4733 }
4734 }
4735
4736 if (getOwnPropertySymbols) {
4737 symbols = getOwnPropertySymbols(from);
4738 for (var i = 0; i < symbols.length; i++) {
4739 if (propIsEnumerable.call(from, symbols[i])) {
4740 to[symbols[i]] = from[symbols[i]];
4741 }
4742 }
4743 }
4744 }
4745
4746 return to;
4747 };
4748
4749
4750 /***/ }),
4751
4752 /***/ "./node_modules/prop-types/checkPropTypes.js":
4753 /*!***************************************************!*\
4754 !*** ./node_modules/prop-types/checkPropTypes.js ***!
4755 \***************************************************/
4756 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4757
4758 "use strict";
4759 /**
4760 * Copyright (c) 2013-present, Facebook, Inc.
4761 *
4762 * This source code is licensed under the MIT license found in the
4763 * LICENSE file in the root directory of this source tree.
4764 */
4765
4766
4767
4768 var printWarning = function() {};
4769
4770 if (true) {
4771 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4772 var loggedTypeFailures = {};
4773 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4774
4775 printWarning = function(text) {
4776 var message = 'Warning: ' + text;
4777 if (typeof console !== 'undefined') {
4778 console.error(message);
4779 }
4780 try {
4781 // --- Welcome to debugging React ---
4782 // This error was thrown as a convenience so that you can use this stack
4783 // to find the callsite that caused this warning to fire.
4784 throw new Error(message);
4785 } catch (x) { /**/ }
4786 };
4787 }
4788
4789 /**
4790 * Assert that the values match with the type specs.
4791 * Error messages are memorized and will only be shown once.
4792 *
4793 * @param {object} typeSpecs Map of name to a ReactPropType
4794 * @param {object} values Runtime values that need to be type-checked
4795 * @param {string} location e.g. "prop", "context", "child context"
4796 * @param {string} componentName Name of the component for error messages.
4797 * @param {?Function} getStack Returns the component stack.
4798 * @private
4799 */
4800 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
4801 if (true) {
4802 for (var typeSpecName in typeSpecs) {
4803 if (has(typeSpecs, typeSpecName)) {
4804 var error;
4805 // Prop type validation may throw. In case they do, we don't want to
4806 // fail the render phase where it didn't fail before. So we log it.
4807 // After these have been cleaned up, we'll let them throw.
4808 try {
4809 // This is intentionally an invariant that gets caught. It's the same
4810 // behavior as without this statement except with a better message.
4811 if (typeof typeSpecs[typeSpecName] !== 'function') {
4812 var err = Error(
4813 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
4814 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
4815 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
4816 );
4817 err.name = 'Invariant Violation';
4818 throw err;
4819 }
4820 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
4821 } catch (ex) {
4822 error = ex;
4823 }
4824 if (error && !(error instanceof Error)) {
4825 printWarning(
4826 (componentName || 'React class') + ': type specification of ' +
4827 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
4828 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
4829 'You may have forgotten to pass an argument to the type checker ' +
4830 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
4831 'shape all require an argument).'
4832 );
4833 }
4834 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
4835 // Only monitor this failure once because there tends to be a lot of the
4836 // same error.
4837 loggedTypeFailures[error.message] = true;
4838
4839 var stack = getStack ? getStack() : '';
4840
4841 printWarning(
4842 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
4843 );
4844 }
4845 }
4846 }
4847 }
4848 }
4849
4850 /**
4851 * Resets warning cache when testing.
4852 *
4853 * @private
4854 */
4855 checkPropTypes.resetWarningCache = function() {
4856 if (true) {
4857 loggedTypeFailures = {};
4858 }
4859 }
4860
4861 module.exports = checkPropTypes;
4862
4863
4864 /***/ }),
4865
4866 /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
4867 /*!************************************************************!*\
4868 !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
4869 \************************************************************/
4870 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4871
4872 "use strict";
4873 /**
4874 * Copyright (c) 2013-present, Facebook, Inc.
4875 *
4876 * This source code is licensed under the MIT license found in the
4877 * LICENSE file in the root directory of this source tree.
4878 */
4879
4880
4881
4882 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
4883 var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
4884
4885 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
4886 var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
4887 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
4888
4889 var printWarning = function() {};
4890
4891 if (true) {
4892 printWarning = function(text) {
4893 var message = 'Warning: ' + text;
4894 if (typeof console !== 'undefined') {
4895 console.error(message);
4896 }
4897 try {
4898 // --- Welcome to debugging React ---
4899 // This error was thrown as a convenience so that you can use this stack
4900 // to find the callsite that caused this warning to fire.
4901 throw new Error(message);
4902 } catch (x) {}
4903 };
4904 }
4905
4906 function emptyFunctionThatReturnsNull() {
4907 return null;
4908 }
4909
4910 module.exports = function(isValidElement, throwOnDirectAccess) {
4911 /* global Symbol */
4912 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
4913 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
4914
4915 /**
4916 * Returns the iterator method function contained on the iterable object.
4917 *
4918 * Be sure to invoke the function with the iterable as context:
4919 *
4920 * var iteratorFn = getIteratorFn(myIterable);
4921 * if (iteratorFn) {
4922 * var iterator = iteratorFn.call(myIterable);
4923 * ...
4924 * }
4925 *
4926 * @param {?object} maybeIterable
4927 * @return {?function}
4928 */
4929 function getIteratorFn(maybeIterable) {
4930 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
4931 if (typeof iteratorFn === 'function') {
4932 return iteratorFn;
4933 }
4934 }
4935
4936 /**
4937 * Collection of methods that allow declaration and validation of props that are
4938 * supplied to React components. Example usage:
4939 *
4940 * var Props = require('ReactPropTypes');
4941 * var MyArticle = React.createClass({
4942 * propTypes: {
4943 * // An optional string prop named "description".
4944 * description: Props.string,
4945 *
4946 * // A required enum prop named "category".
4947 * category: Props.oneOf(['News','Photos']).isRequired,
4948 *
4949 * // A prop named "dialog" that requires an instance of Dialog.
4950 * dialog: Props.instanceOf(Dialog).isRequired
4951 * },
4952 * render: function() { ... }
4953 * });
4954 *
4955 * A more formal specification of how these methods are used:
4956 *
4957 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
4958 * decl := ReactPropTypes.{type}(.isRequired)?
4959 *
4960 * Each and every declaration produces a function with the same signature. This
4961 * allows the creation of custom validation functions. For example:
4962 *
4963 * var MyLink = React.createClass({
4964 * propTypes: {
4965 * // An optional string or URI prop named "href".
4966 * href: function(props, propName, componentName) {
4967 * var propValue = props[propName];
4968 * if (propValue != null && typeof propValue !== 'string' &&
4969 * !(propValue instanceof URI)) {
4970 * return new Error(
4971 * 'Expected a string or an URI for ' + propName + ' in ' +
4972 * componentName
4973 * );
4974 * }
4975 * }
4976 * },
4977 * render: function() {...}
4978 * });
4979 *
4980 * @internal
4981 */
4982
4983 var ANONYMOUS = '<<anonymous>>';
4984
4985 // Important!
4986 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
4987 var ReactPropTypes = {
4988 array: createPrimitiveTypeChecker('array'),
4989 bigint: createPrimitiveTypeChecker('bigint'),
4990 bool: createPrimitiveTypeChecker('boolean'),
4991 func: createPrimitiveTypeChecker('function'),
4992 number: createPrimitiveTypeChecker('number'),
4993 object: createPrimitiveTypeChecker('object'),
4994 string: createPrimitiveTypeChecker('string'),
4995 symbol: createPrimitiveTypeChecker('symbol'),
4996
4997 any: createAnyTypeChecker(),
4998 arrayOf: createArrayOfTypeChecker,
4999 element: createElementTypeChecker(),
5000 elementType: createElementTypeTypeChecker(),
5001 instanceOf: createInstanceTypeChecker,
5002 node: createNodeChecker(),
5003 objectOf: createObjectOfTypeChecker,
5004 oneOf: createEnumTypeChecker,
5005 oneOfType: createUnionTypeChecker,
5006 shape: createShapeTypeChecker,
5007 exact: createStrictShapeTypeChecker,
5008 };
5009
5010 /**
5011 * inlined Object.is polyfill to avoid requiring consumers ship their own
5012 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5013 */
5014 /*eslint-disable no-self-compare*/
5015 function is(x, y) {
5016 // SameValue algorithm
5017 if (x === y) {
5018 // Steps 1-5, 7-10
5019 // Steps 6.b-6.e: +0 != -0
5020 return x !== 0 || 1 / x === 1 / y;
5021 } else {
5022 // Step 6.a: NaN == NaN
5023 return x !== x && y !== y;
5024 }
5025 }
5026 /*eslint-enable no-self-compare*/
5027
5028 /**
5029 * We use an Error-like object for backward compatibility as people may call
5030 * PropTypes directly and inspect their output. However, we don't use real
5031 * Errors anymore. We don't inspect their stack anyway, and creating them
5032 * is prohibitively expensive if they are created too often, such as what
5033 * happens in oneOfType() for any type before the one that matched.
5034 */
5035 function PropTypeError(message, data) {
5036 this.message = message;
5037 this.data = data && typeof data === 'object' ? data: {};
5038 this.stack = '';
5039 }
5040 // Make `instanceof Error` still work for returned errors.
5041 PropTypeError.prototype = Error.prototype;
5042
5043 function createChainableTypeChecker(validate) {
5044 if (true) {
5045 var manualPropTypeCallCache = {};
5046 var manualPropTypeWarningCount = 0;
5047 }
5048 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5049 componentName = componentName || ANONYMOUS;
5050 propFullName = propFullName || propName;
5051
5052 if (secret !== ReactPropTypesSecret) {
5053 if (throwOnDirectAccess) {
5054 // New behavior only for users of `prop-types` package
5055 var err = new Error(
5056 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
5057 'Use `PropTypes.checkPropTypes()` to call them. ' +
5058 'Read more at http://fb.me/use-check-prop-types'
5059 );
5060 err.name = 'Invariant Violation';
5061 throw err;
5062 } else if ( true && typeof console !== 'undefined') {
5063 // Old behavior for people using React.PropTypes
5064 var cacheKey = componentName + ':' + propName;
5065 if (
5066 !manualPropTypeCallCache[cacheKey] &&
5067 // Avoid spamming the console because they are often not actionable except for lib authors
5068 manualPropTypeWarningCount < 3
5069 ) {
5070 printWarning(
5071 'You are manually calling a React.PropTypes validation ' +
5072 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
5073 'and will throw in the standalone `prop-types` package. ' +
5074 'You may be seeing this warning due to a third-party PropTypes ' +
5075 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
5076 );
5077 manualPropTypeCallCache[cacheKey] = true;
5078 manualPropTypeWarningCount++;
5079 }
5080 }
5081 }
5082 if (props[propName] == null) {
5083 if (isRequired) {
5084 if (props[propName] === null) {
5085 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5086 }
5087 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5088 }
5089 return null;
5090 } else {
5091 return validate(props, propName, componentName, location, propFullName);
5092 }
5093 }
5094
5095 var chainedCheckType = checkType.bind(null, false);
5096 chainedCheckType.isRequired = checkType.bind(null, true);
5097
5098 return chainedCheckType;
5099 }
5100
5101 function createPrimitiveTypeChecker(expectedType) {
5102 function validate(props, propName, componentName, location, propFullName, secret) {
5103 var propValue = props[propName];
5104 var propType = getPropType(propValue);
5105 if (propType !== expectedType) {
5106 // `propValue` being instance of, say, date/regexp, pass the 'object'
5107 // check, but we can offer a more precise error message here rather than
5108 // 'of type `object`'.
5109 var preciseType = getPreciseType(propValue);
5110
5111 return new PropTypeError(
5112 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
5113 {expectedType: expectedType}
5114 );
5115 }
5116 return null;
5117 }
5118 return createChainableTypeChecker(validate);
5119 }
5120
5121 function createAnyTypeChecker() {
5122 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5123 }
5124
5125 function createArrayOfTypeChecker(typeChecker) {
5126 function validate(props, propName, componentName, location, propFullName) {
5127 if (typeof typeChecker !== 'function') {
5128 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5129 }
5130 var propValue = props[propName];
5131 if (!Array.isArray(propValue)) {
5132 var propType = getPropType(propValue);
5133 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5134 }
5135 for (var i = 0; i < propValue.length; i++) {
5136 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5137 if (error instanceof Error) {
5138 return error;
5139 }
5140 }
5141 return null;
5142 }
5143 return createChainableTypeChecker(validate);
5144 }
5145
5146 function createElementTypeChecker() {
5147 function validate(props, propName, componentName, location, propFullName) {
5148 var propValue = props[propName];
5149 if (!isValidElement(propValue)) {
5150 var propType = getPropType(propValue);
5151 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5152 }
5153 return null;
5154 }
5155 return createChainableTypeChecker(validate);
5156 }
5157
5158 function createElementTypeTypeChecker() {
5159 function validate(props, propName, componentName, location, propFullName) {
5160 var propValue = props[propName];
5161 if (!ReactIs.isValidElementType(propValue)) {
5162 var propType = getPropType(propValue);
5163 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5164 }
5165 return null;
5166 }
5167 return createChainableTypeChecker(validate);
5168 }
5169
5170 function createInstanceTypeChecker(expectedClass) {
5171 function validate(props, propName, componentName, location, propFullName) {
5172 if (!(props[propName] instanceof expectedClass)) {
5173 var expectedClassName = expectedClass.name || ANONYMOUS;
5174 var actualClassName = getClassName(props[propName]);
5175 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5176 }
5177 return null;
5178 }
5179 return createChainableTypeChecker(validate);
5180 }
5181
5182 function createEnumTypeChecker(expectedValues) {
5183 if (!Array.isArray(expectedValues)) {
5184 if (true) {
5185 if (arguments.length > 1) {
5186 printWarning(
5187 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
5188 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
5189 );
5190 } else {
5191 printWarning('Invalid argument supplied to oneOf, expected an array.');
5192 }
5193 }
5194 return emptyFunctionThatReturnsNull;
5195 }
5196
5197 function validate(props, propName, componentName, location, propFullName) {
5198 var propValue = props[propName];
5199 for (var i = 0; i < expectedValues.length; i++) {
5200 if (is(propValue, expectedValues[i])) {
5201 return null;
5202 }
5203 }
5204
5205 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5206 var type = getPreciseType(value);
5207 if (type === 'symbol') {
5208 return String(value);
5209 }
5210 return value;
5211 });
5212 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5213 }
5214 return createChainableTypeChecker(validate);
5215 }
5216
5217 function createObjectOfTypeChecker(typeChecker) {
5218 function validate(props, propName, componentName, location, propFullName) {
5219 if (typeof typeChecker !== 'function') {
5220 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5221 }
5222 var propValue = props[propName];
5223 var propType = getPropType(propValue);
5224 if (propType !== 'object') {
5225 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5226 }
5227 for (var key in propValue) {
5228 if (has(propValue, key)) {
5229 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5230 if (error instanceof Error) {
5231 return error;
5232 }
5233 }
5234 }
5235 return null;
5236 }
5237 return createChainableTypeChecker(validate);
5238 }
5239
5240 function createUnionTypeChecker(arrayOfTypeCheckers) {
5241 if (!Array.isArray(arrayOfTypeCheckers)) {
5242 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
5243 return emptyFunctionThatReturnsNull;
5244 }
5245
5246 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5247 var checker = arrayOfTypeCheckers[i];
5248 if (typeof checker !== 'function') {
5249 printWarning(
5250 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
5251 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
5252 );
5253 return emptyFunctionThatReturnsNull;
5254 }
5255 }
5256
5257 function validate(props, propName, componentName, location, propFullName) {
5258 var expectedTypes = [];
5259 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5260 var checker = arrayOfTypeCheckers[i];
5261 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5262 if (checkerResult == null) {
5263 return null;
5264 }
5265 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5266 expectedTypes.push(checkerResult.data.expectedType);
5267 }
5268 }
5269 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
5270 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5271 }
5272 return createChainableTypeChecker(validate);
5273 }
5274
5275 function createNodeChecker() {
5276 function validate(props, propName, componentName, location, propFullName) {
5277 if (!isNode(props[propName])) {
5278 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5279 }
5280 return null;
5281 }
5282 return createChainableTypeChecker(validate);
5283 }
5284
5285 function invalidValidatorError(componentName, location, propFullName, key, type) {
5286 return new PropTypeError(
5287 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
5288 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
5289 );
5290 }
5291
5292 function createShapeTypeChecker(shapeTypes) {
5293 function validate(props, propName, componentName, location, propFullName) {
5294 var propValue = props[propName];
5295 var propType = getPropType(propValue);
5296 if (propType !== 'object') {
5297 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5298 }
5299 for (var key in shapeTypes) {
5300 var checker = shapeTypes[key];
5301 if (typeof checker !== 'function') {
5302 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5303 }
5304 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5305 if (error) {
5306 return error;
5307 }
5308 }
5309 return null;
5310 }
5311 return createChainableTypeChecker(validate);
5312 }
5313
5314 function createStrictShapeTypeChecker(shapeTypes) {
5315 function validate(props, propName, componentName, location, propFullName) {
5316 var propValue = props[propName];
5317 var propType = getPropType(propValue);
5318 if (propType !== 'object') {
5319 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5320 }
5321 // We need to check all keys in case some are required but missing from props.
5322 var allKeys = assign({}, props[propName], shapeTypes);
5323 for (var key in allKeys) {
5324 var checker = shapeTypes[key];
5325 if (has(shapeTypes, key) && typeof checker !== 'function') {
5326 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5327 }
5328 if (!checker) {
5329 return new PropTypeError(
5330 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
5331 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
5332 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
5333 );
5334 }
5335 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5336 if (error) {
5337 return error;
5338 }
5339 }
5340 return null;
5341 }
5342
5343 return createChainableTypeChecker(validate);
5344 }
5345
5346 function isNode(propValue) {
5347 switch (typeof propValue) {
5348 case 'number':
5349 case 'string':
5350 case 'undefined':
5351 return true;
5352 case 'boolean':
5353 return !propValue;
5354 case 'object':
5355 if (Array.isArray(propValue)) {
5356 return propValue.every(isNode);
5357 }
5358 if (propValue === null || isValidElement(propValue)) {
5359 return true;
5360 }
5361
5362 var iteratorFn = getIteratorFn(propValue);
5363 if (iteratorFn) {
5364 var iterator = iteratorFn.call(propValue);
5365 var step;
5366 if (iteratorFn !== propValue.entries) {
5367 while (!(step = iterator.next()).done) {
5368 if (!isNode(step.value)) {
5369 return false;
5370 }
5371 }
5372 } else {
5373 // Iterator will provide entry [k,v] tuples rather than values.
5374 while (!(step = iterator.next()).done) {
5375 var entry = step.value;
5376 if (entry) {
5377 if (!isNode(entry[1])) {
5378 return false;
5379 }
5380 }
5381 }
5382 }
5383 } else {
5384 return false;
5385 }
5386
5387 return true;
5388 default:
5389 return false;
5390 }
5391 }
5392
5393 function isSymbol(propType, propValue) {
5394 // Native Symbol.
5395 if (propType === 'symbol') {
5396 return true;
5397 }
5398
5399 // falsy value can't be a Symbol
5400 if (!propValue) {
5401 return false;
5402 }
5403
5404 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5405 if (propValue['@@toStringTag'] === 'Symbol') {
5406 return true;
5407 }
5408
5409 // Fallback for non-spec compliant Symbols which are polyfilled.
5410 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5411 return true;
5412 }
5413
5414 return false;
5415 }
5416
5417 // Equivalent of `typeof` but with special handling for array and regexp.
5418 function getPropType(propValue) {
5419 var propType = typeof propValue;
5420 if (Array.isArray(propValue)) {
5421 return 'array';
5422 }
5423 if (propValue instanceof RegExp) {
5424 // Old webkits (at least until Android 4.0) return 'function' rather than
5425 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5426 // passes PropTypes.object.
5427 return 'object';
5428 }
5429 if (isSymbol(propType, propValue)) {
5430 return 'symbol';
5431 }
5432 return propType;
5433 }
5434
5435 // This handles more types than `getPropType`. Only used for error messages.
5436 // See `createPrimitiveTypeChecker`.
5437 function getPreciseType(propValue) {
5438 if (typeof propValue === 'undefined' || propValue === null) {
5439 return '' + propValue;
5440 }
5441 var propType = getPropType(propValue);
5442 if (propType === 'object') {
5443 if (propValue instanceof Date) {
5444 return 'date';
5445 } else if (propValue instanceof RegExp) {
5446 return 'regexp';
5447 }
5448 }
5449 return propType;
5450 }
5451
5452 // Returns a string that is postfixed to a warning about an invalid type.
5453 // For example, "undefined" or "of type array"
5454 function getPostfixForTypeWarning(value) {
5455 var type = getPreciseType(value);
5456 switch (type) {
5457 case 'array':
5458 case 'object':
5459 return 'an ' + type;
5460 case 'boolean':
5461 case 'date':
5462 case 'regexp':
5463 return 'a ' + type;
5464 default:
5465 return type;
5466 }
5467 }
5468
5469 // Returns class name of the object, if any.
5470 function getClassName(propValue) {
5471 if (!propValue.constructor || !propValue.constructor.name) {
5472 return ANONYMOUS;
5473 }
5474 return propValue.constructor.name;
5475 }
5476
5477 ReactPropTypes.checkPropTypes = checkPropTypes;
5478 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5479 ReactPropTypes.PropTypes = ReactPropTypes;
5480
5481 return ReactPropTypes;
5482 };
5483
5484
5485 /***/ }),
5486
5487 /***/ "./node_modules/prop-types/index.js":
5488 /*!******************************************!*\
5489 !*** ./node_modules/prop-types/index.js ***!
5490 \******************************************/
5491 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5492
5493 /**
5494 * Copyright (c) 2013-present, Facebook, Inc.
5495 *
5496 * This source code is licensed under the MIT license found in the
5497 * LICENSE file in the root directory of this source tree.
5498 */
5499
5500 if (true) {
5501 var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
5502
5503 // By explicitly using `prop-types` you are opting into new development behavior.
5504 // http://fb.me/prop-types-in-prod
5505 var throwOnDirectAccess = true;
5506 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
5507 } else {}
5508
5509
5510 /***/ }),
5511
5512 /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
5513 /*!*************************************************************!*\
5514 !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
5515 \*************************************************************/
5516 /***/ ((module) => {
5517
5518 "use strict";
5519 /**
5520 * Copyright (c) 2013-present, Facebook, Inc.
5521 *
5522 * This source code is licensed under the MIT license found in the
5523 * LICENSE file in the root directory of this source tree.
5524 */
5525
5526
5527
5528 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5529
5530 module.exports = ReactPropTypesSecret;
5531
5532
5533 /***/ }),
5534
5535 /***/ "./node_modules/prop-types/lib/has.js":
5536 /*!********************************************!*\
5537 !*** ./node_modules/prop-types/lib/has.js ***!
5538 \********************************************/
5539 /***/ ((module) => {
5540
5541 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
5542
5543
5544 /***/ }),
5545
5546 /***/ "./node_modules/raven-js/src/configError.js":
5547 /*!**************************************************!*\
5548 !*** ./node_modules/raven-js/src/configError.js ***!
5549 \**************************************************/
5550 /***/ ((module) => {
5551
5552 function RavenConfigError(message) {
5553 this.name = 'RavenConfigError';
5554 this.message = message;
5555 }
5556 RavenConfigError.prototype = new Error();
5557 RavenConfigError.prototype.constructor = RavenConfigError;
5558
5559 module.exports = RavenConfigError;
5560
5561
5562 /***/ }),
5563
5564 /***/ "./node_modules/raven-js/src/console.js":
5565 /*!**********************************************!*\
5566 !*** ./node_modules/raven-js/src/console.js ***!
5567 \**********************************************/
5568 /***/ ((module) => {
5569
5570 var wrapMethod = function(console, level, callback) {
5571 var originalConsoleLevel = console[level];
5572 var originalConsole = console;
5573
5574 if (!(level in console)) {
5575 return;
5576 }
5577
5578 var sentryLevel = level === 'warn' ? 'warning' : level;
5579
5580 console[level] = function() {
5581 var args = [].slice.call(arguments);
5582
5583 var msg = '' + args.join(' ');
5584 var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};
5585
5586 if (level === 'assert') {
5587 if (args[0] === false) {
5588 // Default browsers message
5589 msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');
5590 data.extra.arguments = args.slice(1);
5591 callback && callback(msg, data);
5592 }
5593 } else {
5594 callback && callback(msg, data);
5595 }
5596
5597 // this fails for some browsers. :(
5598 if (originalConsoleLevel) {
5599 // IE9 doesn't allow calling apply on console functions directly
5600 // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
5601 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);
5602 }
5603 };
5604 };
5605
5606 module.exports = {
5607 wrapMethod: wrapMethod
5608 };
5609
5610
5611 /***/ }),
5612
5613 /***/ "./node_modules/raven-js/src/raven.js":
5614 /*!********************************************!*\
5615 !*** ./node_modules/raven-js/src/raven.js ***!
5616 \********************************************/
5617 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5618
5619 /*global XDomainRequest:false */
5620
5621 var TraceKit = __webpack_require__(/*! ../vendor/TraceKit/tracekit */ "./node_modules/raven-js/vendor/TraceKit/tracekit.js");
5622 var stringify = __webpack_require__(/*! ../vendor/json-stringify-safe/stringify */ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js");
5623 var RavenConfigError = __webpack_require__(/*! ./configError */ "./node_modules/raven-js/src/configError.js");
5624
5625 var utils = __webpack_require__(/*! ./utils */ "./node_modules/raven-js/src/utils.js");
5626 var isError = utils.isError;
5627 var isObject = utils.isObject;
5628 var isObject = utils.isObject;
5629 var isErrorEvent = utils.isErrorEvent;
5630 var isUndefined = utils.isUndefined;
5631 var isFunction = utils.isFunction;
5632 var isString = utils.isString;
5633 var isEmptyObject = utils.isEmptyObject;
5634 var each = utils.each;
5635 var objectMerge = utils.objectMerge;
5636 var truncate = utils.truncate;
5637 var objectFrozen = utils.objectFrozen;
5638 var hasKey = utils.hasKey;
5639 var joinRegExp = utils.joinRegExp;
5640 var urlencode = utils.urlencode;
5641 var uuid4 = utils.uuid4;
5642 var htmlTreeAsString = utils.htmlTreeAsString;
5643 var isSameException = utils.isSameException;
5644 var isSameStacktrace = utils.isSameStacktrace;
5645 var parseUrl = utils.parseUrl;
5646 var fill = utils.fill;
5647
5648 var wrapConsoleMethod = (__webpack_require__(/*! ./console */ "./node_modules/raven-js/src/console.js").wrapMethod);
5649
5650 var dsnKeys = 'source protocol user pass host port path'.split(' '),
5651 dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;
5652
5653 function now() {
5654 return +new Date();
5655 }
5656
5657 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
5658 var _window =
5659 typeof window !== 'undefined'
5660 ? window
5661 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
5662 var _document = _window.document;
5663 var _navigator = _window.navigator;
5664
5665 function keepOriginalCallback(original, callback) {
5666 return isFunction(callback)
5667 ? function(data) {
5668 return callback(data, original);
5669 }
5670 : callback;
5671 }
5672
5673 // First, check for JSON support
5674 // If there is no JSON, we no-op the core features of Raven
5675 // since JSON is required to encode the payload
5676 function Raven() {
5677 this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);
5678 // Raven can run in contexts where there's no document (react-native)
5679 this._hasDocument = !isUndefined(_document);
5680 this._hasNavigator = !isUndefined(_navigator);
5681 this._lastCapturedException = null;
5682 this._lastData = null;
5683 this._lastEventId = null;
5684 this._globalServer = null;
5685 this._globalKey = null;
5686 this._globalProject = null;
5687 this._globalContext = {};
5688 this._globalOptions = {
5689 logger: 'javascript',
5690 ignoreErrors: [],
5691 ignoreUrls: [],
5692 whitelistUrls: [],
5693 includePaths: [],
5694 collectWindowErrors: true,
5695 maxMessageLength: 0,
5696
5697 // By default, truncates URL values to 250 chars
5698 maxUrlLength: 250,
5699 stackTraceLimit: 50,
5700 autoBreadcrumbs: true,
5701 instrument: true,
5702 sampleRate: 1
5703 };
5704 this._ignoreOnError = 0;
5705 this._isRavenInstalled = false;
5706 this._originalErrorStackTraceLimit = Error.stackTraceLimit;
5707 // capture references to window.console *and* all its methods first
5708 // before the console plugin has a chance to monkey patch
5709 this._originalConsole = _window.console || {};
5710 this._originalConsoleMethods = {};
5711 this._plugins = [];
5712 this._startTime = now();
5713 this._wrappedBuiltIns = [];
5714 this._breadcrumbs = [];
5715 this._lastCapturedEvent = null;
5716 this._keypressTimeout;
5717 this._location = _window.location;
5718 this._lastHref = this._location && this._location.href;
5719 this._resetBackoff();
5720
5721 // eslint-disable-next-line guard-for-in
5722 for (var method in this._originalConsole) {
5723 this._originalConsoleMethods[method] = this._originalConsole[method];
5724 }
5725 }
5726
5727 /*
5728 * The core Raven singleton
5729 *
5730 * @this {Raven}
5731 */
5732
5733 Raven.prototype = {
5734 // Hardcode version string so that raven source can be loaded directly via
5735 // webpack (using a build step causes webpack #1617). Grunt verifies that
5736 // this value matches package.json during build.
5737 // See: https://github.com/getsentry/raven-js/issues/465
5738 VERSION: '3.19.1',
5739
5740 debug: false,
5741
5742 TraceKit: TraceKit, // alias to TraceKit
5743
5744 /*
5745 * Configure Raven with a DSN and extra options
5746 *
5747 * @param {string} dsn The public Sentry DSN
5748 * @param {object} options Set of global options [optional]
5749 * @return {Raven}
5750 */
5751 config: function(dsn, options) {
5752 var self = this;
5753
5754 if (self._globalServer) {
5755 this._logDebug('error', 'Error: Raven has already been configured');
5756 return self;
5757 }
5758 if (!dsn) return self;
5759
5760 var globalOptions = self._globalOptions;
5761
5762 // merge in options
5763 if (options) {
5764 each(options, function(key, value) {
5765 // tags and extra are special and need to be put into context
5766 if (key === 'tags' || key === 'extra' || key === 'user') {
5767 self._globalContext[key] = value;
5768 } else {
5769 globalOptions[key] = value;
5770 }
5771 });
5772 }
5773
5774 self.setDSN(dsn);
5775
5776 // "Script error." is hard coded into browsers for errors that it can't read.
5777 // this is the result of a script being pulled in from an external domain and CORS.
5778 globalOptions.ignoreErrors.push(/^Script error\.?$/);
5779 globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
5780
5781 // join regexp rules into one big rule
5782 globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
5783 globalOptions.ignoreUrls = globalOptions.ignoreUrls.length
5784 ? joinRegExp(globalOptions.ignoreUrls)
5785 : false;
5786 globalOptions.whitelistUrls = globalOptions.whitelistUrls.length
5787 ? joinRegExp(globalOptions.whitelistUrls)
5788 : false;
5789 globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
5790 globalOptions.maxBreadcrumbs = Math.max(
5791 0,
5792 Math.min(globalOptions.maxBreadcrumbs || 100, 100)
5793 ); // default and hard limit is 100
5794
5795 var autoBreadcrumbDefaults = {
5796 xhr: true,
5797 console: true,
5798 dom: true,
5799 location: true
5800 };
5801
5802 var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
5803 if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {
5804 autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);
5805 } else if (autoBreadcrumbs !== false) {
5806 autoBreadcrumbs = autoBreadcrumbDefaults;
5807 }
5808 globalOptions.autoBreadcrumbs = autoBreadcrumbs;
5809
5810 var instrumentDefaults = {
5811 tryCatch: true
5812 };
5813
5814 var instrument = globalOptions.instrument;
5815 if ({}.toString.call(instrument) === '[object Object]') {
5816 instrument = objectMerge(instrumentDefaults, instrument);
5817 } else if (instrument !== false) {
5818 instrument = instrumentDefaults;
5819 }
5820 globalOptions.instrument = instrument;
5821
5822 TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
5823
5824 // return for chaining
5825 return self;
5826 },
5827
5828 /*
5829 * Installs a global window.onerror error handler
5830 * to capture and report uncaught exceptions.
5831 * At this point, install() is required to be called due
5832 * to the way TraceKit is set up.
5833 *
5834 * @return {Raven}
5835 */
5836 install: function() {
5837 var self = this;
5838 if (self.isSetup() && !self._isRavenInstalled) {
5839 TraceKit.report.subscribe(function() {
5840 self._handleOnErrorStackInfo.apply(self, arguments);
5841 });
5842 if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {
5843 self._instrumentTryCatch();
5844 }
5845
5846 if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();
5847
5848 // Install all of the plugins
5849 self._drainPlugins();
5850
5851 self._isRavenInstalled = true;
5852 }
5853
5854 Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
5855 return this;
5856 },
5857
5858 /*
5859 * Set the DSN (can be called multiple time unlike config)
5860 *
5861 * @param {string} dsn The public Sentry DSN
5862 */
5863 setDSN: function(dsn) {
5864 var self = this,
5865 uri = self._parseDSN(dsn),
5866 lastSlash = uri.path.lastIndexOf('/'),
5867 path = uri.path.substr(1, lastSlash);
5868
5869 self._dsn = dsn;
5870 self._globalKey = uri.user;
5871 self._globalSecret = uri.pass && uri.pass.substr(1);
5872 self._globalProject = uri.path.substr(lastSlash + 1);
5873
5874 self._globalServer = self._getGlobalServer(uri);
5875
5876 self._globalEndpoint =
5877 self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';
5878
5879 // Reset backoff state since we may be pointing at a
5880 // new project/server
5881 this._resetBackoff();
5882 },
5883
5884 /*
5885 * Wrap code within a context so Raven can capture errors
5886 * reliably across domains that is executed immediately.
5887 *
5888 * @param {object} options A specific set of options for this context [optional]
5889 * @param {function} func The callback to be immediately executed within the context
5890 * @param {array} args An array of arguments to be called with the callback [optional]
5891 */
5892 context: function(options, func, args) {
5893 if (isFunction(options)) {
5894 args = func || [];
5895 func = options;
5896 options = undefined;
5897 }
5898
5899 return this.wrap(options, func).apply(this, args);
5900 },
5901
5902 /*
5903 * Wrap code within a context and returns back a new function to be executed
5904 *
5905 * @param {object} options A specific set of options for this context [optional]
5906 * @param {function} func The function to be wrapped in a new context
5907 * @param {function} func A function to call before the try/catch wrapper [optional, private]
5908 * @return {function} The newly wrapped functions with a context
5909 */
5910 wrap: function(options, func, _before) {
5911 var self = this;
5912 // 1 argument has been passed, and it's not a function
5913 // so just return it
5914 if (isUndefined(func) && !isFunction(options)) {
5915 return options;
5916 }
5917
5918 // options is optional
5919 if (isFunction(options)) {
5920 func = options;
5921 options = undefined;
5922 }
5923
5924 // At this point, we've passed along 2 arguments, and the second one
5925 // is not a function either, so we'll just return the second argument.
5926 if (!isFunction(func)) {
5927 return func;
5928 }
5929
5930 // We don't wanna wrap it twice!
5931 try {
5932 if (func.__raven__) {
5933 return func;
5934 }
5935
5936 // If this has already been wrapped in the past, return that
5937 if (func.__raven_wrapper__) {
5938 return func.__raven_wrapper__;
5939 }
5940 } catch (e) {
5941 // Just accessing custom props in some Selenium environments
5942 // can cause a "Permission denied" exception (see raven-js#495).
5943 // Bail on wrapping and return the function as-is (defers to window.onerror).
5944 return func;
5945 }
5946
5947 function wrapped() {
5948 var args = [],
5949 i = arguments.length,
5950 deep = !options || (options && options.deep !== false);
5951
5952 if (_before && isFunction(_before)) {
5953 _before.apply(this, arguments);
5954 }
5955
5956 // Recursively wrap all of a function's arguments that are
5957 // functions themselves.
5958 while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];
5959
5960 try {
5961 // Attempt to invoke user-land function
5962 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
5963 // means Raven caught an error invoking your application code. This is
5964 // expected behavior and NOT indicative of a bug with Raven.js.
5965 return func.apply(this, args);
5966 } catch (e) {
5967 self._ignoreNextOnError();
5968 self.captureException(e, options);
5969 throw e;
5970 }
5971 }
5972
5973 // copy over properties of the old function
5974 for (var property in func) {
5975 if (hasKey(func, property)) {
5976 wrapped[property] = func[property];
5977 }
5978 }
5979 wrapped.prototype = func.prototype;
5980
5981 func.__raven_wrapper__ = wrapped;
5982 // Signal that this function has been wrapped already
5983 // for both debugging and to prevent it to being wrapped twice
5984 wrapped.__raven__ = true;
5985 wrapped.__inner__ = func;
5986
5987 return wrapped;
5988 },
5989
5990 /*
5991 * Uninstalls the global error handler.
5992 *
5993 * @return {Raven}
5994 */
5995 uninstall: function() {
5996 TraceKit.report.uninstall();
5997
5998 this._restoreBuiltIns();
5999
6000 Error.stackTraceLimit = this._originalErrorStackTraceLimit;
6001 this._isRavenInstalled = false;
6002
6003 return this;
6004 },
6005
6006 /*
6007 * Manually capture an exception and send it over to Sentry
6008 *
6009 * @param {error} ex An exception to be logged
6010 * @param {object} options A specific set of options for this error [optional]
6011 * @return {Raven}
6012 */
6013 captureException: function(ex, options) {
6014 // Cases for sending ex as a message, rather than an exception
6015 var isNotError = !isError(ex);
6016 var isNotErrorEvent = !isErrorEvent(ex);
6017 var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;
6018
6019 if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {
6020 return this.captureMessage(
6021 ex,
6022 objectMerge(
6023 {
6024 trimHeadFrames: 1,
6025 stacktrace: true // if we fall back to captureMessage, default to attempting a new trace
6026 },
6027 options
6028 )
6029 );
6030 }
6031
6032 // Get actual Error from ErrorEvent
6033 if (isErrorEvent(ex)) ex = ex.error;
6034
6035 // Store the raw exception object for potential debugging and introspection
6036 this._lastCapturedException = ex;
6037
6038 // TraceKit.report will re-raise any exception passed to it,
6039 // which means you have to wrap it in try/catch. Instead, we
6040 // can wrap it here and only re-raise if TraceKit.report
6041 // raises an exception different from the one we asked to
6042 // report on.
6043 try {
6044 var stack = TraceKit.computeStackTrace(ex);
6045 this._handleStackInfo(stack, options);
6046 } catch (ex1) {
6047 if (ex !== ex1) {
6048 throw ex1;
6049 }
6050 }
6051
6052 return this;
6053 },
6054
6055 /*
6056 * Manually send a message to Sentry
6057 *
6058 * @param {string} msg A plain message to be captured in Sentry
6059 * @param {object} options A specific set of options for this message [optional]
6060 * @return {Raven}
6061 */
6062 captureMessage: function(msg, options) {
6063 // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an
6064 // early call; we'll error on the side of logging anything called before configuration since it's
6065 // probably something you should see:
6066 if (
6067 !!this._globalOptions.ignoreErrors.test &&
6068 this._globalOptions.ignoreErrors.test(msg)
6069 ) {
6070 return;
6071 }
6072
6073 options = options || {};
6074
6075 var data = objectMerge(
6076 {
6077 message: msg + '' // Make sure it's actually a string
6078 },
6079 options
6080 );
6081
6082 var ex;
6083 // Generate a "synthetic" stack trace from this point.
6084 // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative
6085 // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,
6086 // or if it catches a thrown object without a "stack" property.
6087 try {
6088 throw new Error(msg);
6089 } catch (ex1) {
6090 ex = ex1;
6091 }
6092
6093 // null exception name so `Error` isn't prefixed to msg
6094 ex.name = null;
6095 var stack = TraceKit.computeStackTrace(ex);
6096
6097 // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]
6098 var initialCall = stack.stack[1];
6099
6100 var fileurl = (initialCall && initialCall.url) || '';
6101
6102 if (
6103 !!this._globalOptions.ignoreUrls.test &&
6104 this._globalOptions.ignoreUrls.test(fileurl)
6105 ) {
6106 return;
6107 }
6108
6109 if (
6110 !!this._globalOptions.whitelistUrls.test &&
6111 !this._globalOptions.whitelistUrls.test(fileurl)
6112 ) {
6113 return;
6114 }
6115
6116 if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
6117 options = objectMerge(
6118 {
6119 // fingerprint on msg, not stack trace (legacy behavior, could be
6120 // revisited)
6121 fingerprint: msg,
6122 // since we know this is a synthetic trace, the top N-most frames
6123 // MUST be from Raven.js, so mark them as in_app later by setting
6124 // trimHeadFrames
6125 trimHeadFrames: (options.trimHeadFrames || 0) + 1
6126 },
6127 options
6128 );
6129
6130 var frames = this._prepareFrames(stack, options);
6131 data.stacktrace = {
6132 // Sentry expects frames oldest to newest
6133 frames: frames.reverse()
6134 };
6135 }
6136
6137 // Fire away!
6138 this._send(data);
6139
6140 return this;
6141 },
6142
6143 captureBreadcrumb: function(obj) {
6144 var crumb = objectMerge(
6145 {
6146 timestamp: now() / 1000
6147 },
6148 obj
6149 );
6150
6151 if (isFunction(this._globalOptions.breadcrumbCallback)) {
6152 var result = this._globalOptions.breadcrumbCallback(crumb);
6153
6154 if (isObject(result) && !isEmptyObject(result)) {
6155 crumb = result;
6156 } else if (result === false) {
6157 return this;
6158 }
6159 }
6160
6161 this._breadcrumbs.push(crumb);
6162 if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {
6163 this._breadcrumbs.shift();
6164 }
6165 return this;
6166 },
6167
6168 addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
6169 var pluginArgs = [].slice.call(arguments, 1);
6170
6171 this._plugins.push([plugin, pluginArgs]);
6172 if (this._isRavenInstalled) {
6173 this._drainPlugins();
6174 }
6175
6176 return this;
6177 },
6178
6179 /*
6180 * Set/clear a user to be sent along with the payload.
6181 *
6182 * @param {object} user An object representing user data [optional]
6183 * @return {Raven}
6184 */
6185 setUserContext: function(user) {
6186 // Intentionally do not merge here since that's an unexpected behavior.
6187 this._globalContext.user = user;
6188
6189 return this;
6190 },
6191
6192 /*
6193 * Merge extra attributes to be sent along with the payload.
6194 *
6195 * @param {object} extra An object representing extra data [optional]
6196 * @return {Raven}
6197 */
6198 setExtraContext: function(extra) {
6199 this._mergeContext('extra', extra);
6200
6201 return this;
6202 },
6203
6204 /*
6205 * Merge tags to be sent along with the payload.
6206 *
6207 * @param {object} tags An object representing tags [optional]
6208 * @return {Raven}
6209 */
6210 setTagsContext: function(tags) {
6211 this._mergeContext('tags', tags);
6212
6213 return this;
6214 },
6215
6216 /*
6217 * Clear all of the context.
6218 *
6219 * @return {Raven}
6220 */
6221 clearContext: function() {
6222 this._globalContext = {};
6223
6224 return this;
6225 },
6226
6227 /*
6228 * Get a copy of the current context. This cannot be mutated.
6229 *
6230 * @return {object} copy of context
6231 */
6232 getContext: function() {
6233 // lol javascript
6234 return JSON.parse(stringify(this._globalContext));
6235 },
6236
6237 /*
6238 * Set environment of application
6239 *
6240 * @param {string} environment Typically something like 'production'.
6241 * @return {Raven}
6242 */
6243 setEnvironment: function(environment) {
6244 this._globalOptions.environment = environment;
6245
6246 return this;
6247 },
6248
6249 /*
6250 * Set release version of application
6251 *
6252 * @param {string} release Typically something like a git SHA to identify version
6253 * @return {Raven}
6254 */
6255 setRelease: function(release) {
6256 this._globalOptions.release = release;
6257
6258 return this;
6259 },
6260
6261 /*
6262 * Set the dataCallback option
6263 *
6264 * @param {function} callback The callback to run which allows the
6265 * data blob to be mutated before sending
6266 * @return {Raven}
6267 */
6268 setDataCallback: function(callback) {
6269 var original = this._globalOptions.dataCallback;
6270 this._globalOptions.dataCallback = keepOriginalCallback(original, callback);
6271 return this;
6272 },
6273
6274 /*
6275 * Set the breadcrumbCallback option
6276 *
6277 * @param {function} callback The callback to run which allows filtering
6278 * or mutating breadcrumbs
6279 * @return {Raven}
6280 */
6281 setBreadcrumbCallback: function(callback) {
6282 var original = this._globalOptions.breadcrumbCallback;
6283 this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);
6284 return this;
6285 },
6286
6287 /*
6288 * Set the shouldSendCallback option
6289 *
6290 * @param {function} callback The callback to run which allows
6291 * introspecting the blob before sending
6292 * @return {Raven}
6293 */
6294 setShouldSendCallback: function(callback) {
6295 var original = this._globalOptions.shouldSendCallback;
6296 this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);
6297 return this;
6298 },
6299
6300 /**
6301 * Override the default HTTP transport mechanism that transmits data
6302 * to the Sentry server.
6303 *
6304 * @param {function} transport Function invoked instead of the default
6305 * `makeRequest` handler.
6306 *
6307 * @return {Raven}
6308 */
6309 setTransport: function(transport) {
6310 this._globalOptions.transport = transport;
6311
6312 return this;
6313 },
6314
6315 /*
6316 * Get the latest raw exception that was captured by Raven.
6317 *
6318 * @return {error}
6319 */
6320 lastException: function() {
6321 return this._lastCapturedException;
6322 },
6323
6324 /*
6325 * Get the last event id
6326 *
6327 * @return {string}
6328 */
6329 lastEventId: function() {
6330 return this._lastEventId;
6331 },
6332
6333 /*
6334 * Determine if Raven is setup and ready to go.
6335 *
6336 * @return {boolean}
6337 */
6338 isSetup: function() {
6339 if (!this._hasJSON) return false; // needs JSON support
6340 if (!this._globalServer) {
6341 if (!this.ravenNotConfiguredError) {
6342 this.ravenNotConfiguredError = true;
6343 this._logDebug('error', 'Error: Raven has not been configured.');
6344 }
6345 return false;
6346 }
6347 return true;
6348 },
6349
6350 afterLoad: function() {
6351 // TODO: remove window dependence?
6352
6353 // Attempt to initialize Raven on load
6354 var RavenConfig = _window.RavenConfig;
6355 if (RavenConfig) {
6356 this.config(RavenConfig.dsn, RavenConfig.config).install();
6357 }
6358 },
6359
6360 showReportDialog: function(options) {
6361 if (
6362 !_document // doesn't work without a document (React native)
6363 )
6364 return;
6365
6366 options = options || {};
6367
6368 var lastEventId = options.eventId || this.lastEventId();
6369 if (!lastEventId) {
6370 throw new RavenConfigError('Missing eventId');
6371 }
6372
6373 var dsn = options.dsn || this._dsn;
6374 if (!dsn) {
6375 throw new RavenConfigError('Missing DSN');
6376 }
6377
6378 var encode = encodeURIComponent;
6379 var qs = '';
6380 qs += '?eventId=' + encode(lastEventId);
6381 qs += '&dsn=' + encode(dsn);
6382
6383 var user = options.user || this._globalContext.user;
6384 if (user) {
6385 if (user.name) qs += '&name=' + encode(user.name);
6386 if (user.email) qs += '&email=' + encode(user.email);
6387 }
6388
6389 var globalServer = this._getGlobalServer(this._parseDSN(dsn));
6390
6391 var script = _document.createElement('script');
6392 script.async = true;
6393 script.src = globalServer + '/api/embed/error-page/' + qs;
6394 (_document.head || _document.body).appendChild(script);
6395 },
6396
6397 /**** Private functions ****/
6398 _ignoreNextOnError: function() {
6399 var self = this;
6400 this._ignoreOnError += 1;
6401 setTimeout(function() {
6402 // onerror should trigger before setTimeout
6403 self._ignoreOnError -= 1;
6404 });
6405 },
6406
6407 _triggerEvent: function(eventType, options) {
6408 // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it
6409 var evt, key;
6410
6411 if (!this._hasDocument) return;
6412
6413 options = options || {};
6414
6415 eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);
6416
6417 if (_document.createEvent) {
6418 evt = _document.createEvent('HTMLEvents');
6419 evt.initEvent(eventType, true, true);
6420 } else {
6421 evt = _document.createEventObject();
6422 evt.eventType = eventType;
6423 }
6424
6425 for (key in options)
6426 if (hasKey(options, key)) {
6427 evt[key] = options[key];
6428 }
6429
6430 if (_document.createEvent) {
6431 // IE9 if standards
6432 _document.dispatchEvent(evt);
6433 } else {
6434 // IE8 regardless of Quirks or Standards
6435 // IE9 if quirks
6436 try {
6437 _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
6438 } catch (e) {
6439 // Do nothing
6440 }
6441 }
6442 },
6443
6444 /**
6445 * Wraps addEventListener to capture UI breadcrumbs
6446 * @param evtName the event name (e.g. "click")
6447 * @returns {Function}
6448 * @private
6449 */
6450 _breadcrumbEventHandler: function(evtName) {
6451 var self = this;
6452 return function(evt) {
6453 // reset keypress timeout; e.g. triggering a 'click' after
6454 // a 'keypress' will reset the keypress debounce so that a new
6455 // set of keypresses can be recorded
6456 self._keypressTimeout = null;
6457
6458 // It's possible this handler might trigger multiple times for the same
6459 // event (e.g. event propagation through node ancestors). Ignore if we've
6460 // already captured the event.
6461 if (self._lastCapturedEvent === evt) return;
6462
6463 self._lastCapturedEvent = evt;
6464
6465 // try/catch both:
6466 // - accessing evt.target (see getsentry/raven-js#838, #768)
6467 // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6468 // can throw an exception in some circumstances.
6469 var target;
6470 try {
6471 target = htmlTreeAsString(evt.target);
6472 } catch (e) {
6473 target = '<unknown>';
6474 }
6475
6476 self.captureBreadcrumb({
6477 category: 'ui.' + evtName, // e.g. ui.click, ui.input
6478 message: target
6479 });
6480 };
6481 },
6482
6483 /**
6484 * Wraps addEventListener to capture keypress UI events
6485 * @returns {Function}
6486 * @private
6487 */
6488 _keypressEventHandler: function() {
6489 var self = this,
6490 debounceDuration = 1000; // milliseconds
6491
6492 // TODO: if somehow user switches keypress target before
6493 // debounce timeout is triggered, we will only capture
6494 // a single breadcrumb from the FIRST target (acceptable?)
6495 return function(evt) {
6496 var target;
6497 try {
6498 target = evt.target;
6499 } catch (e) {
6500 // just accessing event properties can throw an exception in some rare circumstances
6501 // see: https://github.com/getsentry/raven-js/issues/838
6502 return;
6503 }
6504 var tagName = target && target.tagName;
6505
6506 // only consider keypress events on actual input elements
6507 // this will disregard keypresses targeting body (e.g. tabbing
6508 // through elements, hotkeys, etc)
6509 if (
6510 !tagName ||
6511 (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
6512 )
6513 return;
6514
6515 // record first keypress in a series, but ignore subsequent
6516 // keypresses until debounce clears
6517 var timeout = self._keypressTimeout;
6518 if (!timeout) {
6519 self._breadcrumbEventHandler('input')(evt);
6520 }
6521 clearTimeout(timeout);
6522 self._keypressTimeout = setTimeout(function() {
6523 self._keypressTimeout = null;
6524 }, debounceDuration);
6525 };
6526 },
6527
6528 /**
6529 * Captures a breadcrumb of type "navigation", normalizing input URLs
6530 * @param to the originating URL
6531 * @param from the target URL
6532 * @private
6533 */
6534 _captureUrlChange: function(from, to) {
6535 var parsedLoc = parseUrl(this._location.href);
6536 var parsedTo = parseUrl(to);
6537 var parsedFrom = parseUrl(from);
6538
6539 // because onpopstate only tells you the "new" (to) value of location.href, and
6540 // not the previous (from) value, we need to track the value of the current URL
6541 // state ourselves
6542 this._lastHref = to;
6543
6544 // Use only the path component of the URL if the URL matches the current
6545 // document (almost all the time when using pushState)
6546 if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)
6547 to = parsedTo.relative;
6548 if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)
6549 from = parsedFrom.relative;
6550
6551 this.captureBreadcrumb({
6552 category: 'navigation',
6553 data: {
6554 to: to,
6555 from: from
6556 }
6557 });
6558 },
6559
6560 /**
6561 * Wrap timer functions and event targets to catch errors and provide
6562 * better metadata.
6563 */
6564 _instrumentTryCatch: function() {
6565 var self = this;
6566
6567 var wrappedBuiltIns = self._wrappedBuiltIns;
6568
6569 function wrapTimeFn(orig) {
6570 return function(fn, t) {
6571 // preserve arity
6572 // Make a copy of the arguments to prevent deoptimization
6573 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6574 var args = new Array(arguments.length);
6575 for (var i = 0; i < args.length; ++i) {
6576 args[i] = arguments[i];
6577 }
6578 var originalCallback = args[0];
6579 if (isFunction(originalCallback)) {
6580 args[0] = self.wrap(originalCallback);
6581 }
6582
6583 // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it
6584 // also supports only two arguments and doesn't care what this is, so we
6585 // can just call the original function directly.
6586 if (orig.apply) {
6587 return orig.apply(this, args);
6588 } else {
6589 return orig(args[0], args[1]);
6590 }
6591 };
6592 }
6593
6594 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6595
6596 function wrapEventTarget(global) {
6597 var proto = _window[global] && _window[global].prototype;
6598 if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {
6599 fill(
6600 proto,
6601 'addEventListener',
6602 function(orig) {
6603 return function(evtName, fn, capture, secure) {
6604 // preserve arity
6605 try {
6606 if (fn && fn.handleEvent) {
6607 fn.handleEvent = self.wrap(fn.handleEvent);
6608 }
6609 } catch (err) {
6610 // can sometimes get 'Permission denied to access property "handle Event'
6611 }
6612
6613 // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`
6614 // so that we don't have more than one wrapper function
6615 var before, clickHandler, keypressHandler;
6616
6617 if (
6618 autoBreadcrumbs &&
6619 autoBreadcrumbs.dom &&
6620 (global === 'EventTarget' || global === 'Node')
6621 ) {
6622 // NOTE: generating multiple handlers per addEventListener invocation, should
6623 // revisit and verify we can just use one (almost certainly)
6624 clickHandler = self._breadcrumbEventHandler('click');
6625 keypressHandler = self._keypressEventHandler();
6626 before = function(evt) {
6627 // need to intercept every DOM event in `before` argument, in case that
6628 // same wrapped method is re-used for different events (e.g. mousemove THEN click)
6629 // see #724
6630 if (!evt) return;
6631
6632 var eventType;
6633 try {
6634 eventType = evt.type;
6635 } catch (e) {
6636 // just accessing event properties can throw an exception in some rare circumstances
6637 // see: https://github.com/getsentry/raven-js/issues/838
6638 return;
6639 }
6640 if (eventType === 'click') return clickHandler(evt);
6641 else if (eventType === 'keypress') return keypressHandler(evt);
6642 };
6643 }
6644 return orig.call(
6645 this,
6646 evtName,
6647 self.wrap(fn, undefined, before),
6648 capture,
6649 secure
6650 );
6651 };
6652 },
6653 wrappedBuiltIns
6654 );
6655 fill(
6656 proto,
6657 'removeEventListener',
6658 function(orig) {
6659 return function(evt, fn, capture, secure) {
6660 try {
6661 fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);
6662 } catch (e) {
6663 // ignore, accessing __raven_wrapper__ will throw in some Selenium environments
6664 }
6665 return orig.call(this, evt, fn, capture, secure);
6666 };
6667 },
6668 wrappedBuiltIns
6669 );
6670 }
6671 }
6672
6673 fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
6674 fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
6675 if (_window.requestAnimationFrame) {
6676 fill(
6677 _window,
6678 'requestAnimationFrame',
6679 function(orig) {
6680 return function(cb) {
6681 return orig(self.wrap(cb));
6682 };
6683 },
6684 wrappedBuiltIns
6685 );
6686 }
6687
6688 // event targets borrowed from bugsnag-js:
6689 // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666
6690 var eventTargets = [
6691 'EventTarget',
6692 'Window',
6693 'Node',
6694 'ApplicationCache',
6695 'AudioTrackList',
6696 'ChannelMergerNode',
6697 'CryptoOperation',
6698 'EventSource',
6699 'FileReader',
6700 'HTMLUnknownElement',
6701 'IDBDatabase',
6702 'IDBRequest',
6703 'IDBTransaction',
6704 'KeyOperation',
6705 'MediaController',
6706 'MessagePort',
6707 'ModalWindow',
6708 'Notification',
6709 'SVGElementInstance',
6710 'Screen',
6711 'TextTrack',
6712 'TextTrackCue',
6713 'TextTrackList',
6714 'WebSocket',
6715 'WebSocketWorker',
6716 'Worker',
6717 'XMLHttpRequest',
6718 'XMLHttpRequestEventTarget',
6719 'XMLHttpRequestUpload'
6720 ];
6721 for (var i = 0; i < eventTargets.length; i++) {
6722 wrapEventTarget(eventTargets[i]);
6723 }
6724 },
6725
6726 /**
6727 * Instrument browser built-ins w/ breadcrumb capturing
6728 * - XMLHttpRequests
6729 * - DOM interactions (click/typing)
6730 * - window.location changes
6731 * - console
6732 *
6733 * Can be disabled or individually configured via the `autoBreadcrumbs` config option
6734 */
6735 _instrumentBreadcrumbs: function() {
6736 var self = this;
6737 var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
6738
6739 var wrappedBuiltIns = self._wrappedBuiltIns;
6740
6741 function wrapProp(prop, xhr) {
6742 if (prop in xhr && isFunction(xhr[prop])) {
6743 fill(xhr, prop, function(orig) {
6744 return self.wrap(orig);
6745 }); // intentionally don't track filled methods on XHR instances
6746 }
6747 }
6748
6749 if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
6750 var xhrproto = XMLHttpRequest.prototype;
6751 fill(
6752 xhrproto,
6753 'open',
6754 function(origOpen) {
6755 return function(method, url) {
6756 // preserve arity
6757
6758 // if Sentry key appears in URL, don't capture
6759 if (isString(url) && url.indexOf(self._globalKey) === -1) {
6760 this.__raven_xhr = {
6761 method: method,
6762 url: url,
6763 status_code: null
6764 };
6765 }
6766
6767 return origOpen.apply(this, arguments);
6768 };
6769 },
6770 wrappedBuiltIns
6771 );
6772
6773 fill(
6774 xhrproto,
6775 'send',
6776 function(origSend) {
6777 return function(data) {
6778 // preserve arity
6779 var xhr = this;
6780
6781 function onreadystatechangeHandler() {
6782 if (xhr.__raven_xhr && xhr.readyState === 4) {
6783 try {
6784 // touching statusCode in some platforms throws
6785 // an exception
6786 xhr.__raven_xhr.status_code = xhr.status;
6787 } catch (e) {
6788 /* do nothing */
6789 }
6790
6791 self.captureBreadcrumb({
6792 type: 'http',
6793 category: 'xhr',
6794 data: xhr.__raven_xhr
6795 });
6796 }
6797 }
6798
6799 var props = ['onload', 'onerror', 'onprogress'];
6800 for (var j = 0; j < props.length; j++) {
6801 wrapProp(props[j], xhr);
6802 }
6803
6804 if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {
6805 fill(
6806 xhr,
6807 'onreadystatechange',
6808 function(orig) {
6809 return self.wrap(orig, undefined, onreadystatechangeHandler);
6810 } /* intentionally don't track this instrumentation */
6811 );
6812 } else {
6813 // if onreadystatechange wasn't actually set by the page on this xhr, we
6814 // are free to set our own and capture the breadcrumb
6815 xhr.onreadystatechange = onreadystatechangeHandler;
6816 }
6817
6818 return origSend.apply(this, arguments);
6819 };
6820 },
6821 wrappedBuiltIns
6822 );
6823 }
6824
6825 if (autoBreadcrumbs.xhr && 'fetch' in _window) {
6826 fill(
6827 _window,
6828 'fetch',
6829 function(origFetch) {
6830 return function(fn, t) {
6831 // preserve arity
6832 // Make a copy of the arguments to prevent deoptimization
6833 // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
6834 var args = new Array(arguments.length);
6835 for (var i = 0; i < args.length; ++i) {
6836 args[i] = arguments[i];
6837 }
6838
6839 var fetchInput = args[0];
6840 var method = 'GET';
6841 var url;
6842
6843 if (typeof fetchInput === 'string') {
6844 url = fetchInput;
6845 } else if ('Request' in _window && fetchInput instanceof _window.Request) {
6846 url = fetchInput.url;
6847 if (fetchInput.method) {
6848 method = fetchInput.method;
6849 }
6850 } else {
6851 url = '' + fetchInput;
6852 }
6853
6854 if (args[1] && args[1].method) {
6855 method = args[1].method;
6856 }
6857
6858 var fetchData = {
6859 method: method,
6860 url: url,
6861 status_code: null
6862 };
6863
6864 self.captureBreadcrumb({
6865 type: 'http',
6866 category: 'fetch',
6867 data: fetchData
6868 });
6869
6870 return origFetch.apply(this, args).then(function(response) {
6871 fetchData.status_code = response.status;
6872
6873 return response;
6874 });
6875 };
6876 },
6877 wrappedBuiltIns
6878 );
6879 }
6880
6881 // Capture breadcrumbs from any click that is unhandled / bubbled up all the way
6882 // to the document. Do this before we instrument addEventListener.
6883 if (autoBreadcrumbs.dom && this._hasDocument) {
6884 if (_document.addEventListener) {
6885 _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
6886 _document.addEventListener('keypress', self._keypressEventHandler(), false);
6887 } else {
6888 // IE8 Compatibility
6889 _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
6890 _document.attachEvent('onkeypress', self._keypressEventHandler());
6891 }
6892 }
6893
6894 // record navigation (URL) changes
6895 // NOTE: in Chrome App environment, touching history.pushState, *even inside
6896 // a try/catch block*, will cause Chrome to output an error to console.error
6897 // borrowed from: https://github.com/angular/angular.js/pull/13945/files
6898 var chrome = _window.chrome;
6899 var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
6900 var hasPushAndReplaceState =
6901 !isChromePackagedApp &&
6902 _window.history &&
6903 history.pushState &&
6904 history.replaceState;
6905 if (autoBreadcrumbs.location && hasPushAndReplaceState) {
6906 // TODO: remove onpopstate handler on uninstall()
6907 var oldOnPopState = _window.onpopstate;
6908 _window.onpopstate = function() {
6909 var currentHref = self._location.href;
6910 self._captureUrlChange(self._lastHref, currentHref);
6911
6912 if (oldOnPopState) {
6913 return oldOnPopState.apply(this, arguments);
6914 }
6915 };
6916
6917 var historyReplacementFunction = function(origHistFunction) {
6918 // note history.pushState.length is 0; intentionally not declaring
6919 // params to preserve 0 arity
6920 return function(/* state, title, url */) {
6921 var url = arguments.length > 2 ? arguments[2] : undefined;
6922
6923 // url argument is optional
6924 if (url) {
6925 // coerce to string (this is what pushState does)
6926 self._captureUrlChange(self._lastHref, url + '');
6927 }
6928
6929 return origHistFunction.apply(this, arguments);
6930 };
6931 };
6932
6933 fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);
6934 fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);
6935 }
6936
6937 if (autoBreadcrumbs.console && 'console' in _window && console.log) {
6938 // console
6939 var consoleMethodCallback = function(msg, data) {
6940 self.captureBreadcrumb({
6941 message: msg,
6942 level: data.level,
6943 category: 'console'
6944 });
6945 };
6946
6947 each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {
6948 wrapConsoleMethod(console, level, consoleMethodCallback);
6949 });
6950 }
6951 },
6952
6953 _restoreBuiltIns: function() {
6954 // restore any wrapped builtins
6955 var builtin;
6956 while (this._wrappedBuiltIns.length) {
6957 builtin = this._wrappedBuiltIns.shift();
6958
6959 var obj = builtin[0],
6960 name = builtin[1],
6961 orig = builtin[2];
6962
6963 obj[name] = orig;
6964 }
6965 },
6966
6967 _drainPlugins: function() {
6968 var self = this;
6969
6970 // FIX ME TODO
6971 each(this._plugins, function(_, plugin) {
6972 var installer = plugin[0];
6973 var args = plugin[1];
6974 installer.apply(self, [self].concat(args));
6975 });
6976 },
6977
6978 _parseDSN: function(str) {
6979 var m = dsnPattern.exec(str),
6980 dsn = {},
6981 i = 7;
6982
6983 try {
6984 while (i--) dsn[dsnKeys[i]] = m[i] || '';
6985 } catch (e) {
6986 throw new RavenConfigError('Invalid DSN: ' + str);
6987 }
6988
6989 if (dsn.pass && !this._globalOptions.allowSecretKey) {
6990 throw new RavenConfigError(
6991 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'
6992 );
6993 }
6994
6995 return dsn;
6996 },
6997
6998 _getGlobalServer: function(uri) {
6999 // assemble the endpoint from the uri pieces
7000 var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');
7001
7002 if (uri.protocol) {
7003 globalServer = uri.protocol + ':' + globalServer;
7004 }
7005 return globalServer;
7006 },
7007
7008 _handleOnErrorStackInfo: function() {
7009 // if we are intentionally ignoring errors via onerror, bail out
7010 if (!this._ignoreOnError) {
7011 this._handleStackInfo.apply(this, arguments);
7012 }
7013 },
7014
7015 _handleStackInfo: function(stackInfo, options) {
7016 var frames = this._prepareFrames(stackInfo, options);
7017
7018 this._triggerEvent('handle', {
7019 stackInfo: stackInfo,
7020 options: options
7021 });
7022
7023 this._processException(
7024 stackInfo.name,
7025 stackInfo.message,
7026 stackInfo.url,
7027 stackInfo.lineno,
7028 frames,
7029 options
7030 );
7031 },
7032
7033 _prepareFrames: function(stackInfo, options) {
7034 var self = this;
7035 var frames = [];
7036 if (stackInfo.stack && stackInfo.stack.length) {
7037 each(stackInfo.stack, function(i, stack) {
7038 var frame = self._normalizeFrame(stack, stackInfo.url);
7039 if (frame) {
7040 frames.push(frame);
7041 }
7042 });
7043
7044 // e.g. frames captured via captureMessage throw
7045 if (options && options.trimHeadFrames) {
7046 for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {
7047 frames[j].in_app = false;
7048 }
7049 }
7050 }
7051 frames = frames.slice(0, this._globalOptions.stackTraceLimit);
7052 return frames;
7053 },
7054
7055 _normalizeFrame: function(frame, stackInfoUrl) {
7056 // normalize the frames data
7057 var normalized = {
7058 filename: frame.url,
7059 lineno: frame.line,
7060 colno: frame.column,
7061 function: frame.func || '?'
7062 };
7063
7064 // Case when we don't have any information about the error
7065 // E.g. throwing a string or raw object, instead of an `Error` in Firefox
7066 // Generating synthetic error doesn't add any value here
7067 //
7068 // We should probably somehow let a user know that they should fix their code
7069 if (!frame.url) {
7070 normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler
7071 }
7072
7073 normalized.in_app = !// determine if an exception came from outside of our app
7074 // first we check the global includePaths list.
7075 (
7076 (!!this._globalOptions.includePaths.test &&
7077 !this._globalOptions.includePaths.test(normalized.filename)) ||
7078 // Now we check for fun, if the function name is Raven or TraceKit
7079 /(Raven|TraceKit)\./.test(normalized['function']) ||
7080 // finally, we do a last ditch effort and check for raven.min.js
7081 /raven\.(min\.)?js$/.test(normalized.filename)
7082 );
7083
7084 return normalized;
7085 },
7086
7087 _processException: function(type, message, fileurl, lineno, frames, options) {
7088 var prefixedMessage = (type ? type + ': ' : '') + (message || '');
7089 if (
7090 !!this._globalOptions.ignoreErrors.test &&
7091 (this._globalOptions.ignoreErrors.test(message) ||
7092 this._globalOptions.ignoreErrors.test(prefixedMessage))
7093 ) {
7094 return;
7095 }
7096
7097 var stacktrace;
7098
7099 if (frames && frames.length) {
7100 fileurl = frames[0].filename || fileurl;
7101 // Sentry expects frames oldest to newest
7102 // and JS sends them as newest to oldest
7103 frames.reverse();
7104 stacktrace = {frames: frames};
7105 } else if (fileurl) {
7106 stacktrace = {
7107 frames: [
7108 {
7109 filename: fileurl,
7110 lineno: lineno,
7111 in_app: true
7112 }
7113 ]
7114 };
7115 }
7116
7117 if (
7118 !!this._globalOptions.ignoreUrls.test &&
7119 this._globalOptions.ignoreUrls.test(fileurl)
7120 ) {
7121 return;
7122 }
7123
7124 if (
7125 !!this._globalOptions.whitelistUrls.test &&
7126 !this._globalOptions.whitelistUrls.test(fileurl)
7127 ) {
7128 return;
7129 }
7130
7131 var data = objectMerge(
7132 {
7133 // sentry.interfaces.Exception
7134 exception: {
7135 values: [
7136 {
7137 type: type,
7138 value: message,
7139 stacktrace: stacktrace
7140 }
7141 ]
7142 },
7143 culprit: fileurl
7144 },
7145 options
7146 );
7147
7148 // Fire away!
7149 this._send(data);
7150 },
7151
7152 _trimPacket: function(data) {
7153 // For now, we only want to truncate the two different messages
7154 // but this could/should be expanded to just trim everything
7155 var max = this._globalOptions.maxMessageLength;
7156 if (data.message) {
7157 data.message = truncate(data.message, max);
7158 }
7159 if (data.exception) {
7160 var exception = data.exception.values[0];
7161 exception.value = truncate(exception.value, max);
7162 }
7163
7164 var request = data.request;
7165 if (request) {
7166 if (request.url) {
7167 request.url = truncate(request.url, this._globalOptions.maxUrlLength);
7168 }
7169 if (request.Referer) {
7170 request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);
7171 }
7172 }
7173
7174 if (data.breadcrumbs && data.breadcrumbs.values)
7175 this._trimBreadcrumbs(data.breadcrumbs);
7176
7177 return data;
7178 },
7179
7180 /**
7181 * Truncate breadcrumb values (right now just URLs)
7182 */
7183 _trimBreadcrumbs: function(breadcrumbs) {
7184 // known breadcrumb properties with urls
7185 // TODO: also consider arbitrary prop values that start with (https?)?://
7186 var urlProps = ['to', 'from', 'url'],
7187 urlProp,
7188 crumb,
7189 data;
7190
7191 for (var i = 0; i < breadcrumbs.values.length; ++i) {
7192 crumb = breadcrumbs.values[i];
7193 if (
7194 !crumb.hasOwnProperty('data') ||
7195 !isObject(crumb.data) ||
7196 objectFrozen(crumb.data)
7197 )
7198 continue;
7199
7200 data = objectMerge({}, crumb.data);
7201 for (var j = 0; j < urlProps.length; ++j) {
7202 urlProp = urlProps[j];
7203 if (data.hasOwnProperty(urlProp) && data[urlProp]) {
7204 data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);
7205 }
7206 }
7207 breadcrumbs.values[i].data = data;
7208 }
7209 },
7210
7211 _getHttpData: function() {
7212 if (!this._hasNavigator && !this._hasDocument) return;
7213 var httpData = {};
7214
7215 if (this._hasNavigator && _navigator.userAgent) {
7216 httpData.headers = {
7217 'User-Agent': navigator.userAgent
7218 };
7219 }
7220
7221 if (this._hasDocument) {
7222 if (_document.location && _document.location.href) {
7223 httpData.url = _document.location.href;
7224 }
7225 if (_document.referrer) {
7226 if (!httpData.headers) httpData.headers = {};
7227 httpData.headers.Referer = _document.referrer;
7228 }
7229 }
7230
7231 return httpData;
7232 },
7233
7234 _resetBackoff: function() {
7235 this._backoffDuration = 0;
7236 this._backoffStart = null;
7237 },
7238
7239 _shouldBackoff: function() {
7240 return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;
7241 },
7242
7243 /**
7244 * Returns true if the in-process data payload matches the signature
7245 * of the previously-sent data
7246 *
7247 * NOTE: This has to be done at this level because TraceKit can generate
7248 * data from window.onerror WITHOUT an exception object (IE8, IE9,
7249 * other old browsers). This can take the form of an "exception"
7250 * data object with a single frame (derived from the onerror args).
7251 */
7252 _isRepeatData: function(current) {
7253 var last = this._lastData;
7254
7255 if (
7256 !last ||
7257 current.message !== last.message || // defined for captureMessage
7258 current.culprit !== last.culprit // defined for captureException/onerror
7259 )
7260 return false;
7261
7262 // Stacktrace interface (i.e. from captureMessage)
7263 if (current.stacktrace || last.stacktrace) {
7264 return isSameStacktrace(current.stacktrace, last.stacktrace);
7265 } else if (current.exception || last.exception) {
7266 // Exception interface (i.e. from captureException/onerror)
7267 return isSameException(current.exception, last.exception);
7268 }
7269
7270 return true;
7271 },
7272
7273 _setBackoffState: function(request) {
7274 // If we are already in a backoff state, don't change anything
7275 if (this._shouldBackoff()) {
7276 return;
7277 }
7278
7279 var status = request.status;
7280
7281 // 400 - project_id doesn't exist or some other fatal
7282 // 401 - invalid/revoked dsn
7283 // 429 - too many requests
7284 if (!(status === 400 || status === 401 || status === 429)) return;
7285
7286 var retry;
7287 try {
7288 // If Retry-After is not in Access-Control-Expose-Headers, most
7289 // browsers will throw an exception trying to access it
7290 retry = request.getResponseHeader('Retry-After');
7291 retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds
7292 } catch (e) {
7293 /* eslint no-empty:0 */
7294 }
7295
7296 this._backoffDuration = retry
7297 ? // If Sentry server returned a Retry-After value, use it
7298 retry
7299 : // Otherwise, double the last backoff duration (starts at 1 sec)
7300 this._backoffDuration * 2 || 1000;
7301
7302 this._backoffStart = now();
7303 },
7304
7305 _send: function(data) {
7306 var globalOptions = this._globalOptions;
7307
7308 var baseData = {
7309 project: this._globalProject,
7310 logger: globalOptions.logger,
7311 platform: 'javascript'
7312 },
7313 httpData = this._getHttpData();
7314
7315 if (httpData) {
7316 baseData.request = httpData;
7317 }
7318
7319 // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload
7320 if (data.trimHeadFrames) delete data.trimHeadFrames;
7321
7322 data = objectMerge(baseData, data);
7323
7324 // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge
7325 data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);
7326 data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);
7327
7328 // Send along our own collected metadata with extra
7329 data.extra['session:duration'] = now() - this._startTime;
7330
7331 if (this._breadcrumbs && this._breadcrumbs.length > 0) {
7332 // intentionally make shallow copy so that additions
7333 // to breadcrumbs aren't accidentally sent in this request
7334 data.breadcrumbs = {
7335 values: [].slice.call(this._breadcrumbs, 0)
7336 };
7337 }
7338
7339 // If there are no tags/extra, strip the key from the payload alltogther.
7340 if (isEmptyObject(data.tags)) delete data.tags;
7341
7342 if (this._globalContext.user) {
7343 // sentry.interfaces.User
7344 data.user = this._globalContext.user;
7345 }
7346
7347 // Include the environment if it's defined in globalOptions
7348 if (globalOptions.environment) data.environment = globalOptions.environment;
7349
7350 // Include the release if it's defined in globalOptions
7351 if (globalOptions.release) data.release = globalOptions.release;
7352
7353 // Include server_name if it's defined in globalOptions
7354 if (globalOptions.serverName) data.server_name = globalOptions.serverName;
7355
7356 if (isFunction(globalOptions.dataCallback)) {
7357 data = globalOptions.dataCallback(data) || data;
7358 }
7359
7360 // Why??????????
7361 if (!data || isEmptyObject(data)) {
7362 return;
7363 }
7364
7365 // Check if the request should be filtered or not
7366 if (
7367 isFunction(globalOptions.shouldSendCallback) &&
7368 !globalOptions.shouldSendCallback(data)
7369 ) {
7370 return;
7371 }
7372
7373 // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),
7374 // so drop requests until "cool-off" period has elapsed.
7375 if (this._shouldBackoff()) {
7376 this._logDebug('warn', 'Raven dropped error due to backoff: ', data);
7377 return;
7378 }
7379
7380 if (typeof globalOptions.sampleRate === 'number') {
7381 if (Math.random() < globalOptions.sampleRate) {
7382 this._sendProcessedPayload(data);
7383 }
7384 } else {
7385 this._sendProcessedPayload(data);
7386 }
7387 },
7388
7389 _getUuid: function() {
7390 return uuid4();
7391 },
7392
7393 _sendProcessedPayload: function(data, callback) {
7394 var self = this;
7395 var globalOptions = this._globalOptions;
7396
7397 if (!this.isSetup()) return;
7398
7399 // Try and clean up the packet before sending by truncating long values
7400 data = this._trimPacket(data);
7401
7402 // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,
7403 // but this would require copying an un-truncated copy of the data packet, which can be
7404 // arbitrarily deep (extra_data) -- could be worthwhile? will revisit
7405 if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {
7406 this._logDebug('warn', 'Raven dropped repeat event: ', data);
7407 return;
7408 }
7409
7410 // Send along an event_id if not explicitly passed.
7411 // This event_id can be used to reference the error within Sentry itself.
7412 // Set lastEventId after we know the error should actually be sent
7413 this._lastEventId = data.event_id || (data.event_id = this._getUuid());
7414
7415 // Store outbound payload after trim
7416 this._lastData = data;
7417
7418 this._logDebug('debug', 'Raven about to send:', data);
7419
7420 var auth = {
7421 sentry_version: '7',
7422 sentry_client: 'raven-js/' + this.VERSION,
7423 sentry_key: this._globalKey
7424 };
7425
7426 if (this._globalSecret) {
7427 auth.sentry_secret = this._globalSecret;
7428 }
7429
7430 var exception = data.exception && data.exception.values[0];
7431 this.captureBreadcrumb({
7432 category: 'sentry',
7433 message: exception
7434 ? (exception.type ? exception.type + ': ' : '') + exception.value
7435 : data.message,
7436 event_id: data.event_id,
7437 level: data.level || 'error' // presume error unless specified
7438 });
7439
7440 var url = this._globalEndpoint;
7441 (globalOptions.transport || this._makeRequest).call(this, {
7442 url: url,
7443 auth: auth,
7444 data: data,
7445 options: globalOptions,
7446 onSuccess: function success() {
7447 self._resetBackoff();
7448
7449 self._triggerEvent('success', {
7450 data: data,
7451 src: url
7452 });
7453 callback && callback();
7454 },
7455 onError: function failure(error) {
7456 self._logDebug('error', 'Raven transport failed to send: ', error);
7457
7458 if (error.request) {
7459 self._setBackoffState(error.request);
7460 }
7461
7462 self._triggerEvent('failure', {
7463 data: data,
7464 src: url
7465 });
7466 error = error || new Error('Raven send failed (no additional details provided)');
7467 callback && callback(error);
7468 }
7469 });
7470 },
7471
7472 _makeRequest: function(opts) {
7473 var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();
7474 if (!request) return;
7475
7476 // if browser doesn't support CORS (e.g. IE7), we are out of luck
7477 var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';
7478
7479 if (!hasCORS) return;
7480
7481 var url = opts.url;
7482
7483 if ('withCredentials' in request) {
7484 request.onreadystatechange = function() {
7485 if (request.readyState !== 4) {
7486 return;
7487 } else if (request.status === 200) {
7488 opts.onSuccess && opts.onSuccess();
7489 } else if (opts.onError) {
7490 var err = new Error('Sentry error code: ' + request.status);
7491 err.request = request;
7492 opts.onError(err);
7493 }
7494 };
7495 } else {
7496 request = new XDomainRequest();
7497 // xdomainrequest cannot go http -> https (or vice versa),
7498 // so always use protocol relative
7499 url = url.replace(/^https?:/, '');
7500
7501 // onreadystatechange not supported by XDomainRequest
7502 if (opts.onSuccess) {
7503 request.onload = opts.onSuccess;
7504 }
7505 if (opts.onError) {
7506 request.onerror = function() {
7507 var err = new Error('Sentry error code: XDomainRequest');
7508 err.request = request;
7509 opts.onError(err);
7510 };
7511 }
7512 }
7513
7514 // NOTE: auth is intentionally sent as part of query string (NOT as custom
7515 // HTTP header) so as to avoid preflight CORS requests
7516 request.open('POST', url + '?' + urlencode(opts.auth));
7517 request.send(stringify(opts.data));
7518 },
7519
7520 _logDebug: function(level) {
7521 if (this._originalConsoleMethods[level] && this.debug) {
7522 // In IE<10 console methods do not have their own 'apply' method
7523 Function.prototype.apply.call(
7524 this._originalConsoleMethods[level],
7525 this._originalConsole,
7526 [].slice.call(arguments, 1)
7527 );
7528 }
7529 },
7530
7531 _mergeContext: function(key, context) {
7532 if (isUndefined(context)) {
7533 delete this._globalContext[key];
7534 } else {
7535 this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);
7536 }
7537 }
7538 };
7539
7540 // Deprecations
7541 Raven.prototype.setUser = Raven.prototype.setUserContext;
7542 Raven.prototype.setReleaseContext = Raven.prototype.setRelease;
7543
7544 module.exports = Raven;
7545
7546
7547 /***/ }),
7548
7549 /***/ "./node_modules/raven-js/src/singleton.js":
7550 /*!************************************************!*\
7551 !*** ./node_modules/raven-js/src/singleton.js ***!
7552 \************************************************/
7553 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7554
7555 /**
7556 * Enforces a single instance of the Raven client, and the
7557 * main entry point for Raven. If you are a consumer of the
7558 * Raven library, you SHOULD load this file (vs raven.js).
7559 **/
7560
7561 var RavenConstructor = __webpack_require__(/*! ./raven */ "./node_modules/raven-js/src/raven.js");
7562
7563 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
7564 var _window =
7565 typeof window !== 'undefined'
7566 ? window
7567 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7568 var _Raven = _window.Raven;
7569
7570 var Raven = new RavenConstructor();
7571
7572 /*
7573 * Allow multiple versions of Raven to be installed.
7574 * Strip Raven from the global context and returns the instance.
7575 *
7576 * @return {Raven}
7577 */
7578 Raven.noConflict = function() {
7579 _window.Raven = _Raven;
7580 return Raven;
7581 };
7582
7583 Raven.afterLoad();
7584
7585 module.exports = Raven;
7586
7587
7588 /***/ }),
7589
7590 /***/ "./node_modules/raven-js/src/utils.js":
7591 /*!********************************************!*\
7592 !*** ./node_modules/raven-js/src/utils.js ***!
7593 \********************************************/
7594 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7595
7596 var _window =
7597 typeof window !== 'undefined'
7598 ? window
7599 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
7600
7601 function isObject(what) {
7602 return typeof what === 'object' && what !== null;
7603 }
7604
7605 // Yanked from https://git.io/vS8DV re-used under CC0
7606 // with some tiny modifications
7607 function isError(value) {
7608 switch ({}.toString.call(value)) {
7609 case '[object Error]':
7610 return true;
7611 case '[object Exception]':
7612 return true;
7613 case '[object DOMException]':
7614 return true;
7615 default:
7616 return value instanceof Error;
7617 }
7618 }
7619
7620 function isErrorEvent(value) {
7621 return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';
7622 }
7623
7624 function isUndefined(what) {
7625 return what === void 0;
7626 }
7627
7628 function isFunction(what) {
7629 return typeof what === 'function';
7630 }
7631
7632 function isString(what) {
7633 return Object.prototype.toString.call(what) === '[object String]';
7634 }
7635
7636 function isEmptyObject(what) {
7637 for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
7638 return true;
7639 }
7640
7641 function supportsErrorEvent() {
7642 try {
7643 new ErrorEvent(''); // eslint-disable-line no-new
7644 return true;
7645 } catch (e) {
7646 return false;
7647 }
7648 }
7649
7650 function wrappedCallback(callback) {
7651 function dataCallback(data, original) {
7652 var normalizedData = callback(data) || data;
7653 if (original) {
7654 return original(normalizedData) || normalizedData;
7655 }
7656 return normalizedData;
7657 }
7658
7659 return dataCallback;
7660 }
7661
7662 function each(obj, callback) {
7663 var i, j;
7664
7665 if (isUndefined(obj.length)) {
7666 for (i in obj) {
7667 if (hasKey(obj, i)) {
7668 callback.call(null, i, obj[i]);
7669 }
7670 }
7671 } else {
7672 j = obj.length;
7673 if (j) {
7674 for (i = 0; i < j; i++) {
7675 callback.call(null, i, obj[i]);
7676 }
7677 }
7678 }
7679 }
7680
7681 function objectMerge(obj1, obj2) {
7682 if (!obj2) {
7683 return obj1;
7684 }
7685 each(obj2, function(key, value) {
7686 obj1[key] = value;
7687 });
7688 return obj1;
7689 }
7690
7691 /**
7692 * This function is only used for react-native.
7693 * react-native freezes object that have already been sent over the
7694 * js bridge. We need this function in order to check if the object is frozen.
7695 * So it's ok that objectFrozen returns false if Object.isFrozen is not
7696 * supported because it's not relevant for other "platforms". See related issue:
7697 * https://github.com/getsentry/react-native-sentry/issues/57
7698 */
7699 function objectFrozen(obj) {
7700 if (!Object.isFrozen) {
7701 return false;
7702 }
7703 return Object.isFrozen(obj);
7704 }
7705
7706 function truncate(str, max) {
7707 return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
7708 }
7709
7710 /**
7711 * hasKey, a better form of hasOwnProperty
7712 * Example: hasKey(MainHostObject, property) === true/false
7713 *
7714 * @param {Object} host object to check property
7715 * @param {string} key to check
7716 */
7717 function hasKey(object, key) {
7718 return Object.prototype.hasOwnProperty.call(object, key);
7719 }
7720
7721 function joinRegExp(patterns) {
7722 // Combine an array of regular expressions and strings into one large regexp
7723 // Be mad.
7724 var sources = [],
7725 i = 0,
7726 len = patterns.length,
7727 pattern;
7728
7729 for (; i < len; i++) {
7730 pattern = patterns[i];
7731 if (isString(pattern)) {
7732 // If it's a string, we need to escape it
7733 // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
7734 sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
7735 } else if (pattern && pattern.source) {
7736 // If it's a regexp already, we want to extract the source
7737 sources.push(pattern.source);
7738 }
7739 // Intentionally skip other cases
7740 }
7741 return new RegExp(sources.join('|'), 'i');
7742 }
7743
7744 function urlencode(o) {
7745 var pairs = [];
7746 each(o, function(key, value) {
7747 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
7748 });
7749 return pairs.join('&');
7750 }
7751
7752 // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7753 // intentionally using regex and not <a/> href parsing trick because React Native and other
7754 // environments where DOM might not be available
7755 function parseUrl(url) {
7756 var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7757 if (!match) return {};
7758
7759 // coerce to undefined values to empty string so we don't get 'undefined'
7760 var query = match[6] || '';
7761 var fragment = match[8] || '';
7762 return {
7763 protocol: match[2],
7764 host: match[4],
7765 path: match[5],
7766 relative: match[5] + query + fragment // everything minus origin
7767 };
7768 }
7769 function uuid4() {
7770 var crypto = _window.crypto || _window.msCrypto;
7771
7772 if (!isUndefined(crypto) && crypto.getRandomValues) {
7773 // Use window.crypto API if available
7774 // eslint-disable-next-line no-undef
7775 var arr = new Uint16Array(8);
7776 crypto.getRandomValues(arr);
7777
7778 // set 4 in byte 7
7779 arr[3] = (arr[3] & 0xfff) | 0x4000;
7780 // set 2 most significant bits of byte 9 to '10'
7781 arr[4] = (arr[4] & 0x3fff) | 0x8000;
7782
7783 var pad = function(num) {
7784 var v = num.toString(16);
7785 while (v.length < 4) {
7786 v = '0' + v;
7787 }
7788 return v;
7789 };
7790
7791 return (
7792 pad(arr[0]) +
7793 pad(arr[1]) +
7794 pad(arr[2]) +
7795 pad(arr[3]) +
7796 pad(arr[4]) +
7797 pad(arr[5]) +
7798 pad(arr[6]) +
7799 pad(arr[7])
7800 );
7801 } else {
7802 // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7803 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
7804 var r = (Math.random() * 16) | 0,
7805 v = c === 'x' ? r : (r & 0x3) | 0x8;
7806 return v.toString(16);
7807 });
7808 }
7809 }
7810
7811 /**
7812 * Given a child DOM element, returns a query-selector statement describing that
7813 * and its ancestors
7814 * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
7815 * @param elem
7816 * @returns {string}
7817 */
7818 function htmlTreeAsString(elem) {
7819 /* eslint no-extra-parens:0*/
7820 var MAX_TRAVERSE_HEIGHT = 5,
7821 MAX_OUTPUT_LEN = 80,
7822 out = [],
7823 height = 0,
7824 len = 0,
7825 separator = ' > ',
7826 sepLength = separator.length,
7827 nextStr;
7828
7829 while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
7830 nextStr = htmlElementAsString(elem);
7831 // bail out if
7832 // - nextStr is the 'html' element
7833 // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
7834 // (ignore this limit if we are on the first iteration)
7835 if (
7836 nextStr === 'html' ||
7837 (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)
7838 ) {
7839 break;
7840 }
7841
7842 out.push(nextStr);
7843
7844 len += nextStr.length;
7845 elem = elem.parentNode;
7846 }
7847
7848 return out.reverse().join(separator);
7849 }
7850
7851 /**
7852 * Returns a simple, query-selector representation of a DOM element
7853 * e.g. [HTMLElement] => input#foo.btn[name=baz]
7854 * @param HTMLElement
7855 * @returns {string}
7856 */
7857 function htmlElementAsString(elem) {
7858 var out = [],
7859 className,
7860 classes,
7861 key,
7862 attr,
7863 i;
7864
7865 if (!elem || !elem.tagName) {
7866 return '';
7867 }
7868
7869 out.push(elem.tagName.toLowerCase());
7870 if (elem.id) {
7871 out.push('#' + elem.id);
7872 }
7873
7874 className = elem.className;
7875 if (className && isString(className)) {
7876 classes = className.split(/\s+/);
7877 for (i = 0; i < classes.length; i++) {
7878 out.push('.' + classes[i]);
7879 }
7880 }
7881 var attrWhitelist = ['type', 'name', 'title', 'alt'];
7882 for (i = 0; i < attrWhitelist.length; i++) {
7883 key = attrWhitelist[i];
7884 attr = elem.getAttribute(key);
7885 if (attr) {
7886 out.push('[' + key + '="' + attr + '"]');
7887 }
7888 }
7889 return out.join('');
7890 }
7891
7892 /**
7893 * Returns true if either a OR b is truthy, but not both
7894 */
7895 function isOnlyOneTruthy(a, b) {
7896 return !!(!!a ^ !!b);
7897 }
7898
7899 /**
7900 * Returns true if the two input exception interfaces have the same content
7901 */
7902 function isSameException(ex1, ex2) {
7903 if (isOnlyOneTruthy(ex1, ex2)) return false;
7904
7905 ex1 = ex1.values[0];
7906 ex2 = ex2.values[0];
7907
7908 if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;
7909
7910 return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);
7911 }
7912
7913 /**
7914 * Returns true if the two input stack trace interfaces have the same content
7915 */
7916 function isSameStacktrace(stack1, stack2) {
7917 if (isOnlyOneTruthy(stack1, stack2)) return false;
7918
7919 var frames1 = stack1.frames;
7920 var frames2 = stack2.frames;
7921
7922 // Exit early if frame count differs
7923 if (frames1.length !== frames2.length) return false;
7924
7925 // Iterate through every frame; bail out if anything differs
7926 var a, b;
7927 for (var i = 0; i < frames1.length; i++) {
7928 a = frames1[i];
7929 b = frames2[i];
7930 if (
7931 a.filename !== b.filename ||
7932 a.lineno !== b.lineno ||
7933 a.colno !== b.colno ||
7934 a['function'] !== b['function']
7935 )
7936 return false;
7937 }
7938 return true;
7939 }
7940
7941 /**
7942 * Polyfill a method
7943 * @param obj object e.g. `document`
7944 * @param name method name present on object e.g. `addEventListener`
7945 * @param replacement replacement function
7946 * @param track {optional} record instrumentation to an array
7947 */
7948 function fill(obj, name, replacement, track) {
7949 var orig = obj[name];
7950 obj[name] = replacement(orig);
7951 if (track) {
7952 track.push([obj, name, orig]);
7953 }
7954 }
7955
7956 module.exports = {
7957 isObject: isObject,
7958 isError: isError,
7959 isErrorEvent: isErrorEvent,
7960 isUndefined: isUndefined,
7961 isFunction: isFunction,
7962 isString: isString,
7963 isEmptyObject: isEmptyObject,
7964 supportsErrorEvent: supportsErrorEvent,
7965 wrappedCallback: wrappedCallback,
7966 each: each,
7967 objectMerge: objectMerge,
7968 truncate: truncate,
7969 objectFrozen: objectFrozen,
7970 hasKey: hasKey,
7971 joinRegExp: joinRegExp,
7972 urlencode: urlencode,
7973 uuid4: uuid4,
7974 htmlTreeAsString: htmlTreeAsString,
7975 htmlElementAsString: htmlElementAsString,
7976 isSameException: isSameException,
7977 isSameStacktrace: isSameStacktrace,
7978 parseUrl: parseUrl,
7979 fill: fill
7980 };
7981
7982
7983 /***/ }),
7984
7985 /***/ "./node_modules/raven-js/vendor/TraceKit/tracekit.js":
7986 /*!***********************************************************!*\
7987 !*** ./node_modules/raven-js/vendor/TraceKit/tracekit.js ***!
7988 \***********************************************************/
7989 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7990
7991 var utils = __webpack_require__(/*! ../../src/utils */ "./node_modules/raven-js/src/utils.js");
7992
7993 /*
7994 TraceKit - Cross brower stack traces
7995
7996 This was originally forked from github.com/occ/TraceKit, but has since been
7997 largely re-written and is now maintained as part of raven-js. Tests for
7998 this are in test/vendor.
7999
8000 MIT license
8001 */
8002
8003 var TraceKit = {
8004 collectWindowErrors: true,
8005 debug: false
8006 };
8007
8008 // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)
8009 var _window =
8010 typeof window !== 'undefined'
8011 ? window
8012 : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};
8013
8014 // global reference to slice
8015 var _slice = [].slice;
8016 var UNKNOWN_FUNCTION = '?';
8017
8018 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
8019 var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;
8020
8021 function getLocationHref() {
8022 if (typeof document === 'undefined' || document.location == null) return '';
8023
8024 return document.location.href;
8025 }
8026
8027 /**
8028 * TraceKit.report: cross-browser processing of unhandled exceptions
8029 *
8030 * Syntax:
8031 * TraceKit.report.subscribe(function(stackInfo) { ... })
8032 * TraceKit.report.unsubscribe(function(stackInfo) { ... })
8033 * TraceKit.report(exception)
8034 * try { ...code... } catch(ex) { TraceKit.report(ex); }
8035 *
8036 * Supports:
8037 * - Firefox: full stack trace with line numbers, plus column number
8038 * on top frame; column number is not guaranteed
8039 * - Opera: full stack trace with line and column numbers
8040 * - Chrome: full stack trace with line and column numbers
8041 * - Safari: line and column number for the top frame only; some frames
8042 * may be missing, and column number is not guaranteed
8043 * - IE: line and column number for the top frame only; some frames
8044 * may be missing, and column number is not guaranteed
8045 *
8046 * In theory, TraceKit should work on all of the following versions:
8047 * - IE5.5+ (only 8.0 tested)
8048 * - Firefox 0.9+ (only 3.5+ tested)
8049 * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
8050 * Exceptions Have Stacktrace to be enabled in opera:config)
8051 * - Safari 3+ (only 4+ tested)
8052 * - Chrome 1+ (only 5+ tested)
8053 * - Konqueror 3.5+ (untested)
8054 *
8055 * Requires TraceKit.computeStackTrace.
8056 *
8057 * Tries to catch all unhandled exceptions and report them to the
8058 * subscribed handlers. Please note that TraceKit.report will rethrow the
8059 * exception. This is REQUIRED in order to get a useful stack trace in IE.
8060 * If the exception does not reach the top of the browser, you will only
8061 * get a stack trace from the point where TraceKit.report was called.
8062 *
8063 * Handlers receive a stackInfo object as described in the
8064 * TraceKit.computeStackTrace docs.
8065 */
8066 TraceKit.report = (function reportModuleWrapper() {
8067 var handlers = [],
8068 lastArgs = null,
8069 lastException = null,
8070 lastExceptionStack = null;
8071
8072 /**
8073 * Add a crash handler.
8074 * @param {Function} handler
8075 */
8076 function subscribe(handler) {
8077 installGlobalHandler();
8078 handlers.push(handler);
8079 }
8080
8081 /**
8082 * Remove a crash handler.
8083 * @param {Function} handler
8084 */
8085 function unsubscribe(handler) {
8086 for (var i = handlers.length - 1; i >= 0; --i) {
8087 if (handlers[i] === handler) {
8088 handlers.splice(i, 1);
8089 }
8090 }
8091 }
8092
8093 /**
8094 * Remove all crash handlers.
8095 */
8096 function unsubscribeAll() {
8097 uninstallGlobalHandler();
8098 handlers = [];
8099 }
8100
8101 /**
8102 * Dispatch stack information to all handlers.
8103 * @param {Object.<string, *>} stack
8104 */
8105 function notifyHandlers(stack, isWindowError) {
8106 var exception = null;
8107 if (isWindowError && !TraceKit.collectWindowErrors) {
8108 return;
8109 }
8110 for (var i in handlers) {
8111 if (handlers.hasOwnProperty(i)) {
8112 try {
8113 handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));
8114 } catch (inner) {
8115 exception = inner;
8116 }
8117 }
8118 }
8119
8120 if (exception) {
8121 throw exception;
8122 }
8123 }
8124
8125 var _oldOnerrorHandler, _onErrorHandlerInstalled;
8126
8127 /**
8128 * Ensures all global unhandled exceptions are recorded.
8129 * Supported by Gecko and IE.
8130 * @param {string} message Error message.
8131 * @param {string} url URL of script that generated the exception.
8132 * @param {(number|string)} lineNo The line number at which the error
8133 * occurred.
8134 * @param {?(number|string)} colNo The column number at which the error
8135 * occurred.
8136 * @param {?Error} ex The actual Error object.
8137 */
8138 function traceKitWindowOnError(message, url, lineNo, colNo, ex) {
8139 var stack = null;
8140
8141 if (lastExceptionStack) {
8142 TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(
8143 lastExceptionStack,
8144 url,
8145 lineNo,
8146 message
8147 );
8148 processLastException();
8149 } else if (ex && utils.isError(ex)) {
8150 // non-string `ex` arg; attempt to extract stack trace
8151
8152 // New chrome and blink send along a real error object
8153 // Let's just report that like a normal error.
8154 // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror
8155 stack = TraceKit.computeStackTrace(ex);
8156 notifyHandlers(stack, true);
8157 } else {
8158 var location = {
8159 url: url,
8160 line: lineNo,
8161 column: colNo
8162 };
8163
8164 var name = undefined;
8165 var msg = message; // must be new var or will modify original `arguments`
8166 var groups;
8167 if ({}.toString.call(message) === '[object String]') {
8168 var groups = message.match(ERROR_TYPES_RE);
8169 if (groups) {
8170 name = groups[1];
8171 msg = groups[2];
8172 }
8173 }
8174
8175 location.func = UNKNOWN_FUNCTION;
8176
8177 stack = {
8178 name: name,
8179 message: msg,
8180 url: getLocationHref(),
8181 stack: [location]
8182 };
8183 notifyHandlers(stack, true);
8184 }
8185
8186 if (_oldOnerrorHandler) {
8187 return _oldOnerrorHandler.apply(this, arguments);
8188 }
8189
8190 return false;
8191 }
8192
8193 function installGlobalHandler() {
8194 if (_onErrorHandlerInstalled) {
8195 return;
8196 }
8197 _oldOnerrorHandler = _window.onerror;
8198 _window.onerror = traceKitWindowOnError;
8199 _onErrorHandlerInstalled = true;
8200 }
8201
8202 function uninstallGlobalHandler() {
8203 if (!_onErrorHandlerInstalled) {
8204 return;
8205 }
8206 _window.onerror = _oldOnerrorHandler;
8207 _onErrorHandlerInstalled = false;
8208 _oldOnerrorHandler = undefined;
8209 }
8210
8211 function processLastException() {
8212 var _lastExceptionStack = lastExceptionStack,
8213 _lastArgs = lastArgs;
8214 lastArgs = null;
8215 lastExceptionStack = null;
8216 lastException = null;
8217 notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));
8218 }
8219
8220 /**
8221 * Reports an unhandled Error to TraceKit.
8222 * @param {Error} ex
8223 * @param {?boolean} rethrow If false, do not re-throw the exception.
8224 * Only used for window.onerror to not cause an infinite loop of
8225 * rethrowing.
8226 */
8227 function report(ex, rethrow) {
8228 var args = _slice.call(arguments, 1);
8229 if (lastExceptionStack) {
8230 if (lastException === ex) {
8231 return; // already caught by an inner catch block, ignore
8232 } else {
8233 processLastException();
8234 }
8235 }
8236
8237 var stack = TraceKit.computeStackTrace(ex);
8238 lastExceptionStack = stack;
8239 lastException = ex;
8240 lastArgs = args;
8241
8242 // If the stack trace is incomplete, wait for 2 seconds for
8243 // slow slow IE to see if onerror occurs or not before reporting
8244 // this exception; otherwise, we will end up with an incomplete
8245 // stack trace
8246 setTimeout(function() {
8247 if (lastException === ex) {
8248 processLastException();
8249 }
8250 }, stack.incomplete ? 2000 : 0);
8251
8252 if (rethrow !== false) {
8253 throw ex; // re-throw to propagate to the top level (and cause window.onerror)
8254 }
8255 }
8256
8257 report.subscribe = subscribe;
8258 report.unsubscribe = unsubscribe;
8259 report.uninstall = unsubscribeAll;
8260 return report;
8261 })();
8262
8263 /**
8264 * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
8265 *
8266 * Syntax:
8267 * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
8268 * Returns:
8269 * s.name - exception name
8270 * s.message - exception message
8271 * s.stack[i].url - JavaScript or HTML file URL
8272 * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)
8273 * s.stack[i].args - arguments passed to the function, if known
8274 * s.stack[i].line - line number, if known
8275 * s.stack[i].column - column number, if known
8276 *
8277 * Supports:
8278 * - Firefox: full stack trace with line numbers and unreliable column
8279 * number on top frame
8280 * - Opera 10: full stack trace with line and column numbers
8281 * - Opera 9-: full stack trace with line numbers
8282 * - Chrome: full stack trace with line and column numbers
8283 * - Safari: line and column number for the topmost stacktrace element
8284 * only
8285 * - IE: no line numbers whatsoever
8286 *
8287 * Tries to guess names of anonymous functions by looking for assignments
8288 * in the source code. In IE and Safari, we have to guess source file names
8289 * by searching for function bodies inside all page scripts. This will not
8290 * work for scripts that are loaded cross-domain.
8291 * Here be dragons: some function names may be guessed incorrectly, and
8292 * duplicate functions may be mismatched.
8293 *
8294 * TraceKit.computeStackTrace should only be used for tracing purposes.
8295 * Logging of unhandled exceptions should be done with TraceKit.report,
8296 * which builds on top of TraceKit.computeStackTrace and provides better
8297 * IE support by utilizing the window.onerror event to retrieve information
8298 * about the top of the stack.
8299 *
8300 * Note: In IE and Safari, no stack trace is recorded on the Error object,
8301 * so computeStackTrace instead walks its *own* chain of callers.
8302 * This means that:
8303 * * in Safari, some methods may be missing from the stack trace;
8304 * * in IE, the topmost function in the stack trace will always be the
8305 * caller of computeStackTrace.
8306 *
8307 * This is okay for tracing (because you are likely to be calling
8308 * computeStackTrace from the function you want to be the topmost element
8309 * of the stack trace anyway), but not okay for logging unhandled
8310 * exceptions (because your catch block will likely be far away from the
8311 * inner function that actually caused the exception).
8312 *
8313 */
8314 TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
8315 // Contents of Exception in various browsers.
8316 //
8317 // SAFARI:
8318 // ex.message = Can't find variable: qq
8319 // ex.line = 59
8320 // ex.sourceId = 580238192
8321 // ex.sourceURL = http://...
8322 // ex.expressionBeginOffset = 96
8323 // ex.expressionCaretOffset = 98
8324 // ex.expressionEndOffset = 98
8325 // ex.name = ReferenceError
8326 //
8327 // FIREFOX:
8328 // ex.message = qq is not defined
8329 // ex.fileName = http://...
8330 // ex.lineNumber = 59
8331 // ex.columnNumber = 69
8332 // ex.stack = ...stack trace... (see the example below)
8333 // ex.name = ReferenceError
8334 //
8335 // CHROME:
8336 // ex.message = qq is not defined
8337 // ex.name = ReferenceError
8338 // ex.type = not_defined
8339 // ex.arguments = ['aa']
8340 // ex.stack = ...stack trace...
8341 //
8342 // INTERNET EXPLORER:
8343 // ex.message = ...
8344 // ex.name = ReferenceError
8345 //
8346 // OPERA:
8347 // ex.message = ...message... (see the example below)
8348 // ex.name = ReferenceError
8349 // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)
8350 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
8351
8352 /**
8353 * Computes stack trace information from the stack property.
8354 * Chrome and Gecko use this property.
8355 * @param {Error} ex
8356 * @return {?Object.<string, *>} Stack trace information.
8357 */
8358 function computeStackTraceFromStackProp(ex) {
8359 if (typeof ex.stack === 'undefined' || !ex.stack) return;
8360
8361 var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
8362 gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,
8363 winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,
8364 // Used to additionally parse URL/line/column from eval frames
8365 geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i,
8366 chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/,
8367 lines = ex.stack.split('\n'),
8368 stack = [],
8369 submatch,
8370 parts,
8371 element,
8372 reference = /^(.*) is undefined$/.exec(ex.message);
8373
8374 for (var i = 0, j = lines.length; i < j; ++i) {
8375 if ((parts = chrome.exec(lines[i]))) {
8376 var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line
8377 var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
8378 if (isEval && (submatch = chromeEval.exec(parts[2]))) {
8379 // throw out eval line/column and use top-most line/column number
8380 parts[2] = submatch[1]; // url
8381 parts[3] = submatch[2]; // line
8382 parts[4] = submatch[3]; // column
8383 }
8384 element = {
8385 url: !isNative ? parts[2] : null,
8386 func: parts[1] || UNKNOWN_FUNCTION,
8387 args: isNative ? [parts[2]] : [],
8388 line: parts[3] ? +parts[3] : null,
8389 column: parts[4] ? +parts[4] : null
8390 };
8391 } else if ((parts = winjs.exec(lines[i]))) {
8392 element = {
8393 url: parts[2],
8394 func: parts[1] || UNKNOWN_FUNCTION,
8395 args: [],
8396 line: +parts[3],
8397 column: parts[4] ? +parts[4] : null
8398 };
8399 } else if ((parts = gecko.exec(lines[i]))) {
8400 var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
8401 if (isEval && (submatch = geckoEval.exec(parts[3]))) {
8402 // throw out eval line/column and use top-most line number
8403 parts[3] = submatch[1];
8404 parts[4] = submatch[2];
8405 parts[5] = null; // no column when eval
8406 } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {
8407 // FireFox uses this awesome columnNumber property for its top frame
8408 // Also note, Firefox's column number is 0-based and everything else expects 1-based,
8409 // so adding 1
8410 // NOTE: this hack doesn't work if top-most frame is eval
8411 stack[0].column = ex.columnNumber + 1;
8412 }
8413 element = {
8414 url: parts[3],
8415 func: parts[1] || UNKNOWN_FUNCTION,
8416 args: parts[2] ? parts[2].split(',') : [],
8417 line: parts[4] ? +parts[4] : null,
8418 column: parts[5] ? +parts[5] : null
8419 };
8420 } else {
8421 continue;
8422 }
8423
8424 if (!element.func && element.line) {
8425 element.func = UNKNOWN_FUNCTION;
8426 }
8427
8428 stack.push(element);
8429 }
8430
8431 if (!stack.length) {
8432 return null;
8433 }
8434
8435 return {
8436 name: ex.name,
8437 message: ex.message,
8438 url: getLocationHref(),
8439 stack: stack
8440 };
8441 }
8442
8443 /**
8444 * Adds information about the first frame to incomplete stack traces.
8445 * Safari and IE require this to get complete data on the first frame.
8446 * @param {Object.<string, *>} stackInfo Stack trace information from
8447 * one of the compute* methods.
8448 * @param {string} url The URL of the script that caused an error.
8449 * @param {(number|string)} lineNo The line number of the script that
8450 * caused an error.
8451 * @param {string=} message The error generated by the browser, which
8452 * hopefully contains the name of the object that caused the error.
8453 * @return {boolean} Whether or not the stack information was
8454 * augmented.
8455 */
8456 function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
8457 var initial = {
8458 url: url,
8459 line: lineNo
8460 };
8461
8462 if (initial.url && initial.line) {
8463 stackInfo.incomplete = false;
8464
8465 if (!initial.func) {
8466 initial.func = UNKNOWN_FUNCTION;
8467 }
8468
8469 if (stackInfo.stack.length > 0) {
8470 if (stackInfo.stack[0].url === initial.url) {
8471 if (stackInfo.stack[0].line === initial.line) {
8472 return false; // already in stack trace
8473 } else if (
8474 !stackInfo.stack[0].line &&
8475 stackInfo.stack[0].func === initial.func
8476 ) {
8477 stackInfo.stack[0].line = initial.line;
8478 return false;
8479 }
8480 }
8481 }
8482
8483 stackInfo.stack.unshift(initial);
8484 stackInfo.partial = true;
8485 return true;
8486 } else {
8487 stackInfo.incomplete = true;
8488 }
8489
8490 return false;
8491 }
8492
8493 /**
8494 * Computes stack trace information by walking the arguments.caller
8495 * chain at the time the exception occurred. This will cause earlier
8496 * frames to be missed but is the only way to get any stack trace in
8497 * Safari and IE. The top frame is restored by
8498 * {@link augmentStackTraceWithInitialElement}.
8499 * @param {Error} ex
8500 * @return {?Object.<string, *>} Stack trace information.
8501 */
8502 function computeStackTraceByWalkingCallerChain(ex, depth) {
8503 var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,
8504 stack = [],
8505 funcs = {},
8506 recursion = false,
8507 parts,
8508 item,
8509 source;
8510
8511 for (
8512 var curr = computeStackTraceByWalkingCallerChain.caller;
8513 curr && !recursion;
8514 curr = curr.caller
8515 ) {
8516 if (curr === computeStackTrace || curr === TraceKit.report) {
8517 // console.log('skipping internal function');
8518 continue;
8519 }
8520
8521 item = {
8522 url: null,
8523 func: UNKNOWN_FUNCTION,
8524 line: null,
8525 column: null
8526 };
8527
8528 if (curr.name) {
8529 item.func = curr.name;
8530 } else if ((parts = functionName.exec(curr.toString()))) {
8531 item.func = parts[1];
8532 }
8533
8534 if (typeof item.func === 'undefined') {
8535 try {
8536 item.func = parts.input.substring(0, parts.input.indexOf('{'));
8537 } catch (e) {}
8538 }
8539
8540 if (funcs['' + curr]) {
8541 recursion = true;
8542 } else {
8543 funcs['' + curr] = true;
8544 }
8545
8546 stack.push(item);
8547 }
8548
8549 if (depth) {
8550 // console.log('depth is ' + depth);
8551 // console.log('stack is ' + stack.length);
8552 stack.splice(0, depth);
8553 }
8554
8555 var result = {
8556 name: ex.name,
8557 message: ex.message,
8558 url: getLocationHref(),
8559 stack: stack
8560 };
8561 augmentStackTraceWithInitialElement(
8562 result,
8563 ex.sourceURL || ex.fileName,
8564 ex.line || ex.lineNumber,
8565 ex.message || ex.description
8566 );
8567 return result;
8568 }
8569
8570 /**
8571 * Computes a stack trace for an exception.
8572 * @param {Error} ex
8573 * @param {(string|number)=} depth
8574 */
8575 function computeStackTrace(ex, depth) {
8576 var stack = null;
8577 depth = depth == null ? 0 : +depth;
8578
8579 try {
8580 stack = computeStackTraceFromStackProp(ex);
8581 if (stack) {
8582 return stack;
8583 }
8584 } catch (e) {
8585 if (TraceKit.debug) {
8586 throw e;
8587 }
8588 }
8589
8590 try {
8591 stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
8592 if (stack) {
8593 return stack;
8594 }
8595 } catch (e) {
8596 if (TraceKit.debug) {
8597 throw e;
8598 }
8599 }
8600 return {
8601 name: ex.name,
8602 message: ex.message,
8603 url: getLocationHref()
8604 };
8605 }
8606
8607 computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
8608 computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
8609
8610 return computeStackTrace;
8611 })();
8612
8613 module.exports = TraceKit;
8614
8615
8616 /***/ }),
8617
8618 /***/ "./node_modules/raven-js/vendor/json-stringify-safe/stringify.js":
8619 /*!***********************************************************************!*\
8620 !*** ./node_modules/raven-js/vendor/json-stringify-safe/stringify.js ***!
8621 \***********************************************************************/
8622 /***/ ((module, exports) => {
8623
8624 /*
8625 json-stringify-safe
8626 Like JSON.stringify, but doesn't throw on circular references.
8627
8628 Originally forked from https://github.com/isaacs/json-stringify-safe
8629 version 5.0.1 on 3/8/2017 and modified to handle Errors serialization
8630 and IE8 compatibility. Tests for this are in test/vendor.
8631
8632 ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE
8633 */
8634
8635 exports = module.exports = stringify;
8636 exports.getSerialize = serializer;
8637
8638 function indexOf(haystack, needle) {
8639 for (var i = 0; i < haystack.length; ++i) {
8640 if (haystack[i] === needle) return i;
8641 }
8642 return -1;
8643 }
8644
8645 function stringify(obj, replacer, spaces, cycleReplacer) {
8646 return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);
8647 }
8648
8649 // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106
8650 function stringifyError(value) {
8651 var err = {
8652 // These properties are implemented as magical getters and don't show up in for in
8653 stack: value.stack,
8654 message: value.message,
8655 name: value.name
8656 };
8657
8658 for (var i in value) {
8659 if (Object.prototype.hasOwnProperty.call(value, i)) {
8660 err[i] = value[i];
8661 }
8662 }
8663
8664 return err;
8665 }
8666
8667 function serializer(replacer, cycleReplacer) {
8668 var stack = [];
8669 var keys = [];
8670
8671 if (cycleReplacer == null) {
8672 cycleReplacer = function(key, value) {
8673 if (stack[0] === value) {
8674 return '[Circular ~]';
8675 }
8676 return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';
8677 };
8678 }
8679
8680 return function(key, value) {
8681 if (stack.length > 0) {
8682 var thisPos = indexOf(stack, this);
8683 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
8684 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
8685
8686 if (~indexOf(stack, value)) {
8687 value = cycleReplacer.call(this, key, value);
8688 }
8689 } else {
8690 stack.push(value);
8691 }
8692
8693 return replacer == null
8694 ? value instanceof Error ? stringifyError(value) : value
8695 : replacer.call(this, key, value);
8696 };
8697 }
8698
8699
8700 /***/ }),
8701
8702 /***/ "./node_modules/react-is/cjs/react-is.development.js":
8703 /*!***********************************************************!*\
8704 !*** ./node_modules/react-is/cjs/react-is.development.js ***!
8705 \***********************************************************/
8706 /***/ ((__unused_webpack_module, exports) => {
8707
8708 "use strict";
8709 /** @license React v16.13.1
8710 * react-is.development.js
8711 *
8712 * Copyright (c) Facebook, Inc. and its affiliates.
8713 *
8714 * This source code is licensed under the MIT license found in the
8715 * LICENSE file in the root directory of this source tree.
8716 */
8717
8718
8719
8720
8721
8722 if (true) {
8723 (function() {
8724 'use strict';
8725
8726 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8727 // nor polyfill, then a plain number is used for performance.
8728 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
8729 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
8730 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
8731 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
8732 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
8733 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
8734 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
8735 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
8736 // (unstable) APIs that have been removed. Can we remove the symbols?
8737
8738 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
8739 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
8740 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
8741 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
8742 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
8743 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
8744 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
8745 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
8746 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
8747 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
8748 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
8749
8750 function isValidElementType(type) {
8751 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
8752 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);
8753 }
8754
8755 function typeOf(object) {
8756 if (typeof object === 'object' && object !== null) {
8757 var $$typeof = object.$$typeof;
8758
8759 switch ($$typeof) {
8760 case REACT_ELEMENT_TYPE:
8761 var type = object.type;
8762
8763 switch (type) {
8764 case REACT_ASYNC_MODE_TYPE:
8765 case REACT_CONCURRENT_MODE_TYPE:
8766 case REACT_FRAGMENT_TYPE:
8767 case REACT_PROFILER_TYPE:
8768 case REACT_STRICT_MODE_TYPE:
8769 case REACT_SUSPENSE_TYPE:
8770 return type;
8771
8772 default:
8773 var $$typeofType = type && type.$$typeof;
8774
8775 switch ($$typeofType) {
8776 case REACT_CONTEXT_TYPE:
8777 case REACT_FORWARD_REF_TYPE:
8778 case REACT_LAZY_TYPE:
8779 case REACT_MEMO_TYPE:
8780 case REACT_PROVIDER_TYPE:
8781 return $$typeofType;
8782
8783 default:
8784 return $$typeof;
8785 }
8786
8787 }
8788
8789 case REACT_PORTAL_TYPE:
8790 return $$typeof;
8791 }
8792 }
8793
8794 return undefined;
8795 } // AsyncMode is deprecated along with isAsyncMode
8796
8797 var AsyncMode = REACT_ASYNC_MODE_TYPE;
8798 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
8799 var ContextConsumer = REACT_CONTEXT_TYPE;
8800 var ContextProvider = REACT_PROVIDER_TYPE;
8801 var Element = REACT_ELEMENT_TYPE;
8802 var ForwardRef = REACT_FORWARD_REF_TYPE;
8803 var Fragment = REACT_FRAGMENT_TYPE;
8804 var Lazy = REACT_LAZY_TYPE;
8805 var Memo = REACT_MEMO_TYPE;
8806 var Portal = REACT_PORTAL_TYPE;
8807 var Profiler = REACT_PROFILER_TYPE;
8808 var StrictMode = REACT_STRICT_MODE_TYPE;
8809 var Suspense = REACT_SUSPENSE_TYPE;
8810 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
8811
8812 function isAsyncMode(object) {
8813 {
8814 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
8815 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
8816
8817 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.');
8818 }
8819 }
8820
8821 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
8822 }
8823 function isConcurrentMode(object) {
8824 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
8825 }
8826 function isContextConsumer(object) {
8827 return typeOf(object) === REACT_CONTEXT_TYPE;
8828 }
8829 function isContextProvider(object) {
8830 return typeOf(object) === REACT_PROVIDER_TYPE;
8831 }
8832 function isElement(object) {
8833 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
8834 }
8835 function isForwardRef(object) {
8836 return typeOf(object) === REACT_FORWARD_REF_TYPE;
8837 }
8838 function isFragment(object) {
8839 return typeOf(object) === REACT_FRAGMENT_TYPE;
8840 }
8841 function isLazy(object) {
8842 return typeOf(object) === REACT_LAZY_TYPE;
8843 }
8844 function isMemo(object) {
8845 return typeOf(object) === REACT_MEMO_TYPE;
8846 }
8847 function isPortal(object) {
8848 return typeOf(object) === REACT_PORTAL_TYPE;
8849 }
8850 function isProfiler(object) {
8851 return typeOf(object) === REACT_PROFILER_TYPE;
8852 }
8853 function isStrictMode(object) {
8854 return typeOf(object) === REACT_STRICT_MODE_TYPE;
8855 }
8856 function isSuspense(object) {
8857 return typeOf(object) === REACT_SUSPENSE_TYPE;
8858 }
8859
8860 exports.AsyncMode = AsyncMode;
8861 exports.ConcurrentMode = ConcurrentMode;
8862 exports.ContextConsumer = ContextConsumer;
8863 exports.ContextProvider = ContextProvider;
8864 exports.Element = Element;
8865 exports.ForwardRef = ForwardRef;
8866 exports.Fragment = Fragment;
8867 exports.Lazy = Lazy;
8868 exports.Memo = Memo;
8869 exports.Portal = Portal;
8870 exports.Profiler = Profiler;
8871 exports.StrictMode = StrictMode;
8872 exports.Suspense = Suspense;
8873 exports.isAsyncMode = isAsyncMode;
8874 exports.isConcurrentMode = isConcurrentMode;
8875 exports.isContextConsumer = isContextConsumer;
8876 exports.isContextProvider = isContextProvider;
8877 exports.isElement = isElement;
8878 exports.isForwardRef = isForwardRef;
8879 exports.isFragment = isFragment;
8880 exports.isLazy = isLazy;
8881 exports.isMemo = isMemo;
8882 exports.isPortal = isPortal;
8883 exports.isProfiler = isProfiler;
8884 exports.isStrictMode = isStrictMode;
8885 exports.isSuspense = isSuspense;
8886 exports.isValidElementType = isValidElementType;
8887 exports.typeOf = typeOf;
8888 })();
8889 }
8890
8891
8892 /***/ }),
8893
8894 /***/ "./node_modules/react-is/index.js":
8895 /*!****************************************!*\
8896 !*** ./node_modules/react-is/index.js ***!
8897 \****************************************/
8898 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8899
8900 "use strict";
8901
8902
8903 if (false) {} else {
8904 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
8905 }
8906
8907
8908 /***/ }),
8909
8910 /***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
8911 /*!*****************************************************************!*\
8912 !*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
8913 \*****************************************************************/
8914 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8915
8916 "use strict";
8917 /** @license React v17.0.2
8918 * react-jsx-runtime.development.js
8919 *
8920 * Copyright (c) Facebook, Inc. and its affiliates.
8921 *
8922 * This source code is licensed under the MIT license found in the
8923 * LICENSE file in the root directory of this source tree.
8924 */
8925
8926
8927
8928 if (true) {
8929 (function() {
8930 'use strict';
8931
8932 var React = __webpack_require__(/*! react */ "react");
8933 var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
8934
8935 // ATTENTION
8936 // When adding new symbols to this file,
8937 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
8938 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
8939 // nor polyfill, then a plain number is used for performance.
8940 var REACT_ELEMENT_TYPE = 0xeac7;
8941 var REACT_PORTAL_TYPE = 0xeaca;
8942 exports.Fragment = 0xeacb;
8943 var REACT_STRICT_MODE_TYPE = 0xeacc;
8944 var REACT_PROFILER_TYPE = 0xead2;
8945 var REACT_PROVIDER_TYPE = 0xeacd;
8946 var REACT_CONTEXT_TYPE = 0xeace;
8947 var REACT_FORWARD_REF_TYPE = 0xead0;
8948 var REACT_SUSPENSE_TYPE = 0xead1;
8949 var REACT_SUSPENSE_LIST_TYPE = 0xead8;
8950 var REACT_MEMO_TYPE = 0xead3;
8951 var REACT_LAZY_TYPE = 0xead4;
8952 var REACT_BLOCK_TYPE = 0xead9;
8953 var REACT_SERVER_BLOCK_TYPE = 0xeada;
8954 var REACT_FUNDAMENTAL_TYPE = 0xead5;
8955 var REACT_SCOPE_TYPE = 0xead7;
8956 var REACT_OPAQUE_ID_TYPE = 0xeae0;
8957 var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
8958 var REACT_OFFSCREEN_TYPE = 0xeae2;
8959 var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
8960
8961 if (typeof Symbol === 'function' && Symbol.for) {
8962 var symbolFor = Symbol.for;
8963 REACT_ELEMENT_TYPE = symbolFor('react.element');
8964 REACT_PORTAL_TYPE = symbolFor('react.portal');
8965 exports.Fragment = symbolFor('react.fragment');
8966 REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
8967 REACT_PROFILER_TYPE = symbolFor('react.profiler');
8968 REACT_PROVIDER_TYPE = symbolFor('react.provider');
8969 REACT_CONTEXT_TYPE = symbolFor('react.context');
8970 REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
8971 REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
8972 REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
8973 REACT_MEMO_TYPE = symbolFor('react.memo');
8974 REACT_LAZY_TYPE = symbolFor('react.lazy');
8975 REACT_BLOCK_TYPE = symbolFor('react.block');
8976 REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
8977 REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
8978 REACT_SCOPE_TYPE = symbolFor('react.scope');
8979 REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
8980 REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
8981 REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
8982 REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
8983 }
8984
8985 var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
8986 var FAUX_ITERATOR_SYMBOL = '@@iterator';
8987 function getIteratorFn(maybeIterable) {
8988 if (maybeIterable === null || typeof maybeIterable !== 'object') {
8989 return null;
8990 }
8991
8992 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
8993
8994 if (typeof maybeIterator === 'function') {
8995 return maybeIterator;
8996 }
8997
8998 return null;
8999 }
9000
9001 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
9002
9003 function error(format) {
9004 {
9005 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
9006 args[_key2 - 1] = arguments[_key2];
9007 }
9008
9009 printWarning('error', format, args);
9010 }
9011 }
9012
9013 function printWarning(level, format, args) {
9014 // When changing this logic, you might want to also
9015 // update consoleWithStackDev.www.js as well.
9016 {
9017 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9018 var stack = ReactDebugCurrentFrame.getStackAddendum();
9019
9020 if (stack !== '') {
9021 format += '%s';
9022 args = args.concat([stack]);
9023 }
9024
9025 var argsWithFormat = args.map(function (item) {
9026 return '' + item;
9027 }); // Careful: RN currently depends on this prefix
9028
9029 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
9030 // breaks IE9: https://github.com/facebook/react/issues/13610
9031 // eslint-disable-next-line react-internal/no-production-logging
9032
9033 Function.prototype.apply.call(console[level], console, argsWithFormat);
9034 }
9035 }
9036
9037 // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
9038
9039 var enableScopeAPI = false; // Experimental Create Event Handle API.
9040
9041 function isValidElementType(type) {
9042 if (typeof type === 'string' || typeof type === 'function') {
9043 return true;
9044 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
9045
9046
9047 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 ) {
9048 return true;
9049 }
9050
9051 if (typeof type === 'object' && type !== null) {
9052 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) {
9053 return true;
9054 }
9055 }
9056
9057 return false;
9058 }
9059
9060 function getWrappedName(outerType, innerType, wrapperName) {
9061 var functionName = innerType.displayName || innerType.name || '';
9062 return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
9063 }
9064
9065 function getContextName(type) {
9066 return type.displayName || 'Context';
9067 }
9068
9069 function getComponentName(type) {
9070 if (type == null) {
9071 // Host root, text node or just invalid type.
9072 return null;
9073 }
9074
9075 {
9076 if (typeof type.tag === 'number') {
9077 error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
9078 }
9079 }
9080
9081 if (typeof type === 'function') {
9082 return type.displayName || type.name || null;
9083 }
9084
9085 if (typeof type === 'string') {
9086 return type;
9087 }
9088
9089 switch (type) {
9090 case exports.Fragment:
9091 return 'Fragment';
9092
9093 case REACT_PORTAL_TYPE:
9094 return 'Portal';
9095
9096 case REACT_PROFILER_TYPE:
9097 return 'Profiler';
9098
9099 case REACT_STRICT_MODE_TYPE:
9100 return 'StrictMode';
9101
9102 case REACT_SUSPENSE_TYPE:
9103 return 'Suspense';
9104
9105 case REACT_SUSPENSE_LIST_TYPE:
9106 return 'SuspenseList';
9107 }
9108
9109 if (typeof type === 'object') {
9110 switch (type.$$typeof) {
9111 case REACT_CONTEXT_TYPE:
9112 var context = type;
9113 return getContextName(context) + '.Consumer';
9114
9115 case REACT_PROVIDER_TYPE:
9116 var provider = type;
9117 return getContextName(provider._context) + '.Provider';
9118
9119 case REACT_FORWARD_REF_TYPE:
9120 return getWrappedName(type, type.render, 'ForwardRef');
9121
9122 case REACT_MEMO_TYPE:
9123 return getComponentName(type.type);
9124
9125 case REACT_BLOCK_TYPE:
9126 return getComponentName(type._render);
9127
9128 case REACT_LAZY_TYPE:
9129 {
9130 var lazyComponent = type;
9131 var payload = lazyComponent._payload;
9132 var init = lazyComponent._init;
9133
9134 try {
9135 return getComponentName(init(payload));
9136 } catch (x) {
9137 return null;
9138 }
9139 }
9140 }
9141 }
9142
9143 return null;
9144 }
9145
9146 // Helpers to patch console.logs to avoid logging during side-effect free
9147 // replaying on render function. This currently only patches the object
9148 // lazily which won't cover if the log function was extracted eagerly.
9149 // We could also eagerly patch the method.
9150 var disabledDepth = 0;
9151 var prevLog;
9152 var prevInfo;
9153 var prevWarn;
9154 var prevError;
9155 var prevGroup;
9156 var prevGroupCollapsed;
9157 var prevGroupEnd;
9158
9159 function disabledLog() {}
9160
9161 disabledLog.__reactDisabledLog = true;
9162 function disableLogs() {
9163 {
9164 if (disabledDepth === 0) {
9165 /* eslint-disable react-internal/no-production-logging */
9166 prevLog = console.log;
9167 prevInfo = console.info;
9168 prevWarn = console.warn;
9169 prevError = console.error;
9170 prevGroup = console.group;
9171 prevGroupCollapsed = console.groupCollapsed;
9172 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
9173
9174 var props = {
9175 configurable: true,
9176 enumerable: true,
9177 value: disabledLog,
9178 writable: true
9179 }; // $FlowFixMe Flow thinks console is immutable.
9180
9181 Object.defineProperties(console, {
9182 info: props,
9183 log: props,
9184 warn: props,
9185 error: props,
9186 group: props,
9187 groupCollapsed: props,
9188 groupEnd: props
9189 });
9190 /* eslint-enable react-internal/no-production-logging */
9191 }
9192
9193 disabledDepth++;
9194 }
9195 }
9196 function reenableLogs() {
9197 {
9198 disabledDepth--;
9199
9200 if (disabledDepth === 0) {
9201 /* eslint-disable react-internal/no-production-logging */
9202 var props = {
9203 configurable: true,
9204 enumerable: true,
9205 writable: true
9206 }; // $FlowFixMe Flow thinks console is immutable.
9207
9208 Object.defineProperties(console, {
9209 log: _assign({}, props, {
9210 value: prevLog
9211 }),
9212 info: _assign({}, props, {
9213 value: prevInfo
9214 }),
9215 warn: _assign({}, props, {
9216 value: prevWarn
9217 }),
9218 error: _assign({}, props, {
9219 value: prevError
9220 }),
9221 group: _assign({}, props, {
9222 value: prevGroup
9223 }),
9224 groupCollapsed: _assign({}, props, {
9225 value: prevGroupCollapsed
9226 }),
9227 groupEnd: _assign({}, props, {
9228 value: prevGroupEnd
9229 })
9230 });
9231 /* eslint-enable react-internal/no-production-logging */
9232 }
9233
9234 if (disabledDepth < 0) {
9235 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
9236 }
9237 }
9238 }
9239
9240 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
9241 var prefix;
9242 function describeBuiltInComponentFrame(name, source, ownerFn) {
9243 {
9244 if (prefix === undefined) {
9245 // Extract the VM specific prefix used by each line.
9246 try {
9247 throw Error();
9248 } catch (x) {
9249 var match = x.stack.trim().match(/\n( *(at )?)/);
9250 prefix = match && match[1] || '';
9251 }
9252 } // We use the prefix to ensure our stacks line up with native stack frames.
9253
9254
9255 return '\n' + prefix + name;
9256 }
9257 }
9258 var reentry = false;
9259 var componentFrameCache;
9260
9261 {
9262 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
9263 componentFrameCache = new PossiblyWeakMap();
9264 }
9265
9266 function describeNativeComponentFrame(fn, construct) {
9267 // If something asked for a stack inside a fake render, it should get ignored.
9268 if (!fn || reentry) {
9269 return '';
9270 }
9271
9272 {
9273 var frame = componentFrameCache.get(fn);
9274
9275 if (frame !== undefined) {
9276 return frame;
9277 }
9278 }
9279
9280 var control;
9281 reentry = true;
9282 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
9283
9284 Error.prepareStackTrace = undefined;
9285 var previousDispatcher;
9286
9287 {
9288 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
9289 // for warnings.
9290
9291 ReactCurrentDispatcher.current = null;
9292 disableLogs();
9293 }
9294
9295 try {
9296 // This should throw.
9297 if (construct) {
9298 // Something should be setting the props in the constructor.
9299 var Fake = function () {
9300 throw Error();
9301 }; // $FlowFixMe
9302
9303
9304 Object.defineProperty(Fake.prototype, 'props', {
9305 set: function () {
9306 // We use a throwing setter instead of frozen or non-writable props
9307 // because that won't throw in a non-strict mode function.
9308 throw Error();
9309 }
9310 });
9311
9312 if (typeof Reflect === 'object' && Reflect.construct) {
9313 // We construct a different control for this case to include any extra
9314 // frames added by the construct call.
9315 try {
9316 Reflect.construct(Fake, []);
9317 } catch (x) {
9318 control = x;
9319 }
9320
9321 Reflect.construct(fn, [], Fake);
9322 } else {
9323 try {
9324 Fake.call();
9325 } catch (x) {
9326 control = x;
9327 }
9328
9329 fn.call(Fake.prototype);
9330 }
9331 } else {
9332 try {
9333 throw Error();
9334 } catch (x) {
9335 control = x;
9336 }
9337
9338 fn();
9339 }
9340 } catch (sample) {
9341 // This is inlined manually because closure doesn't do it for us.
9342 if (sample && control && typeof sample.stack === 'string') {
9343 // This extracts the first frame from the sample that isn't also in the control.
9344 // Skipping one frame that we assume is the frame that calls the two.
9345 var sampleLines = sample.stack.split('\n');
9346 var controlLines = control.stack.split('\n');
9347 var s = sampleLines.length - 1;
9348 var c = controlLines.length - 1;
9349
9350 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
9351 // We expect at least one stack frame to be shared.
9352 // Typically this will be the root most one. However, stack frames may be
9353 // cut off due to maximum stack limits. In this case, one maybe cut off
9354 // earlier than the other. We assume that the sample is longer or the same
9355 // and there for cut off earlier. So we should find the root most frame in
9356 // the sample somewhere in the control.
9357 c--;
9358 }
9359
9360 for (; s >= 1 && c >= 0; s--, c--) {
9361 // Next we find the first one that isn't the same which should be the
9362 // frame that called our sample function and the control.
9363 if (sampleLines[s] !== controlLines[c]) {
9364 // In V8, the first line is describing the message but other VMs don't.
9365 // If we're about to return the first line, and the control is also on the same
9366 // line, that's a pretty good indicator that our sample threw at same line as
9367 // the control. I.e. before we entered the sample frame. So we ignore this result.
9368 // This can happen if you passed a class to function component, or non-function.
9369 if (s !== 1 || c !== 1) {
9370 do {
9371 s--;
9372 c--; // We may still have similar intermediate frames from the construct call.
9373 // The next one that isn't the same should be our match though.
9374
9375 if (c < 0 || sampleLines[s] !== controlLines[c]) {
9376 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
9377 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
9378
9379 {
9380 if (typeof fn === 'function') {
9381 componentFrameCache.set(fn, _frame);
9382 }
9383 } // Return the line we found.
9384
9385
9386 return _frame;
9387 }
9388 } while (s >= 1 && c >= 0);
9389 }
9390
9391 break;
9392 }
9393 }
9394 }
9395 } finally {
9396 reentry = false;
9397
9398 {
9399 ReactCurrentDispatcher.current = previousDispatcher;
9400 reenableLogs();
9401 }
9402
9403 Error.prepareStackTrace = previousPrepareStackTrace;
9404 } // Fallback to just using the name if we couldn't make it throw.
9405
9406
9407 var name = fn ? fn.displayName || fn.name : '';
9408 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
9409
9410 {
9411 if (typeof fn === 'function') {
9412 componentFrameCache.set(fn, syntheticFrame);
9413 }
9414 }
9415
9416 return syntheticFrame;
9417 }
9418 function describeFunctionComponentFrame(fn, source, ownerFn) {
9419 {
9420 return describeNativeComponentFrame(fn, false);
9421 }
9422 }
9423
9424 function shouldConstruct(Component) {
9425 var prototype = Component.prototype;
9426 return !!(prototype && prototype.isReactComponent);
9427 }
9428
9429 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
9430
9431 if (type == null) {
9432 return '';
9433 }
9434
9435 if (typeof type === 'function') {
9436 {
9437 return describeNativeComponentFrame(type, shouldConstruct(type));
9438 }
9439 }
9440
9441 if (typeof type === 'string') {
9442 return describeBuiltInComponentFrame(type);
9443 }
9444
9445 switch (type) {
9446 case REACT_SUSPENSE_TYPE:
9447 return describeBuiltInComponentFrame('Suspense');
9448
9449 case REACT_SUSPENSE_LIST_TYPE:
9450 return describeBuiltInComponentFrame('SuspenseList');
9451 }
9452
9453 if (typeof type === 'object') {
9454 switch (type.$$typeof) {
9455 case REACT_FORWARD_REF_TYPE:
9456 return describeFunctionComponentFrame(type.render);
9457
9458 case REACT_MEMO_TYPE:
9459 // Memo may contain any component type so we recursively resolve it.
9460 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
9461
9462 case REACT_BLOCK_TYPE:
9463 return describeFunctionComponentFrame(type._render);
9464
9465 case REACT_LAZY_TYPE:
9466 {
9467 var lazyComponent = type;
9468 var payload = lazyComponent._payload;
9469 var init = lazyComponent._init;
9470
9471 try {
9472 // Lazy may contain any component type so we recursively resolve it.
9473 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
9474 } catch (x) {}
9475 }
9476 }
9477 }
9478
9479 return '';
9480 }
9481
9482 var loggedTypeFailures = {};
9483 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
9484
9485 function setCurrentlyValidatingElement(element) {
9486 {
9487 if (element) {
9488 var owner = element._owner;
9489 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9490 ReactDebugCurrentFrame.setExtraStackFrame(stack);
9491 } else {
9492 ReactDebugCurrentFrame.setExtraStackFrame(null);
9493 }
9494 }
9495 }
9496
9497 function checkPropTypes(typeSpecs, values, location, componentName, element) {
9498 {
9499 // $FlowFixMe This is okay but Flow doesn't know it.
9500 var has = Function.call.bind(Object.prototype.hasOwnProperty);
9501
9502 for (var typeSpecName in typeSpecs) {
9503 if (has(typeSpecs, typeSpecName)) {
9504 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
9505 // fail the render phase where it didn't fail before. So we log it.
9506 // After these have been cleaned up, we'll let them throw.
9507
9508 try {
9509 // This is intentionally an invariant that gets caught. It's the same
9510 // behavior as without this statement except with a better message.
9511 if (typeof typeSpecs[typeSpecName] !== 'function') {
9512 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`.');
9513 err.name = 'Invariant Violation';
9514 throw err;
9515 }
9516
9517 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
9518 } catch (ex) {
9519 error$1 = ex;
9520 }
9521
9522 if (error$1 && !(error$1 instanceof Error)) {
9523 setCurrentlyValidatingElement(element);
9524
9525 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);
9526
9527 setCurrentlyValidatingElement(null);
9528 }
9529
9530 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
9531 // Only monitor this failure once because there tends to be a lot of the
9532 // same error.
9533 loggedTypeFailures[error$1.message] = true;
9534 setCurrentlyValidatingElement(element);
9535
9536 error('Failed %s type: %s', location, error$1.message);
9537
9538 setCurrentlyValidatingElement(null);
9539 }
9540 }
9541 }
9542 }
9543 }
9544
9545 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
9546 var hasOwnProperty = Object.prototype.hasOwnProperty;
9547 var RESERVED_PROPS = {
9548 key: true,
9549 ref: true,
9550 __self: true,
9551 __source: true
9552 };
9553 var specialPropKeyWarningShown;
9554 var specialPropRefWarningShown;
9555 var didWarnAboutStringRefs;
9556
9557 {
9558 didWarnAboutStringRefs = {};
9559 }
9560
9561 function hasValidRef(config) {
9562 {
9563 if (hasOwnProperty.call(config, 'ref')) {
9564 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
9565
9566 if (getter && getter.isReactWarning) {
9567 return false;
9568 }
9569 }
9570 }
9571
9572 return config.ref !== undefined;
9573 }
9574
9575 function hasValidKey(config) {
9576 {
9577 if (hasOwnProperty.call(config, 'key')) {
9578 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
9579
9580 if (getter && getter.isReactWarning) {
9581 return false;
9582 }
9583 }
9584 }
9585
9586 return config.key !== undefined;
9587 }
9588
9589 function warnIfStringRefCannotBeAutoConverted(config, self) {
9590 {
9591 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
9592 var componentName = getComponentName(ReactCurrentOwner.current.type);
9593
9594 if (!didWarnAboutStringRefs[componentName]) {
9595 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);
9596
9597 didWarnAboutStringRefs[componentName] = true;
9598 }
9599 }
9600 }
9601 }
9602
9603 function defineKeyPropWarningGetter(props, displayName) {
9604 {
9605 var warnAboutAccessingKey = function () {
9606 if (!specialPropKeyWarningShown) {
9607 specialPropKeyWarningShown = true;
9608
9609 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);
9610 }
9611 };
9612
9613 warnAboutAccessingKey.isReactWarning = true;
9614 Object.defineProperty(props, 'key', {
9615 get: warnAboutAccessingKey,
9616 configurable: true
9617 });
9618 }
9619 }
9620
9621 function defineRefPropWarningGetter(props, displayName) {
9622 {
9623 var warnAboutAccessingRef = function () {
9624 if (!specialPropRefWarningShown) {
9625 specialPropRefWarningShown = true;
9626
9627 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);
9628 }
9629 };
9630
9631 warnAboutAccessingRef.isReactWarning = true;
9632 Object.defineProperty(props, 'ref', {
9633 get: warnAboutAccessingRef,
9634 configurable: true
9635 });
9636 }
9637 }
9638 /**
9639 * Factory method to create a new React element. This no longer adheres to
9640 * the class pattern, so do not use new to call it. Also, instanceof check
9641 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
9642 * if something is a React Element.
9643 *
9644 * @param {*} type
9645 * @param {*} props
9646 * @param {*} key
9647 * @param {string|object} ref
9648 * @param {*} owner
9649 * @param {*} self A *temporary* helper to detect places where `this` is
9650 * different from the `owner` when React.createElement is called, so that we
9651 * can warn. We want to get rid of owner and replace string `ref`s with arrow
9652 * functions, and as long as `this` and owner are the same, there will be no
9653 * change in behavior.
9654 * @param {*} source An annotation object (added by a transpiler or otherwise)
9655 * indicating filename, line number, and/or other information.
9656 * @internal
9657 */
9658
9659
9660 var ReactElement = function (type, key, ref, self, source, owner, props) {
9661 var element = {
9662 // This tag allows us to uniquely identify this as a React Element
9663 $$typeof: REACT_ELEMENT_TYPE,
9664 // Built-in properties that belong on the element
9665 type: type,
9666 key: key,
9667 ref: ref,
9668 props: props,
9669 // Record the component responsible for creating this element.
9670 _owner: owner
9671 };
9672
9673 {
9674 // The validation flag is currently mutative. We put it on
9675 // an external backing store so that we can freeze the whole object.
9676 // This can be replaced with a WeakMap once they are implemented in
9677 // commonly used development environments.
9678 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
9679 // the validation flag non-enumerable (where possible, which should
9680 // include every environment we run tests in), so the test framework
9681 // ignores it.
9682
9683 Object.defineProperty(element._store, 'validated', {
9684 configurable: false,
9685 enumerable: false,
9686 writable: true,
9687 value: false
9688 }); // self and source are DEV only properties.
9689
9690 Object.defineProperty(element, '_self', {
9691 configurable: false,
9692 enumerable: false,
9693 writable: false,
9694 value: self
9695 }); // Two elements created in two different places should be considered
9696 // equal for testing purposes and therefore we hide it from enumeration.
9697
9698 Object.defineProperty(element, '_source', {
9699 configurable: false,
9700 enumerable: false,
9701 writable: false,
9702 value: source
9703 });
9704
9705 if (Object.freeze) {
9706 Object.freeze(element.props);
9707 Object.freeze(element);
9708 }
9709 }
9710
9711 return element;
9712 };
9713 /**
9714 * https://github.com/reactjs/rfcs/pull/107
9715 * @param {*} type
9716 * @param {object} props
9717 * @param {string} key
9718 */
9719
9720 function jsxDEV(type, config, maybeKey, source, self) {
9721 {
9722 var propName; // Reserved names are extracted
9723
9724 var props = {};
9725 var key = null;
9726 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
9727 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
9728 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
9729 // but as an intermediary step, we will use jsxDEV for everything except
9730 // <div {...props} key="Hi" />, because we aren't currently able to tell if
9731 // key is explicitly declared to be undefined or not.
9732
9733 if (maybeKey !== undefined) {
9734 key = '' + maybeKey;
9735 }
9736
9737 if (hasValidKey(config)) {
9738 key = '' + config.key;
9739 }
9740
9741 if (hasValidRef(config)) {
9742 ref = config.ref;
9743 warnIfStringRefCannotBeAutoConverted(config, self);
9744 } // Remaining properties are added to a new props object
9745
9746
9747 for (propName in config) {
9748 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
9749 props[propName] = config[propName];
9750 }
9751 } // Resolve default props
9752
9753
9754 if (type && type.defaultProps) {
9755 var defaultProps = type.defaultProps;
9756
9757 for (propName in defaultProps) {
9758 if (props[propName] === undefined) {
9759 props[propName] = defaultProps[propName];
9760 }
9761 }
9762 }
9763
9764 if (key || ref) {
9765 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
9766
9767 if (key) {
9768 defineKeyPropWarningGetter(props, displayName);
9769 }
9770
9771 if (ref) {
9772 defineRefPropWarningGetter(props, displayName);
9773 }
9774 }
9775
9776 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
9777 }
9778 }
9779
9780 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
9781 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
9782
9783 function setCurrentlyValidatingElement$1(element) {
9784 {
9785 if (element) {
9786 var owner = element._owner;
9787 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
9788 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
9789 } else {
9790 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
9791 }
9792 }
9793 }
9794
9795 var propTypesMisspellWarningShown;
9796
9797 {
9798 propTypesMisspellWarningShown = false;
9799 }
9800 /**
9801 * Verifies the object is a ReactElement.
9802 * See https://reactjs.org/docs/react-api.html#isvalidelement
9803 * @param {?object} object
9804 * @return {boolean} True if `object` is a ReactElement.
9805 * @final
9806 */
9807
9808 function isValidElement(object) {
9809 {
9810 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
9811 }
9812 }
9813
9814 function getDeclarationErrorAddendum() {
9815 {
9816 if (ReactCurrentOwner$1.current) {
9817 var name = getComponentName(ReactCurrentOwner$1.current.type);
9818
9819 if (name) {
9820 return '\n\nCheck the render method of `' + name + '`.';
9821 }
9822 }
9823
9824 return '';
9825 }
9826 }
9827
9828 function getSourceInfoErrorAddendum(source) {
9829 {
9830 if (source !== undefined) {
9831 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
9832 var lineNumber = source.lineNumber;
9833 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
9834 }
9835
9836 return '';
9837 }
9838 }
9839 /**
9840 * Warn if there's no key explicitly set on dynamic arrays of children or
9841 * object keys are not valid. This allows us to keep track of children between
9842 * updates.
9843 */
9844
9845
9846 var ownerHasKeyUseWarning = {};
9847
9848 function getCurrentComponentErrorInfo(parentType) {
9849 {
9850 var info = getDeclarationErrorAddendum();
9851
9852 if (!info) {
9853 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
9854
9855 if (parentName) {
9856 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
9857 }
9858 }
9859
9860 return info;
9861 }
9862 }
9863 /**
9864 * Warn if the element doesn't have an explicit key assigned to it.
9865 * This element is in an array. The array could grow and shrink or be
9866 * reordered. All children that haven't already been validated are required to
9867 * have a "key" property assigned to it. Error statuses are cached so a warning
9868 * will only be shown once.
9869 *
9870 * @internal
9871 * @param {ReactElement} element Element that requires a key.
9872 * @param {*} parentType element's parent's type.
9873 */
9874
9875
9876 function validateExplicitKey(element, parentType) {
9877 {
9878 if (!element._store || element._store.validated || element.key != null) {
9879 return;
9880 }
9881
9882 element._store.validated = true;
9883 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
9884
9885 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
9886 return;
9887 }
9888
9889 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
9890 // property, it may be the creator of the child that's responsible for
9891 // assigning it a key.
9892
9893 var childOwner = '';
9894
9895 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
9896 // Give the component that originally created this child.
9897 childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
9898 }
9899
9900 setCurrentlyValidatingElement$1(element);
9901
9902 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);
9903
9904 setCurrentlyValidatingElement$1(null);
9905 }
9906 }
9907 /**
9908 * Ensure that every element either is passed in a static location, in an
9909 * array with an explicit keys property defined, or in an object literal
9910 * with valid key property.
9911 *
9912 * @internal
9913 * @param {ReactNode} node Statically passed child of any type.
9914 * @param {*} parentType node's parent's type.
9915 */
9916
9917
9918 function validateChildKeys(node, parentType) {
9919 {
9920 if (typeof node !== 'object') {
9921 return;
9922 }
9923
9924 if (Array.isArray(node)) {
9925 for (var i = 0; i < node.length; i++) {
9926 var child = node[i];
9927
9928 if (isValidElement(child)) {
9929 validateExplicitKey(child, parentType);
9930 }
9931 }
9932 } else if (isValidElement(node)) {
9933 // This element was passed in a valid location.
9934 if (node._store) {
9935 node._store.validated = true;
9936 }
9937 } else if (node) {
9938 var iteratorFn = getIteratorFn(node);
9939
9940 if (typeof iteratorFn === 'function') {
9941 // Entry iterators used to provide implicit keys,
9942 // but now we print a separate warning for them later.
9943 if (iteratorFn !== node.entries) {
9944 var iterator = iteratorFn.call(node);
9945 var step;
9946
9947 while (!(step = iterator.next()).done) {
9948 if (isValidElement(step.value)) {
9949 validateExplicitKey(step.value, parentType);
9950 }
9951 }
9952 }
9953 }
9954 }
9955 }
9956 }
9957 /**
9958 * Given an element, validate that its props follow the propTypes definition,
9959 * provided by the type.
9960 *
9961 * @param {ReactElement} element
9962 */
9963
9964
9965 function validatePropTypes(element) {
9966 {
9967 var type = element.type;
9968
9969 if (type === null || type === undefined || typeof type === 'string') {
9970 return;
9971 }
9972
9973 var propTypes;
9974
9975 if (typeof type === 'function') {
9976 propTypes = type.propTypes;
9977 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
9978 // Inner props are checked in the reconciler.
9979 type.$$typeof === REACT_MEMO_TYPE)) {
9980 propTypes = type.propTypes;
9981 } else {
9982 return;
9983 }
9984
9985 if (propTypes) {
9986 // Intentionally inside to avoid triggering lazy initializers:
9987 var name = getComponentName(type);
9988 checkPropTypes(propTypes, element.props, 'prop', name, element);
9989 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
9990 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
9991
9992 var _name = getComponentName(type);
9993
9994 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
9995 }
9996
9997 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
9998 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
9999 }
10000 }
10001 }
10002 /**
10003 * Given a fragment, validate that it can only be provided with fragment props
10004 * @param {ReactElement} fragment
10005 */
10006
10007
10008 function validateFragmentProps(fragment) {
10009 {
10010 var keys = Object.keys(fragment.props);
10011
10012 for (var i = 0; i < keys.length; i++) {
10013 var key = keys[i];
10014
10015 if (key !== 'children' && key !== 'key') {
10016 setCurrentlyValidatingElement$1(fragment);
10017
10018 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
10019
10020 setCurrentlyValidatingElement$1(null);
10021 break;
10022 }
10023 }
10024
10025 if (fragment.ref !== null) {
10026 setCurrentlyValidatingElement$1(fragment);
10027
10028 error('Invalid attribute `ref` supplied to `React.Fragment`.');
10029
10030 setCurrentlyValidatingElement$1(null);
10031 }
10032 }
10033 }
10034
10035 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
10036 {
10037 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
10038 // succeed and there will likely be errors in render.
10039
10040 if (!validType) {
10041 var info = '';
10042
10043 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
10044 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.";
10045 }
10046
10047 var sourceInfo = getSourceInfoErrorAddendum(source);
10048
10049 if (sourceInfo) {
10050 info += sourceInfo;
10051 } else {
10052 info += getDeclarationErrorAddendum();
10053 }
10054
10055 var typeString;
10056
10057 if (type === null) {
10058 typeString = 'null';
10059 } else if (Array.isArray(type)) {
10060 typeString = 'array';
10061 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
10062 typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
10063 info = ' Did you accidentally export a JSX literal instead of a component?';
10064 } else {
10065 typeString = typeof type;
10066 }
10067
10068 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);
10069 }
10070
10071 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
10072 // TODO: Drop this when these are no longer allowed as the type argument.
10073
10074 if (element == null) {
10075 return element;
10076 } // Skip key warning if the type isn't valid since our key validation logic
10077 // doesn't expect a non-string/function type and can throw confusing errors.
10078 // We don't want exception behavior to differ between dev and prod.
10079 // (Rendering will throw with a helpful message and as soon as the type is
10080 // fixed, the key warnings will appear.)
10081
10082
10083 if (validType) {
10084 var children = props.children;
10085
10086 if (children !== undefined) {
10087 if (isStaticChildren) {
10088 if (Array.isArray(children)) {
10089 for (var i = 0; i < children.length; i++) {
10090 validateChildKeys(children[i], type);
10091 }
10092
10093 if (Object.freeze) {
10094 Object.freeze(children);
10095 }
10096 } else {
10097 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.');
10098 }
10099 } else {
10100 validateChildKeys(children, type);
10101 }
10102 }
10103 }
10104
10105 if (type === exports.Fragment) {
10106 validateFragmentProps(element);
10107 } else {
10108 validatePropTypes(element);
10109 }
10110
10111 return element;
10112 }
10113 } // These two functions exist to still get child warnings in dev
10114 // even with the prod transform. This means that jsxDEV is purely
10115 // opt-in behavior for better messages but that we won't stop
10116 // giving you warnings if you use production apis.
10117
10118 function jsxWithValidationStatic(type, props, key) {
10119 {
10120 return jsxWithValidation(type, props, key, true);
10121 }
10122 }
10123 function jsxWithValidationDynamic(type, props, key) {
10124 {
10125 return jsxWithValidation(type, props, key, false);
10126 }
10127 }
10128
10129 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
10130 // for now we can ship identical prod functions
10131
10132 var jsxs = jsxWithValidationStatic ;
10133
10134 exports.jsx = jsx;
10135 exports.jsxs = jsxs;
10136 })();
10137 }
10138
10139
10140 /***/ }),
10141
10142 /***/ "./node_modules/react/jsx-runtime.js":
10143 /*!*******************************************!*\
10144 !*** ./node_modules/react/jsx-runtime.js ***!
10145 \*******************************************/
10146 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10147
10148 "use strict";
10149
10150
10151 if (false) {} else {
10152 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "./node_modules/react/cjs/react-jsx-runtime.development.js");
10153 }
10154
10155
10156 /***/ }),
10157
10158 /***/ "./node_modules/styled-components/dist/styled-components.browser.esm.js":
10159 /*!******************************************************************************!*\
10160 !*** ./node_modules/styled-components/dist/styled-components.browser.esm.js ***!
10161 \******************************************************************************/
10162 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10163
10164 "use strict";
10165 __webpack_require__.r(__webpack_exports__);
10166 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10167 /* harmony export */ "ServerStyleSheet": () => (/* binding */ ServerStyleSheet),
10168 /* harmony export */ "StyleSheetConsumer": () => (/* binding */ StyleSheetConsumer),
10169 /* harmony export */ "StyleSheetContext": () => (/* binding */ StyleSheetContext),
10170 /* harmony export */ "StyleSheetManager": () => (/* binding */ StyleSheetManager),
10171 /* harmony export */ "ThemeConsumer": () => (/* binding */ ThemeConsumer),
10172 /* harmony export */ "ThemeContext": () => (/* binding */ ThemeContext),
10173 /* harmony export */ "ThemeProvider": () => (/* binding */ ThemeProvider),
10174 /* 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),
10175 /* harmony export */ "createGlobalStyle": () => (/* binding */ createGlobalStyle),
10176 /* harmony export */ "css": () => (/* binding */ css),
10177 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
10178 /* harmony export */ "isStyledComponent": () => (/* binding */ isStyledComponent),
10179 /* harmony export */ "keyframes": () => (/* binding */ keyframes),
10180 /* harmony export */ "withTheme": () => (/* binding */ withTheme)
10181 /* harmony export */ });
10182 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! stylis/stylis.min */ "./node_modules/stylis/stylis.min.js");
10183 /* harmony import */ var stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0__);
10184 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! stylis-rule-sheet */ "./node_modules/stylis-rule-sheet/index.js");
10185 /* harmony import */ var stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1__);
10186 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
10187 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
10188 /* harmony import */ var _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/unitless */ "./node_modules/@emotion/unitless/dist/unitless.browser.esm.js");
10189 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10190 /* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! memoize-one */ "./node_modules/memoize-one/dist/memoize-one.esm.js");
10191 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js");
10192 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__);
10193 /* 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");
10194 /* harmony import */ var merge_anything__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! merge-anything */ "./node_modules/merge-anything/dist/index.esm.js");
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205 //
10206
10207 var interleave = (function (strings, interpolations) {
10208 var result = [strings[0]];
10209
10210 for (var i = 0, len = interpolations.length; i < len; i += 1) {
10211 result.push(interpolations[i], strings[i + 1]);
10212 }
10213
10214 return result;
10215 });
10216
10217 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
10218 return typeof obj;
10219 } : function (obj) {
10220 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
10221 };
10222
10223 var classCallCheck = function (instance, Constructor) {
10224 if (!(instance instanceof Constructor)) {
10225 throw new TypeError("Cannot call a class as a function");
10226 }
10227 };
10228
10229 var createClass = function () {
10230 function defineProperties(target, props) {
10231 for (var i = 0; i < props.length; i++) {
10232 var descriptor = props[i];
10233 descriptor.enumerable = descriptor.enumerable || false;
10234 descriptor.configurable = true;
10235 if ("value" in descriptor) descriptor.writable = true;
10236 Object.defineProperty(target, descriptor.key, descriptor);
10237 }
10238 }
10239
10240 return function (Constructor, protoProps, staticProps) {
10241 if (protoProps) defineProperties(Constructor.prototype, protoProps);
10242 if (staticProps) defineProperties(Constructor, staticProps);
10243 return Constructor;
10244 };
10245 }();
10246
10247 var _extends = Object.assign || function (target) {
10248 for (var i = 1; i < arguments.length; i++) {
10249 var source = arguments[i];
10250
10251 for (var key in source) {
10252 if (Object.prototype.hasOwnProperty.call(source, key)) {
10253 target[key] = source[key];
10254 }
10255 }
10256 }
10257
10258 return target;
10259 };
10260
10261 var inherits = function (subClass, superClass) {
10262 if (typeof superClass !== "function" && superClass !== null) {
10263 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
10264 }
10265
10266 subClass.prototype = Object.create(superClass && superClass.prototype, {
10267 constructor: {
10268 value: subClass,
10269 enumerable: false,
10270 writable: true,
10271 configurable: true
10272 }
10273 });
10274 if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
10275 };
10276
10277 var objectWithoutProperties = function (obj, keys) {
10278 var target = {};
10279
10280 for (var i in obj) {
10281 if (keys.indexOf(i) >= 0) continue;
10282 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
10283 target[i] = obj[i];
10284 }
10285
10286 return target;
10287 };
10288
10289 var possibleConstructorReturn = function (self, call) {
10290 if (!self) {
10291 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
10292 }
10293
10294 return call && (typeof call === "object" || typeof call === "function") ? call : self;
10295 };
10296
10297 //
10298 var isPlainObject = (function (x) {
10299 return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x.constructor === Object;
10300 });
10301
10302 //
10303 var EMPTY_ARRAY = Object.freeze([]);
10304 var EMPTY_OBJECT = Object.freeze({});
10305
10306 //
10307 function isFunction(test) {
10308 return typeof test === 'function';
10309 }
10310
10311 //
10312
10313 function getComponentName(target) {
10314 return ( true ? typeof target === 'string' && target : 0) || target.displayName || target.name || 'Component';
10315 }
10316
10317 //
10318 function isStatelessFunction(test) {
10319 return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent);
10320 }
10321
10322 //
10323 function isStyledComponent(target) {
10324 return target && typeof target.styledComponentId === 'string';
10325 }
10326
10327 //
10328
10329 var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
10330
10331 var SC_VERSION_ATTR = 'data-styled-version';
10332
10333 var SC_STREAM_ATTR = 'data-styled-streamed';
10334
10335 var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
10336
10337 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';
10338
10339 // Shared empty execution context when generating static styles
10340 var STATIC_EXECUTION_CONTEXT = {};
10341
10342 //
10343
10344
10345 /**
10346 * Parse errors.md and turn it into a simple hash of code: message
10347 */
10348 var ERRORS = true ? {
10349 "1": "Cannot create styled-component for component: %s.\n\n",
10350 "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",
10351 "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",
10352 "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",
10353 "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",
10354 "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",
10355 "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n",
10356 "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n",
10357 "9": "Missing document `<head>`\n\n",
10358 "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",
10359 "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",
10360 "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",
10361 "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"
10362 } : 0;
10363
10364 /**
10365 * super basic version of sprintf
10366 */
10367 function format() {
10368 var a = arguments.length <= 0 ? undefined : arguments[0];
10369 var b = [];
10370
10371 for (var c = 1, len = arguments.length; c < len; c += 1) {
10372 b.push(arguments.length <= c ? undefined : arguments[c]);
10373 }
10374
10375 b.forEach(function (d) {
10376 a = a.replace(/%[a-z]/, d);
10377 });
10378
10379 return a;
10380 }
10381
10382 /**
10383 * Create an error file out of errors.md for development and a simple web link to the full errors
10384 * in production mode.
10385 */
10386
10387 var StyledComponentsError = function (_Error) {
10388 inherits(StyledComponentsError, _Error);
10389
10390 function StyledComponentsError(code) {
10391 classCallCheck(this, StyledComponentsError);
10392
10393 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10394 interpolations[_key - 1] = arguments[_key];
10395 }
10396
10397 if (false) { var _this; } else {
10398 var _this = possibleConstructorReturn(this, _Error.call(this, format.apply(undefined, [ERRORS[code]].concat(interpolations)).trim()));
10399 }
10400 return possibleConstructorReturn(_this);
10401 }
10402
10403 return StyledComponentsError;
10404 }(Error);
10405
10406 //
10407 var SC_COMPONENT_ID = /^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm;
10408
10409 var extractComps = (function (maybeCSS) {
10410 var css = '' + (maybeCSS || ''); // Definitely a string, and a clone
10411 var existingComponents = [];
10412 css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {
10413 existingComponents.push({ componentId: componentId, matchIndex: matchIndex });
10414 return match;
10415 });
10416 return existingComponents.map(function (_ref, i) {
10417 var componentId = _ref.componentId,
10418 matchIndex = _ref.matchIndex;
10419
10420 var nextComp = existingComponents[i + 1];
10421 var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);
10422 return { componentId: componentId, cssFromDOM: cssFromDOM };
10423 });
10424 });
10425
10426 //
10427
10428 var COMMENT_REGEX = /^\s*\/\/.*$/gm;
10429
10430 // NOTE: This stylis instance is only used to split rules from SSR'd style tags
10431 var stylisSplitter = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10432 global: false,
10433 cascade: true,
10434 keyframe: false,
10435 prefix: false,
10436 compress: false,
10437 semicolon: true
10438 });
10439
10440 var stylis = new (stylis_stylis_min__WEBPACK_IMPORTED_MODULE_0___default())({
10441 global: false,
10442 cascade: true,
10443 keyframe: false,
10444 prefix: true,
10445 compress: false,
10446 semicolon: false // NOTE: This means "autocomplete missing semicolons"
10447 });
10448
10449 // Wrap `insertRulePlugin to build a list of rules,
10450 // and then make our own plugin to return the rules. This
10451 // makes it easier to hook into the existing SSR architecture
10452
10453 var parsingRules = [];
10454
10455 // eslint-disable-next-line consistent-return
10456 var returnRulesPlugin = function returnRulesPlugin(context) {
10457 if (context === -2) {
10458 var parsedRules = parsingRules;
10459 parsingRules = [];
10460 return parsedRules;
10461 }
10462 };
10463
10464 var parseRulesPlugin = stylis_rule_sheet__WEBPACK_IMPORTED_MODULE_1___default()(function (rule) {
10465 parsingRules.push(rule);
10466 });
10467
10468 var _componentId = void 0;
10469 var _selector = void 0;
10470 var _selectorRegexp = void 0;
10471
10472 var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) {
10473 if (
10474 // the first self-ref is always untouched
10475 offset > 0 &&
10476 // there should be at least two self-refs to do a replacement (.b > .b)
10477 string.slice(0, offset).indexOf(_selector) !== -1 &&
10478 // no consecutive self refs (.b.b); that is a precedence boost and treated differently
10479 string.slice(offset - _selector.length, offset) !== _selector) {
10480 return '.' + _componentId;
10481 }
10482
10483 return match;
10484 };
10485
10486 /**
10487 * When writing a style like
10488 *
10489 * & + & {
10490 * color: red;
10491 * }
10492 *
10493 * The second ampersand should be a reference to the static component class. stylis
10494 * has no knowledge of static class so we have to intelligently replace the base selector.
10495 */
10496 var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) {
10497 if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) {
10498 // eslint-disable-next-line no-param-reassign
10499 selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer);
10500 }
10501 };
10502
10503 stylis.use([selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin]);
10504 stylisSplitter.use([parseRulesPlugin, returnRulesPlugin]);
10505
10506 var splitByRules = function splitByRules(css) {
10507 return stylisSplitter('', css);
10508 };
10509
10510 function stringifyRules(rules, selector, prefix) {
10511 var componentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '&';
10512
10513 var flatCSS = rules.join('').replace(COMMENT_REGEX, ''); // replace JS comments
10514
10515 var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;
10516
10517 // stylis has no concept of state to be passed to plugins
10518 // but since JS is single=threaded, we can rely on that to ensure
10519 // these properties stay in sync with the current stylis run
10520 _componentId = componentId;
10521 _selector = selector;
10522 _selectorRegexp = new RegExp('\\' + _selector + '\\b', 'g');
10523
10524 return stylis(prefix || !selector ? '' : selector, cssStr);
10525 }
10526
10527 //
10528 /* eslint-disable camelcase, no-undef */
10529
10530 var getNonce = (function () {
10531 return true ? __webpack_require__.nc : 0;
10532 });
10533
10534 //
10535 /* These are helpers for the StyleTags to keep track of the injected
10536 * rule names for each (component) ID that they're keeping track of.
10537 * They're crucial for detecting whether a name has already been
10538 * injected.
10539 * (This excludes rehydrated names) */
10540
10541 /* adds a new ID:name pairing to a names dictionary */
10542 var addNameForId = function addNameForId(names, id, name) {
10543 if (name) {
10544 // eslint-disable-next-line no-param-reassign
10545 var namesForId = names[id] || (names[id] = Object.create(null));
10546 namesForId[name] = true;
10547 }
10548 };
10549
10550 /* resets an ID entirely by overwriting it in the dictionary */
10551 var resetIdNames = function resetIdNames(names, id) {
10552 // eslint-disable-next-line no-param-reassign
10553 names[id] = Object.create(null);
10554 };
10555
10556 /* factory for a names dictionary checking the existance of an ID:name pairing */
10557 var hasNameForId = function hasNameForId(names) {
10558 return function (id, name) {
10559 return names[id] !== undefined && names[id][name];
10560 };
10561 };
10562
10563 /* stringifies names for the html/element output */
10564 var stringifyNames = function stringifyNames(names) {
10565 var str = '';
10566 // eslint-disable-next-line guard-for-in
10567 for (var id in names) {
10568 str += Object.keys(names[id]).join(' ') + ' ';
10569 }
10570 return str.trim();
10571 };
10572
10573 /* clones the nested names dictionary */
10574 var cloneNames = function cloneNames(names) {
10575 var clone = Object.create(null);
10576 // eslint-disable-next-line guard-for-in
10577 for (var id in names) {
10578 clone[id] = _extends({}, names[id]);
10579 }
10580 return clone;
10581 };
10582
10583 //
10584
10585 /* These are helpers that deal with the insertRule (aka speedy) API
10586 * They are used in the StyleTags and specifically the speedy tag
10587 */
10588
10589 /* retrieve a sheet for a given style tag */
10590 var sheetForTag = function sheetForTag(tag) {
10591 // $FlowFixMe
10592 if (tag.sheet) return tag.sheet;
10593
10594 /* Firefox quirk requires us to step through all stylesheets to find one owned by the given tag */
10595 var size = tag.ownerDocument.styleSheets.length;
10596 for (var i = 0; i < size; i += 1) {
10597 var sheet = tag.ownerDocument.styleSheets[i];
10598 // $FlowFixMe
10599 if (sheet.ownerNode === tag) return sheet;
10600 }
10601
10602 /* we should always be able to find a tag */
10603 throw new StyledComponentsError(10);
10604 };
10605
10606 /* insert a rule safely and return whether it was actually injected */
10607 var safeInsertRule = function safeInsertRule(sheet, cssRule, index) {
10608 /* abort early if cssRule string is falsy */
10609 if (!cssRule) return false;
10610
10611 var maxIndex = sheet.cssRules.length;
10612
10613 try {
10614 /* use insertRule and cap passed index with maxIndex (no of cssRules) */
10615 sheet.insertRule(cssRule, index <= maxIndex ? index : maxIndex);
10616 } catch (err) {
10617 /* any error indicates an invalid rule */
10618 return false;
10619 }
10620
10621 return true;
10622 };
10623
10624 /* deletes `size` rules starting from `removalIndex` */
10625 var deleteRules = function deleteRules(sheet, removalIndex, size) {
10626 var lowerBound = removalIndex - size;
10627 for (var i = removalIndex; i > lowerBound; i -= 1) {
10628 sheet.deleteRule(i);
10629 }
10630 };
10631
10632 //
10633
10634 /* this marker separates component styles and is important for rehydration */
10635 var makeTextMarker = function makeTextMarker(id) {
10636 return '\n/* sc-component-id: ' + id + ' */\n';
10637 };
10638
10639 /* add up all numbers in array up until and including the index */
10640 var addUpUntilIndex = function addUpUntilIndex(sizes, index) {
10641 var totalUpToIndex = 0;
10642 for (var i = 0; i <= index; i += 1) {
10643 totalUpToIndex += sizes[i];
10644 }
10645
10646 return totalUpToIndex;
10647 };
10648
10649 /* create a new style tag after lastEl */
10650 var makeStyleTag = function makeStyleTag(target, tagEl, insertBefore) {
10651 var targetDocument = document;
10652 if (target) targetDocument = target.ownerDocument;else if (tagEl) targetDocument = tagEl.ownerDocument;
10653
10654 var el = targetDocument.createElement('style');
10655 el.setAttribute(SC_ATTR, '');
10656 el.setAttribute(SC_VERSION_ATTR, "4.4.1");
10657
10658 var nonce = getNonce();
10659 if (nonce) {
10660 el.setAttribute('nonce', nonce);
10661 }
10662
10663 /* Work around insertRule quirk in EdgeHTML */
10664 el.appendChild(targetDocument.createTextNode(''));
10665
10666 if (target && !tagEl) {
10667 /* Append to target when no previous element was passed */
10668 target.appendChild(el);
10669 } else {
10670 if (!tagEl || !target || !tagEl.parentNode) {
10671 throw new StyledComponentsError(6);
10672 }
10673
10674 /* Insert new style tag after the previous one */
10675 tagEl.parentNode.insertBefore(el, insertBefore ? tagEl : tagEl.nextSibling);
10676 }
10677
10678 return el;
10679 };
10680
10681 /* takes a css factory function and outputs an html styled tag factory */
10682 var wrapAsHtmlTag = function wrapAsHtmlTag(css, names) {
10683 return function (additionalAttrs) {
10684 var nonce = getNonce();
10685 var attrs = [nonce && 'nonce="' + nonce + '"', SC_ATTR + '="' + stringifyNames(names) + '"', SC_VERSION_ATTR + '="' + "4.4.1" + '"', additionalAttrs];
10686
10687 var htmlAttr = attrs.filter(Boolean).join(' ');
10688 return '<style ' + htmlAttr + '>' + css() + '</style>';
10689 };
10690 };
10691
10692 /* takes a css factory function and outputs an element factory */
10693 var wrapAsElement = function wrapAsElement(css, names) {
10694 return function () {
10695 var _props;
10696
10697 var props = (_props = {}, _props[SC_ATTR] = stringifyNames(names), _props[SC_VERSION_ATTR] = "4.4.1", _props);
10698
10699 var nonce = getNonce();
10700 if (nonce) {
10701 // $FlowFixMe
10702 props.nonce = nonce;
10703 }
10704
10705 // eslint-disable-next-line react/no-danger
10706 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement('style', _extends({}, props, { dangerouslySetInnerHTML: { __html: css() } }));
10707 };
10708 };
10709
10710 var getIdsFromMarkersFactory = function getIdsFromMarkersFactory(markers) {
10711 return function () {
10712 return Object.keys(markers);
10713 };
10714 };
10715
10716 /* speedy tags utilise insertRule */
10717 var makeSpeedyTag = function makeSpeedyTag(el, getImportRuleTag) {
10718 var names = Object.create(null);
10719 var markers = Object.create(null);
10720 var sizes = [];
10721
10722 var extractImport = getImportRuleTag !== undefined;
10723 /* indicates whether getImportRuleTag was called */
10724 var usedImportRuleTag = false;
10725
10726 var insertMarker = function insertMarker(id) {
10727 var prev = markers[id];
10728 if (prev !== undefined) {
10729 return prev;
10730 }
10731
10732 markers[id] = sizes.length;
10733 sizes.push(0);
10734 resetIdNames(names, id);
10735
10736 return markers[id];
10737 };
10738
10739 var insertRules = function insertRules(id, cssRules, name) {
10740 var marker = insertMarker(id);
10741 var sheet = sheetForTag(el);
10742 var insertIndex = addUpUntilIndex(sizes, marker);
10743
10744 var injectedRules = 0;
10745 var importRules = [];
10746 var cssRulesSize = cssRules.length;
10747
10748 for (var i = 0; i < cssRulesSize; i += 1) {
10749 var cssRule = cssRules[i];
10750 var mayHaveImport = extractImport; /* @import rules are reordered to appear first */
10751 if (mayHaveImport && cssRule.indexOf('@import') !== -1) {
10752 importRules.push(cssRule);
10753 } else if (safeInsertRule(sheet, cssRule, insertIndex + injectedRules)) {
10754 mayHaveImport = false;
10755 injectedRules += 1;
10756 }
10757 }
10758
10759 if (extractImport && importRules.length > 0) {
10760 usedImportRuleTag = true;
10761 // $FlowFixMe
10762 getImportRuleTag().insertRules(id + '-import', importRules);
10763 }
10764
10765 sizes[marker] += injectedRules; /* add up no of injected rules */
10766 addNameForId(names, id, name);
10767 };
10768
10769 var removeRules = function removeRules(id) {
10770 var marker = markers[id];
10771 if (marker === undefined) return;
10772 // $FlowFixMe
10773 if (el.isConnected === false) return;
10774
10775 var size = sizes[marker];
10776 var sheet = sheetForTag(el);
10777 var removalIndex = addUpUntilIndex(sizes, marker) - 1;
10778 deleteRules(sheet, removalIndex, size);
10779 sizes[marker] = 0;
10780 resetIdNames(names, id);
10781
10782 if (extractImport && usedImportRuleTag) {
10783 // $FlowFixMe
10784 getImportRuleTag().removeRules(id + '-import');
10785 }
10786 };
10787
10788 var css = function css() {
10789 var _sheetForTag = sheetForTag(el),
10790 cssRules = _sheetForTag.cssRules;
10791
10792 var str = '';
10793
10794 // eslint-disable-next-line guard-for-in
10795 for (var id in markers) {
10796 str += makeTextMarker(id);
10797 var marker = markers[id];
10798 var end = addUpUntilIndex(sizes, marker);
10799 var size = sizes[marker];
10800 for (var i = end - size; i < end; i += 1) {
10801 var rule = cssRules[i];
10802 if (rule !== undefined) {
10803 str += rule.cssText;
10804 }
10805 }
10806 }
10807
10808 return str;
10809 };
10810
10811 return {
10812 clone: function clone() {
10813 throw new StyledComponentsError(5);
10814 },
10815
10816 css: css,
10817 getIds: getIdsFromMarkersFactory(markers),
10818 hasNameForId: hasNameForId(names),
10819 insertMarker: insertMarker,
10820 insertRules: insertRules,
10821 removeRules: removeRules,
10822 sealed: false,
10823 styleTag: el,
10824 toElement: wrapAsElement(css, names),
10825 toHTML: wrapAsHtmlTag(css, names)
10826 };
10827 };
10828
10829 var makeTextNode = function makeTextNode(targetDocument, id) {
10830 return targetDocument.createTextNode(makeTextMarker(id));
10831 };
10832
10833 var makeBrowserTag = function makeBrowserTag(el, getImportRuleTag) {
10834 var names = Object.create(null);
10835 var markers = Object.create(null);
10836
10837 var extractImport = getImportRuleTag !== undefined;
10838
10839 /* indicates whether getImportRuleTag was called */
10840 var usedImportRuleTag = false;
10841
10842 var insertMarker = function insertMarker(id) {
10843 var prev = markers[id];
10844 if (prev !== undefined) {
10845 return prev;
10846 }
10847
10848 markers[id] = makeTextNode(el.ownerDocument, id);
10849 el.appendChild(markers[id]);
10850 names[id] = Object.create(null);
10851
10852 return markers[id];
10853 };
10854
10855 var insertRules = function insertRules(id, cssRules, name) {
10856 var marker = insertMarker(id);
10857 var importRules = [];
10858 var cssRulesSize = cssRules.length;
10859
10860 for (var i = 0; i < cssRulesSize; i += 1) {
10861 var rule = cssRules[i];
10862 var mayHaveImport = extractImport;
10863 if (mayHaveImport && rule.indexOf('@import') !== -1) {
10864 importRules.push(rule);
10865 } else {
10866 mayHaveImport = false;
10867 var separator = i === cssRulesSize - 1 ? '' : ' ';
10868 marker.appendData('' + rule + separator);
10869 }
10870 }
10871
10872 addNameForId(names, id, name);
10873
10874 if (extractImport && importRules.length > 0) {
10875 usedImportRuleTag = true;
10876 // $FlowFixMe
10877 getImportRuleTag().insertRules(id + '-import', importRules);
10878 }
10879 };
10880
10881 var removeRules = function removeRules(id) {
10882 var marker = markers[id];
10883 if (marker === undefined) return;
10884
10885 /* create new empty text node and replace the current one */
10886 var newMarker = makeTextNode(el.ownerDocument, id);
10887 el.replaceChild(newMarker, marker);
10888 markers[id] = newMarker;
10889 resetIdNames(names, id);
10890
10891 if (extractImport && usedImportRuleTag) {
10892 // $FlowFixMe
10893 getImportRuleTag().removeRules(id + '-import');
10894 }
10895 };
10896
10897 var css = function css() {
10898 var str = '';
10899
10900 // eslint-disable-next-line guard-for-in
10901 for (var id in markers) {
10902 str += markers[id].data;
10903 }
10904
10905 return str;
10906 };
10907
10908 return {
10909 clone: function clone() {
10910 throw new StyledComponentsError(5);
10911 },
10912
10913 css: css,
10914 getIds: getIdsFromMarkersFactory(markers),
10915 hasNameForId: hasNameForId(names),
10916 insertMarker: insertMarker,
10917 insertRules: insertRules,
10918 removeRules: removeRules,
10919 sealed: false,
10920 styleTag: el,
10921 toElement: wrapAsElement(css, names),
10922 toHTML: wrapAsHtmlTag(css, names)
10923 };
10924 };
10925
10926 var makeServerTag = function makeServerTag(namesArg, markersArg) {
10927 var names = namesArg === undefined ? Object.create(null) : namesArg;
10928 var markers = markersArg === undefined ? Object.create(null) : markersArg;
10929
10930 var insertMarker = function insertMarker(id) {
10931 var prev = markers[id];
10932 if (prev !== undefined) {
10933 return prev;
10934 }
10935
10936 return markers[id] = [''];
10937 };
10938
10939 var insertRules = function insertRules(id, cssRules, name) {
10940 var marker = insertMarker(id);
10941 marker[0] += cssRules.join(' ');
10942 addNameForId(names, id, name);
10943 };
10944
10945 var removeRules = function removeRules(id) {
10946 var marker = markers[id];
10947 if (marker === undefined) return;
10948 marker[0] = '';
10949 resetIdNames(names, id);
10950 };
10951
10952 var css = function css() {
10953 var str = '';
10954 // eslint-disable-next-line guard-for-in
10955 for (var id in markers) {
10956 var cssForId = markers[id][0];
10957 if (cssForId) {
10958 str += makeTextMarker(id) + cssForId;
10959 }
10960 }
10961 return str;
10962 };
10963
10964 var clone = function clone() {
10965 var namesClone = cloneNames(names);
10966 var markersClone = Object.create(null);
10967
10968 // eslint-disable-next-line guard-for-in
10969 for (var id in markers) {
10970 markersClone[id] = [markers[id][0]];
10971 }
10972
10973 return makeServerTag(namesClone, markersClone);
10974 };
10975
10976 var tag = {
10977 clone: clone,
10978 css: css,
10979 getIds: getIdsFromMarkersFactory(markers),
10980 hasNameForId: hasNameForId(names),
10981 insertMarker: insertMarker,
10982 insertRules: insertRules,
10983 removeRules: removeRules,
10984 sealed: false,
10985 styleTag: null,
10986 toElement: wrapAsElement(css, names),
10987 toHTML: wrapAsHtmlTag(css, names)
10988 };
10989
10990 return tag;
10991 };
10992
10993 var makeTag = function makeTag(target, tagEl, forceServer, insertBefore, getImportRuleTag) {
10994 if (IS_BROWSER && !forceServer) {
10995 var el = makeStyleTag(target, tagEl, insertBefore);
10996
10997 if (DISABLE_SPEEDY) {
10998 return makeBrowserTag(el, getImportRuleTag);
10999 } else {
11000 return makeSpeedyTag(el, getImportRuleTag);
11001 }
11002 }
11003
11004 return makeServerTag();
11005 };
11006
11007 var rehydrate = function rehydrate(tag, els, extracted) {
11008 /* add all extracted components to the new tag */
11009 for (var i = 0, len = extracted.length; i < len; i += 1) {
11010 var _extracted$i = extracted[i],
11011 componentId = _extracted$i.componentId,
11012 cssFromDOM = _extracted$i.cssFromDOM;
11013
11014 var cssRules = splitByRules(cssFromDOM);
11015 tag.insertRules(componentId, cssRules);
11016 }
11017
11018 /* remove old HTMLStyleElements, since they have been rehydrated */
11019 for (var _i = 0, _len = els.length; _i < _len; _i += 1) {
11020 var el = els[_i];
11021 if (el.parentNode) {
11022 el.parentNode.removeChild(el);
11023 }
11024 }
11025 };
11026
11027 //
11028
11029 var SPLIT_REGEX = /\s+/;
11030
11031 /* determine the maximum number of components before tags are sharded */
11032 var MAX_SIZE = void 0;
11033 if (IS_BROWSER) {
11034 /* in speedy mode we can keep a lot more rules in a sheet before a slowdown can be expected */
11035 MAX_SIZE = DISABLE_SPEEDY ? 40 : 1000;
11036 } else {
11037 /* for servers we do not need to shard at all */
11038 MAX_SIZE = -1;
11039 }
11040
11041 var sheetRunningId = 0;
11042 var master = void 0;
11043
11044 var StyleSheet = function () {
11045
11046 /* a map from ids to tags */
11047
11048 /* deferred rules for a given id */
11049
11050 /* this is used for not reinjecting rules via hasNameForId() */
11051
11052 /* when rules for an id are removed using remove() we have to ignore rehydratedNames for it */
11053
11054 /* a list of tags belonging to this StyleSheet */
11055
11056 /* a tag for import rules */
11057
11058 /* current capacity until a new tag must be created */
11059
11060 /* children (aka clones) of this StyleSheet inheriting all and future injections */
11061
11062 function StyleSheet() {
11063 var _this = this;
11064
11065 var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : IS_BROWSER ? document.head : null;
11066 var forceServer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11067 classCallCheck(this, StyleSheet);
11068
11069 this.getImportRuleTag = function () {
11070 var importRuleTag = _this.importRuleTag;
11071
11072 if (importRuleTag !== undefined) {
11073 return importRuleTag;
11074 }
11075
11076 var firstTag = _this.tags[0];
11077 var insertBefore = true;
11078
11079 return _this.importRuleTag = makeTag(_this.target, firstTag ? firstTag.styleTag : null, _this.forceServer, insertBefore);
11080 };
11081
11082 sheetRunningId += 1;
11083 this.id = sheetRunningId;
11084 this.forceServer = forceServer;
11085 this.target = forceServer ? null : target;
11086 this.tagMap = {};
11087 this.deferred = {};
11088 this.rehydratedNames = {};
11089 this.ignoreRehydratedNames = {};
11090 this.tags = [];
11091 this.capacity = 1;
11092 this.clones = [];
11093 }
11094
11095 /* rehydrate all SSR'd style tags */
11096
11097
11098 StyleSheet.prototype.rehydrate = function rehydrate$$1() {
11099 if (!IS_BROWSER || this.forceServer) return this;
11100
11101 var els = [];
11102 var extracted = [];
11103 var isStreamed = false;
11104
11105 /* retrieve all of our SSR style elements from the DOM */
11106 var nodes = document.querySelectorAll('style[' + SC_ATTR + '][' + SC_VERSION_ATTR + '="' + "4.4.1" + '"]');
11107
11108 var nodesSize = nodes.length;
11109
11110 /* abort rehydration if no previous style tags were found */
11111 if (!nodesSize) return this;
11112
11113 for (var i = 0; i < nodesSize; i += 1) {
11114 var el = nodes[i];
11115
11116 /* check if style tag is a streamed tag */
11117 if (!isStreamed) isStreamed = !!el.getAttribute(SC_STREAM_ATTR);
11118
11119 /* retrieve all component names */
11120 var elNames = (el.getAttribute(SC_ATTR) || '').trim().split(SPLIT_REGEX);
11121 var elNamesSize = elNames.length;
11122 for (var j = 0, name; j < elNamesSize; j += 1) {
11123 name = elNames[j];
11124 /* add rehydrated name to sheet to avoid re-adding styles */
11125 this.rehydratedNames[name] = true;
11126 }
11127
11128 /* extract all components and their CSS */
11129 extracted.push.apply(extracted, extractComps(el.textContent));
11130
11131 /* store original HTMLStyleElement */
11132 els.push(el);
11133 }
11134
11135 /* abort rehydration if nothing was extracted */
11136 var extractedSize = extracted.length;
11137 if (!extractedSize) return this;
11138
11139 /* create a tag to be used for rehydration */
11140 var tag = this.makeTag(null);
11141
11142 rehydrate(tag, els, extracted);
11143
11144 /* reset capacity and adjust MAX_SIZE by the initial size of the rehydration */
11145 this.capacity = Math.max(1, MAX_SIZE - extractedSize);
11146 this.tags.push(tag);
11147
11148 /* retrieve all component ids */
11149 for (var _j = 0; _j < extractedSize; _j += 1) {
11150 this.tagMap[extracted[_j].componentId] = tag;
11151 }
11152
11153 return this;
11154 };
11155
11156 /* retrieve a "master" instance of StyleSheet which is typically used when no other is available
11157 * The master StyleSheet is targeted by createGlobalStyle, keyframes, and components outside of any
11158 * StyleSheetManager's context */
11159
11160
11161 /* reset the internal "master" instance */
11162 StyleSheet.reset = function reset() {
11163 var forceServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
11164
11165 master = new StyleSheet(undefined, forceServer).rehydrate();
11166 };
11167
11168 /* adds "children" to the StyleSheet that inherit all of the parents' rules
11169 * while their own rules do not affect the parent */
11170
11171
11172 StyleSheet.prototype.clone = function clone() {
11173 var sheet = new StyleSheet(this.target, this.forceServer);
11174
11175 /* add to clone array */
11176 this.clones.push(sheet);
11177
11178 /* clone all tags */
11179 sheet.tags = this.tags.map(function (tag) {
11180 var ids = tag.getIds();
11181 var newTag = tag.clone();
11182
11183 /* reconstruct tagMap */
11184 for (var i = 0; i < ids.length; i += 1) {
11185 sheet.tagMap[ids[i]] = newTag;
11186 }
11187
11188 return newTag;
11189 });
11190
11191 /* clone other maps */
11192 sheet.rehydratedNames = _extends({}, this.rehydratedNames);
11193 sheet.deferred = _extends({}, this.deferred);
11194
11195 return sheet;
11196 };
11197
11198 /* force StyleSheet to create a new tag on the next injection */
11199
11200
11201 StyleSheet.prototype.sealAllTags = function sealAllTags() {
11202 this.capacity = 1;
11203
11204 this.tags.forEach(function (tag) {
11205 // eslint-disable-next-line no-param-reassign
11206 tag.sealed = true;
11207 });
11208 };
11209
11210 StyleSheet.prototype.makeTag = function makeTag$$1(tag) {
11211 var lastEl = tag ? tag.styleTag : null;
11212 var insertBefore = false;
11213
11214 return makeTag(this.target, lastEl, this.forceServer, insertBefore, this.getImportRuleTag);
11215 };
11216
11217 /* get a tag for a given componentId, assign the componentId to one, or shard */
11218 StyleSheet.prototype.getTagForId = function getTagForId(id) {
11219 /* simply return a tag, when the componentId was already assigned one */
11220 var prev = this.tagMap[id];
11221 if (prev !== undefined && !prev.sealed) {
11222 return prev;
11223 }
11224
11225 var tag = this.tags[this.tags.length - 1];
11226
11227 /* shard (create a new tag) if the tag is exhausted (See MAX_SIZE) */
11228 this.capacity -= 1;
11229
11230 if (this.capacity === 0) {
11231 this.capacity = MAX_SIZE;
11232 tag = this.makeTag(tag);
11233 this.tags.push(tag);
11234 }
11235
11236 return this.tagMap[id] = tag;
11237 };
11238
11239 /* mainly for createGlobalStyle to check for its id */
11240
11241
11242 StyleSheet.prototype.hasId = function hasId(id) {
11243 return this.tagMap[id] !== undefined;
11244 };
11245
11246 /* caching layer checking id+name to already have a corresponding tag and injected rules */
11247
11248
11249 StyleSheet.prototype.hasNameForId = function hasNameForId(id, name) {
11250 /* exception for rehydrated names which are checked separately */
11251 if (this.ignoreRehydratedNames[id] === undefined && this.rehydratedNames[name]) {
11252 return true;
11253 }
11254
11255 var tag = this.tagMap[id];
11256 return tag !== undefined && tag.hasNameForId(id, name);
11257 };
11258
11259 /* registers a componentId and registers it on its tag */
11260
11261
11262 StyleSheet.prototype.deferredInject = function deferredInject(id, cssRules) {
11263 /* don't inject when the id is already registered */
11264 if (this.tagMap[id] !== undefined) return;
11265
11266 var clones = this.clones;
11267
11268 for (var i = 0; i < clones.length; i += 1) {
11269 clones[i].deferredInject(id, cssRules);
11270 }
11271
11272 this.getTagForId(id).insertMarker(id);
11273 this.deferred[id] = cssRules;
11274 };
11275
11276 /* injects rules for a given id with a name that will need to be cached */
11277
11278
11279 StyleSheet.prototype.inject = function inject(id, cssRules, name) {
11280 var clones = this.clones;
11281
11282
11283 for (var i = 0; i < clones.length; i += 1) {
11284 clones[i].inject(id, cssRules, name);
11285 }
11286
11287 var tag = this.getTagForId(id);
11288
11289 /* add deferred rules for component */
11290 if (this.deferred[id] !== undefined) {
11291 // Combine passed cssRules with previously deferred CSS rules
11292 // NOTE: We cannot mutate the deferred array itself as all clones
11293 // do the same (see clones[i].inject)
11294 var rules = this.deferred[id].concat(cssRules);
11295 tag.insertRules(id, rules, name);
11296
11297 this.deferred[id] = undefined;
11298 } else {
11299 tag.insertRules(id, cssRules, name);
11300 }
11301 };
11302
11303 /* removes all rules for a given id, which doesn't remove its marker but resets it */
11304
11305
11306 StyleSheet.prototype.remove = function remove(id) {
11307 var tag = this.tagMap[id];
11308 if (tag === undefined) return;
11309
11310 var clones = this.clones;
11311
11312 for (var i = 0; i < clones.length; i += 1) {
11313 clones[i].remove(id);
11314 }
11315
11316 /* remove all rules from the tag */
11317 tag.removeRules(id);
11318
11319 /* ignore possible rehydrated names */
11320 this.ignoreRehydratedNames[id] = true;
11321
11322 /* delete possible deferred rules */
11323 this.deferred[id] = undefined;
11324 };
11325
11326 StyleSheet.prototype.toHTML = function toHTML() {
11327 return this.tags.map(function (tag) {
11328 return tag.toHTML();
11329 }).join('');
11330 };
11331
11332 StyleSheet.prototype.toReactElements = function toReactElements() {
11333 var id = this.id;
11334
11335
11336 return this.tags.map(function (tag, i) {
11337 var key = 'sc-' + id + '-' + i;
11338 return (0,react__WEBPACK_IMPORTED_MODULE_2__.cloneElement)(tag.toElement(), { key: key });
11339 });
11340 };
11341
11342 createClass(StyleSheet, null, [{
11343 key: 'master',
11344 get: function get$$1() {
11345 return master || (master = new StyleSheet().rehydrate());
11346 }
11347
11348 /* NOTE: This is just for backwards-compatibility with jest-styled-components */
11349
11350 }, {
11351 key: 'instance',
11352 get: function get$$1() {
11353 return StyleSheet.master;
11354 }
11355 }]);
11356 return StyleSheet;
11357 }();
11358
11359 //
11360
11361 var Keyframes = function () {
11362 function Keyframes(name, rules) {
11363 var _this = this;
11364
11365 classCallCheck(this, Keyframes);
11366
11367 this.inject = function (styleSheet) {
11368 if (!styleSheet.hasNameForId(_this.id, _this.name)) {
11369 styleSheet.inject(_this.id, _this.rules, _this.name);
11370 }
11371 };
11372
11373 this.toString = function () {
11374 throw new StyledComponentsError(12, String(_this.name));
11375 };
11376
11377 this.name = name;
11378 this.rules = rules;
11379
11380 this.id = 'sc-keyframes-' + name;
11381 }
11382
11383 Keyframes.prototype.getName = function getName() {
11384 return this.name;
11385 };
11386
11387 return Keyframes;
11388 }();
11389
11390 //
11391
11392 /**
11393 * inlined version of
11394 * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
11395 */
11396
11397 var uppercasePattern = /([A-Z])/g;
11398 var msPattern = /^ms-/;
11399
11400 /**
11401 * Hyphenates a camelcased CSS property name, for example:
11402 *
11403 * > hyphenateStyleName('backgroundColor')
11404 * < "background-color"
11405 * > hyphenateStyleName('MozTransition')
11406 * < "-moz-transition"
11407 * > hyphenateStyleName('msTransition')
11408 * < "-ms-transition"
11409 *
11410 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
11411 * is converted to `-ms-`.
11412 *
11413 * @param {string} string
11414 * @return {string}
11415 */
11416 function hyphenateStyleName(string) {
11417 return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
11418 }
11419
11420 //
11421
11422 // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
11423 function addUnitIfNeeded(name, value) {
11424 // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133
11425 // $FlowFixMe
11426 if (value == null || typeof value === 'boolean' || value === '') {
11427 return '';
11428 }
11429
11430 if (typeof value === 'number' && value !== 0 && !(name in _emotion_unitless__WEBPACK_IMPORTED_MODULE_3__["default"])) {
11431 return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
11432 }
11433
11434 return String(value).trim();
11435 }
11436
11437 //
11438
11439 /**
11440 * It's falsish not falsy because 0 is allowed.
11441 */
11442 var isFalsish = function isFalsish(chunk) {
11443 return chunk === undefined || chunk === null || chunk === false || chunk === '';
11444 };
11445
11446 var objToCssArray = function objToCssArray(obj, prevKey) {
11447 var rules = [];
11448 var keys = Object.keys(obj);
11449
11450 keys.forEach(function (key) {
11451 if (!isFalsish(obj[key])) {
11452 if (isPlainObject(obj[key])) {
11453 rules.push.apply(rules, objToCssArray(obj[key], key));
11454
11455 return rules;
11456 } else if (isFunction(obj[key])) {
11457 rules.push(hyphenateStyleName(key) + ':', obj[key], ';');
11458
11459 return rules;
11460 }
11461 rules.push(hyphenateStyleName(key) + ': ' + addUnitIfNeeded(key, obj[key]) + ';');
11462 }
11463 return rules;
11464 });
11465
11466 return prevKey ? [prevKey + ' {'].concat(rules, ['}']) : rules;
11467 };
11468
11469 function flatten(chunk, executionContext, styleSheet) {
11470 if (Array.isArray(chunk)) {
11471 var ruleSet = [];
11472
11473 for (var i = 0, len = chunk.length, result; i < len; i += 1) {
11474 result = flatten(chunk[i], executionContext, styleSheet);
11475
11476 if (result === null) continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result);
11477 }
11478
11479 return ruleSet;
11480 }
11481
11482 if (isFalsish(chunk)) {
11483 return null;
11484 }
11485
11486 /* Handle other components */
11487 if (isStyledComponent(chunk)) {
11488 return '.' + chunk.styledComponentId;
11489 }
11490
11491 /* Either execute or defer the function */
11492 if (isFunction(chunk)) {
11493 if (isStatelessFunction(chunk) && executionContext) {
11494 var _result = chunk(executionContext);
11495
11496 if ( true && (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isElement)(_result)) {
11497 // eslint-disable-next-line no-console
11498 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.');
11499 }
11500
11501 return flatten(_result, executionContext, styleSheet);
11502 } else return chunk;
11503 }
11504
11505 if (chunk instanceof Keyframes) {
11506 if (styleSheet) {
11507 chunk.inject(styleSheet);
11508 return chunk.getName();
11509 } else return chunk;
11510 }
11511
11512 /* Handle objects */
11513 return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString();
11514 }
11515
11516 //
11517
11518 function css(styles) {
11519 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11520 interpolations[_key - 1] = arguments[_key];
11521 }
11522
11523 if (isFunction(styles) || isPlainObject(styles)) {
11524 // $FlowFixMe
11525 return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations)));
11526 }
11527
11528 // $FlowFixMe
11529 return flatten(interleave(styles, interpolations));
11530 }
11531
11532 //
11533
11534 function constructWithOptions(componentConstructor, tag) {
11535 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11536
11537 if (!(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(tag)) {
11538 throw new StyledComponentsError(1, String(tag));
11539 }
11540
11541 /* This is callable directly as a template function */
11542 // $FlowFixMe: Not typed to avoid destructuring arguments
11543 var templateFunction = function templateFunction() {
11544 return componentConstructor(tag, options, css.apply(undefined, arguments));
11545 };
11546
11547 /* If config methods are called, wrap up a new template function and merge options */
11548 templateFunction.withConfig = function (config) {
11549 return constructWithOptions(componentConstructor, tag, _extends({}, options, config));
11550 };
11551
11552 /* Modify/inject new props at runtime */
11553 templateFunction.attrs = function (attrs) {
11554 return constructWithOptions(componentConstructor, tag, _extends({}, options, {
11555 attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean)
11556 }));
11557 };
11558
11559 return templateFunction;
11560 }
11561
11562 //
11563 // Source: https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
11564 function murmurhash(c) {
11565 for (var e = c.length | 0, a = e | 0, d = 0, b; e >= 4;) {
11566 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;
11567 }
11568 switch (e) {
11569 case 3:
11570 a ^= (c.charCodeAt(d + 2) & 255) << 16;
11571 case 2:
11572 a ^= (c.charCodeAt(d + 1) & 255) << 8;
11573 case 1:
11574 a ^= c.charCodeAt(d) & 255, a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11575 }
11576 a ^= a >>> 13;
11577 a = 1540483477 * (a & 65535) + ((1540483477 * (a >>> 16) & 65535) << 16);
11578 return (a ^ a >>> 15) >>> 0;
11579 }
11580
11581 //
11582 /* eslint-disable no-bitwise */
11583
11584 /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
11585 * counterparts */
11586 var charsLength = 52;
11587
11588 /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
11589 var getAlphabeticChar = function getAlphabeticChar(code) {
11590 return String.fromCharCode(code + (code > 25 ? 39 : 97));
11591 };
11592
11593 /* input a number, usually a hash and convert it to base-52 */
11594 function generateAlphabeticName(code) {
11595 var name = '';
11596 var x = void 0;
11597
11598 /* get a char and divide by alphabet-length */
11599 for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {
11600 name = getAlphabeticChar(x % charsLength) + name;
11601 }
11602
11603 return getAlphabeticChar(x % charsLength) + name;
11604 }
11605
11606 //
11607
11608 function hasFunctionObjectKey(obj) {
11609 // eslint-disable-next-line guard-for-in, no-restricted-syntax
11610 for (var key in obj) {
11611 if (isFunction(obj[key])) {
11612 return true;
11613 }
11614 }
11615
11616 return false;
11617 }
11618
11619 function isStaticRules(rules, attrs) {
11620 for (var i = 0; i < rules.length; i += 1) {
11621 var rule = rules[i];
11622
11623 // recursive case
11624 if (Array.isArray(rule) && !isStaticRules(rule, attrs)) {
11625 return false;
11626 } else if (isFunction(rule) && !isStyledComponent(rule)) {
11627 // functions are allowed to be static if they're just being
11628 // used to get the classname of a nested styled component
11629 return false;
11630 }
11631 }
11632
11633 if (attrs.some(function (x) {
11634 return isFunction(x) || hasFunctionObjectKey(x);
11635 })) return false;
11636
11637 return true;
11638 }
11639
11640 //
11641
11642 /* combines hashStr (murmurhash) and nameGenerator for convenience */
11643 var hasher = function hasher(str) {
11644 return generateAlphabeticName(murmurhash(str));
11645 };
11646
11647 /*
11648 ComponentStyle is all the CSS-specific stuff, not
11649 the React-specific stuff.
11650 */
11651
11652 var ComponentStyle = function () {
11653 function ComponentStyle(rules, attrs, componentId) {
11654 classCallCheck(this, ComponentStyle);
11655
11656 this.rules = rules;
11657 this.isStatic = false && 0;
11658 this.componentId = componentId;
11659
11660 if (!StyleSheet.master.hasId(componentId)) {
11661 StyleSheet.master.deferredInject(componentId, []);
11662 }
11663 }
11664
11665 /*
11666 * Flattens a rule set into valid CSS
11667 * Hashes it, wraps the whole chunk in a .hash1234 {}
11668 * Returns the hash to be injected on render()
11669 * */
11670
11671
11672 ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {
11673 var isStatic = this.isStatic,
11674 componentId = this.componentId,
11675 lastClassName = this.lastClassName;
11676
11677 if (IS_BROWSER && isStatic && typeof lastClassName === 'string' && styleSheet.hasNameForId(componentId, lastClassName)) {
11678 return lastClassName;
11679 }
11680
11681 var flatCSS = flatten(this.rules, executionContext, styleSheet);
11682 var name = hasher(this.componentId + flatCSS.join(''));
11683 if (!styleSheet.hasNameForId(componentId, name)) {
11684 styleSheet.inject(this.componentId, stringifyRules(flatCSS, '.' + name, undefined, componentId), name);
11685 }
11686
11687 this.lastClassName = name;
11688 return name;
11689 };
11690
11691 ComponentStyle.generateName = function generateName(str) {
11692 return hasher(str);
11693 };
11694
11695 return ComponentStyle;
11696 }();
11697
11698 //
11699
11700 var LIMIT = 200;
11701
11702 var createWarnTooManyClasses = (function (displayName) {
11703 var generatedClasses = {};
11704 var warningSeen = false;
11705
11706 return function (className) {
11707 if (!warningSeen) {
11708 generatedClasses[className] = true;
11709 if (Object.keys(generatedClasses).length >= LIMIT) {
11710 // Unable to find latestRule in test environment.
11711 /* eslint-disable no-console, prefer-template */
11712 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 />');
11713 warningSeen = true;
11714 generatedClasses = {};
11715 }
11716 }
11717 };
11718 });
11719
11720 //
11721
11722 var determineTheme = (function (props, fallbackTheme) {
11723 var defaultProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EMPTY_OBJECT;
11724
11725 // Props should take precedence over ThemeProvider, which should take precedence over
11726 // defaultProps, but React automatically puts defaultProps on props.
11727
11728 /* eslint-disable react/prop-types, flowtype-errors/show-errors */
11729 var isDefaultTheme = defaultProps ? props.theme === defaultProps.theme : false;
11730 var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme || defaultProps.theme;
11731 /* eslint-enable */
11732
11733 return theme;
11734 });
11735
11736 //
11737 var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g;
11738 var dashesAtEnds = /(^-|-$)/g;
11739
11740 /**
11741 * TODO: Explore using CSS.escape when it becomes more available
11742 * in evergreen browsers.
11743 */
11744 function escape(str) {
11745 return str
11746 // Replace all possible CSS selectors
11747 .replace(escapeRegex, '-')
11748
11749 // Remove extraneous hyphens at the start and end
11750 .replace(dashesAtEnds, '');
11751 }
11752
11753 //
11754
11755 function isTag(target) {
11756 return typeof target === 'string' && ( true ? target.charAt(0) === target.charAt(0).toLowerCase() : 0);
11757 }
11758
11759 //
11760
11761 function generateDisplayName(target) {
11762 // $FlowFixMe
11763 return isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')';
11764 }
11765
11766 var _TYPE_STATICS;
11767
11768 var REACT_STATICS = {
11769 childContextTypes: true,
11770 contextTypes: true,
11771 defaultProps: true,
11772 displayName: true,
11773 getDerivedStateFromProps: true,
11774 propTypes: true,
11775 type: true
11776 };
11777
11778 var KNOWN_STATICS = {
11779 name: true,
11780 length: true,
11781 prototype: true,
11782 caller: true,
11783 callee: true,
11784 arguments: true,
11785 arity: true
11786 };
11787
11788 var TYPE_STATICS = (_TYPE_STATICS = {}, _TYPE_STATICS[react_is__WEBPACK_IMPORTED_MODULE_4__.ForwardRef] = {
11789 $$typeof: true,
11790 render: true
11791 }, _TYPE_STATICS);
11792
11793 var defineProperty$1 = Object.defineProperty,
11794 getOwnPropertyNames = Object.getOwnPropertyNames,
11795 _Object$getOwnPropert = Object.getOwnPropertySymbols,
11796 getOwnPropertySymbols = _Object$getOwnPropert === undefined ? function () {
11797 return [];
11798 } : _Object$getOwnPropert,
11799 getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
11800 getPrototypeOf = Object.getPrototypeOf,
11801 objectPrototype = Object.prototype;
11802 var arrayPrototype = Array.prototype;
11803
11804
11805 function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
11806 if (typeof sourceComponent !== 'string') {
11807 // don't hoist over string (html) components
11808
11809 var inheritedComponent = getPrototypeOf(sourceComponent);
11810
11811 if (inheritedComponent && inheritedComponent !== objectPrototype) {
11812 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
11813 }
11814
11815 var keys = arrayPrototype.concat(getOwnPropertyNames(sourceComponent),
11816 // $FlowFixMe
11817 getOwnPropertySymbols(sourceComponent));
11818
11819 var targetStatics = TYPE_STATICS[targetComponent.$$typeof] || REACT_STATICS;
11820
11821 var sourceStatics = TYPE_STATICS[sourceComponent.$$typeof] || REACT_STATICS;
11822
11823 var i = keys.length;
11824 var descriptor = void 0;
11825 var key = void 0;
11826
11827 // eslint-disable-next-line no-plusplus
11828 while (i--) {
11829 key = keys[i];
11830
11831 if (
11832 // $FlowFixMe
11833 !KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) &&
11834 // $FlowFixMe
11835 !(targetStatics && targetStatics[key])) {
11836 descriptor = getOwnPropertyDescriptor(sourceComponent, key);
11837
11838 if (descriptor) {
11839 try {
11840 // Avoid failures from read-only properties
11841 defineProperty$1(targetComponent, key, descriptor);
11842 } catch (e) {
11843 /* fail silently */
11844 }
11845 }
11846 }
11847 }
11848
11849 return targetComponent;
11850 }
11851
11852 return targetComponent;
11853 }
11854
11855 //
11856 function isDerivedReactComponent(fn) {
11857 return !!(fn && fn.prototype && fn.prototype.isReactComponent);
11858 }
11859
11860 //
11861 // Helper to call a given function, only once
11862 var once = (function (cb) {
11863 var called = false;
11864
11865 return function () {
11866 if (!called) {
11867 called = true;
11868 cb.apply(undefined, arguments);
11869 }
11870 };
11871 });
11872
11873 //
11874
11875 var ThemeContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
11876
11877 var ThemeConsumer = ThemeContext.Consumer;
11878
11879 /**
11880 * Provide a theme to an entire react component tree via context
11881 */
11882
11883 var ThemeProvider = function (_Component) {
11884 inherits(ThemeProvider, _Component);
11885
11886 function ThemeProvider(props) {
11887 classCallCheck(this, ThemeProvider);
11888
11889 var _this = possibleConstructorReturn(this, _Component.call(this, props));
11890
11891 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext.bind(_this));
11892 _this.renderInner = _this.renderInner.bind(_this);
11893 return _this;
11894 }
11895
11896 ThemeProvider.prototype.render = function render() {
11897 if (!this.props.children) return null;
11898
11899 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11900 ThemeContext.Consumer,
11901 null,
11902 this.renderInner
11903 );
11904 };
11905
11906 ThemeProvider.prototype.renderInner = function renderInner(outerTheme) {
11907 var context = this.getContext(this.props.theme, outerTheme);
11908
11909 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11910 ThemeContext.Provider,
11911 { value: context },
11912 this.props.children
11913 );
11914 };
11915
11916 /**
11917 * Get the theme from the props, supporting both (outerTheme) => {}
11918 * as well as object notation
11919 */
11920
11921
11922 ThemeProvider.prototype.getTheme = function getTheme(theme, outerTheme) {
11923 if (isFunction(theme)) {
11924 var mergedTheme = theme(outerTheme);
11925
11926 if ( true && (mergedTheme === null || Array.isArray(mergedTheme) || (typeof mergedTheme === 'undefined' ? 'undefined' : _typeof(mergedTheme)) !== 'object')) {
11927 throw new StyledComponentsError(7);
11928 }
11929
11930 return mergedTheme;
11931 }
11932
11933 if (theme === null || Array.isArray(theme) || (typeof theme === 'undefined' ? 'undefined' : _typeof(theme)) !== 'object') {
11934 throw new StyledComponentsError(8);
11935 }
11936
11937 return _extends({}, outerTheme, theme);
11938 };
11939
11940 ThemeProvider.prototype.getContext = function getContext(theme, outerTheme) {
11941 return this.getTheme(theme, outerTheme);
11942 };
11943
11944 return ThemeProvider;
11945 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
11946
11947 //
11948
11949 var CLOSING_TAG_R = /^\s*<\/[a-z]/i;
11950
11951 var ServerStyleSheet = function () {
11952 function ServerStyleSheet() {
11953 classCallCheck(this, ServerStyleSheet);
11954
11955 /* The master sheet might be reset, so keep a reference here */
11956 this.masterSheet = StyleSheet.master;
11957 this.instance = this.masterSheet.clone();
11958 this.sealed = false;
11959 }
11960
11961 /**
11962 * Mark the ServerStyleSheet as being fully emitted and manually GC it from the
11963 * StyleSheet singleton.
11964 */
11965
11966
11967 ServerStyleSheet.prototype.seal = function seal() {
11968 if (!this.sealed) {
11969 /* Remove sealed StyleSheets from the master sheet */
11970 var index = this.masterSheet.clones.indexOf(this.instance);
11971 this.masterSheet.clones.splice(index, 1);
11972 this.sealed = true;
11973 }
11974 };
11975
11976 ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {
11977 if (this.sealed) {
11978 throw new StyledComponentsError(2);
11979 }
11980
11981 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
11982 StyleSheetManager,
11983 { sheet: this.instance },
11984 children
11985 );
11986 };
11987
11988 ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {
11989 this.seal();
11990 return this.instance.toHTML();
11991 };
11992
11993 ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {
11994 this.seal();
11995 return this.instance.toReactElements();
11996 };
11997
11998 ServerStyleSheet.prototype.interleaveWithNodeStream = function interleaveWithNodeStream(readableStream) {
11999 var _this = this;
12000
12001 {
12002 throw new StyledComponentsError(3);
12003 }
12004
12005 /* the tag index keeps track of which tags have already been emitted */
12006 var instance = this.instance;
12007
12008 var instanceTagIndex = 0;
12009
12010 var streamAttr = SC_STREAM_ATTR + '="true"';
12011
12012 var transformer = new stream.Transform({
12013 transform: function appendStyleChunks(chunk, /* encoding */_, callback) {
12014 var tags = instance.tags;
12015
12016 var html = '';
12017
12018 /* retrieve html for each new style tag */
12019 for (; instanceTagIndex < tags.length; instanceTagIndex += 1) {
12020 var tag = tags[instanceTagIndex];
12021 html += tag.toHTML(streamAttr);
12022 }
12023
12024 /* force our StyleSheets to emit entirely new tags */
12025 instance.sealAllTags();
12026
12027 var renderedHtml = chunk.toString();
12028
12029 /* prepend style html to chunk, unless the start of the chunk is a closing tag in which case append right after that */
12030 if (CLOSING_TAG_R.test(renderedHtml)) {
12031 var endOfClosingTag = renderedHtml.indexOf('>');
12032
12033 this.push(renderedHtml.slice(0, endOfClosingTag + 1) + html + renderedHtml.slice(endOfClosingTag + 1));
12034 } else this.push(html + renderedHtml);
12035
12036 callback();
12037 }
12038 });
12039
12040 readableStream.on('end', function () {
12041 return _this.seal();
12042 });
12043
12044 readableStream.on('error', function (err) {
12045 _this.seal();
12046
12047 // forward the error to the transform stream
12048 transformer.emit('error', err);
12049 });
12050
12051 return readableStream.pipe(transformer);
12052 };
12053
12054 return ServerStyleSheet;
12055 }();
12056
12057 //
12058
12059 var StyleSheetContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)();
12060 var StyleSheetConsumer = StyleSheetContext.Consumer;
12061
12062 var StyleSheetManager = function (_Component) {
12063 inherits(StyleSheetManager, _Component);
12064
12065 function StyleSheetManager(props) {
12066 classCallCheck(this, StyleSheetManager);
12067
12068 var _this = possibleConstructorReturn(this, _Component.call(this, props));
12069
12070 _this.getContext = (0,memoize_one__WEBPACK_IMPORTED_MODULE_7__["default"])(_this.getContext);
12071 return _this;
12072 }
12073
12074 StyleSheetManager.prototype.getContext = function getContext(sheet, target) {
12075 if (sheet) {
12076 return sheet;
12077 } else if (target) {
12078 return new StyleSheet(target);
12079 } else {
12080 throw new StyledComponentsError(4);
12081 }
12082 };
12083
12084 StyleSheetManager.prototype.render = function render() {
12085 var _props = this.props,
12086 children = _props.children,
12087 sheet = _props.sheet,
12088 target = _props.target;
12089
12090
12091 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12092 StyleSheetContext.Provider,
12093 { value: this.getContext(sheet, target) },
12094 true ? react__WEBPACK_IMPORTED_MODULE_2___default().Children.only(children) : 0
12095 );
12096 };
12097
12098 return StyleSheetManager;
12099 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12100 true ? StyleSheetManager.propTypes = {
12101 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)]),
12102
12103 target: prop_types__WEBPACK_IMPORTED_MODULE_8___default().shape({
12104 appendChild: (prop_types__WEBPACK_IMPORTED_MODULE_8___default().func.isRequired)
12105 })
12106 } : 0;
12107
12108 //
12109
12110 var identifiers = {};
12111
12112 /* We depend on components having unique IDs */
12113 function generateId(_ComponentStyle, _displayName, parentComponentId) {
12114 var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);
12115
12116 /**
12117 * This ensures uniqueness if two components happen to share
12118 * the same displayName.
12119 */
12120 var nr = (identifiers[displayName] || 0) + 1;
12121 identifiers[displayName] = nr;
12122
12123 var componentId = displayName + '-' + _ComponentStyle.generateName(displayName + nr);
12124
12125 return parentComponentId ? parentComponentId + '-' + componentId : componentId;
12126 }
12127
12128 // $FlowFixMe
12129
12130 var StyledComponent = function (_Component) {
12131 inherits(StyledComponent, _Component);
12132
12133 function StyledComponent() {
12134 classCallCheck(this, StyledComponent);
12135
12136 var _this = possibleConstructorReturn(this, _Component.call(this));
12137
12138 _this.attrs = {};
12139
12140 _this.renderOuter = _this.renderOuter.bind(_this);
12141 _this.renderInner = _this.renderInner.bind(_this);
12142
12143 if (true) {
12144 _this.warnInnerRef = once(function (displayName) {
12145 return (
12146 // eslint-disable-next-line no-console
12147 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 + '".')
12148 );
12149 });
12150
12151 _this.warnAttrsFnObjectKeyDeprecated = once(function (key, displayName) {
12152 return (
12153 // eslint-disable-next-line no-console
12154 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)
12155 );
12156 });
12157
12158 _this.warnNonStyledComponentAttrsObjectKey = once(function (key, displayName) {
12159 return (
12160 // eslint-disable-next-line no-console
12161 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 }'))
12162 );
12163 });
12164 }
12165 return _this;
12166 }
12167
12168 StyledComponent.prototype.render = function render() {
12169 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12170 StyleSheetConsumer,
12171 null,
12172 this.renderOuter
12173 );
12174 };
12175
12176 StyledComponent.prototype.renderOuter = function renderOuter() {
12177 var styleSheet = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : StyleSheet.master;
12178
12179 this.styleSheet = styleSheet;
12180
12181 // No need to subscribe a static component to theme changes, it won't change anything
12182 if (this.props.forwardedComponent.componentStyle.isStatic) return this.renderInner();
12183
12184 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12185 ThemeConsumer,
12186 null,
12187 this.renderInner
12188 );
12189 };
12190
12191 StyledComponent.prototype.renderInner = function renderInner(theme) {
12192 var _props$forwardedCompo = this.props.forwardedComponent,
12193 componentStyle = _props$forwardedCompo.componentStyle,
12194 defaultProps = _props$forwardedCompo.defaultProps,
12195 displayName = _props$forwardedCompo.displayName,
12196 foldedComponentIds = _props$forwardedCompo.foldedComponentIds,
12197 styledComponentId = _props$forwardedCompo.styledComponentId,
12198 target = _props$forwardedCompo.target;
12199
12200
12201 var generatedClassName = void 0;
12202 if (componentStyle.isStatic) {
12203 generatedClassName = this.generateAndInjectStyles(EMPTY_OBJECT, this.props);
12204 } else {
12205 generatedClassName = this.generateAndInjectStyles(determineTheme(this.props, theme, defaultProps) || EMPTY_OBJECT, this.props);
12206 }
12207
12208 var elementToBeCreated = this.props.as || this.attrs.as || target;
12209 var isTargetTag = isTag(elementToBeCreated);
12210
12211 var propsForElement = {};
12212 var computedProps = _extends({}, this.props, this.attrs);
12213
12214 var key = void 0;
12215 // eslint-disable-next-line guard-for-in
12216 for (key in computedProps) {
12217 if ( true && key === 'innerRef' && isTargetTag) {
12218 this.warnInnerRef(displayName);
12219 }
12220
12221 if (key === 'forwardedComponent' || key === 'as') {
12222 continue;
12223 } 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)) {
12224 // Don't pass through non HTML tags through to HTML elements
12225 propsForElement[key] = computedProps[key];
12226 }
12227 }
12228
12229 if (this.props.style && this.attrs.style) {
12230 propsForElement.style = _extends({}, this.attrs.style, this.props.style);
12231 }
12232
12233 propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, this.props.className, this.attrs.className).filter(Boolean).join(' ');
12234
12235 return (0,react__WEBPACK_IMPORTED_MODULE_2__.createElement)(elementToBeCreated, propsForElement);
12236 };
12237
12238 StyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props, attrs) {
12239 var _this2 = this;
12240
12241 var context = _extends({}, props, { theme: theme });
12242
12243 if (!attrs.length) return context;
12244
12245 this.attrs = {};
12246
12247 attrs.forEach(function (attrDef) {
12248 var resolvedAttrDef = attrDef;
12249 var attrDefWasFn = false;
12250 var attr = void 0;
12251 var key = void 0;
12252
12253 if (isFunction(resolvedAttrDef)) {
12254 // $FlowFixMe
12255 resolvedAttrDef = resolvedAttrDef(context);
12256 attrDefWasFn = true;
12257 }
12258
12259 /* eslint-disable guard-for-in */
12260 // $FlowFixMe
12261 for (key in resolvedAttrDef) {
12262 attr = resolvedAttrDef[key];
12263
12264 if (!attrDefWasFn) {
12265 if (isFunction(attr) && !isDerivedReactComponent(attr) && !isStyledComponent(attr)) {
12266 if (true) {
12267 _this2.warnAttrsFnObjectKeyDeprecated(key, props.forwardedComponent.displayName);
12268 }
12269
12270 attr = attr(context);
12271
12272 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement(attr)) {
12273 _this2.warnNonStyledComponentAttrsObjectKey(key, props.forwardedComponent.displayName);
12274 }
12275 }
12276 }
12277
12278 _this2.attrs[key] = attr;
12279 context[key] = attr;
12280 }
12281 /* eslint-enable */
12282 });
12283
12284 return context;
12285 };
12286
12287 StyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {
12288 var _props$forwardedCompo2 = props.forwardedComponent,
12289 attrs = _props$forwardedCompo2.attrs,
12290 componentStyle = _props$forwardedCompo2.componentStyle,
12291 warnTooManyClasses = _props$forwardedCompo2.warnTooManyClasses;
12292
12293 // statically styled-components don't need to build an execution context object,
12294 // and shouldn't be increasing the number of class names
12295
12296 if (componentStyle.isStatic && !attrs.length) {
12297 return componentStyle.generateAndInjectStyles(EMPTY_OBJECT, this.styleSheet);
12298 }
12299
12300 var className = componentStyle.generateAndInjectStyles(this.buildExecutionContext(theme, props, attrs), this.styleSheet);
12301
12302 if ( true && warnTooManyClasses) warnTooManyClasses(className);
12303
12304 return className;
12305 };
12306
12307 return StyledComponent;
12308 }(react__WEBPACK_IMPORTED_MODULE_2__.Component);
12309
12310 function createStyledComponent(target, options, rules) {
12311 var isTargetStyledComp = isStyledComponent(target);
12312 var isClass = !isTag(target);
12313
12314 var _options$displayName = options.displayName,
12315 displayName = _options$displayName === undefined ? generateDisplayName(target) : _options$displayName,
12316 _options$componentId = options.componentId,
12317 componentId = _options$componentId === undefined ? generateId(ComponentStyle, options.displayName, options.parentComponentId) : _options$componentId,
12318 _options$ParentCompon = options.ParentComponent,
12319 ParentComponent = _options$ParentCompon === undefined ? StyledComponent : _options$ParentCompon,
12320 _options$attrs = options.attrs,
12321 attrs = _options$attrs === undefined ? EMPTY_ARRAY : _options$attrs;
12322
12323
12324 var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : options.componentId || componentId;
12325
12326 // fold the underlying StyledComponent attrs up (implicit extend)
12327 var finalAttrs =
12328 // $FlowFixMe
12329 isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs;
12330
12331 var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend)
12332 // $FlowFixMe
12333 target.componentStyle.rules.concat(rules) : rules, finalAttrs, styledComponentId);
12334
12335 /**
12336 * forwardRef creates a new interim component, which we'll take advantage of
12337 * instead of extending ParentComponent to create _another_ interim class
12338 */
12339 var WrappedStyledComponent = void 0;
12340 var forwardRef = function forwardRef(props, ref) {
12341 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(ParentComponent, _extends({}, props, { forwardedComponent: WrappedStyledComponent, forwardedRef: ref }));
12342 };
12343 forwardRef.displayName = displayName;
12344 WrappedStyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(forwardRef);
12345 WrappedStyledComponent.displayName = displayName;
12346
12347 // $FlowFixMe
12348 WrappedStyledComponent.attrs = finalAttrs;
12349 // $FlowFixMe
12350 WrappedStyledComponent.componentStyle = componentStyle;
12351
12352 // $FlowFixMe
12353 WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe
12354 Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY;
12355
12356 // $FlowFixMe
12357 WrappedStyledComponent.styledComponentId = styledComponentId;
12358
12359 // fold the underlying StyledComponent target up since we folded the styles
12360 // $FlowFixMe
12361 WrappedStyledComponent.target = isTargetStyledComp ? target.target : target;
12362
12363 // $FlowFixMe
12364 WrappedStyledComponent.withComponent = function withComponent(tag) {
12365 var previousComponentId = options.componentId,
12366 optionsToCopy = objectWithoutProperties(options, ['componentId']);
12367
12368
12369 var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));
12370
12371 var newOptions = _extends({}, optionsToCopy, {
12372 attrs: finalAttrs,
12373 componentId: newComponentId,
12374 ParentComponent: ParentComponent
12375 });
12376
12377 return createStyledComponent(tag, newOptions, rules);
12378 };
12379
12380 // $FlowFixMe
12381 Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
12382 get: function get$$1() {
12383 return this._foldedDefaultProps;
12384 },
12385 set: function set$$1(obj) {
12386 // $FlowFixMe
12387 this._foldedDefaultProps = isTargetStyledComp ? (0,merge_anything__WEBPACK_IMPORTED_MODULE_6__["default"])(target.defaultProps, obj) : obj;
12388 }
12389 });
12390
12391 if (true) {
12392 // $FlowFixMe
12393 WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);
12394 }
12395
12396 // $FlowFixMe
12397 WrappedStyledComponent.toString = function () {
12398 return '.' + WrappedStyledComponent.styledComponentId;
12399 };
12400
12401 if (isClass) {
12402 hoistNonReactStatics(WrappedStyledComponent, target, {
12403 // all SC-specific things should not be hoisted
12404 attrs: true,
12405 componentStyle: true,
12406 displayName: true,
12407 foldedComponentIds: true,
12408 styledComponentId: true,
12409 target: true,
12410 withComponent: true
12411 });
12412 }
12413
12414 return WrappedStyledComponent;
12415 }
12416
12417 //
12418 // Thanks to ReactDOMFactories for this handy list!
12419
12420 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',
12421
12422 // SVG
12423 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
12424
12425 //
12426
12427 var styled = function styled(tag) {
12428 return constructWithOptions(createStyledComponent, tag);
12429 };
12430
12431 // Shorthands for all valid HTML Elements
12432 domElements.forEach(function (domElement) {
12433 styled[domElement] = styled(domElement);
12434 });
12435
12436 //
12437
12438 var GlobalStyle = function () {
12439 function GlobalStyle(rules, componentId) {
12440 classCallCheck(this, GlobalStyle);
12441
12442 this.rules = rules;
12443 this.componentId = componentId;
12444 this.isStatic = isStaticRules(rules, EMPTY_ARRAY);
12445
12446 if (!StyleSheet.master.hasId(componentId)) {
12447 StyleSheet.master.deferredInject(componentId, []);
12448 }
12449 }
12450
12451 GlobalStyle.prototype.createStyles = function createStyles(executionContext, styleSheet) {
12452 var flatCSS = flatten(this.rules, executionContext, styleSheet);
12453 var css = stringifyRules(flatCSS, '');
12454
12455 styleSheet.inject(this.componentId, css);
12456 };
12457
12458 GlobalStyle.prototype.removeStyles = function removeStyles(styleSheet) {
12459 var componentId = this.componentId;
12460
12461 if (styleSheet.hasId(componentId)) {
12462 styleSheet.remove(componentId);
12463 }
12464 };
12465
12466 // TODO: overwrite in-place instead of remove+create?
12467
12468
12469 GlobalStyle.prototype.renderStyles = function renderStyles(executionContext, styleSheet) {
12470 this.removeStyles(styleSheet);
12471 this.createStyles(executionContext, styleSheet);
12472 };
12473
12474 return GlobalStyle;
12475 }();
12476
12477 //
12478
12479 // place our cache into shared context so it'll persist between HMRs
12480 if (IS_BROWSER) {
12481 window.scCGSHMRCache = {};
12482 }
12483
12484 function createGlobalStyle(strings) {
12485 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12486 interpolations[_key - 1] = arguments[_key];
12487 }
12488
12489 var rules = css.apply(undefined, [strings].concat(interpolations));
12490 var id = 'sc-global-' + murmurhash(JSON.stringify(rules));
12491 var style = new GlobalStyle(rules, id);
12492
12493 var GlobalStyleComponent = function (_React$Component) {
12494 inherits(GlobalStyleComponent, _React$Component);
12495
12496 function GlobalStyleComponent(props) {
12497 classCallCheck(this, GlobalStyleComponent);
12498
12499 var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
12500
12501 var _this$constructor = _this.constructor,
12502 globalStyle = _this$constructor.globalStyle,
12503 styledComponentId = _this$constructor.styledComponentId;
12504
12505
12506 if (IS_BROWSER) {
12507 window.scCGSHMRCache[styledComponentId] = (window.scCGSHMRCache[styledComponentId] || 0) + 1;
12508 }
12509
12510 /**
12511 * This fixes HMR compatibility. Don't ask me why, but this combination of
12512 * caching the closure variables via statics and then persisting the statics in
12513 * state works across HMR where no other combination did. ¯\_(ツ)_/¯
12514 */
12515 _this.state = {
12516 globalStyle: globalStyle,
12517 styledComponentId: styledComponentId
12518 };
12519 return _this;
12520 }
12521
12522 GlobalStyleComponent.prototype.componentWillUnmount = function componentWillUnmount() {
12523 if (window.scCGSHMRCache[this.state.styledComponentId]) {
12524 window.scCGSHMRCache[this.state.styledComponentId] -= 1;
12525 }
12526 /**
12527 * Depending on the order "render" is called this can cause the styles to be lost
12528 * until the next render pass of the remaining instance, which may
12529 * not be immediate.
12530 */
12531 if (window.scCGSHMRCache[this.state.styledComponentId] === 0) {
12532 this.state.globalStyle.removeStyles(this.styleSheet);
12533 }
12534 };
12535
12536 GlobalStyleComponent.prototype.render = function render() {
12537 var _this2 = this;
12538
12539 if ( true && react__WEBPACK_IMPORTED_MODULE_2___default().Children.count(this.props.children)) {
12540 // eslint-disable-next-line no-console
12541 console.warn('The global style component ' + this.state.styledComponentId + ' was given child JSX. createGlobalStyle does not render children.');
12542 }
12543
12544 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12545 StyleSheetConsumer,
12546 null,
12547 function (styleSheet) {
12548 _this2.styleSheet = styleSheet || StyleSheet.master;
12549
12550 var globalStyle = _this2.state.globalStyle;
12551
12552
12553 if (globalStyle.isStatic) {
12554 globalStyle.renderStyles(STATIC_EXECUTION_CONTEXT, _this2.styleSheet);
12555
12556 return null;
12557 } else {
12558 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12559 ThemeConsumer,
12560 null,
12561 function (theme) {
12562 // $FlowFixMe
12563 var defaultProps = _this2.constructor.defaultProps;
12564
12565
12566 var context = _extends({}, _this2.props);
12567
12568 if (typeof theme !== 'undefined') {
12569 context.theme = determineTheme(_this2.props, theme, defaultProps);
12570 }
12571
12572 globalStyle.renderStyles(context, _this2.styleSheet);
12573
12574 return null;
12575 }
12576 );
12577 }
12578 }
12579 );
12580 };
12581
12582 return GlobalStyleComponent;
12583 }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
12584
12585 GlobalStyleComponent.globalStyle = style;
12586 GlobalStyleComponent.styledComponentId = id;
12587
12588
12589 return GlobalStyleComponent;
12590 }
12591
12592 //
12593
12594 var replaceWhitespace = function replaceWhitespace(str) {
12595 return str.replace(/\s|\\n/g, '');
12596 };
12597
12598 function keyframes(strings) {
12599 /* Warning if you've used keyframes on React Native */
12600 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12601 // eslint-disable-next-line no-console
12602 console.warn('`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.');
12603 }
12604
12605 for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12606 interpolations[_key - 1] = arguments[_key];
12607 }
12608
12609 var rules = css.apply(undefined, [strings].concat(interpolations));
12610
12611 var name = generateAlphabeticName(murmurhash(replaceWhitespace(JSON.stringify(rules))));
12612
12613 return new Keyframes(name, stringifyRules(rules, name, '@keyframes'));
12614 }
12615
12616 //
12617
12618 var withTheme = (function (Component$$1) {
12619 var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
12620 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(
12621 ThemeConsumer,
12622 null,
12623 function (theme) {
12624 // $FlowFixMe
12625 var defaultProps = Component$$1.defaultProps;
12626
12627 var themeProp = determineTheme(props, theme, defaultProps);
12628
12629 if ( true && themeProp === undefined) {
12630 // eslint-disable-next-line no-console
12631 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) + '"');
12632 }
12633
12634 return react__WEBPACK_IMPORTED_MODULE_2___default().createElement(Component$$1, _extends({}, props, { theme: themeProp, ref: ref }));
12635 }
12636 );
12637 });
12638
12639 hoistNonReactStatics(WithTheme, Component$$1);
12640
12641 WithTheme.displayName = 'WithTheme(' + getComponentName(Component$$1) + ')';
12642
12643 return WithTheme;
12644 });
12645
12646 //
12647
12648 /* eslint-disable */
12649 var __DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS = {
12650 StyleSheet: StyleSheet
12651 };
12652
12653 //
12654
12655 /* Warning if you've imported this file on React Native */
12656 if ( true && typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
12657 // eslint-disable-next-line no-console
12658 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');
12659 }
12660
12661 /* Warning if there are several instances of styled-components */
12662 if ( true && typeof window !== 'undefined' && typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Node.js') === -1 && navigator.userAgent.indexOf('jsdom') === -1) {
12663 window['__styled-components-init__'] = window['__styled-components-init__'] || 0;
12664
12665 if (window['__styled-components-init__'] === 1) {
12666 // eslint-disable-next-line no-console
12667 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.');
12668 }
12669
12670 window['__styled-components-init__'] += 1;
12671 }
12672
12673 //
12674
12675 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);
12676
12677 //# sourceMappingURL=styled-components.browser.esm.js.map
12678
12679
12680 /***/ }),
12681
12682 /***/ "./node_modules/stylis-rule-sheet/index.js":
12683 /*!*************************************************!*\
12684 !*** ./node_modules/stylis-rule-sheet/index.js ***!
12685 \*************************************************/
12686 /***/ ((module) => {
12687
12688 (function (factory) {
12689 true ? (module['exports'] = factory()) :
12690 0
12691 }(function () {
12692
12693 'use strict'
12694
12695 return function (insertRule) {
12696 var delimiter = '/*|*/'
12697 var needle = delimiter+'}'
12698
12699 function toSheet (block) {
12700 if (block)
12701 try {
12702 insertRule(block + '}')
12703 } catch (e) {}
12704 }
12705
12706 return function ruleSheet (context, content, selectors, parents, line, column, length, ns, depth, at) {
12707 switch (context) {
12708 // property
12709 case 1:
12710 // @import
12711 if (depth === 0 && content.charCodeAt(0) === 64)
12712 return insertRule(content+';'), ''
12713 break
12714 // selector
12715 case 2:
12716 if (ns === 0)
12717 return content + delimiter
12718 break
12719 // at-rule
12720 case 3:
12721 switch (ns) {
12722 // @font-face, @page
12723 case 102:
12724 case 112:
12725 return insertRule(selectors[0]+content), ''
12726 default:
12727 return content + (at === 0 ? delimiter : '')
12728 }
12729 case -2:
12730 content.split(needle).forEach(toSheet)
12731 }
12732 }
12733 }
12734 }))
12735
12736
12737 /***/ }),
12738
12739 /***/ "./node_modules/stylis/stylis.min.js":
12740 /*!*******************************************!*\
12741 !*** ./node_modules/stylis/stylis.min.js ***!
12742 \*******************************************/
12743 /***/ ((module) => {
12744
12745 !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});
12746 //# sourceMappingURL=stylis.min.js.map
12747
12748 /***/ }),
12749
12750 /***/ "react":
12751 /*!************************!*\
12752 !*** external "React" ***!
12753 \************************/
12754 /***/ ((module) => {
12755
12756 "use strict";
12757 module.exports = window["React"];
12758
12759 /***/ }),
12760
12761 /***/ "jquery":
12762 /*!*************************!*\
12763 !*** external "jQuery" ***!
12764 \*************************/
12765 /***/ ((module) => {
12766
12767 "use strict";
12768 module.exports = window["jQuery"];
12769
12770 /***/ }),
12771
12772 /***/ "@wordpress/blocks":
12773 /*!********************************!*\
12774 !*** external ["wp","blocks"] ***!
12775 \********************************/
12776 /***/ ((module) => {
12777
12778 "use strict";
12779 module.exports = window["wp"]["blocks"];
12780
12781 /***/ }),
12782
12783 /***/ "@wordpress/components":
12784 /*!************************************!*\
12785 !*** external ["wp","components"] ***!
12786 \************************************/
12787 /***/ ((module) => {
12788
12789 "use strict";
12790 module.exports = window["wp"]["components"];
12791
12792 /***/ }),
12793
12794 /***/ "@wordpress/data":
12795 /*!******************************!*\
12796 !*** external ["wp","data"] ***!
12797 \******************************/
12798 /***/ ((module) => {
12799
12800 "use strict";
12801 module.exports = window["wp"]["data"];
12802
12803 /***/ }),
12804
12805 /***/ "@wordpress/edit-post":
12806 /*!**********************************!*\
12807 !*** external ["wp","editPost"] ***!
12808 \**********************************/
12809 /***/ ((module) => {
12810
12811 "use strict";
12812 module.exports = window["wp"]["editPost"];
12813
12814 /***/ }),
12815
12816 /***/ "@wordpress/element":
12817 /*!*********************************!*\
12818 !*** external ["wp","element"] ***!
12819 \*********************************/
12820 /***/ ((module) => {
12821
12822 "use strict";
12823 module.exports = window["wp"]["element"];
12824
12825 /***/ }),
12826
12827 /***/ "@wordpress/i18n":
12828 /*!******************************!*\
12829 !*** external ["wp","i18n"] ***!
12830 \******************************/
12831 /***/ ((module) => {
12832
12833 "use strict";
12834 module.exports = window["wp"]["i18n"];
12835
12836 /***/ }),
12837
12838 /***/ "@wordpress/plugins":
12839 /*!*********************************!*\
12840 !*** external ["wp","plugins"] ***!
12841 \*********************************/
12842 /***/ ((module) => {
12843
12844 "use strict";
12845 module.exports = window["wp"]["plugins"];
12846
12847 /***/ }),
12848
12849 /***/ "./node_modules/@linaria/react/dist/index.mjs":
12850 /*!****************************************************!*\
12851 !*** ./node_modules/@linaria/react/dist/index.mjs ***!
12852 \****************************************************/
12853 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12854
12855 "use strict";
12856 __webpack_require__.r(__webpack_exports__);
12857 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12858 /* harmony export */ "styled": () => (/* binding */ styled_default)
12859 /* harmony export */ });
12860 /* 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");
12861 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
12862 /* harmony import */ var _linaria_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @linaria/core */ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs");
12863 // src/styled.ts
12864
12865
12866
12867 var isCapital = (ch) => ch.toUpperCase() === ch;
12868 var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
12869 var omit = (obj, keys) => {
12870 const res = {};
12871 Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
12872 res[key] = obj[key];
12873 });
12874 return res;
12875 };
12876 function filterProps(asIs, props, omitKeys) {
12877 const filteredProps = omit(props, omitKeys);
12878 if (!asIs) {
12879 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"];
12880 Object.keys(filteredProps).forEach((key) => {
12881 if (!interopValidAttr.default(key)) {
12882 delete filteredProps[key];
12883 }
12884 });
12885 }
12886 return filteredProps;
12887 }
12888 var warnIfInvalid = (value, componentName) => {
12889 if (true) {
12890 if (typeof value === "string" || typeof value === "number" && isFinite(value)) {
12891 return;
12892 }
12893 const stringified = typeof value === "object" ? JSON.stringify(value) : String(value);
12894 console.warn(
12895 `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.`
12896 );
12897 }
12898 };
12899 function styled(tag) {
12900 return (options) => {
12901 if (true) {
12902 if (Array.isArray(options)) {
12903 throw new Error(
12904 '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'
12905 );
12906 }
12907 }
12908 const render = (props, ref) => {
12909 const { as: component = tag, class: className } = props;
12910 const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
12911 const filteredProps = filterProps(shouldKeepProps, props, [
12912 "as",
12913 "class"
12914 ]);
12915 filteredProps.ref = ref;
12916 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);
12917 const { vars } = options;
12918 if (vars) {
12919 const style = {};
12920 for (const name in vars) {
12921 const variable = vars[name];
12922 const result = variable[0];
12923 const unit = variable[1] || "";
12924 const value = typeof result === "function" ? result(props) : result;
12925 warnIfInvalid(value, options.name);
12926 style[`--${name}`] = `${value}${unit}`;
12927 }
12928 const ownStyle = filteredProps.style || {};
12929 const keys = Object.keys(ownStyle);
12930 if (keys.length > 0) {
12931 keys.forEach((key) => {
12932 style[key] = ownStyle[key];
12933 });
12934 }
12935 filteredProps.style = style;
12936 }
12937 if (tag.__linaria && tag !== component) {
12938 filteredProps.as = component;
12939 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(tag, filteredProps);
12940 }
12941 return react__WEBPACK_IMPORTED_MODULE_1__.createElement(component, filteredProps);
12942 };
12943 const Result = react__WEBPACK_IMPORTED_MODULE_1__.forwardRef ? react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(render) : (props) => {
12944 const rest = omit(props, ["innerRef"]);
12945 return render(rest, props.innerRef);
12946 };
12947 Result.displayName = options.name;
12948 Result.__linaria = {
12949 className: options.class,
12950 extends: tag
12951 };
12952 return Result;
12953 };
12954 }
12955 var styled_default = true ? new Proxy(styled, {
12956 get(o, prop) {
12957 return o(prop);
12958 }
12959 }) : 0;
12960
12961 //# sourceMappingURL=index.mjs.map
12962
12963 /***/ }),
12964
12965 /***/ "./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs":
12966 /*!*******************************************************************************!*\
12967 !*** ./node_modules/@linaria/react/node_modules/@linaria/core/dist/index.mjs ***!
12968 \*******************************************************************************/
12969 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12970
12971 "use strict";
12972 __webpack_require__.r(__webpack_exports__);
12973 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12974 /* harmony export */ "css": () => (/* binding */ css_default),
12975 /* harmony export */ "cx": () => (/* binding */ cx_default)
12976 /* harmony export */ });
12977 // src/css.ts
12978 var css = () => {
12979 throw new Error(
12980 'Using the "css" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly.'
12981 );
12982 };
12983 var css_default = css;
12984
12985 // src/cx.ts
12986 var cx = function cx2() {
12987 const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12988 const atomicClasses = {};
12989 const nonAtomicClasses = [];
12990 presentClassNames.forEach((arg) => {
12991 const individualClassNames = arg ? arg.split(" ") : [];
12992 individualClassNames.forEach((className) => {
12993 if (className.startsWith("atm_")) {
12994 const [, keyHash] = className.split("_");
12995 atomicClasses[keyHash] = className;
12996 } else {
12997 nonAtomicClasses.push(className);
12998 }
12999 });
13000 });
13001 const result = [];
13002 for (const keyHash in atomicClasses) {
13003 if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
13004 result.push(atomicClasses[keyHash]);
13005 }
13006 }
13007 result.push(...nonAtomicClasses);
13008 return result.join(" ");
13009 };
13010 var cx_default = cx;
13011
13012 //# sourceMappingURL=index.mjs.map
13013
13014 /***/ })
13015
13016 /******/ });
13017 /************************************************************************/
13018 /******/ // The module cache
13019 /******/ var __webpack_module_cache__ = {};
13020 /******/
13021 /******/ // The require function
13022 /******/ function __webpack_require__(moduleId) {
13023 /******/ // Check if module is in cache
13024 /******/ var cachedModule = __webpack_module_cache__[moduleId];
13025 /******/ if (cachedModule !== undefined) {
13026 /******/ return cachedModule.exports;
13027 /******/ }
13028 /******/ // Create a new module (and put it into the cache)
13029 /******/ var module = __webpack_module_cache__[moduleId] = {
13030 /******/ // no module.id needed
13031 /******/ // no module.loaded needed
13032 /******/ exports: {}
13033 /******/ };
13034 /******/
13035 /******/ // Execute the module function
13036 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13037 /******/
13038 /******/ // Return the exports of the module
13039 /******/ return module.exports;
13040 /******/ }
13041 /******/
13042 /************************************************************************/
13043 /******/ /* webpack/runtime/compat get default export */
13044 /******/ (() => {
13045 /******/ // getDefaultExport function for compatibility with non-harmony modules
13046 /******/ __webpack_require__.n = (module) => {
13047 /******/ var getter = module && module.__esModule ?
13048 /******/ () => (module['default']) :
13049 /******/ () => (module);
13050 /******/ __webpack_require__.d(getter, { a: getter });
13051 /******/ return getter;
13052 /******/ };
13053 /******/ })();
13054 /******/
13055 /******/ /* webpack/runtime/define property getters */
13056 /******/ (() => {
13057 /******/ // define getter functions for harmony exports
13058 /******/ __webpack_require__.d = (exports, definition) => {
13059 /******/ for(var key in definition) {
13060 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13061 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
13062 /******/ }
13063 /******/ }
13064 /******/ };
13065 /******/ })();
13066 /******/
13067 /******/ /* webpack/runtime/global */
13068 /******/ (() => {
13069 /******/ __webpack_require__.g = (function() {
13070 /******/ if (typeof globalThis === 'object') return globalThis;
13071 /******/ try {
13072 /******/ return this || new Function('return this')();
13073 /******/ } catch (e) {
13074 /******/ if (typeof window === 'object') return window;
13075 /******/ }
13076 /******/ })();
13077 /******/ })();
13078 /******/
13079 /******/ /* webpack/runtime/hasOwnProperty shorthand */
13080 /******/ (() => {
13081 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13082 /******/ })();
13083 /******/
13084 /******/ /* webpack/runtime/make namespace object */
13085 /******/ (() => {
13086 /******/ // define __esModule on exports
13087 /******/ __webpack_require__.r = (exports) => {
13088 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
13089 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
13090 /******/ }
13091 /******/ Object.defineProperty(exports, '__esModule', { value: true });
13092 /******/ };
13093 /******/ })();
13094 /******/
13095 /******/ /* webpack/runtime/nonce */
13096 /******/ (() => {
13097 /******/ __webpack_require__.nc = undefined;
13098 /******/ })();
13099 /******/
13100 /************************************************************************/
13101 var __webpack_exports__ = {};
13102 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
13103 (() => {
13104 "use strict";
13105 /*!**************************************!*\
13106 !*** ./scripts/entries/gutenberg.ts ***!
13107 \**************************************/
13108 __webpack_require__.r(__webpack_exports__);
13109 /* harmony import */ var _gutenberg_FormBlock_registerFormBlock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gutenberg/FormBlock/registerFormBlock */ "./scripts/gutenberg/FormBlock/registerFormBlock.tsx");
13110 /* harmony import */ var _gutenberg_Sidebar_contentType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../gutenberg/Sidebar/contentType */ "./scripts/gutenberg/Sidebar/contentType.tsx");
13111 /* harmony import */ var _gutenberg_MeetingsBlock_registerMeetingBlock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../gutenberg/MeetingsBlock/registerMeetingBlock */ "./scripts/gutenberg/MeetingsBlock/registerMeetingBlock.tsx");
13112 /* harmony import */ var _utils_backgroundAppUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/backgroundAppUtils */ "./scripts/utils/backgroundAppUtils.ts");
13113
13114
13115
13116
13117 (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]);
13118 })();
13119
13120 /******/ })()
13121 ;
13122 //# sourceMappingURL=gutenberg.js.map